Commit 31a854bb by 张立顺

feat 功能禁用

1 parent 88069fb3
......@@ -49,7 +49,8 @@ import {
// Overlay,
// loading,
// SwipeCell
Toast
Toast,
Dialog
} from 'vant'
export const components = [
Toast,
......@@ -84,7 +85,8 @@ export const components = [
// Cascader,
// Checkbox,
// CheckboxGroup,
Notify
Notify,
Dialog
// Icon,
// Empty,
// PullRefresh,
......
......@@ -80,12 +80,18 @@
<img class="logoIcon" src="../images/djLogin.png" />
</div>
</div>
<van-dialog v-model="show" confirm-button-text="知道了" confirm-button-color="#347BFF">
<img class="errorIcon" src="https://img02.glsx.com.cn/weapp/resource/venus-agentic/sass/h5/image/error.png" />
<div class="text ">当前收款码已停用,请联系销售人员</div>
<div class="text text_bottom">重新提供新的收款码,谢谢~</div>
</van-dialog>
</div>
</template>
<script>
import { alipayOauthToken, createWxPayH5, getTitleByModule } from '@/api/alipayApi'
import { baseConfig } from '@/main'
import { Toast, Dialog } from 'vant'
export default {
name: 'Alipay',
data() {
......@@ -120,7 +126,9 @@ export default {
userCollaborationCheck: false,
isYqType: true,
merchantDisabled: false,
appId: ''
appId: '',
disabledPay: false,
show: false
}
},
mounted() {
......@@ -135,7 +143,9 @@ export default {
// 区分是流量方还是导流方
// this.getMiniAppConfig()
this.setMerchantDisabled(merchantId || shopMerchantId)
console.log(merchantId || M, 'merchantId || M')
if (merchantId || M) {
this.setDisabledList(merchantId || M)
this.merchantId = merchantId || M
this.merchantName = merchantName || MN
} else {
......@@ -183,6 +193,15 @@ export default {
this.getTitleByModule()
},
methods: {
// 如果id不住名单中,就弹框提升并禁用cer
setDisabledList(id) {
const { prohibitedList } = baseConfig
this.disabledPay = !prohibitedList.some(item => item.merchantId == id)
console.log(this.disabledPay, prohibitedList)
if (this.disabledPay) {
this.show = true
}
},
setMerchantDisabled(id) {
const { disabledList } = baseConfig
this.merchantDisabled = disabledList.some(item => item.merchantId == id)
......@@ -281,6 +300,9 @@ export default {
handlePay() {
// const _this = this
const { payMoney, unPayMoneyList, userId, userCollaborationName, userCollaborationCheck, merchantDisabled } = this
if (this.disabledPay) {
this.show = true
}
if (payMoney === '' || unPayMoneyList.includes(payMoney)) return
if (userCollaborationName && !userCollaborationCheck && !merchantDisabled) {
return this.showToast(`请先阅读并勾选《${userCollaborationName}》`)
......@@ -667,4 +689,22 @@ export default {
width: 200px;
height: 50px;
}
.text {
text-align: center;
}
.errorIcon {
display: flex;
align-items: center;
width: 117px;
height: 88px;
margin: 30px auto 16px;
}
.text_bottom {
margin-bottom: 32px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!