Commit 319e4cba by 高淑倩

Merge branch 'dev_7.1.0' of ssh://gitlab.bigaka.net:2287/gaoshq/7-Eleven into dev_7.1.0

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