| | |
| | | <view class="login-info"> |
| | | <image src="/static/icon/ic_agree@2x.png" mode="widthFix"></image> |
| | | <view class="login-info-text"> |
| | | 我已阅读并同意<text>《鼎元科技用户服务协议》</text>及<text>《鼎元科技用户隐私政策》</text> |
| | | 我已阅读并同意<text @click="jumpService(4)">《鼎元科技用户服务协议》</text>及<text @click="jumpService(5)">《鼎元科技用户隐私政策》</text> |
| | | </view> |
| | | </view> |
| | | <button class="login-btn" open-type="getPhoneNumber" @getphonenumber="getphonenumber">手机号快捷登录</button> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from 'vuex' |
| | | export default { |
| | | name: "login", |
| | | data() { |
| | |
| | | show: false |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapState(['openid', 'recshopid', 'recuserid']) |
| | | }, |
| | | methods: { |
| | | jumpService(flag) { |
| | | uni.navigateTo({ |
| | | url: '/pagesA/pages/rich-text-page/rich-text-page?flag='+flag |
| | | }) |
| | | }, |
| | | open() { |
| | | this.show = true |
| | | }, |
| | |
| | | this.show = false |
| | | }, |
| | | getphonenumber(e) { |
| | | console.log(e) |
| | | if (e.detail.errMsg === 'getPhoneNumber:ok') { |
| | | this.$u.api.wxPhone({ |
| | | code: e.detail.code, |
| | | shopId:this.recshopid, |
| | | recId:this.recuserid, |
| | | openid: this.openid |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$store.commit('setUserInfo', res.data.member) |
| | | this.$store.commit('setToken', res.data.token) |
| | | this.$store.commit('setRecShopId','') |
| | | this.$store.commit('setRecUserId','') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |