52457 【手机端】所有流程 任意节点处理完任务都要显示下图
This commit is contained in:
+30
-3
@@ -62,6 +62,7 @@ import { mapMutations, mapActions } from 'vuex'
|
||||
import isMobile from "./store/isMobile";
|
||||
// 路由拦截
|
||||
router.beforeEach(function (to, from, next) {
|
||||
alert(to.name)
|
||||
let toName = to.name
|
||||
let token = store.state.token
|
||||
let path = to.path;
|
||||
@@ -113,7 +114,20 @@ router.beforeEach(function (to, from, next) {
|
||||
/** 判断是不是在手机端操作 */
|
||||
if (isMobile()) {
|
||||
if(toName === 'processCenter'){
|
||||
hwh5.close();
|
||||
// hwh5.close();
|
||||
//关闭当前窗口
|
||||
let userAgent = navigator.userAgent;
|
||||
if (userAgent.indexOf("Firefox") !== -1 || userAgent.indexOf("Chrome") !==-1) {
|
||||
window.location.href="about:blank";
|
||||
}else if(userAgent.indexOf('Android') > -1 || userAgent.indexOf('Linux') > -1){
|
||||
window.opener=null;window.open('about:blank','_self','').close();
|
||||
}else {
|
||||
window.opener = null;
|
||||
window.open("about:blank", "_self");
|
||||
window.close();
|
||||
}
|
||||
//如果是微信打开,关闭当前微信窗口
|
||||
weixinClosePage()
|
||||
}else {
|
||||
if ((token === null || token === '' ) && toName !== 'Login') {
|
||||
if(toName !== 'phoneIndex'){
|
||||
@@ -177,7 +191,21 @@ router.beforeEach(function (to, from, next) {
|
||||
extractedVerify(token)
|
||||
}
|
||||
}
|
||||
|
||||
function weixinClosePage() {
|
||||
if (typeof WeixinJSBridge == "undefined") {
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener('WeixinJSBridgeReady', weixin_ClosePage, false);
|
||||
} else if (document.attachEvent) {
|
||||
document.attachEvent('WeixinJSBridgeReady', weixin_ClosePage);
|
||||
document.attachEvent('onWeixinJSBridgeReady', weixin_ClosePage);
|
||||
}
|
||||
} else {
|
||||
weixin_ClosePage();
|
||||
}
|
||||
}
|
||||
function weixin_ClosePage() {
|
||||
WeixinJSBridge.call('closeWindow');
|
||||
}
|
||||
function extractedVerify() {
|
||||
if (taskId !== undefined && taskId !== null && prcId !== undefined && prcId !== null) {
|
||||
get_verify_by_instance({
|
||||
@@ -187,7 +215,6 @@ router.beforeEach(function (to, from, next) {
|
||||
let hisCount = res.hisCount === undefined ? 0 : res.hisCount;
|
||||
let commitStatus = res.commitStatus === undefined ? 0 : res.commitStatus;
|
||||
let isNotFinished = res.isNotFinished === undefined ? 0 : res.isNotFinished;
|
||||
|
||||
if ((hisCount && hisCount > 0)) { // 业务系统 当前节点已完成
|
||||
if(isMobile()){
|
||||
next('/processedPage')
|
||||
|
||||
Reference in New Issue
Block a user