update
This commit is contained in:
@@ -6,10 +6,24 @@ import XLink from "../../components/XLink.vue";
|
||||
import Right from "../../static/icons/right.png";
|
||||
import {toPage} from "../../utils/uils.js";
|
||||
import WithdrawalModal from "./components/WithdrawalModal.vue";
|
||||
import {useUserStore} from "../../pinia/UserStore/index.js";
|
||||
import {onShow} from "@dcloudio/uni-app";
|
||||
import Api from "../../api/index.js";
|
||||
import {ref} from "vue";
|
||||
import ZFENUM from "../../enum/ZFENUM.js";
|
||||
|
||||
const withdrawal = async () => {
|
||||
const UserStore = useUserStore();
|
||||
|
||||
const defaultDrawal = ref();
|
||||
const getData = async () => {
|
||||
await UserStore.getUserInfo();
|
||||
const {data: _defaultDrawal} = await Api.system.getDefaultWithdrawalInfo();
|
||||
defaultDrawal.value = _defaultDrawal;
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
getData();
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -18,6 +32,7 @@ const withdrawal = async () => {
|
||||
|
||||
<view class="!flex flex-col gap-[20rpx] p-[20rpx]">
|
||||
<view class="py-[20rpx] pl-[30rpx] pr-[24rpx] rounded-[12rpx] bg-[#fff] w-full !flex gap-[22rpx] items-center"
|
||||
v-if="!defaultDrawal?.id"
|
||||
@click="toPage('/pages/paymentAccount/index')">
|
||||
<image class="!size-[72rpx]" mode="aspectFill" :src="ICON1"></image>
|
||||
<view class="text-[#86909C] test-28r">您还没有添加收款信息~</view>
|
||||
@@ -25,15 +40,24 @@ const withdrawal = async () => {
|
||||
<image class="!w-[12rpx]" mode="widthFix" :src="ICON2"></image>
|
||||
</view>
|
||||
|
||||
<view class="py-[20rpx] pl-[30rpx] pr-[24rpx] rounded-[12rpx] bg-[#fff] w-full !flex gap-[22rpx] items-center"
|
||||
v-else
|
||||
@click="toPage('/pages/paymentAccount/index')">
|
||||
<image class="!size-[72rpx] rounded-[20rpx]" mode="aspectFill" :src="ZFENUM[defaultDrawal.type]"></image>
|
||||
<view class="text-[#1D2129] test-28r">{{ defaultDrawal.account }}</view>
|
||||
<image class="!w-[12rpx] !ml-auto" mode="widthFix" :src="ICON2"></image>
|
||||
</view>
|
||||
|
||||
<view class="py-[32rpx] px-[24rpx] rounded-[12rpx] bg-[#fff] w-full">
|
||||
<view class="!flex items-center justify-between">
|
||||
<view>
|
||||
<view class="test-28r">可提现余额(元)</view>
|
||||
<view class="HarmonyOS" style="font-size: 60rpx;font-weight: 500;">0.00</view>
|
||||
<view class="HarmonyOS" style="font-size: 60rpx;font-weight: 500;">
|
||||
{{ UserStore.userInfo.money.toFixed(2) }}
|
||||
</view>
|
||||
</view>
|
||||
<withdrawal-modal>
|
||||
<withdrawal-modal @success="getData">
|
||||
<view
|
||||
@click=""
|
||||
class="py-[8rpx] bg-[var(--primary-color)] text-[#fff] rounded-full w-[200rpx] !flex justify-center items-center">
|
||||
立即提现
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user