yerong 4 anni fa
parent
commit
d596761edf
2 ha cambiato i file con 5 aggiunte e 6 eliminazioni
  1. 0 1
      .gitignore
  2. 5 5
      src/pages/index/index.vue

+ 0 - 1
.gitignore

@@ -3,7 +3,6 @@ node_modules/
 npm-debug.log*
 yarn-debug.log*
 yarn-error.log*
-dist/
 # Editor directories and files
 .idea
 *.suo

+ 5 - 5
src/pages/index/index.vue

@@ -136,11 +136,6 @@ export default {
     }
   },
   mounted() {
-    wx.login({
-      success(res){
-        console.log(res);
-      }
-    })
   },
   onShow() {
     userDetail().then((res) => {
@@ -155,6 +150,11 @@ export default {
   onUnload() {
   },
   onLoad($option) {
+    wx.login({
+      success(res){
+        console.log(res);
+      }
+    })
     //  判断存储是否登录
     let $token = wx.getStorageSync('token')
     if ($token) {