【新增】增加【用户提现】功能开关,前端根据设置限制访问,同时优化充值后台设置后前端的限制。

This commit is contained in:
jianweie code
2023-11-18 19:33:38 +08:00
parent 3b93ccbf0b
commit 33bd32870e
7 changed files with 50 additions and 8 deletions

View File

@@ -21,7 +21,7 @@
<u-icon name="gift" size="16" class="coreshop-text-grey" label="账户充值"></u-icon>
</view>
</view>
<view class="coreshop-list-item arrow" @click="navigateToHandle('/pages/member/balance/withdrawCash/withdrawCash')">
<view class="coreshop-list-item arrow" v-if="isAllowWithdrawCash" @click="navigateToHandle('/pages/member/balance/withdrawCash/withdrawCash')">
<view class="content">
<u-icon name="rmb" size="16" class="coreshop-text-yellow" label="余额提现"></u-icon>
</view>
@@ -51,13 +51,16 @@
data() {
return {
userInfo: {},
platform: 'ios',
platform: 'ios'
}
},
computed: {
showRecharge() {
return this.$store.state.config.showStoreBalanceRechargeSwitch === 1;
}
},
isAllowWithdrawCash() {
return this.$store.state.config.isAllowWithdrawCash === 1;
},
},
onShow() {
this.getUserInfo();

View File

@@ -10,7 +10,7 @@
<view slot="right">
</view>
</u-navbar>
<view class="coreshop-bg-white coreshop-margin-10 coreshop-padding-10">
<view class="coreshop-bg-white coreshop-margin-10 coreshop-padding-10" v-if="showRecharge">
<u--form :model="form" :rules="rules" ref="uForm" errorType="message" labelPosition="left" labelWidth="80">
<u-form-item label="当前金额" borderBottom>
<view class="coreshop-text-red coreshop-text-price coreshop-font-17">{{ user.balance || '0'}}</view>
@@ -54,6 +54,15 @@
<u-button type="error" size="normal" @click="navigateToHandle">去支付</u-button>
</view>
</view>
<view v-else>
<view class="page-box">
<view>
<view class="coreshop-emptybox">
<u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/coupon.png'" icon-size="150" mode="order" text="暂未充值功能"></u-empty>
</view>
</view>
</view>
</view>
</view>
</template>
@@ -83,6 +92,11 @@
orderType: this.$globalConstVars.paymentType.recharge // 储值类型
}
},
computed: {
showRecharge() {
return this.$store.state.config.showStoreBalanceRechargeSwitch === 1;
}
},
onReady() {
this.$refs.uForm.setRules(this.rules);
},

View File

@@ -10,7 +10,7 @@
<view slot="right">
</view>
</u-navbar>
<view class="content">
<view class="content" v-if="isAllowWithdrawCash">
<view class="coreshop-tabbar-height">
<!-- 我的银行卡信息 -->
<view class="coreshop-list menu sm-border margin-top" v-if="userbankCard" @click="toBankCardList">
@@ -54,6 +54,15 @@
<u-button size="normal" v-else-if="!isSubmit" disabled>确认提现</u-button>
</view>
</view>
<view v-else>
<view class="page-box">
<view>
<view class="coreshop-emptybox">
<u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/coupon.png'" icon-size="150" mode="order" text="暂未开启提现功能"></u-empty>
</view>
</view>
</view>
</view>
</view>
</template>
@@ -109,7 +118,10 @@
} else {
return ''
}
}
},
isAllowWithdrawCash() {
return this.$store.state.config.isAllowWithdrawCash === 1;
},
},
methods: {
// 获取我的默认银行卡信息