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

6
im-uniapp/manifest.json

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

5
im-uniapp/pages.json

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

Loading…
Cancel
Save