无商户信息时直接关闭应用

This commit is contained in:
weipengfei 2023-11-22 16:10:58 +08:00
parent 1d1f6498e9
commit c6a082d1d7
2 changed files with 18 additions and 2 deletions

View File

@ -121,7 +121,15 @@
getUserInfo().then(res => { getUserInfo().then(res => {
if (res.data.mer_info.length == 0) { if (res.data.mer_info.length == 0) {
return uni.showModal({ return uni.showModal({
title: '暂无商户信息' title: '暂无商户信息',
complete(res) {
// #ifdef APP-PLUS
uni.sendHostEvent('closeApp', (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
});
// #endif
}
}) })
} }
this.mer_id = res.data.service.mer_id; this.mer_id = res.data.service.mer_id;

View File

@ -960,7 +960,15 @@
} }
if (res.data.mer_info.length == 0) { if (res.data.mer_info.length == 0) {
uni.showModal({ uni.showModal({
title: '暂无商户信息' title: '暂无商户信息',
complete(res) {
// #ifdef APP-PLUS
uni.sendHostEvent('closeApp', (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
});
// #endif
}
}) })
} else { } else {
this.getindex() this.getindex()