fix: 修复bug
This commit is contained in:
@@ -10,38 +10,46 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="withdrawal-type-page min-h-screen pb-100">
|
<view class="withdrawal-type-page min-h-screen pb-100">
|
||||||
<template v-if="list.length > 0">
|
<template v-if="list.length > 0">
|
||||||
<view
|
<wd-swipe-action v-for="item in list" :key="item.id">
|
||||||
class="flex items-center justify-between py-15 text-14 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10 m-15 p-15"
|
<view
|
||||||
v-for="item in list"
|
class="flex items-center justify-between py-15 text-14 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10 m-15 p-15"
|
||||||
:key="item.id"
|
@click="onSelectType(item)"
|
||||||
@click="onSelectType(item)"
|
>
|
||||||
>
|
<image
|
||||||
<image
|
v-if="Number(item.card_type) === 1"
|
||||||
v-if="Number(item.card_type) === 1"
|
class="w-45 h-45"
|
||||||
class="w-45 h-45"
|
src="@/static/images/invest/unionpay-icon.png"
|
||||||
src="@/static/images/invest/unionpay-icon.png"
|
mode="aspectFit"
|
||||||
mode="aspectFit"
|
/>
|
||||||
/>
|
<image
|
||||||
<image
|
v-if="Number(item.card_type) === 2"
|
||||||
v-if="Number(item.card_type) === 2"
|
class="w-45 h-45"
|
||||||
class="w-45 h-45"
|
src="@/static/images/invest/alipay-icon.png"
|
||||||
src="@/static/images/invest/alipay-icon.png"
|
mode="aspectFit"
|
||||||
mode="aspectFit"
|
/>
|
||||||
/>
|
<image
|
||||||
<image
|
v-if="Number(item.card_type) === 3"
|
||||||
v-if="Number(item.card_type) === 3"
|
class="w-45 h-45"
|
||||||
class="w-45 h-45"
|
src="@/static/images/invest/wechat-icon.png"
|
||||||
src="@/static/images/invest/wechat-icon.png"
|
mode="aspectFit"
|
||||||
mode="aspectFit"
|
/>
|
||||||
/>
|
<view class="flex-1 ml-15">
|
||||||
<view class="flex-1 ml-15">
|
<view class="text-16 font-bold">
|
||||||
<view class="text-16 font-bold">
|
{{ ['银行卡', '支付宝', '微信'][Number(item.card_type) - 1] }}
|
||||||
{{ ['银行卡', '支付宝', '微信'][Number(item.card_type) - 1] }}
|
</view>
|
||||||
|
<view class="mt-10 text-14 text-#889BC6">{{ item.card_account }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-10 text-14 text-#889BC6">{{ item.card_account }}</view>
|
<wd-icon v-if="isSelect" name="arrow-right" size="14px"></wd-icon>
|
||||||
</view>
|
</view>
|
||||||
<wd-icon v-if="isSelect" name="arrow-right" size="14px"></wd-icon>
|
<template #right>
|
||||||
</view>
|
<view
|
||||||
|
class="px-15 mr-15 rounded-10 bg-#ff000040 h-full flex items-center text-14 text-red-600"
|
||||||
|
@click="onDelete(item)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</wd-swipe-action>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<wd-status-tip image="content" tip="暂无内容" />
|
<wd-status-tip image="content" tip="暂无内容" />
|
||||||
@@ -55,7 +63,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getBankCardListAPI } from '@/service'
|
import { deleteBankCardAPI, getBankCardListAPI } from '@/service'
|
||||||
|
import { showModal } from '@/utils'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
|
||||||
const isSelect = ref(false)
|
const isSelect = ref(false)
|
||||||
@@ -82,8 +91,21 @@ const onAddType = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onDelete = async (item) => {
|
||||||
|
await showModal('确认删除?')
|
||||||
|
await deleteBankCardAPI({
|
||||||
|
card_account: item.card_account,
|
||||||
|
})
|
||||||
|
await showModal('删除成功')
|
||||||
|
loadData()
|
||||||
|
}
|
||||||
|
|
||||||
const list = ref([])
|
const list = ref([])
|
||||||
onShow(async () => {
|
const loadData = async () => {
|
||||||
list.value = (await getBankCardListAPI().then((res) => res.data)) as any
|
list.value = (await getBankCardListAPI().then((res) => res.data)) as any
|
||||||
|
}
|
||||||
|
|
||||||
|
onShow(async () => {
|
||||||
|
loadData()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
class="bg-white fixed bottom-0 left-0 right-0 px-15 py-10 shadow-[0_0_10px_rgba(10,68,245,0.1)]"
|
class="bg-white fixed bottom-0 left-0 right-0 px-15 py-10 shadow-[0_0_10px_rgba(10,68,245,0.1)]"
|
||||||
>
|
>
|
||||||
<view class="flex items-center pb-safe">
|
<view class="flex items-center pb-safe">
|
||||||
<view class="text-gradient flex-1 text-14">到账CNY:13123.00</view>
|
<view class="text-gradient flex-1 text-14">到账CNY:{{ form.cash_money }}</view>
|
||||||
<view
|
<view
|
||||||
class="btn-gradient text-center text-white rounded-full text-14 px-30 py-10"
|
class="btn-gradient text-center text-white rounded-full text-14 px-30 py-10"
|
||||||
@click="onSubmit"
|
@click="onSubmit"
|
||||||
|
|||||||
Reference in New Issue
Block a user