Commit ecc0121c by 赵雅纹

触点bug修改

parent a2da13c8
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
......@@ -118,8 +118,8 @@ wxService.page({
}
},
//快速分享
onTapShare(){
//生成海报
onTapPoster(){
console.log('111')
this.setData({
showShareModal: true
......@@ -168,8 +168,8 @@ wxService.page({
console.log('++++++++++++++++',this.data.currentShareContent)
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
this.data.currentShareContent.tentacleId = res.tentacleId;
if (res && res.id) {
this.data.currentShareContent.tentacleId = res.id;
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
......@@ -187,10 +187,9 @@ wxService.page({
})
},
//生成卡片
onTapPoster() {
//快速分享
onTapShare() {
this.getChooseExtendPro()
},
// 获取推广商品列表
......
......@@ -81,7 +81,7 @@
</view>
</view>
<view class="share-wrap" wx:if="{{extendProList.length}}">
<view class="share-button" bindtap="onTapPoster">
<view class="share-button" bindtap="onTapShare">
<image mode="widthFix" />
<text>快速分享</text>
</view>
......
......@@ -88,12 +88,13 @@ wxService.page({
// 发布内容权限
getContentPermission() {
console.log(member)
wxService.post(`/merchant/contentMobileTerminal/getReleasePermissions`, {
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
let params = {
userId: memberId,
plus: this.data.plus,
level: member.level ? member.level : 0
}).then(res => {
level: (member && member.level) ? member.level : 0
}
wxService.post(`/merchant/contentMobileTerminal/getReleasePermissions`,params).then(res => {
if (!res) return false
const { result, data } = res.data
if (result == 0) {
......@@ -125,6 +126,7 @@ wxService.page({
// 获取发现内容
getContentList(classifyId){
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
wxService.post(`/merchant/contentMobileTerminal/getContentList?pageNum=${this.data.pageNum}&pageSize=${this.data.pageSize}`, {
classifyId: classifyId,
userId: memberId
......@@ -204,8 +206,8 @@ wxService.page({
this.data.currentShareContent = e.detail;
wxService.getTentacleContent(tentacleInfo).then(res =>{
if (res && res.tentacleId){
this.data.currentShareContent.tentacleId = res.tentacleId;
if (res && res.id){
this.data.currentShareContent.tentacleId = res.id;
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
......
......@@ -44,6 +44,8 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let memberId = options.memberId;
if (memberId) {
let tentacleInfo = {
content: '集点详情页面',
title: '集点详情页面',
......@@ -51,14 +53,6 @@ wxService.page({
contentType: app.globalData.contants.SHARE_TYPE.SET_POINT_DETAILS,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
let memberId = options.memberId;
if (memberId) {
let tentacleInfo = {
content: '集点列表页面',
title: '集点列表',
contentType: app.globalData.contants.SHARE_TYPE.SET_POINT_ACTIVITY,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
this.generatePointObject(tentacleInfo);
}
},
......@@ -331,7 +325,8 @@ wxService.page({
var path = `pages/pointDetail/pointDetail`;
if (memberId) {
let m = Integer.digit(memberId, 10, 64);
path = `pages/pointDetail/pointDetail?m=${m}`;
let id = Integer.digit(this.data.id, 10, 64);
path = `pages/pointDetail/pointDetail?i=${id}&m=${m}`;
}
return {
path: path
......
......@@ -86,8 +86,8 @@ wxService.page({
this.data.currentShareContent.id = this.data.productInfo.productId;
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
this.data.currentShareContent.tentacleId = res.tentacleId;
if (res && res.id) {
this.data.currentShareContent.tentacleId = res.id;
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'pages/productDetail/productDetail?i=' + id + '&t=' + tentacleId;
......
......@@ -66,6 +66,7 @@ wxService.page({
contentType: app.globalData.contants.SHARE_TYPE.HOME,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
console.log('触点对象id-----------', options)
this.generatePointObject(tentacleInfo);
}
......
......@@ -130,8 +130,8 @@ wxService.page({
this.data.currentShareContent = this.data.contentInfo;
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
this.data.currentShareContent.tentacleId = res.tentacleId;
if (res && res.id) {
this.data.currentShareContent.tentacleId = res.id;
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
......
......@@ -33,6 +33,20 @@ wxService.page({
id: options.id
})
}
let memberId = options.memberId;
if (memberId) {
let tentacleInfo = {
content: '推广商品列表',
title: '推广商品',
tentacleId: memberId,
contentType: app.globalData.contants.SHARE_TYPE.PRODUCTS_PROMOTION,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
console.log('触点对象id-----------', options)
this.generatePointObject(tentacleInfo);
}
},
/**
* 生命周期函数--监听页面显示
......@@ -40,7 +54,6 @@ wxService.page({
onShow() {
this.getExtendInfo()
this.data.currentShareContent = null;
},
//获取推广商品获取商品id
......@@ -98,24 +111,29 @@ wxService.page({
item.title = item.productName
item.id = item.productId
})
let tentacleInfo = {
content: '推广商品列表',
title: '推广商品',
contentType: 3,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
// wxService.getTentacleContent(tentacleInfo).then(res => {
// if (res && res.tentacleId) {
// let id = Integer.digit(this.data.id, 10, 64);
// let tentacleId = Integer.digit(res.tentacleId, 10, 64);
// var path = `subPackage/page/pages/friendShareList/friendShareList?id=${id}&t=${tentacleId}`;
// console.log(path)
// return {
// path: path
// }
// }
// });
//修改为参数memberId
var path = `subPackage/page/pages/friendShareList/friendShareList`;
if (memberId) {
let m = Integer.digit(memberId, 10, 64);
let id = Integer.digit(this.data.id, 10, 64);
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = `subPackage/page/pages/friendShareList/friendShareList?id=${id}&t=${tentacleId}`;
console.log(path)
path = `subPackage/page/pages/friendShareList/friendShareList?m=${m}&i=${id}`;
}
return {
path: path
}
}
});
}
})
\ No newline at end of file
......@@ -33,12 +33,26 @@ wxService.page({
}
})
}
let memberId = options.memberId;
if (memberId) {
let tentacleInfo = {
content: '商品列表页',
title: '商品列表页',
tentacleId: memberId,
contentType: app.globalData.contants.SHARE_TYPE.PRODUCT_LIST,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
this.generatePointObject(tentacleInfo);
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
this.getProList();
},
......@@ -104,21 +118,14 @@ wxService.page({
* 用户点击右上角分享
*/
onShareAppMessage: function (res) {
let tentacleInfo = {
content: this.route,
title: this.route,
contentType: 3,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = `subPackage/page/pages/fun/fun?t=${tentacleId}`;
console.log(path)
//修改为参数memberId
var path = `subPackage/page/pages/fun/fun`;
if (memberId) {
let m = Integer.digit(memberId, 10, 64);
path = `subPackage/page/pages/fun/fun?m=${m}`;
}
return {
path: path
}
}
});
}
})
\ No newline at end of file
......@@ -201,8 +201,8 @@ wxService.page({
this.data.currentShareContent = e.detail;
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
this.data.currentShareContent.tentacleId = res.tentacleId;
if (res && res.id) {
this.data.currentShareContent.tentacleId = res.id;
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
......
<!--subPackage/page/pages/myRelease/myRelease.wxml-->
<view class="release-num weui-flex df-j--bt">
<view class="num-invite df-1 border_box">
<view class="num">{{inviteSum}}</view>
<view class="num">{{inviteSum || 0}}</view>
<view class="desc">当前分享订单</view>
</view>
<view class="num-invite-yesterday df-1 border_box">
<view class="num">{{yesterdayInviteSum}}</view>
<view class="num">{{yesterdayInviteSum || 0}}</view>
<view class="desc">昨天新增分享订单</view>
</view>
</view>
......
......@@ -78,8 +78,8 @@ wxService.page({
console.log(this.data.contentInfo)
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
this.data.currentShareContent.tentacleId = res.tentacleId;
if (res && res.id) {
this.data.currentShareContent.tentacleId = res.id;
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
......
......@@ -125,7 +125,7 @@ wxService.page({
wxService.getTentacleContent(tentacleInfo).then(res => {
console.log(res)
if (res && res.tentacleId) {
if (res && res.id) {
wx.saveImageToPhotosAlbum({
filePath: this.imagePath,
success(res) {
......
......@@ -268,8 +268,8 @@ class WXService extends Http {
}
//根据触点对象id获取触点对象信息
getTentacleContentByTentacleId(tentacleId) {
this.post('/marketing/tentacleContent/getTentacleContent', { tentacleId: tentacleId }).then((res) => {
getTentacleContentByTentacleId(id) {
this.post('/marketing/tentacleContent/queryTentacleContentById', { id: id }).then((res) => {
let data = res.data.data
let TENTACLE_CONTENT = {
id: data.id,
......@@ -567,11 +567,11 @@ class WXService extends Http {
const page = this
_self.initAppGlobalDataSync()
//修改参数
let pageIsFromShare = false, tentacleId = null;
let pageIsFromShare = false, id = null;
args.forEach(item => {
if (item['t']) {
pageIsFromShare = true;
tentacleId = Integer.digit(item['t'], 64, 10);
id = Integer.digit(item['t'], 64, 10);
if (item['i']) {
item['id'] = Integer.digit(item['i'], 64, 10);
}
......@@ -586,7 +586,7 @@ class WXService extends Http {
//如果打开的是分享界面则进行触点对象信息请求并存储到本地 放到后续的header中
if (pageIsFromShare) {
//调用接口
_self.getTentacleContentByTentacleId(tentacleId);
_self.getTentacleContentByTentacleId(id);
}
config.onLoad && config.onLoad.apply(page, args);
......
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