|
|
|
@ -357,27 +357,52 @@ Page({ |
|
|
|
|
|
|
|
// 数币密码确认
|
|
|
|
showPassword () { |
|
|
|
let _this =this |
|
|
|
// 请求是否设置密码
|
|
|
|
commonApi.user_post("pay_password/checkUsedPassword",{}).then(res=>{ |
|
|
|
// 设置过密码
|
|
|
|
if (res.data) { |
|
|
|
this.setData({ |
|
|
|
SBMask: true, |
|
|
|
haveSBPassword: true, |
|
|
|
vcode: '', |
|
|
|
isFoucs: true |
|
|
|
}) |
|
|
|
} else { |
|
|
|
let userinfo = wx.getStorageSync('jstrip_userInfo') |
|
|
|
let inputData = {phone: '',code: '',password: '',confirmPassword: ''} |
|
|
|
if (userinfo && userinfo.mobile) { |
|
|
|
inputData.phone = userinfo.mobile |
|
|
|
if (res.data && res.data.data) { |
|
|
|
let resCode = res.data.data |
|
|
|
// 密码过期
|
|
|
|
if (resCode == 0) { |
|
|
|
let userinfo = wx.getStorageSync('jstrip_userInfo') |
|
|
|
let inputData = {phone: '',code: '',password: '',confirmPassword: ''} |
|
|
|
if (userinfo && userinfo.mobile) { |
|
|
|
inputData.phone = userinfo.mobile |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
SBMask: true, |
|
|
|
inputData: inputData, |
|
|
|
haveSBPassword: false, |
|
|
|
}) |
|
|
|
} else if (resCode == 1) { |
|
|
|
// 密码正常
|
|
|
|
this.setData({ |
|
|
|
SBMask: true, |
|
|
|
haveSBPassword: true, |
|
|
|
vcode: '', |
|
|
|
isFoucs: true |
|
|
|
}) |
|
|
|
} else { |
|
|
|
wx.showModal({ |
|
|
|
title: '您的支付密码已过期', |
|
|
|
content: resCode, |
|
|
|
cancelText: '修改密码', |
|
|
|
confirmText:'忘记密码', |
|
|
|
confirmColor:"#0E8790", |
|
|
|
success(res){ |
|
|
|
if (res.confirm) { |
|
|
|
console.log('忘记密码') |
|
|
|
_this.goReset() |
|
|
|
} else if (res.cancel) { |
|
|
|
console.log('修改密码') |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/subPackages/password/setting/setting?type=edit' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
}) |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
SBMask: true, |
|
|
|
inputData: inputData, |
|
|
|
haveSBPassword: false, |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|