Commit cca3f200 authored by 黄奎's avatar 黄奎

11

parent cc3f53b8
......@@ -188,7 +188,7 @@
let b2bResult = {
accountId: 0,
customerId: 0,
customerInfoChildrenId:0,
customerInfoChildrenId: 0,
realNameAuthentication: 0,
account: "",
name: mallUserName,
......@@ -203,7 +203,7 @@
contactNumber: "",
salesBaseInfo: {},
count: 0,
customerType: 1, //直客,2-同行
customerType: 2, //直客,2-同行
directCustomerId: 0, //直客Id
}
that.apipost("LvXiaoYou_post_GetLvXiaoYouCustomerLogin", b2bLoginParam, b2bRes => {
......@@ -211,10 +211,15 @@
if (b2bRes.resultCode == 1) {
b2bResult.accountId = b2bData.customerAccountId;
b2bResult.customerId = b2bData.customerId;
b2bResult.customerInfoChildrenId=b2bData.customerInfoChildrenId;
b2bResult.customerInfoChildrenId = b2bData.customerInfoChildrenId;
b2bResult.name = b2bData.name;
b2bResult.customerName = b2bData.customerName;
b2bResult.token=b2bData.token;
b2bResult.token = b2bData.token;
b2bResult.isMember = b2bData.isMember;
b2bResult.account = b2bData.account;
b2bResult.createBy = b2bData.createBy;
b2bResult.salesBaseInfo=b2bData.salesBaseInfo;
b2bResult.groupId=b2bData.groupId;
uni.setStorageSync('b2b_user', b2bResult)
}
}, (error2) => {
......
......@@ -268,6 +268,11 @@
}
}
let mall_UserInfo = uni.getStorageSync("mall_UserInfo");
//同行联系人绑定的优惠卷
if (options && options.isCustomerCoupon && options.isCustomerCoupon == "1") {
this.showCoupons = true;
this.couponMessage = options.couponMessage;
}
if (options && options.Up) {
//校园id
uni.setStorageSync("Up", {
......@@ -539,7 +544,6 @@
},
methods: {
//获取IsOpenReserve
getIsOpenReserve() {
this.request2({
......
......@@ -70,13 +70,23 @@
param.password = ''
}
this.apipost("b2b_post_LvXiaoYouBindCustomerInfo", param, (res) => {
if (res.resultCode == 1) {
//移除缓存=>跳转到首页重新登录
uni.removeStorageSync('b2b_user')
uni.removeStorageSync('mall_UserInfo')
let tempData = res.data;
if (tempData && tempData.Id && tempData.Id > 0) {
let newUrl = '/pages/index/index?isCustomerCoupon=1&couponMessage=' + tempData.CouponsName + '&msgtype=' +
tempData.CouponsType;
uni.redirectTo({
url: newUrl
})
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
} else {
this.loginLoading = false
uni.hideLoading()
......
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