会员支付密码修改
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class='keyboard' @click.stop='_handleKeyPress'>
|
<view class='keyboard' :style="{position: pos}" @click.stop='_handleKeyPress'>
|
||||||
<view class='key-row'>
|
<view class='key-row'>
|
||||||
<view class='key-cell cell_b' data-num='1'>1</view>
|
<view class='key-cell cell_b' data-num='1'>1</view>
|
||||||
<view class='key-cell cell_b' data-num='2'>2</view>
|
<view class='key-cell cell_b' data-num='2'>2</view>
|
||||||
@@ -46,7 +46,11 @@
|
|||||||
},
|
},
|
||||||
btnColor: {
|
btnColor: {
|
||||||
default: 'green',
|
default: 'green',
|
||||||
}
|
},
|
||||||
|
pos: {
|
||||||
|
default: 'fixed',
|
||||||
|
type: String
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
224
components/payPasswordtwo - 副本.vue
Normal file
224
components/payPasswordtwo - 副本.vue
Normal file
@@ -0,0 +1,224 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<!-- ref:唯一ref passwrdType:密码样式pay keyInfo:密码输入返回事件 -->
|
||||||
|
<u-popup :show="payPasswordShow" :round="20" mode="bottom" @close="payPasswordShow = false" height="500" :safeAreaInsetBottom="false">
|
||||||
|
<view class="pay-info-wrap">
|
||||||
|
<view class="info-wrap flex-between">
|
||||||
|
<view class="close" @click="showShopInfo = false">
|
||||||
|
<u-icon name="close" color="#999999" size="28"></u-icon>
|
||||||
|
</view>
|
||||||
|
<text class="title">请输入支付密码</text>
|
||||||
|
<view></view>
|
||||||
|
</view>
|
||||||
|
<view class="info-content">
|
||||||
|
<view style="margin-bottom: 128rpx;">
|
||||||
|
<view class="pay-title">
|
||||||
|
<text style="margin-top: 4rpx;">¥ </text>
|
||||||
|
<text>123</text>
|
||||||
|
</view>
|
||||||
|
<view class="pay-password" @click="onPayUp">
|
||||||
|
<view class="list">
|
||||||
|
<text v-show="passwordArr.length >= 1">●</text>
|
||||||
|
</view>
|
||||||
|
<view class="list">
|
||||||
|
<text v-show="passwordArr.length >= 2">●</text>
|
||||||
|
</view>
|
||||||
|
<view class="list">
|
||||||
|
<text v-show="passwordArr.length >= 3">●</text>
|
||||||
|
</view>
|
||||||
|
<view class="list">
|
||||||
|
<text v-show="passwordArr.length >= 4">●</text>
|
||||||
|
</view>
|
||||||
|
<view class="list">
|
||||||
|
<text v-show="passwordArr.length >= 5">●</text>
|
||||||
|
</view>
|
||||||
|
<view class="list">
|
||||||
|
<text v-show="passwordArr.length >= 6">●</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="hint" @click="gopaypassword">
|
||||||
|
<text>忘记支付密码?</text>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
<!-- ref:唯一ref passwrdType:密码样式pay keyInfo:密码输入返回事件 -->
|
||||||
|
<cc-defineKeyboard ref="CodeKeyboard" passwrdType="pay" @KeyInfo="KeyInfo"></cc-defineKeyboard>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
listinfo: {
|
||||||
|
type: Object,
|
||||||
|
default () {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// AffirmStatus: 1,
|
||||||
|
payPasswordShow: true,
|
||||||
|
passwordArr: [],
|
||||||
|
oldPasswordArr: [],
|
||||||
|
newPasswordArr: [],
|
||||||
|
afPasswordArr: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 忘记支付密码
|
||||||
|
gopaypassword() {
|
||||||
|
uni.pro.navigateTo('/pages/user/repairpassword')
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 唤起键盘
|
||||||
|
*/
|
||||||
|
onPayUp() {
|
||||||
|
this.$refs.CodeKeyboard.show();
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 支付键盘回调
|
||||||
|
* @param {Object} val
|
||||||
|
*/
|
||||||
|
KeyInfo(val) {
|
||||||
|
|
||||||
|
if (val.index >= 6) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 判断是否输入的是删除键
|
||||||
|
if (val.keyCode === 8) {
|
||||||
|
// 删除最后一位
|
||||||
|
this.passwordArr.splice(val.index + 1, 1)
|
||||||
|
}
|
||||||
|
// 判断是否输入的是.
|
||||||
|
else if (val.keyCode == 190) {
|
||||||
|
// 输入.无效
|
||||||
|
} else {
|
||||||
|
this.passwordArr.push(val.key);
|
||||||
|
}
|
||||||
|
|
||||||
|
// uni.showModal({
|
||||||
|
// title: '温馨提示',
|
||||||
|
// content: '输入密码是 = ' + JSON.stringify(this.passwordArr)
|
||||||
|
// })
|
||||||
|
|
||||||
|
// 判断是否等于6
|
||||||
|
if (this.passwordArr.length === 6) {
|
||||||
|
// this.AffirmStatus = this.AffirmStatus + 1;
|
||||||
|
let str = ''
|
||||||
|
this.passwordArr.forEach(res => {
|
||||||
|
str += res
|
||||||
|
})
|
||||||
|
this.$emit('accountPayevent', str)
|
||||||
|
this.passwordArr = [];
|
||||||
|
}
|
||||||
|
// 判断到哪一步了
|
||||||
|
// if (this.AffirmStatus === 1) {
|
||||||
|
// this.oldPasswordArr = this.passwordArr;
|
||||||
|
// } else if (this.AffirmStatus === 2) {
|
||||||
|
// this.newPasswordArr = this.passwordArr;
|
||||||
|
// } else if (this.AffirmStatus === 3) {
|
||||||
|
// this.afPasswordArr = this.passwordArr;
|
||||||
|
// } else if (this.AffirmStatus === 4) {
|
||||||
|
// console.log(this.oldPasswordArr.join(''));
|
||||||
|
// console.log(this.newPasswordArr.join(''));
|
||||||
|
// console.log(this.afPasswordArr.join(''));
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '修改成功',
|
||||||
|
// icon: 'none'
|
||||||
|
// })
|
||||||
|
// setTimeout(() => {
|
||||||
|
// uni.navigateBack();
|
||||||
|
// }, 2000)
|
||||||
|
// }
|
||||||
|
this.$forceUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.page-total{
|
||||||
|
position: inherit;
|
||||||
|
}
|
||||||
|
/deep/ .page-total{
|
||||||
|
position: inherit;
|
||||||
|
}
|
||||||
|
.pay-info-wrap{
|
||||||
|
|
||||||
|
.info-wrap{
|
||||||
|
padding: 64rpx 30rpx 0 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.title{
|
||||||
|
align-self: center;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-content{
|
||||||
|
.pay-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
justify-content: center;
|
||||||
|
font-weight: bold;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 48rpx;
|
||||||
|
color: #333;
|
||||||
|
margin-top: 48rpx;
|
||||||
|
text {
|
||||||
|
font-size: 60rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.pay-password {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 64rpx;
|
||||||
|
|
||||||
|
.list {
|
||||||
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border: 2rpx solid #999;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
text {
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
|
||||||
|
text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,224 +1,227 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<view class="content">
|
||||||
<!-- ref:唯一ref passwrdType:密码样式pay keyInfo:密码输入返回事件 -->
|
<view style="margin-bottom: 128rpx;">
|
||||||
<u-popup :show="payPasswordShow" :round="20" mode="bottom" @close="payPasswordShow = false" height="500" :safeAreaInsetBottom="false">
|
<view class="contenttext flex-center">
|
||||||
<view class="pay-info-wrap">
|
{{form.password.length == 6?'请再次确认支付密码':"请设置新密码,用于支付验证"}}
|
||||||
<view class="info-wrap flex-between">
|
|
||||||
<view class="close" @click="showShopInfo = false">
|
|
||||||
<u-icon name="close" color="#999999" size="28"></u-icon>
|
|
||||||
</view>
|
|
||||||
<text class="title">请输入支付密码</text>
|
|
||||||
<view></view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="info-content">
|
<view class="contentbox flex-between">
|
||||||
<view style="margin-bottom: 128rpx;">
|
<view class="contentboxitem flex-colum">
|
||||||
<view class="pay-title">
|
{{consumeFee.slice(0,1)}}
|
||||||
<text style="margin-top: 4rpx;">¥ </text>
|
</view>
|
||||||
<text>123</text>
|
<view class="contentboxitem flex-colum">
|
||||||
</view>
|
{{consumeFee.slice(1,2)}}
|
||||||
<view class="pay-password" @click="onPayUp">
|
</view>
|
||||||
<view class="list">
|
<view class="contentboxitem flex-colum">
|
||||||
<text v-show="passwordArr.length >= 1">●</text>
|
{{consumeFee.slice(2,3)}}
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="contentboxitem flex-colum">
|
||||||
<text v-show="passwordArr.length >= 2">●</text>
|
{{consumeFee.slice(3,4)}}
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="contentboxitem flex-colum">
|
||||||
<text v-show="passwordArr.length >= 3">●</text>
|
{{consumeFee.slice(4,5)}}
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="contentboxitem flex-colum">
|
||||||
<text v-show="passwordArr.length >= 4">●</text>
|
{{consumeFee.slice(5,6)}}
|
||||||
</view>
|
|
||||||
<view class="list">
|
|
||||||
<text v-show="passwordArr.length >= 5">●</text>
|
|
||||||
</view>
|
|
||||||
<view class="list">
|
|
||||||
<text v-show="passwordArr.length >= 6">●</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- <view class="hint" @click="gopaypassword">
|
|
||||||
<text>忘记支付密码?</text>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
<!-- ref:唯一ref passwrdType:密码样式pay keyInfo:密码输入返回事件 -->
|
|
||||||
<cc-defineKeyboard ref="CodeKeyboard" passwrdType="pay" @KeyInfo="KeyInfo"></cc-defineKeyboard>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
<!-- <view class="" v-else>
|
||||||
|
|
||||||
|
</view> -->
|
||||||
|
<cwx-keyboard ref="keyboard" :pos="'inherit'" @confirmEvent="confirmEvent"
|
||||||
|
:money.sync="consumeFee"></cwx-keyboard>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import cwxKeyboard from '@/components/cwx-keyboard/cwx-keyboard';
|
||||||
export default {
|
export default {
|
||||||
props: {
|
|
||||||
listinfo: {
|
|
||||||
type: Object,
|
|
||||||
default () {
|
|
||||||
return {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
|
cwxKeyboard
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// AffirmStatus: 1,
|
isPwd: uni.cache.get('userInfo').isPwd,
|
||||||
payPasswordShow: true,
|
form: {
|
||||||
passwordArr: [],
|
mobile: uni.cache.get('userInfo').telephone,
|
||||||
oldPasswordArr: [],
|
password: '', //密码
|
||||||
newPasswordArr: [],
|
payPassword: '', //二次密码
|
||||||
afPasswordArr: [],
|
checkCode: ''
|
||||||
|
},
|
||||||
|
passwords: false,
|
||||||
|
payPasswords: false,
|
||||||
|
// 注册定时器 初始值
|
||||||
|
second: 60,
|
||||||
|
showText: true,
|
||||||
|
Recapture: '发送验证码',
|
||||||
|
consumeFee: '', //第一遍
|
||||||
|
consumeFees: '', //第二遍
|
||||||
|
money: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
console.log(uni.cache.get('userInfo').isPwd)
|
||||||
|
if (uni.cache.get('userInfo').isPwd != 0) {
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: '忘记支付密码', // 标题文本,必须是字符串
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
watch: {
|
||||||
// 忘记支付密码
|
consumeFee(newVal, oldVal) {
|
||||||
gopaypassword() {
|
if (this.form.password.length == 6) {
|
||||||
uni.pro.navigateTo('/pages/user/repairpassword')
|
this.form.payPassword = newVal
|
||||||
},
|
if (this.form.payPassword.length == 6) {
|
||||||
/**
|
this.userInfosavePayPassword()
|
||||||
* 唤起键盘
|
}
|
||||||
*/
|
|
||||||
onPayUp() {
|
|
||||||
this.$refs.CodeKeyboard.show();
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 支付键盘回调
|
|
||||||
* @param {Object} val
|
|
||||||
*/
|
|
||||||
KeyInfo(val) {
|
|
||||||
|
|
||||||
if (val.index >= 6) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 判断是否输入的是删除键
|
|
||||||
if (val.keyCode === 8) {
|
|
||||||
// 删除最后一位
|
|
||||||
this.passwordArr.splice(val.index + 1, 1)
|
|
||||||
}
|
|
||||||
// 判断是否输入的是.
|
|
||||||
else if (val.keyCode == 190) {
|
|
||||||
// 输入.无效
|
|
||||||
} else {
|
} else {
|
||||||
this.passwordArr.push(val.key);
|
this.form.password = newVal
|
||||||
}
|
if (this.form.password.length == 6) {
|
||||||
|
this.$refs.keyboard._handleClearKey() //清空
|
||||||
// uni.showModal({
|
|
||||||
// title: '温馨提示',
|
|
||||||
// content: '输入密码是 = ' + JSON.stringify(this.passwordArr)
|
|
||||||
// })
|
|
||||||
|
|
||||||
// 判断是否等于6
|
|
||||||
if (this.passwordArr.length === 6) {
|
|
||||||
// this.AffirmStatus = this.AffirmStatus + 1;
|
|
||||||
let str = ''
|
|
||||||
this.passwordArr.forEach(res => {
|
|
||||||
str += res
|
|
||||||
})
|
|
||||||
this.$emit('accountPayevent', str)
|
|
||||||
this.passwordArr = [];
|
|
||||||
}
|
|
||||||
// 判断到哪一步了
|
|
||||||
// if (this.AffirmStatus === 1) {
|
|
||||||
// this.oldPasswordArr = this.passwordArr;
|
|
||||||
// } else if (this.AffirmStatus === 2) {
|
|
||||||
// this.newPasswordArr = this.passwordArr;
|
|
||||||
// } else if (this.AffirmStatus === 3) {
|
|
||||||
// this.afPasswordArr = this.passwordArr;
|
|
||||||
// } else if (this.AffirmStatus === 4) {
|
|
||||||
// console.log(this.oldPasswordArr.join(''));
|
|
||||||
// console.log(this.newPasswordArr.join(''));
|
|
||||||
// console.log(this.afPasswordArr.join(''));
|
|
||||||
// uni.showToast({
|
|
||||||
// title: '修改成功',
|
|
||||||
// icon: 'none'
|
|
||||||
// })
|
|
||||||
// setTimeout(() => {
|
|
||||||
// uni.navigateBack();
|
|
||||||
// }, 2000)
|
|
||||||
// }
|
|
||||||
this.$forceUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.page-total{
|
|
||||||
position: inherit;
|
|
||||||
}
|
|
||||||
/deep/ .page-total{
|
|
||||||
position: inherit;
|
|
||||||
}
|
|
||||||
.pay-info-wrap{
|
|
||||||
|
|
||||||
.info-wrap{
|
|
||||||
padding: 64rpx 30rpx 0 30rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
.title{
|
|
||||||
align-self: center;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-content{
|
|
||||||
.pay-title {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-end;
|
|
||||||
justify-content: center;
|
|
||||||
font-weight: bold;
|
|
||||||
width: 100%;
|
|
||||||
font-size: 48rpx;
|
|
||||||
color: #333;
|
|
||||||
margin-top: 48rpx;
|
|
||||||
text {
|
|
||||||
font-size: 60rpx;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.pay-password {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-top: 64rpx;
|
|
||||||
|
|
||||||
.list {
|
|
||||||
width: 88rpx;
|
|
||||||
height: 88rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border: 2rpx solid #999;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
text {
|
|
||||||
font-size: 32rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
.hint {
|
methods: {
|
||||||
display: flex;
|
confirmEvent(e) {
|
||||||
align-items: center;
|
console.log(e)
|
||||||
justify-content: center;
|
},
|
||||||
width: 100%;
|
async CodeRegister() {
|
||||||
height: 100rpx;
|
const res = await this.api.phoneValidateCode({
|
||||||
|
// post 手机验证码
|
||||||
text {
|
phone: this.form.mobile
|
||||||
font-size: 28rpx;
|
});
|
||||||
color: #ccc;
|
if (res) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '验证码获取成功',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
// 定时器
|
||||||
|
this.showText = false;
|
||||||
|
this.Recapture = '重新获取';
|
||||||
|
var interval = setInterval(() => {
|
||||||
|
let times = --this.second;
|
||||||
|
this.second = times < 10 ? '0' + times : times; //小于10秒补 0
|
||||||
|
}, 1000);
|
||||||
|
setTimeout(() => {
|
||||||
|
clearInterval(interval);
|
||||||
|
this.second = 60;
|
||||||
|
this.showText = true;
|
||||||
|
}, 60000);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async loginwxuserInfo() {
|
||||||
|
let res = await this.api.loginwxuserInfo({
|
||||||
|
userId: uni.cache.get('userInfo').id
|
||||||
|
})
|
||||||
|
if (res.code == 0) {
|
||||||
|
uni.cache.set('userInfo', res.data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async userInfosavePayPassword() {
|
||||||
|
if (this.form.mobile.length != 11 && this.isPwd == 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '手机号必须是11位',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.form.password == null || this.form.password == '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入密码',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.form.payPassword == null || this.form.payPassword == '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入确认密码',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.form.password.length != 6 || this.form.payPassword.length != 6) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '密码必须是6位',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.form.payPassword != this.form.password) {
|
||||||
|
this.$refs.keyboard._handleClearKey() //清空
|
||||||
|
this.form.payPassword = ''
|
||||||
|
this.form.password = ''
|
||||||
|
uni.showToast({
|
||||||
|
title: '密码和确认密码不一致',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.form.checkCode == null || this.form.checkCode == '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入验证码',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let res = await this.api.loginresetPwd({
|
||||||
|
pwd: this.form.password,
|
||||||
|
code: this.form.checkCode
|
||||||
|
})
|
||||||
|
|
||||||
|
if (res.code == 0) {
|
||||||
|
if (uni.cache.get('userInfo').isPwd != 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '修改成功',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '设置成功',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 获取用户信息
|
||||||
|
this.loginwxuserInfo()
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack();
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
this.$refs.keyboard._handleClearKey() //清空
|
||||||
|
this.form.payPassword = ''
|
||||||
|
this.form.password = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
/keep/ .keyboard {
|
||||||
|
position: inherit;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
height: 100%;
|
||||||
|
background: #FFFFFF;
|
||||||
|
|
||||||
|
.contenttext {
|
||||||
|
padding: 48rpx 0;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentbox {
|
||||||
|
margin-top: 48rpx;
|
||||||
|
padding: 0 56rpx;
|
||||||
|
|
||||||
|
.contentboxitem {
|
||||||
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
|
border: 2rpx solid #999999;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -124,8 +124,24 @@
|
|||||||
<view class="paymentBtnText" @tap="$u.debounce(orderdetail, 500)" v-else> {{ paymentBtnText }} </view>
|
<view class="paymentBtnText" @tap="$u.debounce(orderdetail, 500)" v-else> {{ paymentBtnText }} </view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<u-popup :show="ispws" :round="20" mode="bottom" @close="ispws = false" height="500" :safeAreaInsetBottom="false">
|
||||||
|
<view class="pay-info-wrap">
|
||||||
|
<view class="info-wrap flex-between">
|
||||||
|
<view class="close" @click="showShopInfo = false">
|
||||||
|
<u-icon name="close" color="#999999" size="28"></u-icon>
|
||||||
|
</view>
|
||||||
|
<text class="title">请输入支付密码</text>
|
||||||
|
<view></view>
|
||||||
|
</view>
|
||||||
|
<view class="info-content">
|
||||||
|
<payPasswordtwo ref="payPwd" :listinfo="listinfo" @accountPayevent="accountPayevent" v-if="ispws"></payPasswordtwo>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
|
||||||
<!-- 支付密码 -->
|
<!-- 支付密码 -->
|
||||||
<payPasswordtwo ref="payPwd" :listinfo="listinfo" @accountPayevent="accountPayevent" v-if="ispws"></payPasswordtwo>
|
<!-- <payPasswordtwo ref="payPwd" :listinfo="listinfo" @accountPayevent="accountPayevent" v-if="ispws"></payPasswordtwo> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -176,6 +192,7 @@
|
|||||||
remark: "", // 备注
|
remark: "", // 备注
|
||||||
radiovalue: 1, // 支付方式
|
radiovalue: 1, // 支付方式
|
||||||
ispws: false, // 输入支付密码
|
ispws: false, // 输入支付密码
|
||||||
|
payPasswordShow: false,
|
||||||
amountVIP: null, // 会员信息
|
amountVIP: null, // 会员信息
|
||||||
listinfoid: null,
|
listinfoid: null,
|
||||||
paymentBtnText: "会员卡支付",
|
paymentBtnText: "会员卡支付",
|
||||||
@@ -392,9 +409,10 @@
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
// this.payPasswordShow = false;
|
||||||
this.ispws = true
|
this.ispws = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.payPwd.onPayUp();
|
// this.$refs.payPwd.onPayUp();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -460,7 +478,7 @@
|
|||||||
* @param {Object} pwd
|
* @param {Object} pwd
|
||||||
*/
|
*/
|
||||||
async accountPayevent(pwd) {
|
async accountPayevent(pwd) {
|
||||||
this.ispws = false
|
this.ispws = false;
|
||||||
console.log(pwd)
|
console.log(pwd)
|
||||||
let res = await this.api.accountPay({
|
let res = await this.api.accountPay({
|
||||||
orderId: this.listinfoid,
|
orderId: this.listinfoid,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user