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 @@
+
+
+
+ 转入{{ state.targetWalletTypeName }}
+
+
+
+
+
+ 转入金额
+
+ ¥
+ 转入金额
+ {{ formattedAmount }}
+
+
+
+
+ 注:转账金额不能超过钱包余额
+
+
+
+ 确定转入
+
+
+
+
+
+
+
+
+
+
+
+ {{ v.walletTypeName }}
+ {{ v.cardNumber }}
+
+
+ 余额:{{ hooks.useMoney(v.balance) + "元" }}
+
+
+
+
+ 确定
+
+
+
+
+
+
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)
+}
@@ -173,6 +178,7 @@ const doFreeze = async () => {
+ 转入
申请冻结
diff --git a/src/sheep/api/pay.ts b/src/sheep/api/pay.ts
index feb10bf..13def0f 100644
--- a/src/sheep/api/pay.ts
+++ b/src/sheep/api/pay.ts
@@ -61,4 +61,15 @@ export default {
},
})
},
+ // 转账
+ transferMoney: (data): Promise => {
+ return request({
+ url: "/wallet/wallet-rule-transaction/app/transfer-accounts",
+ method: "POST",
+ data,
+ custom: {
+ showLoading: false,
+ },
+ })
+ },
}
diff --git a/src/sheep/api/wallet.ts b/src/sheep/api/wallet.ts
index d1c6340..5b92043 100644
--- a/src/sheep/api/wallet.ts
+++ b/src/sheep/api/wallet.ts
@@ -1,7 +1,7 @@
import request from "@/sheep/utils/request"
export default {
- all: () =>
+ all: (): Promise =>
request({
url: "/wallet/wallet-manage/app/get-all",
method: "GET",
diff --git a/src/sheep/components/numberKeyboard.vue b/src/sheep/components/numberKeyboard.vue
new file mode 100644
index 0000000..5a15966
--- /dev/null
+++ b/src/sheep/components/numberKeyboard.vue
@@ -0,0 +1,75 @@
+
+
+
+
+ {{ key }}
+
+
+
+
+ .
+
+
+ 0
+
+
+
+
+
+
+
+
+
diff --git a/src/sheep/utils/request.ts b/src/sheep/utils/request.ts
index 7450939..74eed72 100644
--- a/src/sheep/utils/request.ts
+++ b/src/sheep/utils/request.ts
@@ -288,7 +288,7 @@ http.interceptors.response.use(
mask: true,
})
}
- return false
+ return Promise.resolve(error.data)
},
)
diff --git a/src/static/page/keyboardDelete.svg b/src/static/page/keyboardDelete.svg
new file mode 100644
index 0000000..894a7ee
--- /dev/null
+++ b/src/static/page/keyboardDelete.svg
@@ -0,0 +1,26 @@
+
\ No newline at end of file
diff --git a/src/uni_modules/tm-ui/components/tm-cell/tm-cell.vue b/src/uni_modules/tm-ui/components/tm-cell/tm-cell.vue
index f235244..1f9a450 100644
--- a/src/uni_modules/tm-ui/components/tm-cell/tm-cell.vue
+++ b/src/uni_modules/tm-ui/components/tm-cell/tm-cell.vue
@@ -1,74 +1,89 @@
-
-
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
- {{ _allAttr.title
- }}
-
-
-
- {{
- _allAttr.desc }}
-
-
-
-
-
- {{ _allAttr.label }}
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
+