@@ -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 wx:if="{{ type == 'mobile' }}">
@@ -23,7 +23,7 @@
"compileHotReLoad": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
- "useApiHostProcess": true,
+ "useApiHostProcess": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
@@ -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, {