Commit 632be74c authored by xinzhedeai's avatar xinzhedeai

页面加载 空白显示优化处理

parent ec64a0a8
......@@ -2,9 +2,14 @@
* 请求拦截、相应拦截、错误统一处理
*/
const BASE_URL = 'https://gqyjpt.weihai.cn'
var errors = []
if(localStorage.getItem('wenti')){
errors = JSON.parse(localStorage.getItem('wenti'))
}
localStorage.setItem('wenti', JSON.stringify(errors))
var http2 = {
post: function(params, fn) {
console.log('中台错误信息', JSON.stringify(localStorage.getItem('wenti')))
/**
* 网关验签接口
* @param {1} = appid应用唯一标识
......@@ -46,6 +51,9 @@ var http2 = {
success: true
*/
if(!value){
var errors = JSON.parse(localStorage.getItem('wenti'))
errors.push('中台发生了错误-中台value为undefined')
localStorage.setItem('wenti', JSON.stringify(errors))
// vant.Dialog.alert({
// title: '信息提示',
// message: '网络异常, 请重试',
......@@ -61,6 +69,9 @@ var http2 = {
console.log('vaildInterfacefn响应解密', sm2_decrypt_result)
if(!sm2_decrypt_result){ // 解密为空字符串
var errors = JSON.parse(localStorage.getItem('wenti'))
errors.push('中台发生了错误-解密为空')
localStorage.setItem('wenti', JSON.stringify(errors))
fn && fn(null, 'decrypt')
return
}
......
......@@ -220,7 +220,9 @@ window.addEventListener("load", function() {
if (res) {
console.log('接口回调数据', JSON.parse(res))
setTimeout(() => {
this.$nextTick(()=>{
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
// this.noticeContent = result.noticeContent
......
......@@ -72,7 +72,9 @@ window.addEventListener("load", function() {
}
this.loading = false
setTimeout(() => {
this.$nextTick(()=>{
vant.Toast.clear()
})
}, 0);
this.$nextTick(()=>{
// 滚动条跳转位置
......
......@@ -256,7 +256,9 @@ window.addEventListener("load", function() {
}
this.filePathList = this.form.drillPhotoList || [];
setTimeout(() => {
this.$nextTick(()=>{
vant.Toast.clear()
})
}, 0);
}
})
......
......@@ -82,7 +82,9 @@ window.addEventListener("load", function() {
}
this.loading = false
setTimeout(() => {
this.$nextTick(()=>{
vant.Toast.clear()
})
}, 0);
this.$nextTick(()=>{
// 滚动条跳转位置
......
......@@ -45,7 +45,9 @@ window.addEventListener("load", function() {
this.lawChapter = result.lawChapter
}
setTimeout(() => {
this.$nextTick(()=>{
vant.Toast.clear()
})
}, 0);
})
},
......
......@@ -63,7 +63,9 @@ window.addEventListener("load", function() {
}
this.loading = false
setTimeout(() => {
this.$nextTick(()=>{
vant.Toast.clear()
})
}, 0);
this.$nextTick(()=>{
// 滚动条跳转位置
......
......@@ -64,7 +64,9 @@ window.addEventListener("load", function() {
}
this.loading = false
setTimeout(() => {
this.$nextTick(()=>{
vant.Toast.clear()
})
}, 0);
this.$nextTick(()=>{
// 滚动条跳转位置
......
......@@ -67,7 +67,9 @@ window.addEventListener("load", function() {
}
this.loading = false
setTimeout(() => {
this.$nextTick(()=>{
vant.Toast.clear()
})
}, 0);
this.$nextTick(()=>{
// 滚动条跳转位置
......
......@@ -44,7 +44,9 @@ window.addEventListener("load", function() {
this.noticeContent = result.noticeContent
}
setTimeout(() => {
this.$nextTick(()=>{
vant.Toast.clear()
})
}, 0);
})
},
......
......@@ -65,7 +65,9 @@ window.addEventListener("load", function() {
}
this.loading = false
setTimeout(() => {
this.$nextTick(()=>{
vant.Toast.clear()
})
}, 0);
this.$nextTick(()=>{
// 滚动条跳转位置
......
......@@ -116,7 +116,9 @@ window.addEventListener("load", function() {
// 隐患状态 成功和待验证 则不允许编辑
this.disabled = this.form.hdStatus === 1 || this.form.hdStatus === 3
setTimeout(() => {
this.$nextTick(()=>{
vant.Toast.clear()
})
}, 0);
}
......
......@@ -63,7 +63,9 @@ window.addEventListener("load", function() {
}
this.loadFlag = false
setTimeout(() => {
this.$nextTick(()=>{
vant.Toast.clear()
})
}, 0);
// console.log('响应结束',this.total, this.list.length)
this.$nextTick(()=>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment