提交 a5b1efe2 编写于 作者: api工厂's avatar api工厂

三级分销增加抢客功能

上级 f44d7bb1
......@@ -129,6 +129,8 @@ App({
AUTH.checkHasLogined().then(isLogined => {
if (!isLogined) {
AUTH.login()
} else {
AUTH.bindSeller()
}
})
},
......
module.exports = {
version: '11.1.0',
note: '添加收货地址需要定位bug,下单支付前判断可用积分', // 这个为版本描述,无需修改
version: '11.2.0',
note: '三级分销增加抢客功能', // 这个为版本描述,无需修改
subDomain: 'tz', // liu123 此处改成你自己的专属域名。什么是专属域名?请看教程 https://www.it120.cc/help/qr6l4m.html
merchantId: 951, // 商户ID,可在后台工厂设置-->商户信息查看
sdkAppID: 1400450467, // 腾讯实时音视频应用编号,请看教程 https://www.it120.cc/help/nxoqsl.html
......
......@@ -1121,6 +1121,9 @@ module.exports = {
idcardCheck: function idcardCheck(token, name, idCardNo) {
return request('/user/idcard', true, 'post', { token: token, name: name, idCardNo: idCardNo });
},
bindSeller: function bindSeller(data) {
return request('/user/bindSeller', true, 'post', data);
},
loginout: function loginout(token) {
return request('/user/loginout', true, 'get', { token: token });
},
......
......@@ -72,7 +72,7 @@ Page({
}
// 静默式授权注册/登陆
AUTH.authorize().then(res => {
AUTH.bindSeller()
})
this.data.goodsId = e.id
const that = this
......
......@@ -64,7 +64,7 @@ Page({
}
// 静默式授权注册/登陆
AUTH.authorize().then(res => {
AUTH.bindSeller()
})
this.data.goodsId = e.id
const that = this
......
......@@ -91,6 +91,7 @@ Page({
}
// 静默式授权注册/登陆
AUTH.authorize().then(res => {
AUTH.bindSeller()
TOOLS.showTabBarBadge()
})
wx.setNavigationBarTitle({
......
......@@ -19,7 +19,7 @@ Page({
}
// 静默式授权注册/登陆
AUTH.authorize().then(res => {
AUTH.bindSeller()
})
},
onShow() {
......
......@@ -44,6 +44,7 @@ Page({
TOOLS.showTabBarBadge();
} else {
AUTH.authorize().then(res => {
AUTH.bindSeller()
_this.getUserApiInfo();
_this.getUserAmount();
_this.orderStatistics();
......
......@@ -40,6 +40,7 @@ Page({
this.doneShow()
} else {
AUTH.authorize().then(res => {
AUTH.bindSeller()
this.doneShow()
})
}
......
......@@ -36,7 +36,7 @@
"minifyWXSS": true
},
"compileType": "miniprogram",
"libVersion": "2.14.3",
"libVersion": "2.16.0",
"appid": "wxa46b09d413fbcaff",
"projectname": "天使童装",
"scripts": {},
......
......@@ -14,6 +14,21 @@ async function checkSession(){
})
}
async function bindSeller() {
const token = wx.getStorageSync('token')
const referrer = wx.getStorageSync('referrer')
if (!token) {
return
}
if (!referrer) {
return
}
const res = await WXAPI.bindSeller({
token,
uid: referrer
})
}
// 检测登录状态,返回 true / false
async function checkHasLogined() {
const token = wx.getStorageSync('token')
......@@ -295,5 +310,6 @@ module.exports = {
loginOut: loginOut,
checkAndAuthorize: checkAndAuthorize,
openLoginDialog: openLoginDialog,
authorize: authorize
authorize: authorize,
bindSeller: bindSeller
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册