优化提升页面加载速度
This commit is contained in:
parent
b1f7a48310
commit
27dca505a1
@ -114,7 +114,7 @@
|
||||
"nativePlugins" : {
|
||||
"JG-JCore" : {
|
||||
"JPUSH_APPKEY_ANDROID" : "5ced5ec5fa7bb86302944f0f",
|
||||
"JPUSH_APPKEY_IOS" : "",
|
||||
"JPUSH_APPKEY_IOS" : "5ced5ec5fa7bb86302944f0f",
|
||||
"JPUSH_CHANNEL_ANDROID" : "",
|
||||
"JPUSH_CHANNEL_IOS" : "",
|
||||
"__plugin_info__" : {
|
||||
|
@ -193,14 +193,14 @@
|
||||
methods: {
|
||||
navTo(url) {
|
||||
if (url) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
success() {
|
||||
uni.hideLoading()
|
||||
uni.hideLoading();
|
||||
}
|
||||
})
|
||||
} else Toast('暂未开放');
|
||||
|
@ -370,14 +370,15 @@
|
||||
data_type: '1',
|
||||
datas: []
|
||||
},
|
||||
|
||||
datasList: [], //临时保存列表的
|
||||
listloging: true,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.initInformationDetails({
|
||||
id: options.id
|
||||
});
|
||||
this.initMap();
|
||||
// this.initMap();
|
||||
},
|
||||
onShow() {},
|
||||
computed: {
|
||||
@ -400,18 +401,27 @@
|
||||
},
|
||||
async initInformationDetails(id) {
|
||||
let res = await informationDetails(id);
|
||||
this.$u.sleep(100).then(() => {
|
||||
this.skeleton = false;
|
||||
Object.keys(res.data).forEach(key => {
|
||||
this.formData[key] = res.data[key];
|
||||
})
|
||||
})
|
||||
Object.keys(res.data).forEach(key => {
|
||||
if(key!='datas')this.formData[key] = res.data[key];
|
||||
})
|
||||
this.skeleton = false;
|
||||
this.datasList = res.data['datas'];
|
||||
},
|
||||
toastShow() {
|
||||
Toast('不可修改')
|
||||
},
|
||||
changeCurrent(e) {
|
||||
this.current = e.index;
|
||||
if(e.index==1&&this.listloging){
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
this.formData.datas = [...this.datasList];
|
||||
this.$nextTick(()=>{
|
||||
uni.hideLoading();
|
||||
this.listloging = false;
|
||||
})
|
||||
}
|
||||
},
|
||||
updateTo(time) {
|
||||
return getTimeAgo(time)
|
||||
|
Loading…
x
Reference in New Issue
Block a user