Commit 592c23d0 by 前端

Merge branch 'SAAS+V5.5.0' into 'master'

上线合并

See merge request !11
2 parents 88069fb3 55ff46e6
...@@ -49,7 +49,8 @@ import { ...@@ -49,7 +49,8 @@ import {
// Overlay, // Overlay,
// loading, // loading,
// SwipeCell // SwipeCell
Toast Toast,
Dialog
} from 'vant' } from 'vant'
export const components = [ export const components = [
Toast, Toast,
...@@ -84,7 +85,8 @@ export const components = [ ...@@ -84,7 +85,8 @@ export const components = [
// Cascader, // Cascader,
// Checkbox, // Checkbox,
// CheckboxGroup, // CheckboxGroup,
Notify Notify,
Dialog
// Icon, // Icon,
// Empty, // Empty,
// PullRefresh, // PullRefresh,
......
...@@ -80,6 +80,11 @@ ...@@ -80,6 +80,11 @@
<img class="logoIcon" src="../images/djLogin.png" /> <img class="logoIcon" src="../images/djLogin.png" />
</div> </div>
</div> </div>
<van-dialog v-model="show" confirm-button-text="知道了" confirm-button-color="#347BFF" @confirm="handleConfirm">
<img class="errorIcon" src="https://img02.glsx.com.cn/weapp/resource/saas/h5/image/error.png" />
<div class="text ">当前收款码已停用,请联系销售人员</div>
<div class="text text_bottom">重新提供新的收款码,谢谢~</div>
</van-dialog>
</div> </div>
</template> </template>
...@@ -120,7 +125,9 @@ export default { ...@@ -120,7 +125,9 @@ export default {
userCollaborationCheck: false, userCollaborationCheck: false,
isYqType: true, isYqType: true,
merchantDisabled: false, merchantDisabled: false,
appId: '' appId: '',
disabledPay: false,
show: false
} }
}, },
mounted() { mounted() {
...@@ -135,7 +142,9 @@ export default { ...@@ -135,7 +142,9 @@ export default {
// 区分是流量方还是导流方 // 区分是流量方还是导流方
// this.getMiniAppConfig() // this.getMiniAppConfig()
this.setMerchantDisabled(merchantId || shopMerchantId) this.setMerchantDisabled(merchantId || shopMerchantId)
console.log(merchantId || M, 'merchantId || M')
if (merchantId || M) { if (merchantId || M) {
this.setDisabledList(merchantId || M)
this.merchantId = merchantId || M this.merchantId = merchantId || M
this.merchantName = merchantName || MN this.merchantName = merchantName || MN
} else { } else {
...@@ -183,6 +192,62 @@ export default { ...@@ -183,6 +192,62 @@ export default {
this.getTitleByModule() this.getTitleByModule()
}, },
methods: { methods: {
handleConfirm() {
function isAlipay() {
var ua = window.navigator.userAgent.toLowerCase();
return ua.indexOf('alipay') !== -1;
}
function closeAlipay() {
if (window.AlipayJSBridge) {
window.AlipayJSBridge.call('closeWebview');
} else {
document.addEventListener('AlipayJSBridgeReady', function () {
window.AlipayJSBridge && window.AlipayJSBridge.call('closeWebview');
}, false);
}
}
function isPc() {
var userAgent = navigator.userAgent;
let Agents = ["Android", "iPhone",
"SymbianOS", "Windows Phone",
"iPad", "iPod"];
var flag = true;
for (let v = 0; v < Agents.length; v++) {
if (userAgent.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
return flag;
}
var userAgent = navigator.userAgent;
if (isAlipay()) {
closeAlipay();
return;
}
if (!isPc()) {
window.opener = null; window.open('about:blank', '_self', '').close();
}
if (userAgent.indexOf("Firefox") != -1 || userAgent.indexOf("Chrome") != -1) {
window.location.href = "about:blank";
}
else {
window.opener = null;
window.open("about:blank", "_self");
window.close();
}
},
// 如果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) { setMerchantDisabled(id) {
const { disabledList } = baseConfig const { disabledList } = baseConfig
this.merchantDisabled = disabledList.some(item => item.merchantId == id) this.merchantDisabled = disabledList.some(item => item.merchantId == id)
...@@ -281,6 +346,9 @@ export default { ...@@ -281,6 +346,9 @@ export default {
handlePay() { handlePay() {
// const _this = this // const _this = this
const { payMoney, unPayMoneyList, userId, userCollaborationName, userCollaborationCheck, merchantDisabled } = this const { payMoney, unPayMoneyList, userId, userCollaborationName, userCollaborationCheck, merchantDisabled } = this
if (this.disabledPay) {
this.show = true
}
if (payMoney === '' || unPayMoneyList.includes(payMoney)) return if (payMoney === '' || unPayMoneyList.includes(payMoney)) return
if (userCollaborationName && !userCollaborationCheck && !merchantDisabled) { if (userCollaborationName && !userCollaborationCheck && !merchantDisabled) {
return this.showToast(`请先阅读并勾选《${userCollaborationName}》`) return this.showToast(`请先阅读并勾选《${userCollaborationName}》`)
...@@ -667,4 +735,22 @@ export default { ...@@ -667,4 +735,22 @@ export default {
width: 200px; width: 200px;
height: 50px; height: 50px;
} }
.text {
text-align: center;
}
.errorIcon {
display: flex;
align-items: center;
width: 234px;
height: 176px;
margin: 30px auto 16px;
}
.text_bottom {
margin-bottom: 32px;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!