Quellcode durchsuchen

feat: 优化小程序

xiansin vor 2 Jahren
Ursprung
Commit
d27d5bb587
2 geänderte Dateien mit 8 neuen und 2 gelöschten Zeilen
  1. 2 2
      mini/pages.json
  2. 6 0
      mini/pages/login.vue

+ 2 - 2
mini/pages.json

xqd
@@ -21,10 +21,10 @@
       "path": "pages/login",
       "style": {
         // #ifdef  MP-KUAISHOU
-        "navigationBarTitleText": "四海剧场",
+        "navigationBarTitleText": "四海剧场|login",
         // #endif
         // #ifdef  MP-TOUTIAO | MP-WEIXIN
-        "navigationBarTitleText": "张四爷剧场",
+        "navigationBarTitleText": "张四爷剧场|login",
         // #endif
         "enablePullDownRefresh": false
       }

+ 6 - 0
mini/pages/login.vue

xqd
@@ -52,6 +52,12 @@ export default {
   },
   onLoad(options) {
     console.log('-->data', options)
+    if (this.$api.user.isLogin()) {
+      uni.reLaunch({
+        url: '/pages/index/index'
+      })
+      return
+    }
     this.path = options.path ? options.path : this.path
     this.path = this.path.replace('//', '/')
     this.path = this.path.indexOf('/') !== 0 ? '/' + this.path : this.path