Commit 454ebd88 by 程默

分销员 分享

parent 2a7ba4dd
......@@ -50,6 +50,7 @@ export default {
this.spokesmanBindId =
getQueryVariable(this.link, "spokesmanBindId") || "";
if (this.spokesmanGroupId != "") {
//分销员分享
this.$store.commit("setSpokesman", {
spokesmanGroupId: this.spokesmanGroupId,
spokesmanShopId: this.spokesmanShopId,
......
......@@ -3,7 +3,7 @@
<div class="toCLogin">
<p class="shopName" v-if="shopName">{{shopName}}</p>
<div class="btn_info">
<button class="btn" lang='zh_CN' open-type="getUserInfo" @getuserinfo="getUserInfo">微信登录</button>
<button class="btn" lang="zh_CN" open-type="getUserInfo" @getuserinfo="getUserInfo">微信登录</button>
</div>
<div class="enterpriseLogin" @click="eLogin">企业员工登录</div>
</div>
......@@ -58,7 +58,7 @@ export default {
isHaveUnion: "",
unionId: "",
userInfo: "",
NEED_CERTIFIED:""
NEED_CERTIFIED: ""
};
},
created() {},
......@@ -71,7 +71,10 @@ export default {
this.backParams = serialize(options.params);
}
console.log(options, "登录页面", this.backPath, this.backParams);
console.log(this.$store.state.spokesmanGroupId,'-----------0---------------')
console.log(
this.$store.state.spokesmanGroupId,
"-----------0---------------"
);
this.getshop();
this.init();
},
......@@ -100,7 +103,7 @@ export default {
//有账号
this.isHaveUnion = true;
this.backParams += `&sessionid=${res.data.data.sessionId}`;
this.NEED_CERTIFIED=res.data.data.NEED_CERTIFIED;
this.NEED_CERTIFIED = res.data.data.NEED_CERTIFIED;
wx.setStorage({
key: "sessionid",
data: res.data.data.sessionId
......@@ -146,7 +149,7 @@ export default {
if (res.data.code == 200) {
console.log("check", res);
if (res.data.data.isHaveUnion == "true") {
this.NEED_CERTIFIED=res.data.data.NEED_CERTIFIED;
this.NEED_CERTIFIED = res.data.data.NEED_CERTIFIED;
this.backParams += `&sessionid=${res.data.data.sessionId}`;
wx.setStorage({
key: "sessionid",
......@@ -194,27 +197,32 @@ export default {
});
},
bindUser() {
// spokesmanRelId:'',
// spokesmanGroupId:'',
// spokesmanShopId:'',
// spokesmanBindId:''
login
.bindUser({
let query = {
openId: this.openid,
phoneNumber: this.phoneNumber,
unionId: this.unionId,
headImgUrl: this.userInfo.avatarUrl,
gender: this.userInfo.gender,
nickname: this.userInfo.nickName,
country:this.userInfo.country,
province:this.userInfo.province,
city:this.userInfo.city,
otherPhone:0
})
country: this.userInfo.country,
province: this.userInfo.province,
city: this.userInfo.city,
otherPhone: 0
};
if (this.$store.state.spokesmanGroupId != "") {
query.spokesmanRelId=this.$store.state.spokesmanRelId;
query.spokesmanGroupId=this.$store.state.spokesmanGroupId;
query.spokesmanShopId=this.$store.state.spokesmanShopId;
query.spokesmanBindId=this.$store.state.spokesmanBindId;
}
console.log(query,'query')
login
.bindUser(query)
.then(res => {
//绑定成功
if (res.data.code == 200) {
this.NEED_CERTIFIED=res.data.data.NEED_CERTIFIED;
this.NEED_CERTIFIED = res.data.data.NEED_CERTIFIED;
this.backParams += `&sessionid=${res.data.data.sessionId}`;
wx.setStorage({
key: "sessionid",
......@@ -245,19 +253,21 @@ export default {
});
},
handbindHandle() {
const query={
const query = {
openId: this.openid,
unionId: this.unionId,
headImgUrl: this.userInfo.avatarUrl,
gender: this.userInfo.gender,
nickname: this.userInfo.nickName,
country:this.userInfo.country,
province:this.userInfo.province,
city:this.userInfo.city
}
country: this.userInfo.country,
province: this.userInfo.province,
city: this.userInfo.city
};
//绑定手机号
wx.navigateTo({
url: `../index/main?from=login&backpath=/login/wxRegister&params=${encodeURIComponent(serialize(query))}`
url: `../index/main?from=login&backpath=/login/wxRegister&params=${encodeURIComponent(
serialize(query)
)}`
});
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment