tanyanfei 4 년 전
부모
커밋
d214bf68ae
2개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app.js
  2. 8 0
      pages/user/user.js

+ 1 - 1
app.js

@@ -5,7 +5,7 @@ App({
   },
   globalData: {
     userInfo: null,
-    host: 'https://test.scxjc.club',
+    host: 'https://www.hunanwanzhu.com',
     openid: '',
   }
 })

+ 8 - 0
pages/user/user.js

@@ -96,6 +96,14 @@ Page({
               },
               success(res) {
                 //获取openid
+                if(res.data.code != 0){
+                  wx.showToast({
+                    icon: 'none',
+                    title: res.data.message,
+                  })
+                  wx.hideLoading();
+                  return;
+                }
                 data.openid=res.data.data.openid
                 wx.request({
                   url: host + '/api/wx/login',