Commit 5ff39f0a by 李伟康

fix(pages): 页面加载时隐藏加载提示并优化初始化逻辑

在多个页面的 onLoad 生命周期中添加 uni.hideLoading() 调用,确保页面加载时及时隐藏加载提示。同时移除了 login 页面中重复的 toolkit 配置设置,避免不必要的初始化操作。
1 parent d71f20c8
......@@ -116,6 +116,7 @@ export default {
return false;
},
async onLoad () {
uni.hideLoading()
await uni.$api.systemApi.getMockData(true) //获取APP配置信息
this.init();
this.requested = true
......
......@@ -129,7 +129,6 @@ export default {
},
onLoad (options) {
uni.$signHttp = new Request(uni.signHttpConfig) //重新登录重置请求参数
this.setToolkitConfig()
if (options.mobile) this.mobile = options.mobile
const noSignInUuid = uni.$storage.get('noSignInUuid')
if (noSignInUuid) this.autoLogin(noSignInUuid)
......
......@@ -82,6 +82,7 @@ export default {
return false
},
async onLoad () {
uni.hideLoading()
const mockdata = await uni.$api.systemApi.getMockData(true) //获取APP配置信息
if (this.channelType == 1 && mockdata.boutiqueDefaultCarBrandId) {
this.$store.state.user.boutiqueDefaultCarBrandId = mockdata.boutiqueDefaultCarBrandId //默认车辆品牌
......
......@@ -36,6 +36,7 @@ export default {
return false
},
async onLoad () {
uni.hideLoading()
},
async onShow () {
const userInfo = uni.$storage.get('userInfo')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!