|
@@ -16,7 +16,7 @@
|
|
|
|
|
|
<wButton class="wbutton" text="登 录" :rotate="isRotate" @click.native="startReg()"></wButton>
|
|
<wButton class="wbutton" text="登 录" :rotate="isRotate" @click.native="startReg()"></wButton>
|
|
<button style="margin-top: 20rpx;" :class="['buttonBorder',!istrue?'dlbutton':'dlbutton_loading']" open-type="getUserInfo"
|
|
<button style="margin-top: 20rpx;" :class="['buttonBorder',!istrue?'dlbutton':'dlbutton_loading']" open-type="getUserInfo"
|
|
- @getuserinfo="">
|
|
|
|
|
|
+ @getuserinfo="getinfo">
|
|
<view :class="istrue?'rotate_loop':''">
|
|
<view :class="istrue?'rotate_loop':''">
|
|
<text v-if="istrue" class="cuIcon cuIcon-loading1 "></text>
|
|
<text v-if="istrue" class="cuIcon cuIcon-loading1 "></text>
|
|
<view v-if="!istrue">
|
|
<view v-if="!istrue">
|
|
@@ -146,6 +146,29 @@
|
|
},
|
|
},
|
|
ispwd() {
|
|
ispwd() {
|
|
this.ispwdlogin = !this.ispwdlogin
|
|
this.ispwdlogin = !this.ispwdlogin
|
|
|
|
+ },
|
|
|
|
+ getinfo: async function(e) {
|
|
|
|
+ let event = e
|
|
|
|
+ console.log(event)
|
|
|
|
+ let res = await this.$request.post("api/v2/common/wxLogin", {
|
|
|
|
+ wechat_code: uni.getStorageSync("code"),
|
|
|
|
+ nickname: event.detail.userInfo.nickName,
|
|
|
|
+ avatar: event.detail.userInfo.avatarUrl
|
|
|
|
+ })
|
|
|
|
+ console.log(event.detail.iv)
|
|
|
|
+ console.log(event.detail.encryptedData)
|
|
|
|
+ console.log(res.data.session_key)
|
|
|
|
+ console.log(res.data.openid)
|
|
|
|
+ // console.log(res)
|
|
|
|
+ // if (res.status == 0) {
|
|
|
|
+ // let data = await this.$request.post("api/v2/common/getPhoneNumber", {
|
|
|
|
+ // iv: event.detail.iv,
|
|
|
|
+ // encryptedData: event.detail.encryptedData,
|
|
|
|
+ // session_key: res.data.session_key,
|
|
|
|
+ // openid: res.data.openid
|
|
|
|
+ // })
|
|
|
|
+ // console.log(data)
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|