pc端跳转取消loading
This commit is contained in:
+15
-10
@@ -73,15 +73,20 @@ router.beforeEach(function (to, from, next) {
|
|||||||
// const endUrl = currentURL.slice(index + 2)
|
// const endUrl = currentURL.slice(index + 2)
|
||||||
// window.location.href = startUrl + endUrl
|
// window.location.href = startUrl + endUrl
|
||||||
// }
|
// }
|
||||||
let loading = Loading.service({
|
closeLoading()
|
||||||
text: '加载中...',
|
if (isMobile()){
|
||||||
background: '#fff'
|
var loading = Loading.service({
|
||||||
});
|
text: '加载中...',
|
||||||
|
background: '#fff'
|
||||||
|
});
|
||||||
|
}
|
||||||
function closeLoading(){
|
function closeLoading(){
|
||||||
setTimeout(() => {
|
if (loading) {
|
||||||
loading.close()
|
setTimeout(() => {
|
||||||
loading = null
|
loading.close()
|
||||||
}, 3000)
|
loading = null
|
||||||
|
}, 3000)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let fromName = from.name
|
let fromName = from.name
|
||||||
if(fromName === undefined || fromName === null){
|
if(fromName === undefined || fromName === null){
|
||||||
@@ -261,7 +266,7 @@ router.beforeEach(function (to, from, next) {
|
|||||||
closeLoading()
|
closeLoading()
|
||||||
}else {
|
}else {
|
||||||
|
|
||||||
console.log('-bussLibrary4-')
|
console.log('-pc端-')
|
||||||
extractedVerify()
|
extractedVerify()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -281,7 +286,7 @@ router.beforeEach(function (to, from, next) {
|
|||||||
closeLoading()
|
closeLoading()
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
console.log('-phoneBussLibrary4-')
|
console.log('-phone端-')
|
||||||
next()
|
next()
|
||||||
closeLoading()
|
closeLoading()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user