onLoad() {
this.Show_homebar();
// 获取屏幕宽度
windowWidth = uni.getSystemInfoSync().windowWidth;
uni.setStorage({
key: 'khbm',
data: this.khbm,
success() {}
}),
uni.setStorage({
key: 'khmc',
data: this.khmc,
success() {}
}),
uni.getStorage({
key: 'user_id',
success: e => {
this.user_id = e.data;
}
}),
uni.getStorage({
key: 'shop',
success: e => {
this.ksbm = e.data;
}
}),
uni.getStorage({
key: 'khmcjs',
success: e => {
this.khmcjs = e.data;
}
}),
uni.getStorage({
key: 'date',
success: e => {
this.date_one = e.data;
}
}),
this.Show_tzt();
uni.hideTabBar();
// #ifdef APP-PLUS
this.statusHeight = plus.navigator.getStatusbarHeight();
// #endif
this.amapPlugin = new amap.AMapWX({
//高德地图KEY,随时失效,请务必替换为自己的KEY,参考:http://ask.dcloud.net.cn/article/35070
key: 'fedf7809f280da0d019452aebb9289ec'
});
//定位地址
this.amapPlugin.getRegeo({
success: data => {
this.city = data[0].regeocodeData.addressComponent.city.replace(/市/g, ''); //把"市"去掉
}
});
//开启定时器
this.Timer();
//加载活动专区
this.loadPromotion();
this.loadTabbars();
this.Get_user();
//this.Get_xptj();
}
1 个回复
希
试试加个延时呗,可能页面渲染比数据快,或者在获取数据赋值后面加个强制渲染(猜的,嘿嘿)