diff --git a/pages/order/confirm-order.vue b/pages/order/confirm-order.vue index 620b394..70ea57f 100644 --- a/pages/order/confirm-order.vue +++ b/pages/order/confirm-order.vue @@ -333,8 +333,6 @@ const storeMemberpay = Memberpay(); - - import { productStore } from '@/stores/user.js'; @@ -354,7 +352,7 @@ } from '@dcloudio/uni-app'; // 输入支付密码 const ispws = ref(false) - + const userInfo= uni.cache.get('userInfo') // 会员信息 const orderVIP = ref(uni.cache.get('orderVIP')) @@ -800,25 +798,6 @@ const goToPay = async (isCreateOrder = false) => { // 余额支付 if (paymentmethod.payType == 'accountPay') { - // if (orderVIP.value.isVip == 0) { - // uni.showModal({ - // title: '提示', - // content: '您还不是会员,是否去注册会员?', - // success: (res) => { - // if (res.confirm) { - // uni.pro.navigateTo('user/member/index', { - // shopId: orderVIP.value.shopId, - // type: 'detail' - // }) - // } else if (res.cancel) { - // console.log('用户点击取消'); - // } - // } - // }) - // return - - // } - if (orderVIP.value.payPwd == '') { uni.showModal({ title: '提示', @@ -834,16 +813,15 @@ } } }) - // } else if (orderVIP.value.amount == 0) { - // uni.showToast({ - // title: '您的余额不足', - // icon: 'none' - // }) - // } else { - } else { + return + } + console.log('userInfo.usePayPwd',userInfo.usePayPwd); + if(userInfo.usePayPwd){ ispws.value = true + return } - return false + accountPayevent() + return } const canPayRes = await search_pay_lock() @@ -959,7 +937,6 @@ const accountPayevent = async (pwd) => { ispws.value = false; - let checkOrderPay = { userId: uni.cache.get('userInfo').id, orderId: listinfo.id, diff --git a/pages/user/member/setPassword.vue b/pages/user/member/setPassword.vue index 60d7e3f..4400905 100644 --- a/pages/user/member/setPassword.vue +++ b/pages/user/member/setPassword.vue @@ -69,6 +69,7 @@ import { productStore } from '@/stores/user.js'; + import {APIuser} from '@/common/api/api.js' const storeuser = productStore(); const shopUserInfo = reactive({ shopInfo: uni.cache.get('orderVIP'), @@ -217,6 +218,12 @@ title:'修改成功' }) } + onMounted(()=>{ + APIuser().then(res=>{ + uni.cache.set('userInfo', res); + form.usePayPwd=res.usePayPwd + }) + })