|
|
@@ -5,7 +5,7 @@ import { storeToRefs } from 'pinia'
|
|
|
import { computed, ref, watch } from 'vue'
|
|
|
import dayjs from 'dayjs'
|
|
|
import { getAccountCount } from '@/api/home'
|
|
|
-import { getBankSignRecord } from '@/api/pay'
|
|
|
+import { getBankSignRecord, bankCardAuth } from '@/api/pay'
|
|
|
import { getCouponIssuerAccountByPageMap } from '@/api/income'
|
|
|
import IncomeItem from '@/components/IncomeItem.vue'
|
|
|
import MescrollBody from '@/custom-components/custom-mescroll/mescroll-body.vue'
|
|
|
@@ -318,9 +318,41 @@ function goToWithdrawal() {
|
|
|
// 获取可提现余额
|
|
|
const money = accountCountData.value?.withdrawableAmount || 0
|
|
|
const bankNumber = accountCountData.value?.bankNumber || 0
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages-B/payment/withdrawal?m=${money}&bankNumber=${bankNumber}`,
|
|
|
- })
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: `/pages-B/payment/withdrawal?m=${money}&bankNumber=${bankNumber}`,
|
|
|
+ // })
|
|
|
+ bankCardAuth({ clientApp: "COUPON_CENTER_WECHAT_MINIAPP" }).then((res: any) => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ const { status, certificationUrl } = res.data.result;
|
|
|
+ switch (status) {
|
|
|
+ case 'NEED_CERTIFICATION':
|
|
|
+ // 会员注册确认
|
|
|
+ confirmRegister(certificationUrl);
|
|
|
+ break;
|
|
|
+ case 'FAILED':
|
|
|
+ uni.$u.toast('会员认证失败');
|
|
|
+ break;
|
|
|
+ case 'READY':
|
|
|
+ // 跳转提现页面
|
|
|
+ uni.navigateTo({ url: `/pages-B/payment/withdrawal?m=${money}&bankNumber=${bankNumber}` });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ uni.$u.toast(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+// 会员注册确认-跳转三方链接
|
|
|
+function confirmRegister(url: string) {
|
|
|
+ // #ifdef H5
|
|
|
+ window.location.href = url;
|
|
|
+ // #endif
|
|
|
+ // #ifndef H5
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages-B/payment/web-view?webUrl=${encodeURIComponent(url)}`,
|
|
|
+ });
|
|
|
+ // #endif
|
|
|
}
|
|
|
|
|
|
function handleItemClick(item: any) {
|