bug修复

This commit is contained in:
2024-04-26 19:01:31 +08:00
parent 68cce822be
commit eb1abb69fd
5 changed files with 31 additions and 22 deletions

View File

@@ -3,6 +3,7 @@ import { mpUpdate, setCompanyId, setReferrerUserId, setRegisterStoreId } from '@
onLaunch((options) => {
console.log('App Launch options ', options);
// setRegisterStoreId('1144085996641443841');
if(options?.query) {
//保存登录邀请员工id

View File

@@ -46,7 +46,7 @@
<script lang='ts' setup>
import { pay, progress } from '@/api/groupbuy';
import { OrderBean } from '@/api/order/types';
import { parseParameter, sortASCII } from '@/utils';
import { parseParameter, showToast, sortASCII } from '@/utils';
import { hexMD5 } from '@/utils/common/md5';
import { useUserStore } from '@/store';
import { handlePayResult } from '@/utils/order';
@@ -82,11 +82,17 @@ const buildSqbParams = computed(() => {
const navigateTo = (e: any) => {
handlePayResult(orderBean.value?.id, e, {
onSuccess: () => {
pay({
'orderId': orderBean.value?.id,
'result': 'xxx'
}).then(res => {
uni.navigateBack();
showToast('支付成功', {
icon: 'success',
complete: () => {
pay({
'orderId': orderBean.value?.id,
'result': 'xxx'
}).then(res => {
uni.navigateBack();
});
uni.hideLoading();
}
});
}
});

View File

@@ -256,7 +256,7 @@ const payment = async () => {
transactionPrice: orderBean?.value?.totalPrice,
useGold: orderBean.value?.useGold || 0,
detailBos: [{
integralNumber: orderBean?.value?.totalPrice || 0,
integralNumber: Math.floor(orderBean?.value?.totalPrice || 0),
onlinePayResult: '',
payName: '收钱吧',
payTypeId: paymentList.find((res: any) => res.type === 'ShouQianBa')?.id,
@@ -264,8 +264,13 @@ const payment = async () => {
}]
};
await overPayment(paymentParams);
await uni.navigateBack()
uni.hideLoading();
showToast('支付成功', {
icon: 'success',
complete: () => {
uni.navigateBack();
uni.hideLoading();
}
});
};
</script>

View File

@@ -141,14 +141,13 @@ const save = async () => {
if(result) {
await store.setUserInfo(newUserInfo);
uni.showToast({
title: '修改成功',
icon: 'success',
duration: 2000,
success(result) {
showToast('修改成功', {
icon: 'success', complete: () => {
uni.navigateBack();
}
});
} else {
showToast('服务异常,操作失败', { icon: 'error' });
}
};

View File

@@ -4,7 +4,7 @@
<image :src='assetsUrl("bg_member_recharge.png")' />
<view class='balance-content'>
<text>累计余额</text>
<text>{{ userInfo?.totalIncoming}}</text>
<text>{{ userInfo?.totalIncoming }}</text>
</view>
<view class='balance-content'>
<text>当前余额</text>
@@ -103,7 +103,7 @@ const navigateTo = (e: any) => {
...userInfo.value,
balance: Number(userInfo.value.balance) + Number(rechargeItems.value[currentIndex.value].rechargeamount) + Number(rechargeItems.value[currentIndex.value]?.rewardamount)
});
await uni.navigateBack()
await uni.navigateBack();
},
onFailure: () => {
}
@@ -111,12 +111,10 @@ const navigateTo = (e: any) => {
};
const goRecharge = async () => {
console.log(buildSqbParams.value);
const result = await recharge({
itemid: rechargeItems.value[currentIndex.value].itemid
});
console.log('platform recharge result ', result);
// const result = await recharge({
// itemid: rechargeItems.value[currentIndex.value].itemid
// });
// console.log('platform recharge result ', result);
await rechargeVerify({
payid: preRechargeOrderId.value
});