tanyanfei před 2 roky
rodič
revize
3a957e6389
4 změnil soubory, kde provedl 15 přidání a 8 odebrání
  1. 6 1
      pages/index/index.js
  2. 3 1
      pages/user/user.js
  3. 1 1
      project.config.json
  4. 5 5
      utils/api.js

+ 6 - 1
pages/index/index.js

@@ -90,7 +90,6 @@ Page({
       this.setData({
         error:1
       })
-      // console.log(err)
     })
   },
   //胜率分页
@@ -302,6 +301,12 @@ Page({
   onShow: function (e) {
     //判断是否报名
     $api.getAuthinfo().then(res=>{
+      if(res.data.data.phone == null || res.data.data.phone==''){
+        wx.switchTab({
+          url: '../user/user',
+        })
+      }
+    
       if(res.data.data.role==0){
         wx.navigateTo({
           url: '../apply/apply',

+ 3 - 1
pages/user/user.js

@@ -71,7 +71,9 @@ Page({
       wx.setNavigationBarTitle({
         title: '',
       })
-      
+      if(res.data.data.phone == null || res.data.data.phone==''){
+        return
+      }
       if(res.data.data.role==0){
         wx.navigateTo({
           url: '../apply/apply',

+ 1 - 1
project.config.json

@@ -45,7 +45,7 @@
   },
   "compileType": "miniprogram",
   "libVersion": "2.15.0",
-  "appid": "wx2938132b773c7b5a",
+  "appid": "wxb299e10e65157301",
   "projectname": "newwzb_xcx",
   "simulatorType": "wechat",
   "simulatorPluginLibVersion": {},

+ 5 - 5
utils/api.js

@@ -42,11 +42,11 @@ function request(method, url, data) {
             }else{
               wx.hideNavigationBarLoading()
               wx.hideLoading()
-              wx.showToast({
-                title: res.data.message,
-                icon:'none',
-                duration:3000
-              })
+              // wx.showToast({
+              //   title: res.data.message,
+              //   icon:'none',
+              //   duration:3000
+              // })
             }
           },
           fail(err) {