覆盖11.20的代码

This commit is contained in:
wwz
2025-03-12 13:43:14 +08:00
parent cab9f836af
commit 50c5b4ca81
7 changed files with 197 additions and 118 deletions

View File

@@ -85,7 +85,8 @@
</view>
</view>
<view style="width: 100%;height: 200rpx;"> </view>
<payPassword ref="payPasswordref" :isShow="ispws" @inputComplete="accountPayevent" @close="ispws = false" />
<payPassword ref="payPasswordref" :isShow="ispws" @inputComplete="accountPayevent"
:password='payPasswordPassword' @close="ispws = false" />
</view>
</template>
@@ -130,6 +131,9 @@
// import orderInfoBefore from '../components/orderInfoBefore.vue'
// import rechargeFree from '../components/rechargeFree.vue'
import paymentMethodes from '@/components/paymentMethod.vue'; //支付方式
import {
onBackPress
} from '@dcloudio/uni-app';
// 输入支付密码
const ispws = ref(false)
@@ -229,7 +233,7 @@
.coupondiscountAmount || 0) - (listinfo.pointsDiscountAmount || 0);
listinfo.totalCost = Math.round(sums * 100) / 100;
// 积分
if (listinfo.totalCost) {
if (listinfo.totalCost && listinfo.status == 'unpaid') {
await memberPointscalcUsablePoints()
}
}
@@ -251,7 +255,7 @@
const paymentmethod = reactive({
radiovalue: 1,
paymentBtnText: "余额支付",
payType: ''
payType: 'accountPay'
})
const groupChange = async (e) => {
@@ -306,11 +310,32 @@
};
const payPasswordPassword = ref('')
// * 去支付
const goToPay = async () => {
// 余额支付
if (paymentmethod.payType == '') {
ispws.value = true
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('用户点击取消');
}
}
})
} else {
payPasswordPassword.value = ''
ispws.value = true
}
return false
}
let checkOrderPay = {
@@ -381,7 +406,7 @@
remark: '', //用户备注
}
try {
let res = await storeMemberpay.balancePayOrder({
await storeMemberpay.balancePayOrder({
checkOrderPay,
payType: paymentmethod.payType,
pwd: pwd,
@@ -393,14 +418,14 @@
} catch (error) {
//TODO handle the exception
}
payPasswordref.value.closeModal()
payPasswordPassword.value = ''
}
onUnmounted(() => {
uni.$off('returnData', handleReturnData);
});
// 监听页面返回事件
onMounted(async () => {
// 获取当前页面栈
const pages = getCurrentPages();