|
|
@@ -10,7 +10,7 @@
|
|
|
<!-- 获取手机号 -->
|
|
|
<template v-if="stepIndex == 0">
|
|
|
<div class="popup-attr-wrap">
|
|
|
- <img :src="`${constant.imgUrl}/retail/user/attr-default.png`" mode="widthFix" alt />
|
|
|
+ <img :src="info.smallAvatarUrl" mode="widthFix" alt />
|
|
|
</div>
|
|
|
<!-- #ifdef H5 -->
|
|
|
<div class="creat-account-btn">
|
|
|
@@ -19,7 +19,7 @@
|
|
|
<!-- #endif -->
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
<div class="creat-account-btn">
|
|
|
- <button class="button-com red big mini-btn" open-type="getUserInfo" @getuserinfo="getWxAvatar" :plain="true">点击创建头像</button>
|
|
|
+ <button class="button-com red big mini-btn" open-type="getPhoneNumber" @getphonenumber="getWxMobile" :plain="true">点击创建头像</button>
|
|
|
</div>
|
|
|
<!-- #endif -->
|
|
|
</template>
|
|
|
@@ -29,16 +29,20 @@
|
|
|
<div class="phone-icon">
|
|
|
<i class="iconfont iconshoujihao"></i>
|
|
|
</div>
|
|
|
- <div class="phone-num font-bold">13285979347</div>
|
|
|
+ <div class="phone-num font-bold">{{ wxPhoneInfo }}</div>
|
|
|
</div>
|
|
|
<div class="creat-account-btn">
|
|
|
- <button class="button-com red big mini-btn" open-type="getPhoneNumber" @getphonenumber="getWxMobile" :plain="true">点击创建头像</button>
|
|
|
+ <button class="button-com red big" @click="attentionPublish">点击创建头像</button>
|
|
|
+ <!-- <button class="button-com red big mini-btn" open-type="getPhoneNumber" @getphonenumber="getWxMobile" :plain="true">点击创建头像</button> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
<!-- 关注公众号 -->
|
|
|
<template v-if="stepIndex == 2">
|
|
|
<div class="wx-public-wrap">
|
|
|
- <div class="app-color-3">国兰华尚关联的公众号</div>
|
|
|
+ <!-- #ifdef MP-WEIXIN -->
|
|
|
+ <official-account></official-account>
|
|
|
+ <!-- #endif -->
|
|
|
+ <!-- <div class="app-color-3">国兰华尚关联的公众号</div>
|
|
|
<div class="flex-center-between">
|
|
|
<div class="wx-public-left">
|
|
|
<div class="wx-public-img">
|
|
|
@@ -50,7 +54,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<button class="button-com wx-public-btn">查看</button>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
@@ -62,7 +66,7 @@ import AppStep from '@/components/app-step'
|
|
|
import BottomPopup from '@/components/plugin/bottom-popup'
|
|
|
import AppClose from '@/components/module/app-close'
|
|
|
// api
|
|
|
-import { getUser } from '@/utils/auth'
|
|
|
+import { getUser, wxLoginFn } from '@/utils/auth'
|
|
|
import { getWxPhone } from '@/api/mini'
|
|
|
export default {
|
|
|
name: 'login-popup-module',
|
|
|
@@ -72,10 +76,10 @@ export default {
|
|
|
AppClose
|
|
|
},
|
|
|
props: {
|
|
|
- stepIndex: {
|
|
|
- type: Number,
|
|
|
- default: 0
|
|
|
- },
|
|
|
+ // stepIndex: {
|
|
|
+ // type: Number,
|
|
|
+ // default: 0
|
|
|
+ // },
|
|
|
show: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
@@ -87,12 +91,15 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- constant: this.$constant
|
|
|
+ constant: this.$constant,
|
|
|
+ stepIndex: 0,
|
|
|
+ wxPhoneInfo: ''
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
hidePopup() {
|
|
|
this.$emit('hide')
|
|
|
+ this.stepIndex = 0
|
|
|
},
|
|
|
registerFn() {
|
|
|
this.$util.getCheckLogin()
|
|
|
@@ -102,10 +109,17 @@ export default {
|
|
|
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
|
|
getWxPhone({ iv: e.detail.iv, encryptedData: e.detail.encryptedData }).then(res => {
|
|
|
console.log('用户信息', res)
|
|
|
+ this.wxPhoneInfo = res.data.mobile
|
|
|
+ this.stepIndex = 1
|
|
|
+ wxLoginFn(true)
|
|
|
})
|
|
|
} else {
|
|
|
this.$msg('获取信息失败!')
|
|
|
}
|
|
|
+ },
|
|
|
+ // 关注公众号
|
|
|
+ attentionPublish() {
|
|
|
+ this.stepIndex = 2
|
|
|
}
|
|
|
}
|
|
|
}
|