Commit 454ebd88 by 程默

分销员 分享

parent 2a7ba4dd
...@@ -50,6 +50,7 @@ export default { ...@@ -50,6 +50,7 @@ export default {
this.spokesmanBindId = this.spokesmanBindId =
getQueryVariable(this.link, "spokesmanBindId") || ""; getQueryVariable(this.link, "spokesmanBindId") || "";
if (this.spokesmanGroupId != "") { if (this.spokesmanGroupId != "") {
//分销员分享
this.$store.commit("setSpokesman", { this.$store.commit("setSpokesman", {
spokesmanGroupId: this.spokesmanGroupId, spokesmanGroupId: this.spokesmanGroupId,
spokesmanShopId: this.spokesmanShopId, spokesmanShopId: this.spokesmanShopId,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="toCLogin"> <div class="toCLogin">
<p class="shopName" v-if="shopName">{{shopName}}</p> <p class="shopName" v-if="shopName">{{shopName}}</p>
<div class="btn_info"> <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>
<div class="enterpriseLogin" @click="eLogin">企业员工登录</div> <div class="enterpriseLogin" @click="eLogin">企业员工登录</div>
</div> </div>
...@@ -58,7 +58,7 @@ export default { ...@@ -58,7 +58,7 @@ export default {
isHaveUnion: "", isHaveUnion: "",
unionId: "", unionId: "",
userInfo: "", userInfo: "",
NEED_CERTIFIED:"" NEED_CERTIFIED: ""
}; };
}, },
created() {}, created() {},
...@@ -71,7 +71,10 @@ export default { ...@@ -71,7 +71,10 @@ export default {
this.backParams = serialize(options.params); this.backParams = serialize(options.params);
} }
console.log(options, "登录页面", this.backPath, this.backParams); console.log(options, "登录页面", this.backPath, this.backParams);
console.log(this.$store.state.spokesmanGroupId,'-----------0---------------') console.log(
this.$store.state.spokesmanGroupId,
"-----------0---------------"
);
this.getshop(); this.getshop();
this.init(); this.init();
}, },
...@@ -100,7 +103,7 @@ export default { ...@@ -100,7 +103,7 @@ export default {
//有账号 //有账号
this.isHaveUnion = true; this.isHaveUnion = true;
this.backParams += `&sessionid=${res.data.data.sessionId}`; 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({ wx.setStorage({
key: "sessionid", key: "sessionid",
data: res.data.data.sessionId data: res.data.data.sessionId
...@@ -146,7 +149,7 @@ export default { ...@@ -146,7 +149,7 @@ export default {
if (res.data.code == 200) { if (res.data.code == 200) {
console.log("check", res); console.log("check", res);
if (res.data.data.isHaveUnion == "true") { 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}`; this.backParams += `&sessionid=${res.data.data.sessionId}`;
wx.setStorage({ wx.setStorage({
key: "sessionid", key: "sessionid",
...@@ -194,27 +197,32 @@ export default { ...@@ -194,27 +197,32 @@ export default {
}); });
}, },
bindUser() { bindUser() {
// spokesmanRelId:'', let query = {
// spokesmanGroupId:'', openId: this.openid,
// spokesmanShopId:'', phoneNumber: this.phoneNumber,
// spokesmanBindId:'' 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
};
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 login
.bindUser({ .bindUser(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
})
.then(res => { .then(res => {
//绑定成功 //绑定成功
if (res.data.code == 200) { 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}`; this.backParams += `&sessionid=${res.data.data.sessionId}`;
wx.setStorage({ wx.setStorage({
key: "sessionid", key: "sessionid",
...@@ -245,19 +253,21 @@ export default { ...@@ -245,19 +253,21 @@ export default {
}); });
}, },
handbindHandle() { handbindHandle() {
const query={ const query = {
openId: this.openid, openId: this.openid,
unionId: this.unionId, unionId: this.unionId,
headImgUrl: this.userInfo.avatarUrl, headImgUrl: this.userInfo.avatarUrl,
gender: this.userInfo.gender, gender: this.userInfo.gender,
nickname: this.userInfo.nickName, nickname: this.userInfo.nickName,
country:this.userInfo.country, country: this.userInfo.country,
province:this.userInfo.province, province: this.userInfo.province,
city:this.userInfo.city city: this.userInfo.city
} };
//绑定手机号 //绑定手机号
wx.navigateTo({ 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