| | |
| | | <u-input :password="true" :border="false" placeholder="请输入密码" v-model="password"></u-input> |
| | | </view> |
| | | |
| | | <button @tap="login()" class="bottom-button">注 册</button> |
| | | <!-- #ifndef PUB_CUSTOMER --> |
| | | <button @tap="reg('')" class="bottom-button">注 册</button> |
| | | |
| | | <!-- #endif --> |
| | | <!-- #ifdef PUB_CUSTOMER --> |
| | | <!-- open-type="getUserInfo"--> |
| | | <button @tap="wxreg('')" class="bottom-button">注 册</button> |
| | | |
| | | <!-- #endif --> |
| | | |
| | | <view class="flex"> |
| | | <view class="topic-font m-l-0 m-r-a" @click="backInfoPage" v-if="source==='step'">返回上一步</view> |
| | | <view class="topic-font m-l-0 m-r-a" @click="backInfoPage" v-if="source==='step'">返回上一步 |
| | | </view> |
| | | <view class="topic-font m-l-a m-r-0" @click="toLogin">前往登录</view> |
| | | |
| | | </view> |
| | |
| | | changeAll(e) { |
| | | this.pcfvalue = e.detail.value[0] |
| | | }, |
| | | async login() { |
| | | // async wxreg(e) { |
| | | // wx.login({ |
| | | // success: async res => { |
| | | // if (res.code) { |
| | | // |
| | | // } |
| | | // }, |
| | | // fail() { |
| | | // this.$message.showToast('获取微信信息失败') |
| | | // } |
| | | // }) |
| | | // }, |
| | | wxreg(e) { |
| | | let tmp = this |
| | | wx.login({ |
| | | success: async res => { |
| | | console.log(res) |
| | | if (res.code) { |
| | | tmp.reg(res.code) |
| | | } else { |
| | | tmp.$message.showToast('微信登录失败'); |
| | | } |
| | | }, |
| | | error: res => { |
| | | console.log('wx.login error', res) |
| | | tmp.$message.showToast('获取微信信息失败:' + res); |
| | | } |
| | | }); |
| | | }, |
| | | async reg(wxcode) { |
| | | // console.log('e', e) |
| | | // this.$message.showLoading() |
| | | // const res = await wx.getUserProfile({ |
| | | // desc: '用于完善会员资料', |
| | | // }); |
| | | // console.log(res); |
| | | // this.$message.hideLoading() |
| | | |
| | | uni.showLoading({ |
| | | title: '登陆中' |
| | | }); |
| | |
| | | var dto = JSON.parse(tjson) |
| | | post.dto = dto |
| | | } |
| | | post.wxcode = wxcode |
| | | |
| | | // const { |
| | | // code |