feat: There is no way the,iphone config

This commit is contained in:
super_liu
2021-12-22 17:25:29 +08:00
parent 2c47e66911
commit ee41b01f3d
3 changed files with 34 additions and 6 deletions
+8 -2
View File
@@ -109,8 +109,14 @@ router.beforeEach(function (to, from, next) {
debugger
if (isMobile()) {
if(toName === 'processCenter'){
window.opener = null;
window.open("about:blank", "_self").close()
const userAgent = navigator.userAgent;
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();
}
}else {
if ((token === null || token === '' ) && toName !== 'Login') {
if(toName !== 'phoneIndex'){
+13 -2
View File
@@ -2,7 +2,7 @@
<div class="blankPage">
<van-icon name="clear" color="#dabb27" size="70"/>
<div style="font-size: 15px;margin-top: 20px;color: #8c939d">当前任务不支持手机端处理</div>
<el-button type="primary" size="small" style="margin-top: 30px;width: 270px;" @click="$router.go(-1)">返回</el-button>
<el-button type="primary" size="small" style="margin-top: 30px;width: 270px;" @click="closeWindow()">返回</el-button>
</div>
</template>
@@ -16,7 +16,18 @@ export default {
data() {
return {}
},
methods: {}
methods: {
closeWindow(){
const userAgent = navigator.userAgent;
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();
}
}
}
}
</script>
+13 -2
View File
@@ -2,7 +2,7 @@
<div class="processedPage">
<van-icon name="checked" color="#1fcd24" size="70"/>
<div style="font-size: 15px;margin-top: 20px;color: #8c939d">当前任务已处理</div>
<el-button type="primary" size="small" style="margin-top: 30px;width: 270px;" @click="$router.go(-1)">返回</el-button>
<el-button type="primary" size="small" style="margin-top: 30px;width: 270px;" @click="closeWindow()">返回</el-button>
</div>
</template>
@@ -16,7 +16,18 @@ export default {
data() {
return {}
},
methods: {}
methods: {
closeWindow(){
const userAgent = navigator.userAgent;
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();
}
}
}
}
</script>