Browse Source

no message

宇宙无敌M1处理器的MacBook Pro 4 years ago
parent
commit
1630fae7f8
3 changed files with 4 additions and 3 deletions
  1. 1 1
      mini/pages/login/index.wxml
  2. 1 1
      mini/project.config.json
  3. 2 1
      mini/utils/util.js

+ 1 - 1
mini/pages/login/index.wxml

xqd
@@ -29,7 +29,7 @@
       </block>
       <block wx:elif="{{ type == 'wechat' }}">
         <van-button type="primary" block="true" round="true" custom-class="sg-margin-top sg-shadow"
-        bind:getuserinfo="getUserInfo" icon="http://t18.9026.com/mini/wechat2.png" open-type="getUserInfo">微信账号快捷登录</van-button>
+        bind:getphonenumber="getUserInfo" icon="http://t18.9026.com/mini/wechat2.png" open-type="getPhoneNumber">微信账号快捷登录</van-button>
           <van-button type="info" block="true" round="true" color="#195ED7" custom-class="sg-margin-top sg-shadow" bindtap="switchType" data-type="mobile">返回手机登录</van-button>
       </block>
       <block wx:if="{{ type == 'mobile' }}">

+ 1 - 1
mini/project.config.json

xqd
@@ -23,7 +23,7 @@
     "compileHotReLoad": false,
     "useMultiFrameRuntime": true,
     "useApiHook": true,
-    "useApiHostProcess": true,
+    "useApiHostProcess": false,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],

+ 2 - 1
mini/utils/util.js

xqd
@@ -88,7 +88,8 @@ const callLogin = (data, redirect, cb) => {
 }
 
 const wechatLogin = (e, redirect = false, cb = null, bind = false) => {
-  if (e.detail.errMsg == 'getUserInfo:ok') {
+  console.log(e)
+  if (e.detail.errMsg == 'getPhoneNumber:ok') {
     wx.checkSession({
       success() {
         callLogin(Object.assign({}, e.detail, {