Browse Source

忘记密码

master
jiazhipeng 1 year ago
parent
commit
09b0b0a25e
  1. 11
      pages/order/pay/index.js
  2. 2
      pages/order/pay/index.wxml
  3. 11
      subPackages/password/overview/overview.js
  4. 4
      subPackages/password/overview/overview.wxml
  5. 2
      subPackages/password/setting/setting.js

11
pages/order/pay/index.js

@ -533,6 +533,17 @@ Page({
_this.setData({inputAreaHeight: 0})
},300)
},
goReset: function () {
commonApi.user_post("pay_password/checkLocked",{}).then(res=>{
if (res.code!=1) {
return
} else {
wx.navigateTo({
url: '/subPackages/password/setting/setting?type='+type,
})
}
})
},
/**
* 生命周期函数--监听页面隐藏

2
pages/order/pay/index.wxml

@ -137,7 +137,7 @@
</view>
<view class="resetPassword">
<navigator url="/subPackages/password/setting/setting?type=reset">忘记密码</navigator>
<view bind:tap="goReset" url="/subPackages/password/setting/setting?type=reset">忘记密码</view>
</view>
</view>

11
subPackages/password/overview/overview.js

@ -11,7 +11,7 @@ Page({
data: {
havePassword:false,
isLock: false
},
/**
@ -69,6 +69,15 @@ Page({
this.setData({
havePassword:res.data,
})
if (res.data) {
commonApi.user_post("pay_password/checkLocked",{}).then(res=>{
this.setData({
isLock: !res.data
})
})
}
})
},

4
subPackages/password/overview/overview.wxml

@ -8,12 +8,12 @@
<view class="iconfont icon-you" wx:else></view>
</view>
<view bindtap="goSetting" data-type="edit" class="profile-item" wx:if="{{havePassword}}">
<view bindtap="goSetting" data-type="edit" class="profile-item" wx:if="{{havePassword&&!isLock}}">
<text>修改密码</text>
<view class="info"></view>
<view class="iconfont icon-you"></view>
</view>
<view bindtap="goSetting" data-type="reset" class="profile-item" wx:if="{{havePassword}}">
<view bindtap="goSetting" data-type="reset" class="profile-item" wx:if="{{havePassword&&!isLock}}">
<text>忘记密码</text>
<view class="info"></view>
<view class="iconfont icon-you"></view>

2
subPackages/password/setting/setting.js

@ -229,7 +229,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
commonApi.user_post("user/getMyInfo",{}).then(res=>{
commonApi.user_post("uservice/user/getMyInfo",{}).then(res=>{
let userinfo = res.data
if (userinfo && userinfo.mobile) {
this.data.inputData.phone = userinfo.mobile

Loading…
Cancel
Save