修改
This commit is contained in:
1 parent
67a220b60b
commit
2c8e8ff9bd
3 files changed
+20
-12
No files matched your search
@@ -83,11 +83,12 @@ const pay = async () => {
|
||||
customPrice: storePrice(Number(amount.value)),
|
||||
})
|
||||
if (res.code != 0) {
|
||||
throw new Error()
|
||||
uni.showToast({ title: res.msg || "支付失败", icon: "error" })
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
usePayStore().setPayData({ ...scanData.value, customPrice: Number(amount.value).toFixed(2) })
|
||||
router.jump("/pages/pay/payComplete", {}, 2)
|
||||
}
|
||||
uni.hideLoading()
|
||||
usePayStore().setPayData({ ...scanData.value, customPrice: Number(amount.value).toFixed(2) })
|
||||
router.jump("/pages/pay/payComplete", {}, 2)
|
||||
} catch (error: any) {
|
||||
uni.showToast({ title: "错误", icon: "error" })
|
||||
uni.hideLoading()
|
||||
|
||||
@@ -153,13 +153,13 @@ const confirmTransfer = async () => {
|
||||
if (!amount.value || amount.value === "0" || amount.value === "0." || parseFloat(amount.value) === 0) {
|
||||
return uni.showToast({ title: "金额不能为零", icon: "none" })
|
||||
}
|
||||
if (numAmount > transferMoney.sourceWalletType.balance) {
|
||||
if (numAmount.value > transferMoney.sourceWalletType.balance) {
|
||||
return uni.showToast({ title: "转账金额不能超过钱包余额", icon: "none" })
|
||||
}
|
||||
|
||||
console.log("state.sourceWalletTypeId", state.sourceWalletTypeId)
|
||||
console.log("state.targetWalletTypeId", state.targetWalletTypeId)
|
||||
console.log("金额", numAmount.value)
|
||||
// console.log("state.sourceWalletTypeId", state.sourceWalletTypeId)
|
||||
// console.log("state.targetWalletTypeId", state.targetWalletTypeId)
|
||||
// console.log("金额", numAmount.value)
|
||||
|
||||
uni.showModal({
|
||||
title: "确定转入吗?",
|
||||
@@ -181,7 +181,9 @@ const confirmTransferAgain = async () => {
|
||||
})
|
||||
if (res.code == 0) {
|
||||
uni.showToast({ title: "转账成功", icon: "success" })
|
||||
router.jump("/pages/wallet/list", {}, 2)
|
||||
transferMoney.setSourceWalletType({})
|
||||
// router.jump("/pages/wallet/list", {}, 2)
|
||||
router.back()
|
||||
} else {
|
||||
uni.showToast({ title: res.msg, icon: "none" })
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user