Browse Source

支付

master
jiazhipeng 11 months ago
parent
commit
f747d3bf9e
  1. 59
      pages/order/pay/index.js
  2. 11
      subPackages/index/index.js
  3. 7
      subPackages/index/index.wxml

59
pages/order/pay/index.js

@ -357,27 +357,52 @@ Page({
// 数币密码确认 // 数币密码确认
showPassword () { showPassword () {
let _this =this
// 请求是否设置密码 // 请求是否设置密码
commonApi.user_post("pay_password/checkUsedPassword",{}).then(res=>{ commonApi.user_post("pay_password/checkUsedPassword",{}).then(res=>{
// 设置过密码 // 设置过密码
if (res.data) { if (res.data && res.data.data) {
this.setData({ let resCode = res.data.data
SBMask: true, // 密码过期
haveSBPassword: true, if (resCode == 0) {
vcode: '', let userinfo = wx.getStorageSync('jstrip_userInfo')
isFoucs: true let inputData = {phone: '',code: '',password: '',confirmPassword: ''}
}) if (userinfo && userinfo.mobile) {
} else { inputData.phone = userinfo.mobile
let userinfo = wx.getStorageSync('jstrip_userInfo') }
let inputData = {phone: '',code: '',password: '',confirmPassword: ''} this.setData({
if (userinfo && userinfo.mobile) { SBMask: true,
inputData.phone = userinfo.mobile 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,
})
} }
}) })
}, },

11
subPackages/index/index.js

@ -110,7 +110,8 @@ Page({
mainTypeLeft: 0, mainTypeLeft: 0,
xpth: {}, // 新品特惠 xpth: {}, // 新品特惠
XPathBannerIndex: 0, XPathBannerIndex: 0,
xpthIndex: 0,
// 公共服务 // 公共服务
publicSerivce: [ publicSerivce: [
{ {
@ -717,7 +718,13 @@ Page({
}).then(res => { }).then(res => {
this.setData({xpth: res.data,}) this.setData({xpth: res.data,})
}) })
}, },
// 更换新品特惠 当即热门
changeXpthIndex:function (e) {
let value = e.currentTarget.dataset.value
this.setData({xpthIndex:value})
},

7
subPackages/index/index.wxml

@ -70,8 +70,11 @@
<!-- 上方标题部分 --> <!-- 上方标题部分 -->
<view class="xsth-title"> <view class="xsth-title">
<view class="xsth-left" style="display: flex;"> <view class="xsth-left" style="display: flex;">
<image mode="heightFix" class="common-header-img" src="https://static.ticket.sz-trip.com/uploads/20250526/2bcce6d179c4abd3fa6cbdec8c8519bf.png"></image> <image wx:if="{{xpthIndex==0}}" mode="heightFix" class="common-header-img" src="https://static.ticket.sz-trip.com/uploads/20250527/f2dc42edee46a79a6ba375ae1a1c24b7.png"></image>
<image mode="heightFix" class="common-header-img" src="https://static.ticket.sz-trip.com/uploads/20250526/fcab4f467a250c2750c4af53942fa205.png"></image> <image wx:else="" bindtap="changeXpthIndex" data-value="{{0}}" mode="heightFix" class="common-header-img" src="https://static.ticket.sz-trip.com/uploads/20250526/2bcce6d179c4abd3fa6cbdec8c8519bf.png"></image>
<image wx:if="{{xpthIndex==0}}" bindtap="changeXpthIndex" data-value="{{1}}" mode="heightFix" class="common-header-img" src="https://static.ticket.sz-trip.com/uploads/20250527/1d1117bf6120fb75159eb8657b15c640.png"></image>
<image wx:else mode="heightFix" class="common-header-img" src="https://static.ticket.sz-trip.com/uploads/20250526/fcab4f467a250c2750c4af53942fa205.png"></image>
</view> </view>
</view> </view>
<!-- 商品部分 --> <!-- 商品部分 -->

Loading…
Cancel
Save