fix
This commit is contained in:
1 parent
bd069f200a
commit
add3ef1a84
4 files changed
+92
-55
No files matched your search
@@ -220,6 +220,7 @@ const confirmSubmit = async () => {
|
||||
form.mobile = form.mobile.trim().replace(/\s/g, "")
|
||||
|
||||
try {
|
||||
uni.showLoading({ title: "提交中...", mask: true })
|
||||
const { code, msg } = await invitationApi.saveInvitation(form)
|
||||
if (code != 0) return uni.showToast({ title: msg || "提交失败", icon: "error" })
|
||||
uni.showToast({ title: "提交成功", icon: "success" })
|
||||
@@ -228,6 +229,8 @@ const confirmSubmit = async () => {
|
||||
uni.navigateTo({ url: "/pages/integrated/visitor/invitation-record" })
|
||||
} catch (error: any) {
|
||||
uni.showToast({ title: error.message || "提交失败", icon: "none" })
|
||||
} finally {
|
||||
uni.hideLoading()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<view class="bg-gray-100 flex-col min-h-screen">
|
||||
<view class="bg-white p-4 card mx-3 my-1 mt-2 flex items-center justify-between">
|
||||
<crud-layout mainIsScroll bg="/static/page/blue-bg.png">
|
||||
<view class="p-4 card mt-2 flex items-center justify-between">
|
||||
<view class="flex items-center">
|
||||
<image class="w-64 h-64 mr-2" :src="filePath(payStore.sourceWalletData.walletTypeIcon)" />
|
||||
<view>{{ payStore.sourceWalletData.walletTypeName }}</view>
|
||||
</view>
|
||||
<view class="flex items-center">
|
||||
<view class="main-text-28">余额:</view>
|
||||
<view class="main-text-28 mr-1">{{ hooks.useMoney(payStore.sourceWalletData.balance) + "元" }}</view>
|
||||
<view class="flex items-center c-#0094ff! font-bold">
|
||||
<view class="text-30">余额:</view>
|
||||
<view class="text-30 mr-1">{{ hooks.useMoney(payStore.sourceWalletData.balance) + "元" }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bg-white p-4 card mx-3 my-1 flex items-center justify-between active:bg-[#f0f0f0]" @click="show = true">
|
||||
<view class="p-4 card mt-2 flex items-center justify-between active:bg-[#f0f0f0]" @click="show = true">
|
||||
<view class="flex items-center">
|
||||
<image class="w-64 h-64 rounded-full mr-2" src="@/static/page/money-cny-circle-fill.svg" />
|
||||
<view>转入到</view>
|
||||
@@ -22,7 +22,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bg-white p-4 card mx-3 my-1">
|
||||
<view class="p-4 mt-2 card">
|
||||
<text class="text-gray-700 font-bold text-lg">转账金额</text>
|
||||
<view class="flex-row items-center">
|
||||
<text class="text-3xl text-[#333] mr-2">¥</text>
|
||||
@@ -32,37 +32,35 @@
|
||||
</view>
|
||||
<!-- 金额限制提示 -->
|
||||
<view class="h-30rpx">
|
||||
<view v-if="storePrice(amount) > payStore.sourceWalletData?.balance" class="text-xs c-red px-8">注:转账金额不能超过钱包余额</view>
|
||||
<view v-if="storePrice(amount) > payStore.sourceWalletData?.balance" class="text-xs c-red px-4">注:转账金额不能超过钱包余额</view>
|
||||
</view>
|
||||
|
||||
<view class="p-4 font-bold mt-1">
|
||||
<view class="font-bold mt-6">
|
||||
<tm-button block @click="confirmTransfer" v-if="payStore.sourceWalletData.walletTypeId">确定转账</tm-button>
|
||||
</view>
|
||||
|
||||
<number-keyboard v-model="amount" />
|
||||
</crud-layout>
|
||||
|
||||
<!-- 选择转入方式 -->
|
||||
<tm-drawer v-model:show="show" title="选择钱包" size="30%" bg-color="#efefef" position="bottom" :show-footer="false" :showClose="true">
|
||||
<view class="m-4">
|
||||
<view
|
||||
v-for="(v, index) in wallet.walletList"
|
||||
:key="index"
|
||||
class="card mb-2 overflow-hidden relative border-4 border-solid border-white duration-200 flex justify-between items-center p-4"
|
||||
:class="{ 'border-4 border-solid border-blue!': targetWalletType.id == v.walletTypeId }"
|
||||
@click="selectTargetWalletType(v)"
|
||||
>
|
||||
<view class="flex items-center">
|
||||
<image class="w-70 h-70 mr-2" :src="filePath(v.walletTypeIcon)" />
|
||||
<view class="flex flex-col">
|
||||
<view class="main-text-32">{{ v.walletTypeName }}</view>
|
||||
<view class="text-gray-500 text-sm">{{ v.cardNumber }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="main-text-32">余额:{{ hooks.useMoney(v.balance) + "元" }}</view>
|
||||
<!-- 选择转入方式 -->
|
||||
<tm-drawer v-model:show="show" title="选择钱包" size="auto" bg-color="#efefef" :show-footer="false" :showClose="true">
|
||||
<view
|
||||
v-for="(v, index) in wallet.walletList"
|
||||
:key="index"
|
||||
class="card m-2 overflow-hidden relative border-4 border-solid border-white duration-200 flex justify-between items-center p-4"
|
||||
:class="{ 'border-4 border-solid border-blue!': targetWalletType.id == v.walletTypeId }"
|
||||
@click="selectTargetWalletType(v)"
|
||||
>
|
||||
<view class="flex items-center">
|
||||
<image class="w-70 h-70 mr-2" :src="filePath(v.walletTypeIcon)" />
|
||||
<view class="flex flex-col">
|
||||
<view class="main-text-32">{{ v.walletTypeName }}</view>
|
||||
<view class="text-gray-500 text-sm">{{ v.cardNumber }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</tm-drawer>
|
||||
</view>
|
||||
<view class="text-32 c-#0094ff font-bold">余额:{{ hooks.useMoney(v.balance) + "元" }}</view>
|
||||
</view>
|
||||
</tm-drawer>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
+57
-21
@@ -29,7 +29,7 @@ const freezeForm = reactive<any>({
|
||||
remark: "",
|
||||
})
|
||||
|
||||
onLoad(() => { })
|
||||
onLoad(() => {})
|
||||
onShow(async () => {
|
||||
const isLogin = await hooks.useCheckLogin()
|
||||
if (!isLogin) return
|
||||
@@ -140,22 +140,35 @@ const doTransferMoney = (v: any) => {
|
||||
|
||||
<template>
|
||||
<crud-layout bg="/static/page/blue-bg.png">
|
||||
<z-paging ref="pageRef" height="100%" :fixed="false" v-model="pageHook.list" :default-page-size="5"
|
||||
safe-area-inset-bottom :loading-more-enabled="true" :show-scrollbar="false" @query="query"
|
||||
:auto-clean-list-when-reload="false" :auto-scroll-to-top-when-reload="false" @scroll="pageHook.scroll">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
height="100%"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="5"
|
||||
safe-area-inset-bottom
|
||||
:loading-more-enabled="true"
|
||||
:show-scrollbar="false"
|
||||
@query="query"
|
||||
:auto-clean-list-when-reload="false"
|
||||
:auto-scroll-to-top-when-reload="false"
|
||||
@scroll="pageHook.scroll"
|
||||
>
|
||||
<view class="h-30rpx" />
|
||||
<view class="card flex-col rounded-20rpx p-x-30rpx p-y-20rpx m-b-30rpx" v-for="(v, i) in pageHook.list"
|
||||
:key="i" @tap="router.jump('/pages/wallet/detail', { id: v.id })">
|
||||
<view
|
||||
class="card flex-col rounded-20rpx p-x-30rpx p-y-20rpx m-b-30rpx"
|
||||
v-for="(v, i) in pageHook.list"
|
||||
:key="i"
|
||||
@tap="router.jump('/pages/wallet/detail', { id: v.id })"
|
||||
>
|
||||
<view class="flex-col">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row-center">
|
||||
<text v-if="v.cardNumber" class="second-text-28">卡号: {{ v.cardNumber }}</text>
|
||||
</view>
|
||||
<view class="second-text-50">
|
||||
<text v-if="v.cardNumber" class="iconfont icon-fuzhi"
|
||||
@tap.stop="hooks.useCopy(v.cardNumber)" />
|
||||
<text v-if="v.walletTypeUniqueCode != '2'" class="m-l-20rpx iconfont icon-erweima"
|
||||
@tap.stop="doPreviewQrCode(v)" />
|
||||
<text v-if="v.cardNumber" class="iconfont icon-fuzhi" @tap.stop="hooks.useCopy(v.cardNumber)" />
|
||||
<text v-if="v.walletTypeUniqueCode != '2'" class="m-l-20rpx iconfont icon-erweima" @tap.stop="doPreviewQrCode(v)" />
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="v.cardNumber" class="h-1px m-t-10rpx bg-#999 bg-opacity-5" />
|
||||
@@ -178,12 +191,14 @@ const doTransferMoney = (v: any) => {
|
||||
<view class="flex-row items-center justify-end space-x-20rpx m-t-10rpx">
|
||||
<!-- <view v-if="v.walletTypeUniqueCode == 1 && !v.cardNumber" class="botder_btn" @tap.stop="openBindDialog(v)">绑定</view> -->
|
||||
<view v-if="v.isRule == '1'" class="botder_btn" @tap.stop="doTransferMoney(v)">转账</view>
|
||||
<view v-if="v.walletTypeUniqueCode == 1 && v.cardNumber && v.isFreeze != 1" class="botder_btn"
|
||||
@tap.stop="openFreezeDialog(v)">
|
||||
<view v-if="v.walletTypeUniqueCode == 1 && v.cardNumber && v.isFreeze != 1" class="botder_btn" @tap.stop="openFreezeDialog(v)">
|
||||
申请冻结
|
||||
</view>
|
||||
<view v-if="false && v.walletTypeUniqueCode == 2" class="botder_btn"
|
||||
@tap.stop="router.jump('/pages/wallet/recharge', { id: v.id })">
|
||||
<view
|
||||
v-if="false && v.walletTypeUniqueCode == 2"
|
||||
class="botder_btn"
|
||||
@tap.stop="router.jump('/pages/wallet/recharge', { id: v.id })"
|
||||
>
|
||||
去充值
|
||||
</view>
|
||||
</view>
|
||||
@@ -191,19 +206,33 @@ const doTransferMoney = (v: any) => {
|
||||
</z-paging>
|
||||
</crud-layout>
|
||||
|
||||
<tm-drawer z-index="100" v-model:show="state.showBindDialog" :overlayClick="false" title="绑定饭卡" :show-close="true"
|
||||
position="bottom" size="40%">
|
||||
<tm-drawer
|
||||
z-index="100"
|
||||
v-model:show="state.showBindDialog"
|
||||
:overlayClick="false"
|
||||
title="绑定饭卡"
|
||||
:show-close="true"
|
||||
position="bottom"
|
||||
size="40%"
|
||||
>
|
||||
<view class="h-50rpx" />
|
||||
<tm-form ref="bindFormRef" v-model="bindForm" :rules="bindFormRules">
|
||||
<tm-form-item name="cardNumber" :showLabel="false" :showBottom="false">
|
||||
<tm-input v-model="bindForm.cardNumber" showClear placeholder="请输入卡号.." />
|
||||
<tm-input v-model="bindForm.cardNumber" showClear placeholder="请输入卡号..." />
|
||||
</tm-form-item>
|
||||
</tm-form>
|
||||
<view class="h-50rpx" />
|
||||
<view class="bg-#0094ff p-y-20rpx text-center rounded-40rpx sub-text-30 color-white!" @tap="doBind">绑定</view>
|
||||
</tm-drawer>
|
||||
<tm-drawer z-index="100" v-model:show="state.showFreezeDialog" :overlayClick="false" title="申请冻结" :show-close="true"
|
||||
position="bottom" size="40%">
|
||||
<tm-drawer
|
||||
z-index="100"
|
||||
v-model:show="state.showFreezeDialog"
|
||||
:overlayClick="true"
|
||||
title="申请冻结"
|
||||
:show-close="true"
|
||||
position="bottom"
|
||||
size="40%"
|
||||
>
|
||||
<view class="h-50rpx" />
|
||||
<tm-form ref="bindFormRef" v-model="freezeForm">
|
||||
<tm-form-item name="remark" :showLabel="false" :showBottom="false">
|
||||
@@ -213,8 +242,15 @@ const doTransferMoney = (v: any) => {
|
||||
<view class="h-50rpx" />
|
||||
<view class="bg-#0094ff p-y-20rpx text-center rounded-40rpx sub-text-30 color-white!" @tap="doFreeze">冻结</view>
|
||||
</tm-drawer>
|
||||
<tm-drawer z-index="100" v-model:show="state.showQrCodeDialog" :overlayClick="false" title="钱包二维码"
|
||||
:show-close="true" position="bottom" size="50%">
|
||||
<tm-drawer
|
||||
z-index="100"
|
||||
v-model:show="state.showQrCodeDialog"
|
||||
:overlayClick="false"
|
||||
title="钱包二维码"
|
||||
:show-close="true"
|
||||
position="bottom"
|
||||
size="50%"
|
||||
>
|
||||
<view class="flex-col-center">
|
||||
<view class="h-80rpx" />
|
||||
<canvas canvas-id="qrcodeId" class="size-200px" />
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</view>
|
||||
<view v-show="show" class="flex mb-2.5" v-for="(row, rowIndex) in keyboardLayout" :key="rowIndex">
|
||||
<view
|
||||
class="flex-1 h-[80rpx] flex items-center justify-center bg-white text-2xl text-[#333] mx-[5px] rounded-lg cursor-pointer select-none active:bg-[#f0f0f0]"
|
||||
class="flex-1 h-[90rpx] flex items-center justify-center bg-white text-2xl text-[#333] mx-[5px] rounded-lg cursor-pointer select-none active:bg-[#f0f0f0]"
|
||||
v-for="(key, keyIndex) in row"
|
||||
:key="keyIndex"
|
||||
@click="handleKeyPress(key.toString())"
|
||||
@@ -16,22 +16,22 @@
|
||||
</view>
|
||||
<view v-show="show" class="flex mb-0">
|
||||
<view
|
||||
class="flex-1 h-[80rpx] flex items-center justify-center bg-white text-2xl text-[#333] mx-[5px] rounded-lg cursor-pointer select-none active:bg-[#f0f0f0]"
|
||||
class="flex-1 h-[90rpx] flex items-center justify-center bg-white text-2xl text-[#333] mx-[5px] rounded-lg cursor-pointer select-none active:bg-[#f0f0f0]"
|
||||
@click="handleKeyPress('.')"
|
||||
>
|
||||
.
|
||||
</view>
|
||||
<view
|
||||
class="flex-auto h-[80rpx] flex items-center justify-center bg-white text-2xl text-[#333] mx-[5px] rounded-lg cursor-pointer select-none active:bg-[#f0f0f0]"
|
||||
class="flex-auto h-[90rpx] flex items-center justify-center bg-white text-2xl text-[#333] mx-[5px] rounded-lg cursor-pointer select-none active:bg-[#f0f0f0]"
|
||||
@click="handleKeyPress('0')"
|
||||
>
|
||||
0
|
||||
</view>
|
||||
<view
|
||||
class="flex-1 h-[80rpx] flex items-center justify-center bg-white mx-[5px] rounded-lg cursor-pointer select-none active:bg-[#f0f0f0]"
|
||||
class="flex-1 h-[90rpx] flex items-center justify-center bg-white mx-[5px] rounded-lg cursor-pointer select-none active:bg-[#f0f0f0]"
|
||||
@click="handleDelete"
|
||||
>
|
||||
<image class="w-[40rpx] h-[40rpx]" src="@/static/page/keyboardDelete.svg" />
|
||||
<image class="size-45rpx" src="@/static/page/keyboardDelete.svg" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in new issue
Block a user