|
|
|
@ -78,6 +78,8 @@ |
|
|
|
uni.removeStorageSync('homePageOptions'); |
|
|
|
if(this.pt == 2) { |
|
|
|
this.bindUsders() |
|
|
|
}else if(this.pt == 3){ |
|
|
|
this.bindAllUsders(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -96,7 +98,6 @@ |
|
|
|
let timeDate = Math.round(new Date().getTime() / 1000).toString(); |
|
|
|
let md5TimeDate = SparkMD5.hash(timeDate) |
|
|
|
let nowTime = new Date().toLocaleString(); |
|
|
|
console.log("进来啦~~~~~") |
|
|
|
_this.$http(_this.API.API_BINDSALES, { |
|
|
|
deed: md5TimeDate, |
|
|
|
sid: _this.s_id, |
|
|
|
@ -107,6 +108,14 @@ |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 小程序卡片分享的绑定 |
|
|
|
bindAllUsders(){ |
|
|
|
this.$http(this.API.API_SALESMAN_BINDALL, { |
|
|
|
pid: this.s_id |
|
|
|
}).then(res => { |
|
|
|
this.$msg('提交审核成功'); |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取分享信息 |
|
|
|
getShareInfo(){ |
|
|
|
this.$http(this.API.API_SHARE_HOME).then(res => { |
|
|
|
@ -157,6 +166,7 @@ |
|
|
|
getGoodsList(){ |
|
|
|
let per_page = this.pageSize; |
|
|
|
let tab_item = this.tab_list[this.current]; |
|
|
|
if(this.$shared.isValueType(tab_item) == 'undefined') return; |
|
|
|
this.$http(this.API.API_GOODS_LIST, { |
|
|
|
category_id: tab_item.id, |
|
|
|
type: tab_item.type, |
|
|
|
@ -219,16 +229,21 @@ |
|
|
|
// this.getGoodsList(); |
|
|
|
}, |
|
|
|
onShareAppMessage(){ |
|
|
|
const token = this.$shared.createToken(); |
|
|
|
const userInfo = uni.getStorageSync('userinfo') || {}; |
|
|
|
const token = this.$shared.createToken({user_id: userInfo.id}); |
|
|
|
const scene_code = this.$scene.V2_HOME_SHAREBUTTON; |
|
|
|
let options = {route: 'home', scene_code}; |
|
|
|
let options = { |
|
|
|
route: 'home', |
|
|
|
scene_code, |
|
|
|
share_id: userInfo.id, |
|
|
|
pt: 3 |
|
|
|
}; |
|
|
|
this.generateKooken(token, options); // 谁分享了就生成一个token |
|
|
|
|
|
|
|
let shareInfo = { |
|
|
|
title: this.shareInfo.title || '欢迎使用时空网小程序', |
|
|
|
path: '/pages/route/index?token='+ token |
|
|
|
} |
|
|
|
|
|
|
|
if(this.shareInfo.cover){ |
|
|
|
shareInfo.imageUrl = this.shareInfo.cover; |
|
|
|
} |
|
|
|
|