Commit 5e9ed294 authored by 郑秀明's avatar 郑秀明

Merge commit '0a251a21'

# Conflicts:
#	.DS_Store
#	manifest.json
#	package.json
#	pages.json
#	static/.DS_Store
parents 552c04f7 0a251a21
......@@ -2,7 +2,7 @@
"name": "shop_mobile_uni",
"appid": "__UNI__F904656",
"description": "",
"versionName": "1.0.12",
"versionName": "1.0.13",
"versionCode": "100",
"transformPx": false,
"app-plus": {
......@@ -51,7 +51,7 @@
"mode": "history",
"base": "/uni"
},
"publicPath": "https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/prod/1.0.12/",
"publicPath": "https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/mirror/1.0.13/",
"optimization": {
"treeShaking": {
"enable": true
......
......@@ -506,6 +506,11 @@
"supports-color": "^2.0.0"
}
},
"charenc": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
"integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc="
},
"chokidar": {
"version": "2.1.8",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
......@@ -711,6 +716,11 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
"crypt": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
"integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs="
},
"d": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
......@@ -2256,8 +2266,7 @@
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
"dev": true
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-data-descriptor": {
"version": "0.1.4",
......@@ -2713,6 +2722,16 @@
}
}
},
"md5": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz",
"integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=",
"requires": {
"charenc": "~0.0.1",
"crypt": "~0.0.1",
"is-buffer": "~1.1.1"
}
},
"merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/merge-stream/download/merge-stream-2.0.0.tgz",
......
{
"name": "shop_mobile_uni",
"version": "1.0.12",
"version": "1.0.13",
"description": "谛宝多多商城",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
......@@ -27,6 +27,7 @@
"dependencies": {
"clipboard": "^2.0.6",
"jweixin-module": "^1.6.0",
"md5": "^2.2.1",
"moment": "^2.24.0"
}
}
......@@ -132,6 +132,18 @@
"style": {
"navigationBarTitleText": "物流查询-谛宝多多商城"
}
},
{
"path": "pages/setaccount/setaccount",
"style": {
"navigationBarTitleText": "账号设置-谛宝多多商城"
}
},
{
"path": "pages/setinfo/setinfo",
"style": {
"navigationBarTitleText": "账号设置-谛宝多多商城"
}
}
],
"globalStyle": {
......
<template>
<view class="main">
<view class="main_content">
<TopBar title="账号设置"/>
<view class="account_base_info flex">
<view class="flex flex_center">
<image class="portrait" :src="data.portrait || $defaultPortrait" @click="uploadImage()"></image>
<view class="flex flex_center base_info">
<text class="customer_name">{{data.customer_name}}</text>
<text class="custommer_integral">总积分:{{data.total_integral}}</text>
</view>
</view>
</view>
<view class="flex set_item" @click="changeAddress()">
<text class="set_title">收货地址管理</text>
<text class="eosfont right_icon">&#xe608;</text>
</view>
<view class="flex set_item" @click="changePass('phone')">
<text class="set_title">更换绑定手机号</text>
<view class="flex" style="align-items: center;">
<text class="phone_num">{{data.phone_mob.replace(/(\d{3})\d*(\d{4})/,"$1****$2")}}</text>
<text class="eosfont right_icon">&#xe608;</text>
</view>
</view>
<view class="flex set_item" @click="changePass('pay')">
<text class="set_title">修改支付密码</text>
<text class="eosfont right_icon">&#xe608;</text>
</view>
<view class="flex set_item" @click="changePass('login')">
<text class="set_title">修改登录密码</text>
<text class="eosfont right_icon">&#xe608;</text>
</view>
</view>
<view class="log_out" @click="logOut()">退出登录</view>
<BottomBar />
</view>
</template>
<script>
import TopBar from '../../components/TopBar/TopBar';
import BottomBar from "@/components/BottomBar/BottomBar.vue";
import { php } from '../../common/host.js';
export default {
data() {
return {
data: {
portrait: '',
customer_name: '',
total_integral: '',
phone_mob: ''
}
}
},
onLoad() {
uni.request({
url: '/uni/api/member/profile',
method: 'GET',
dataType: 'json',
success: (res) => {
this.data = res.data.data
}
})
},
methods: {
changeAddress() {
this.$jump(`${php}app=my_address`);
},
changePass(type) {
this.$jump(`/pages/setinfo/setinfo?type=${type}&phone=${this.data.phone_mob}`, 2)
},
uploadImage() {
uni.chooseImage({
sizeType: ['compress'],
count:1,
success: (res) => {
const tempFilePaths = res.tempFilePaths;
uni.showLoading({
title: '上传中'
})
uni.uploadFile({
url: '/uni/api/resources',
filePath: tempFilePaths[0],
name: 'file',
success: (uploadFileRes) => {
const data = JSON.parse(uploadFileRes.data)
uni.request({
url: '/uni/api/member/change_portrait',
method: 'POST',
data: {
portrait: data.data
},
dataType: 'json',
success: (result) => {
if(result.data.code === 0) {
uni.hideLoading();
uni.showToast({
title: '头像修改成功',
icon: 'none'
});
this.data.portrait = data.data;
}
}
})
}
});
}
})
},
logOut() {
this.$jump(`${php}app=member&act=logout&synlogout=1`);
}
},
components: {
TopBar,
BottomBar
}
}
</script>
<style lang="less" scoped>
.main {
padding-top: 80rpx;
height: 1334rpx;
box-sizing: border-box;
background: #f5f5f5;
}
.flex {
display: flex;
}
.flex_center {
justify-content: center;
}
.right_icon {
font-size: 24rpx;
color: #7C7C7C;
}
.main_content {
background-color: #fff;
.account_base_info {
height: 160rpx;
align-items: center;
justify-content: space-between;
border-bottom: 1Px solid #ECECEC;
padding: 0 24rpx;
.base_info {
flex-direction: column;
}
.portrait {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.customer_name {
color: #16171C;
font-size: 28rpx;
line-height: 40rpx;
}
.custommer_integral {
color: #7C7C7C;
font-size: 22rpx;
line-height: 32rpx;
}
}
.set_item {
height: 92rpx;
justify-content: space-between;
align-items: center;
padding: 0 24rpx;
border-bottom: 1Px solid #d5d5d5;
.set_title {
font-size: 28rpx;
color: #212121;
line-height: 40rpx;
}
.phone_num {
color: #7C7C7C;
font-size: 26rpx;
line-height: 36rpx;
margin-right: 16rpx;
}
}
.set_item:last-child {
border-bottom: none;
}
}
.log_out {
height: 92rpx;
width: 100%;
line-height: 92rpx;
background-color: #fff;
text-align: center;
color: #212121;
font-size: 28rpx;
position: fixed;
bottom: 98rpx;
left: 0;
}
</style>
<template>
<view class="main">
<TopBar title="修改登录密码"/>
<view v-if="!next">
<view class="set_title">请完成以下认证</view>
<view class="set_subtitle">请输入{{phone.replace(/(\d{3})\d*(\d{4})/,"$1****$2")}}收到的短信验证码</view>
<view class="flex confirm_box">
<input type="text" class="code_input" v-model="code" placeholder="请输入手机验证码">
<text class="get_code" v-if="codeFlag" @click="getCode()">获取验证码</text>
<text v-else class="get_code grey_bg">{{countdown}}</text>
</view>
<view class="nextstep" @click="nextStep()">下一步</view>
</view>
<view v-else>
<view class="set_title" style="margin-top: 40rpx;">设置新登录密码</view>
<view class="set_tip">密码至少包含字母/数字,长度不小于6</view>
<input password class="set_input" v-model="new_password" placeholder="设置6位登录密码">
<input password class="set_input" v-model="new_password_repeat" placeholder="再一次输入登录密码">
<view class="conform_btn" @click="checkPass()">确认</view>
</view>
<view class="success_page" v-if="changeSuccess">
<image src="../../../static/common/icon_chenggong@2x.png"></image>
<text>修改成功!</text>
<view class="conform_btn" @click="returnHome()">确认</view>
</view>
</view>
</template>
<script>
import TopBar from '@/components/TopBar/TopBar';
import md5 from 'md5';
import { php } from '@/common/host.js';
export default {
data() {
return {
old_password: '',
new_password: '',
new_password_repeat: '',
changeSuccess: false,
next: false,
codeFlag: true,
countdown: '(60)重新获取',
code: ''
}
},
props: {
phone: {
type: String
}
},
methods: {
getCode() {
if(this.codeFlag) {
uni.request({
url: `/uni/api/mobile_msg/change/${this.phone}`,
method: 'GET',
dataType: 'json',
success: (res) => {
if(res.data.code === 0) {
uni.showToast({
title: '短信已发送',
icon: 'none'
})
}
}
});
let seconds = 60;
this.codeFlag = false;
let timer = setInterval(() => {
seconds-=1;
this.countdown = `(${seconds})重新获取`;
if(seconds === 0) {
clearInterval(timer);
this.codeFlag = true;
this.countdown = '(60)重新获取';
}
}, 1000);
}
},
nextStep() {
if(!/^\d{6}$/.test(this.code)) {
uni.showToast({
title: '请输入6位数字验证码',
icon: 'none'
})
return
}
uni.request({
url: `/uni/api/member/check_code/${this.code}`,
method: 'GET',
dataType: 'json',
success: (res) => {
if(res.data.code === 0) {
this.next = true;
this.countdown = '(60)重新获取';
} else {
uni.showToast({
title: res.data.message,
icon: 'none'
});
}
}
})
},
checkPass() {
const reg = /^[0-9a-zA-Z_]{6,}$/;
if(this.new_password !== this.new_password_repeat) {
uni.showToast({
title: '两次密码输入不一致',
icon: 'none'
});
return
}
if(!reg.test(this.new_password)) {
uni.showToast({
title: '密码由字母、数字或下划线组成,长度不小于6位',
icon: 'none',
duration: 2000
});
return
}
uni.request({
url: '/uni/api/member/change_password',
method: 'POST',
data: {
newpassword: md5(this.new_password),
confirm_password: md5(this.new_password_repeat)
},
dataType: 'json',
success: (res) => {
if(res.data.code === 0) {
uni.removeStorage({
key: 'goods_type'
});
this.changeSuccess = true;
} else {
uni.showToast({
title: res.data.message,
icon: 'none'
});
}
}
})
},
returnHome() {
this.$jump(`${php}app=member&act=logout`);
}
},
components: {
TopBar
}
}
</script>
<style lang="less" scoped>
.main {
padding: 80rpx 40rpx 0;
.flex {
display: flex;
}
.set_title {
font-size: 32rpx;
color: #212121;
line-height: 44rpx;
margin-top: 24rpx;
}
.set_subtitle {
font-size: 28rpx;
color: #212121;
line-height: 40rpx;
margin-top: 16rpx;
font-size: 30rpx;
}
.set_tip {
color: #7C7C7C;
font-size: 26rpx;
line-height: 36rpx;
margin-top: 4rpx;
}
.set_input {
width: 670rpx;
height: 88rpx;
line-height: 88rpx;
background-color: #f5f5f5;
padding-left: 20rpx;
box-sizing: border-box;
border-radius: 8rpx;
margin-top: 20rpx;
}
.set_input::placeholder {
color: #aeaeae;
}
.conform_btn {
background-color: #FFCD00;
border-radius: 16rpx;
text-align: center;
width: 670rpx;
height: 88rpx;
line-height: 88rpx;
margin: 80rpx auto 0;
font-size: 30rpx;
}
.success_page {
display: flex;
flex-direction: column;
align-items: center;
position: absolute;
left: 0;
top: 0;
z-index: 10;
width: 100%;
height: 100vh;
background-color: #fff;
image {
width: 152rpx;
height: 152rpx;
margin-top: 282rpx;
}
text {
font-size: 32rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
line-height: 44rpx;
margin: 16rpx auto 78rpx;
}
}
}
.nextstep {
background-color: #FFCD00;
border-radius: 16rpx;
text-align: center;
width: 670rpx;
height: 88rpx;
line-height: 88rpx;
margin: 208rpx auto 0;
font-size: 30rpx;
}
.confirm_box {
justify-content: space-between;
margin-top: 24rpx;
.code_input {
width: 400rpx;
height: 88rpx;
line-height: 88rpx;
background-color: #f5f5f5;
color: #212121;
font-size: 30rpx;
padding-left: 20rpx;
box-sizing: border-box;
border-radius: 8rpx;
}
.code_input::placeholder {
color: #aeaeae;
}
.get_code {
width: 250rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 30rpx;
background-color: #FFCD00;
border-radius: 16rpx;
}
.grey_bg {
background-color: #ECECEC;
color: #7c7c7c;
}
}
</style>
\ No newline at end of file
<template>
<view class="main">
<TopBar title="修改支付密码"/>
<view v-if="!next">
<view class="set_title">请完成以下认证</view>
<view class="set_subtitle">请输入{{phone.replace(/(\d{3})\d*(\d{4})/,"$1****$2")}}收到的短信验证码</view>
<view class="flex confirm_box">
<input type="text" class="code_input" v-model="code" placeholder="请输入手机验证码">
<text class="get_code" v-if="codeFlag" @click="getCode()">获取验证码</text>
<text v-else class="get_code grey_bg">{{countdown}}</text>
</view>
<view class="nextstep" @click="nextStep()">下一步</view>
</view>
<view v-else>
<view class="set_title" style="margin-top: 40rpx;">请完成以下认证</view>
<view class="set_title" style="margin-top: 40rpx;">设置新的支付密码</view>
<input password class="set_input" v-model="new_password" placeholder="设置6位支付密码">
<input password class="set_input" v-model="new_password_repeat" placeholder="再一次输入支付密码">
<view class="btn" style="margin-top: 80rpx;" @click="checkPass()">确认</view>
</view>
<view class="success_page" v-if="changeSuccess">
<image src="../../../static/common/icon_chenggong@2x.png"></image>
<text>修改成功!</text>
<view class="btn" @click="returnHome()">确认</view>
</view>
</view>
</template>
<script>
import TopBar from '@/components/TopBar/TopBar';
import md5 from 'md5';
export default {
data() {
return {
old_password: '',
new_password: '',
new_password_repeat: '',
changeSuccess: false,
next: false,
codeFlag: true,
countdown: '(60)重新获取',
code: '',
}
},
props: {
phone: {
type: String
}
},
methods: {
getCode() {
if(this.codeFlag) {
uni.request({
url: `/uni/api/mobile_msg/change/${this.phone}`,
method: 'GET',
dataType: 'json',
success: (res) => {
if(res.data.code === 0) {
uni.showToast({
title: '短信已发送',
icon: 'none'
})
}
}
});
let seconds = 60;
this.codeFlag = false;
let timer = setInterval(() => {
seconds-=1;
this.countdown = `(${seconds})重新获取`;
if(seconds === 0) {
clearInterval(timer);
this.codeFlag = true;
this.countdown = '(60)重新获取';
}
}, 1000);
}
},
nextStep() {
if(!/^\d{6}$/.test(this.code)) {
uni.showToast({
title: '请输入6位数字验证码',
icon: 'none'
})
return
}
uni.request({
url: `/uni/api/member/check_code/${this.code}`,
method: 'GET',
dataType: 'json',
success: (res) => {
if(res.data.code === 0) {
this.next = true;
this.countdown = '(60)重新获取';
} else {
uni.showToast({
title: res.data.message,
icon: 'none'
});
}
}
})
},
checkPass() {
if(this.new_password !== this.new_password_repeat) {
uni.showToast({
title: '两次密码输入不一致',
icon: 'none'
});
return
}
if(!/^[0-9a-zA-Z_]{6}$/.test(this.new_password)) {
uni.showToast({
title: '请设置6位支付密码,可以是字母、数字或下划线',
icon: 'none',
duration: 2000
});
return
}
uni.request({
url: '/uni/api/member/change_payword',
method: 'POST',
data: {
old_password: md5(this.old_password),
newpassword: md5(this.new_password),
confirm_password: md5(this.new_password_repeat)
},
dataType: 'json',
success: (res) => {
if(res.data.code === 0) {
this.changeSuccess = true;
} else {
uni.showToast({
title: res.data.message,
icon: 'none'
});
}
}
})
},
returnHome() {
this.$jump('/pages/setaccount/setaccount', 2);
}
},
components: {
TopBar
}
}
</script>
<style lang="less" scoped>
.main {
padding: 80rpx 40rpx 0;
.flex {
display: flex;
}
.set_title {
font-size: 32rpx;
color: #212121;
line-height: 44rpx;
margin-top: 24rpx;
}
.set_subtitle {
font-size: 28rpx;
color: #212121;
line-height: 40rpx;
margin-top: 16rpx;
font-size: 30rpx;
}
.set_tip {
color: #7C7C7C;
font-size: 26rpx;
line-height: 36rpx;
margin-top: 4rpx;
}
.set_input {
width: 670rpx;
height: 88rpx;
line-height: 88rpx;
background-color: #f5f5f5;
padding-left: 20rpx;
box-sizing: border-box;
border-radius: 8rpx;
margin-top: 20rpx;
}
.set_input::placeholder {
color: #aeaeae;
}
.btn {
background-color: #FFCD00;
border-radius: 16rpx;
text-align: center;
width: 670rpx;
height: 88rpx;
line-height: 88rpx;
margin: 162rpx auto 0;
font-size: 30rpx;
}
.success_page {
display: flex;
flex-direction: column;
align-items: center;
position: absolute;
left: 0;
top: 0;
z-index: 10;
width: 100%;
height: 100vh;
background-color: #fff;
image {
width: 152rpx;
height: 152rpx;
margin-top: 282rpx;
}
text {
font-size: 32rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
line-height: 44rpx;
margin: 16rpx auto 78rpx;
}
}
}
.nextstep {
background-color: #FFCD00;
border-radius: 16rpx;
text-align: center;
width: 670rpx;
height: 88rpx;
line-height: 88rpx;
margin: 208rpx auto 0;
font-size: 30rpx;
}
.confirm_box {
justify-content: space-between;
margin-top: 24rpx;
.code_input {
width: 400rpx;
height: 88rpx;
line-height: 88rpx;
background-color: #f5f5f5;
color: #212121;
font-size: 30rpx;
padding-left: 20rpx;
box-sizing: border-box;
border-radius: 8rpx;
}
.code_input::placeholder {
color: #aeaeae;
}
.get_code {
width: 250rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 30rpx;
background-color: #FFCD00;
border-radius: 16rpx;
}
.grey_bg {
background-color: #ECECEC;
color: #7c7c7c;
}
}
</style>
<template>
<view class="main">
<TopBar title="更换绑定手机"/>
<view v-if="!next">
<view class="set_title">请完成以下认证</view>
<view class="set_subtitle">请输入{{phone.replace(/(\d{3})\d*(\d{4})/,"$1****$2")}}收到的短信验证码</view>
<view class="flex confirm_box">
<input type="text" class="code_input" v-model="code" placeholder="请输入手机验证码">
<text class="get_code" v-if="codeFlag" @click="getCode()">获取验证码</text>
<text v-else class="get_code grey_bg">{{countdown}}</text>
</view>
<view class="nextstep" @click="nextStep()">下一步</view>
</view>
<view v-else>
<view class="set_title">请输入新手机号码</view>
<view class="set_tip">验证号码后即可更换绑定手机</view>
<input type="text" class="set_input" v-model="newPhone" placeholder="请输入新更换的手机号">
<view class="flex confirm_box">
<input type="text" class="code_input" v-model="newCode" placeholder="请输入手机验证码">
<text class="get_code" v-if="newPhoneCodeFlag" @click="getNewCode()">获取验证码</text>
<text v-else class="get_code grey_bg">{{newCountDown}}</text>
</view>
<view class="nextstep" style="margin-top: 108rpx;" @click="confirm()">确认</view>
</view>
<view class="success_page" v-if="changeSuccess">
<image src="../../../static/common/icon_chenggong@2x.png"></image>
<text>修改成功!</text>
<view class="nextstep" @click="returnHome()">确认</view>
</view>
</view>
</template>
<script>
import TopBar from '@/components/TopBar/TopBar';
export default {
data() {
return {
codeFlag: true,
newPhoneCodeFlag: true,
countdown: '(60)重新获取',
newCountDown: '(60)重新获取',
next: false,
code: '',
newPhone: '',
newCode: '',
changeSuccess: false
}
},
props: {
phone: {
type: String
}
},
methods: {
getCode() {
if(this.codeFlag) {
uni.request({
url: `/uni/api/mobile_msg/change/${this.phone}`,
method: 'GET',
dataType: 'json',
success: (res) => {
if(res.data.code === 0) {
uni.showToast({
title: '短信已发送',
icon: 'none'
})
}
}
});
let seconds = 60;
this.codeFlag = false;
let timer = setInterval(() => {
seconds-=1;
this.countdown = `(${seconds})重新获取`;
if(seconds === 0) {
clearInterval(timer);
this.codeFlag = true;
this.countdown = '(60)重新获取';
}
}, 1000);
}
},
getNewCode() {
if(!/^1[3456789]\d{9}$/.test(this.newPhone)) {
uni.showToast({
title: '手机号不正确',
icon: 'none'
})
return
}
if(this.newPhoneCodeFlag) {
uni.request({
url: `/uni/api/mobile_msg/change/${this.newPhone}`,
method: 'GET',
dataType: 'json',
success: (res) => {
if(res.data.code === 0) {
uni.showToast({
title: '短信已发送',
icon: 'none'
})
}
}
});
let seconds = 60;
this.newPhoneCodeFlag = false;
let timer = setInterval(() => {
seconds-=1;
this.newCountDown = `(${seconds})重新获取`;
if(seconds === 0) {
clearInterval(timer);
this.newPhoneCodeFlag = true;
this.newCountDown = '(60)重新获取';
}
}, 1000);
}
},
nextStep() {
if(!/^\d{6}$/.test(this.code)) {
uni.showToast({
title: '请输入6位数字验证码',
icon: 'none'
})
return
}
uni.request({
url: `/uni/api/member/check_code/${this.code}`,
method: 'GET',
dataType: 'json',
success: (res) => {
if(res.data.code === 0) {
this.next = true;
this.countdown = '(60)重新获取';
} else {
uni.showToast({
title: res.data.message,
icon: 'none'
});
}
}
})
},
confirm() {
if(!/^\d{6}$/.test(this.newCode)) {
uni.showToast({
title: '请输入6位数字验证码',
icon: 'none'
})
return
}
uni.request({
url: `/uni/api/member/change_mobile`,
method: 'POST',
data: {
code: this.newCode,
phone_mob: this.newPhone
},
dataType: 'json',
success: (res) => {
if(res.data.code === 0) {
this.changeSuccess = true;
} else {
uni.showToast({
title: res.data.message,
icon: 'none'
});
}
}
})
},
returnHome() {
this.$jump('/pages/setaccount/setaccount', 2);
}
},
components: {
TopBar
}
}
</script>
<style lang="less" scoped>
.main {
padding: 80rpx 40rpx 0;
.flex {
display: flex;
}
.set_title {
font-size: 32rpx;
color: #212121;
line-height: 44rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
margin-top: 40rpx;
}
.set_tip {
color: #7C7C7C;
font-size: 26rpx;
line-height: 36rpx;
margin-top: 4rpx;
}
.set_subtitle {
font-size: 28rpx;
color: #212121;
line-height: 40rpx;
margin-top: 16rpx;
font-size: 30rpx;
}
.set_input {
width: 670rpx;
height: 88rpx;
line-height: 88rpx;
background-color: #f5f5f5;
padding-left: 20rpx;
box-sizing: border-box;
border-radius: 8rpx;
margin-top: 32rpx;
}
.set_input::placeholder {
color: #aeaeae;
}
.confirm_box {
justify-content: space-between;
margin-top: 24rpx;
.code_input {
width: 400rpx;
height: 88rpx;
line-height: 88rpx;
background-color: #f5f5f5;
color: #212121;
font-size: 30rpx;
padding-left: 20rpx;
box-sizing: border-box;
border-radius: 8rpx;
}
.code_input::placeholder {
color: #aeaeae;
}
.get_code {
width: 250rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 30rpx;
background-color: #FFCD00;
border-radius: 16rpx;
}
.grey_bg {
background-color: #ECECEC;
color: #7c7c7c;
}
}
.nextstep {
background-color: #FFCD00;
border-radius: 16rpx;
text-align: center;
width: 670rpx;
height: 88rpx;
line-height: 88rpx;
margin: 208rpx auto 0;
font-size: 30rpx;
}
.success_page {
display: flex;
flex-direction: column;
align-items: center;
position: absolute;
left: 0;
top: 0;
z-index: 10;
width: 100%;
height: 100vh;
background-color: #fff;
image {
width: 152rpx;
height: 152rpx;
margin-top: 282rpx;
}
text {
font-size: 32rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
line-height: 44rpx;
margin: 16rpx auto 78rpx;
}
}
}
</style>
<template>
<view>
<ChangePhone v-if="type === 'phone'" :phone="phone" />
<ChangeLoginPass v-if="type === 'login'" :phone="phone" />
<ChangePayPass v-if="type === 'pay'" :phone="phone" />
</view>
</template>
<script>
import ChangePhone from './components/changephone.vue';
import ChangeLoginPass from './components/changeLoginPass.vue';
import ChangePayPass from './components/changePayPass.vue';
export default {
data() {
return {
type: '',
phone: ''
}
},
onLoad(option) {
this.type = option.type;
this.phone = option.phone || '';
},
components: {
ChangePhone,
ChangeLoginPass,
ChangePayPass
}
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
......@@ -24,6 +24,7 @@
</view>
</view>
<button type="primary" class="submit-btn" :loading="loading" @click="handleSumit">立即支付</button>
<view class="forget_btn" @click="forget()">忘记密码?</view>
</view>
</template>
......@@ -40,7 +41,8 @@
order_price: '',
order_id: '',
password: '',
loading: false
loading: false,
phone_mob: ''
}
},
onLoad(option){
......@@ -48,6 +50,14 @@
this.money = money || '0.00';
this.order_price = amount || '0.00';
this.order_id = order_id || '';
uni.request({
url: '/uni/api/member/profile',
method: 'GET',
dataType: 'json',
success: (res) => {
this.phone_mob = res.data.data.phone_mob;
}
})
},
methods: {
handleSumit(){
......@@ -81,6 +91,9 @@
},
goBack(){
this.$backup();
},
forget() {
this.$jump(`/pages/setinfo/setinfo?type=pay&phone=${this.phone_mob}`, 2)
}
}
}
......@@ -177,4 +190,10 @@
position: absolute;
right: 0;
}
.forget_btn {
text-align: center;
color: #5875E3;
font-size: 24rpx;
margin-top: 30rpx;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment