diff --git a/pageQuota/Balance/bindAccout.vue b/pageQuota/Balance/bindAccout.vue index 6550ee6..69d702c 100644 --- a/pageQuota/Balance/bindAccout.vue +++ b/pageQuota/Balance/bindAccout.vue @@ -9,12 +9,11 @@ {{form.is_own?'对公账户':'个人账户'}} - 更换账户 + 账户绑定 - + {{form.bank_name}} 点击选择开户银行 @@ -59,10 +58,10 @@ - + 个人账户 - + 对公账户 @@ -75,7 +74,8 @@ diff --git a/pageQuota/Balance/detail.vue b/pageQuota/Balance/detail.vue index 91f1ca1..103a5c7 100644 --- a/pageQuota/Balance/detail.vue +++ b/pageQuota/Balance/detail.vue @@ -15,15 +15,16 @@ - - 2024-4-7-2024-4-7 + + {{formatTimestampToYearMonth(nowTimes) }} - + 余额提现至 - {{item.merchant_bank_info.bank_code}} + ({{item.merchant_bank_info.bank_code.substring(item.merchant_bank_info.bank_code.length - 4)}}) {{ item.merchant_bank_info.is_own?"对公" :"个人"}} @@ -39,17 +40,12 @@ {{item.fail_msg}} + - - - - - - + + + @@ -61,12 +57,16 @@ } from "vue" import { UserWithdrawListsApi, - UserWithdrawIndexApi + UserWithdrawIndexApi, + } from "@/api/balance.js" const showDate = ref(false) const count = ref(0) const total = ref(0) + const nowTimes = ref(new Date().getFullYear() + '-' + (new Date().getMonth() + 1)) + + const getInfo = async () => { let res = await UserWithdrawIndexApi() count.value = res.data.count @@ -77,19 +77,29 @@ const lists = ref([]) const getList = async () => { let res = await UserWithdrawListsApi({ - create_time: '2024-05 ' + create_time: nowTimes.value }) lists.value = res.data.lists - console.log(res) } getList() let now = ref(new Date().getTime()) - const confirmDate = (e) => { + function formatTimestampToYearMonth(timestamp) { + var date = new Date(timestamp); + var year = date.getFullYear(); + var month = date.getMonth() + 1; // 月份是从0开始的,所以需要加1 + if (month < 10) { + month = '0' + month; // 如果月份小于10,则在前面补零 + } + return year + '-' + month; + } - console.log(e) + const confirmDate = (e) => { + nowTimes.value = formatTimestampToYearMonth(e.value) + getList() + showDate.value = false } @@ -102,7 +112,6 @@ showPop.value = true } const confirm = (e) => { - console.log(e) showPop.value = false } diff --git a/pageQuota/Balance/index.vue b/pageQuota/Balance/index.vue index 7ec7fae..a56c0d6 100644 --- a/pageQuota/Balance/index.vue +++ b/pageQuota/Balance/index.vue @@ -12,7 +12,7 @@ 提现至 - + {{target_bank.is_own?'对公账户':"个人账户"}} - + @@ -44,8 +43,6 @@ - - @@ -54,6 +51,21 @@ + + + 请选择提现账户 + + + + 个人账户 + + + 对公账户 + + + + @@ -68,6 +80,14 @@ reactive } from 'vue'; const emptyText = '您尚未绑定提现账户,\n点击右上角"添加账户"' + const showPop1 = ref(false) + + const choseAccount = (type) => { + target_bank.value = bank_list.value[type] + console.log(target_bank.value) + showPop1.value = false + } + const showPop = ref(false) const navgo = (url) => { @@ -124,55 +144,6 @@ } - // 使用 reactive 创建响应式状态 - const state = reactive({ - showSex: false, - model1: { - userInfo: { - name: 'uview-plus UI', - sex: '', - }, - }, - actions: [{ - name: '男' - }, - { - name: '女' - }, - { - name: '保密' - }, - ], - rules: { - 'userInfo.name': { - type: 'string', - required: true, - message: '请填写姓名', - trigger: ['blur', 'change'], - }, - 'userInfo.sex': { - type: 'string', - max: 1, - required: true, - message: '请选择男或女', - trigger: ['blur', 'change'], - }, - }, - radio: '', - switchVal: false, - }); - - // 使用 ref 创建响应式引用 - const formRef = ref(null); - - // 定义方法 - function sexSelect(e) { - state.model1.userInfo.sex = e.name; - if (formRef.value) { - formRef.value.validateField('userInfo.sex'); - } - } - getBankList()