diff --git a/src/pages.json b/src/pages.json index b193088..d49c846 100644 --- a/src/pages.json +++ b/src/pages.json @@ -313,6 +313,13 @@ "navigationBarTitleText": "支付完成", "disableScroll": true } + }, + { + "path": "transferMoney", + "style": { + "navigationBarTitleText": "转账", + "disableScroll": true + } } ] } diff --git a/src/pages/pay/scanPay.vue b/src/pages/pay/scanPay.vue index 2ff1389..dffa552 100644 --- a/src/pages/pay/scanPay.vue +++ b/src/pages/pay/scanPay.vue @@ -9,63 +9,7 @@ 支付 - - - - {{ key }} - - - - - . - - - 0 - - - - - - - - - - + @@ -78,13 +22,9 @@ import payApi from "@@/api/pay" import { storePrice } from "@/sheep/utils/formatMoney" import { router } from "@/sheep" import { merchantApi } from "@/sheep/api" +import numberKeyboard from "@/sheep/components/numberKeyboard.vue" const amount = ref("") -const keyboardLayout = ref([ - ["1", "2", "3"], - ["4", "5", "6"], - ["7", "8", "9"], -]) const scanData = ref<{ id?: string; name?: string }>({}) const disabled = ref(false) @@ -113,27 +53,6 @@ const displayAmount = computed(() => { ) }) -// 按下键盘 -const handleKeyPress = (key) => { - if (key === "." && amount.value.includes(".")) return - if (key === "." && !amount.value) { - amount.value = "0." - return - } - - if (amount.value.includes(".")) { - const decimalPlaces = amount.value.split(".")[1] - if (decimalPlaces && decimalPlaces.length >= 2) return - } - - amount.value += key -} - -// 点击删除 -const handleDelete = () => { - amount.value = amount.value.slice(0, -1) -} - // 点击支付 const handlePay = () => { if (!scanData.value.id || !scanData.value.name) return uni.showToast({ title: "扫码信息不存在", icon: "none" }) diff --git a/src/pages/pay/transferMoney.vue b/src/pages/pay/transferMoney.vue new file mode 100644 index 0000000..4f4611a --- /dev/null +++ b/src/pages/pay/transferMoney.vue @@ -0,0 +1,190 @@ + + + diff --git a/src/pages/wallet/list.vue b/src/pages/wallet/list.vue index cec451c..079cd6a 100644 --- a/src/pages/wallet/list.vue +++ b/src/pages/wallet/list.vue @@ -119,6 +119,11 @@ const doFreeze = async () => { uni.hideLoading() } } + +// 转账 +const doTransferMoney = (v: any) => { + router.jump("/pages/pay/transferMoney", { walletTypeId: v.walletTypeId, walletTypeName: v.walletTypeName }, 2) +}