Browse Source

启动界面优化

master
xsx 1 year ago
parent
commit
7e1a3ecd41
  1. 18
      im-uniapp/App.vue
  2. 6
      im-uniapp/manifest.json
  3. 5
      im-uniapp/pages.json

18
im-uniapp/App.vue

@ -356,6 +356,15 @@ export default {
url: '/user/self',
method: 'GET'
})
},
closeSplashscreen(delay) {
// #ifdef APP-PLUS
//
setTimeout(() => {
console.log("plus.navigator.closeSplashscreen()")
plus.navigator.closeSplashscreen()
}, delay)
// #endif
}
},
onLaunch() {
@ -365,17 +374,14 @@ export default {
this.refreshToken(loginInfo).then(() => {
//
this.init();
//
uni.switchTab({
url: "/pages/chat/chat"
})
this.closeSplashscreen(0);
}).catch(() => {
//
// #ifdef H5
uni.navigateTo({
url: "/pages/login/login"
})
// #endif
// 1s
this.closeSplashscreen(1000);
})
}
}

6
im-uniapp/manifest.json

@ -11,9 +11,9 @@
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"alwaysShowBeforeRender" : false,
"waiting" : false,
"autoclose" : false,
"delay" : 0
},
/* */

5
im-uniapp/pages.json

@ -8,14 +8,13 @@
}
},
"pages": [{
"path": "pages/chat/chat"
}, {
"path": "pages/login/login"
},
{
"path": "pages/register/register"
},
{
"path": "pages/chat/chat"
},
{
"path": "pages/friend/friend"
},

Loading…
Cancel
Save