问题修复

This commit is contained in:
2025-09-29 20:56:16 +08:00
parent 32ca45a5f3
commit 44c3e1e8b4
6 changed files with 96 additions and 34 deletions

View File

@@ -13,7 +13,7 @@
<view class="color-333 font-16 font-700">密码支付</view>
<view class="font-12 color-999 u-m-t-4">关闭时使用余额支付将会直接扣除不再进行确认</view>
</view>
<up-switch v-model="form.isOpen" active-color="#FFD158" :inactive-value="0"
<up-switch v-model="form.usePayPwd" active-color="#FFD158" :inactive-value="0" @change="usePayPwdChange"
:active-value="1"></up-switch>
</view>
<view class="color-333 font-16 font-700" style="margin-top: 60rpx;">密码支付</view>
@@ -74,13 +74,15 @@
shopInfo: uni.cache.get('orderVIP'),
shopId: ''
})
const userInfo=uni.cache.get('userInfo')
const form = reactive({
mobile: uni.cache.get('orderVIP').phone,
password: '',
payPassword: '',
checkCode: '',
isOpen: 1
usePayPwd: userInfo.usePayPwd
})
const datalist = reactive({
@@ -94,6 +96,7 @@
})
const CodeRegister = async () => {
console.log('CodeRegister');
const res = await APIusercode({
// post 手机验证码
phone: form.mobile
@@ -195,7 +198,8 @@
let res = await APIuserpwd({
checkPayPwd: form.payPassword,
payPwd: form.password,
code: form.checkCode
code: form.checkCode,
usePayPwd:form.usePayPwd
})
// * 获取会员信息
await storeuser.actionsproductqueryProduct()
@@ -203,6 +207,16 @@
uni.navigateBack()
}
}
async function usePayPwdChange(){
uni.showLoading()
await APIuserpwd({
usePayPwd:form.usePayPwd
})
uni.showToast({
title:'修改成功'
})
}
</script>
<style lang="scss" scoped>
@@ -250,7 +264,7 @@
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #5082fd;
z-index: 1;
.yzm {
padding: 8rpx 20rpx;
background: #E5E5E5;