|
@@ -10,7 +10,7 @@
|
|
|
<!-- 获取手机号 -->
|
|
<!-- 获取手机号 -->
|
|
|
<template v-if="stepIndex == 0">
|
|
<template v-if="stepIndex == 0">
|
|
|
<div class="popup-attr-wrap">
|
|
<div class="popup-attr-wrap">
|
|
|
- <img :src="info.smallAvatarUrl | default_avatar" mode="widthFix" alt />
|
|
|
|
|
|
|
+ <img :src="wxInfo.smallAvatarUrl | default_avatar" mode="widthFix" alt />
|
|
|
</div>
|
|
</div>
|
|
|
<!-- #ifdef H5 -->
|
|
<!-- #ifdef H5 -->
|
|
|
<div class="creat-account-btn">
|
|
<div class="creat-account-btn">
|
|
@@ -18,8 +18,11 @@
|
|
|
</div>
|
|
</div>
|
|
|
<!-- #endif -->
|
|
<!-- #endif -->
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
- <div class="creat-account-btn">
|
|
|
|
|
- <button class="button-com mini-btn" open-type="getUserInfo" @getuserinfo="getWxAvatar">点击创建头像</button>
|
|
|
|
|
|
|
+ <div class="creat-account-btn" v-if="$util.isEmpty(wxInfo)">
|
|
|
|
|
+ <button class="button-com red big mini-btn" open-type="getUserInfo" @getuserinfo="getWxAvatar">点击创建头像</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="creat-account-btn" v-else>
|
|
|
|
|
+ <button class="button-com red big mini-btn" open-type="getPhoneNumber" @getphonenumber="getWxMobile" :plain="true">点击生成手机号</button>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- #endif -->
|
|
<!-- #endif -->
|
|
|
</template>
|
|
</template>
|
|
@@ -32,22 +35,20 @@
|
|
|
<div class="phone-num font-bold">{{ wxPhoneInfo }}</div>
|
|
<div class="phone-num font-bold">{{ wxPhoneInfo }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="creat-account-btn">
|
|
<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" @click="attentionPublish">点击创建账号</button>
|
|
|
<!-- <button class="button-com red big mini-btn" open-type="getPhoneNumber" @getphonenumber="getWxMobile" :plain="true">点击创建头像</button> -->
|
|
<!-- <button class="button-com red big mini-btn" open-type="getPhoneNumber" @getphonenumber="getWxMobile" :plain="true">点击创建头像</button> -->
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 关注公众号 -->
|
|
<!-- 关注公众号 -->
|
|
|
<template v-if="stepIndex == 2">
|
|
<template v-if="stepIndex == 2">
|
|
|
|
|
+ <!-- #ifdef MP-WEIXIN -->
|
|
|
<div class="wx-public-wrap">
|
|
<div class="wx-public-wrap">
|
|
|
- <!-- #ifdef MP-WEIXIN -->
|
|
|
|
|
- <block v-if="true">
|
|
|
|
|
|
|
+ <block v-if="isPublic">
|
|
|
<official-account @binderror="officialErr"></official-account>
|
|
<official-account @binderror="officialErr"></official-account>
|
|
|
</block>
|
|
</block>
|
|
|
<block v-else>
|
|
<block v-else>
|
|
|
<button class="button-com red big">完成</button>
|
|
<button class="button-com red big">完成</button>
|
|
|
</block>
|
|
</block>
|
|
|
- <!-- #endif -->
|
|
|
|
|
<!-- <div class="app-color-3">国兰华尚关联的公众号</div>
|
|
<!-- <div class="app-color-3">国兰华尚关联的公众号</div>
|
|
|
<div class="flex-center-between">
|
|
<div class="flex-center-between">
|
|
|
<div class="wx-public-left">
|
|
<div class="wx-public-left">
|
|
@@ -62,6 +63,7 @@
|
|
|
<button class="button-com wx-public-btn">查看</button>
|
|
<button class="button-com wx-public-btn">查看</button>
|
|
|
</div> -->
|
|
</div> -->
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <!-- #endif -->
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
|
</bottom-popup>
|
|
</bottom-popup>
|
|
@@ -93,13 +95,18 @@ export default {
|
|
|
info: {
|
|
info: {
|
|
|
type: Object,
|
|
type: Object,
|
|
|
default: () => {}
|
|
default: () => {}
|
|
|
|
|
+ },
|
|
|
|
|
+ isPublic: {
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ default: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
constant: this.$constant,
|
|
constant: this.$constant,
|
|
|
stepIndex: 0,
|
|
stepIndex: 0,
|
|
|
- wxPhoneInfo: ''
|
|
|
|
|
|
|
+ wxPhoneInfo: '',
|
|
|
|
|
+ wxInfo: {}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -119,7 +126,7 @@ export default {
|
|
|
// this.popupShow = true
|
|
// this.popupShow = true
|
|
|
getWxInfo({ iv: res.iv, encryptedData: res.encryptedData }).then(subRes => {
|
|
getWxInfo({ iv: res.iv, encryptedData: res.encryptedData }).then(subRes => {
|
|
|
console.log('用户信息', subRes)
|
|
console.log('用户信息', subRes)
|
|
|
- this.stepIndex = 1
|
|
|
|
|
|
|
+ // this.stepIndex = 1
|
|
|
this.wxInfo = subRes.data
|
|
this.wxInfo = subRes.data
|
|
|
this.popupShow = true
|
|
this.popupShow = true
|
|
|
})
|
|
})
|
|
@@ -136,7 +143,7 @@ export default {
|
|
|
getWxPhone({ iv: e.detail.iv, encryptedData: e.detail.encryptedData }).then(res => {
|
|
getWxPhone({ iv: e.detail.iv, encryptedData: e.detail.encryptedData }).then(res => {
|
|
|
console.log('用户信息', res)
|
|
console.log('用户信息', res)
|
|
|
this.wxPhoneInfo = res.data.mobile
|
|
this.wxPhoneInfo = res.data.mobile
|
|
|
- this.stepIndex = 2
|
|
|
|
|
|
|
+ this.stepIndex = 1
|
|
|
wxLoginFn(true)
|
|
wxLoginFn(true)
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
@@ -193,7 +200,7 @@ export default {
|
|
|
@include disFlex(center, flex-start);
|
|
@include disFlex(center, flex-start);
|
|
|
width: 600px;
|
|
width: 600px;
|
|
|
// height: 94px;
|
|
// height: 94px;
|
|
|
- margin: 142px auto 62px;
|
|
|
|
|
|
|
+ margin: 116px auto 62px;
|
|
|
padding-left: 40px;
|
|
padding-left: 40px;
|
|
|
padding-bottom: 40px;
|
|
padding-bottom: 40px;
|
|
|
border-bottom: 1px solid $borderColor;
|
|
border-bottom: 1px solid $borderColor;
|
|
@@ -213,7 +220,7 @@ export default {
|
|
|
width: 90%;
|
|
width: 90%;
|
|
|
padding: 10px 16px 28px;
|
|
padding: 10px 16px 28px;
|
|
|
box-shadow: 2px 2px 10px #eee;
|
|
box-shadow: 2px 2px 10px #eee;
|
|
|
- margin: 118px auto 194px;
|
|
|
|
|
|
|
+ margin: 130px auto 194px;
|
|
|
border-radius: 10px;
|
|
border-radius: 10px;
|
|
|
.flex-center-between {
|
|
.flex-center-between {
|
|
|
margin-top: 22px;
|
|
margin-top: 22px;
|
|
@@ -239,6 +246,11 @@ export default {
|
|
|
border-radius: 10px;
|
|
border-radius: 10px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .button-com {
|
|
|
|
|
+ width: 90%;
|
|
|
|
|
+ margin: 20px 5% 0;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|