Commit c82e10b7 by 赵雅纹

Merge branch 'fixbug-ZYW' into 'dev_7.1.0'

Fixbug zyw

See merge request !122
parents dd43fccb 056a36a3
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
const app = getApp() const app = getApp()
const wxService = require('../../utils/wxService') const wxService = require('../../utils/wxService')
import { Integer } from '../../utils/integerDigitalConvertion' import { Integer } from '../../utils/integerDigitalConvertion'
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
wxService.page({ wxService.page({
...@@ -18,7 +19,18 @@ wxService.page({ ...@@ -18,7 +19,18 @@ wxService.page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
let memberId = options.memberId;
if (memberId) {
let tentacleInfo = {
content: '分类',
title: '分类',
tentacleId: memberId,
contentType: app.globalData.contants.SHARE_TYPE.CLASSIFY,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
this.generatePointObject(tentacleInfo);
}
}, },
/** /**
...@@ -116,20 +128,15 @@ wxService.page({ ...@@ -116,20 +128,15 @@ wxService.page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function (res) { onShareAppMessage: function (res) {
let tentacleInfo = {
content: '分类', //修改为参数memberId
title: '分类', var path = `pages/category/category`;
contentType: app.globalData.contants.SHARE_TYPE.CLASSIFY, if (memberId) {
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销 let m = Integer.digit(memberId, 10, 64);
}; path = `pages/category/category?m=${m}`;
wxService.getTentacleContent(tentacleInfo).then(res => { }
if (res && res.tentacleId) {
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = `pages/category/category?t=${tentacleId}`;
return { return {
path: path path: path
} }
} }
});
}
}) })
\ No newline at end of file
...@@ -4,6 +4,7 @@ const wxService = require('../../utils/wxService') ...@@ -4,6 +4,7 @@ const wxService = require('../../utils/wxService')
const utils = require('../../utils/util') const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo const envInfo = require('../../config/index').envInfo
import { Integer } from '../../utils/integerDigitalConvertion' import { Integer } from '../../utils/integerDigitalConvertion'
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
wxService.page({ wxService.page({
...@@ -31,8 +32,19 @@ wxService.page({ ...@@ -31,8 +32,19 @@ wxService.page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
}, let memberId = options.memberId;
if (memberId){
let tentacleInfo = {
content: '推广商品',
tentacleId: memberId,
title: '推广商品',
contentType: app.globalData.contants.SHARE_TYPE.PRODUCTS_PROMOTION,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
this.generatePointObject(tentacleInfo);
}
},
// 点击切换 // 点击切换
clickTab: function (e) { clickTab: function (e) {
...@@ -309,12 +321,8 @@ wxService.page({ ...@@ -309,12 +321,8 @@ wxService.page({
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function () {
console.log('onReachBottom')
console.log(this.data.currentTab)
if (this.data.currentTab == 0){ if (this.data.currentTab == 0){
console.log('11111')
if (this.data.pageNo < this.data.totalPages){ if (this.data.pageNo < this.data.totalPages){
console.log('22222')
this.setData({ this.setData({
pageNo: this.data.pageNo + 1, pageNo: this.data.pageNo + 1,
}, () => { }, () => {
...@@ -323,7 +331,6 @@ wxService.page({ ...@@ -323,7 +331,6 @@ wxService.page({
} }
}else{ }else{
if (this.data.pageNum < this.data.myTotalPages) { if (this.data.pageNum < this.data.myTotalPages) {
console.log('333')
this.setData({ this.setData({
pageNum: this.data.pageNum + 1, pageNum: this.data.pageNum + 1,
}, () => { }, () => {
...@@ -337,42 +344,27 @@ wxService.page({ ...@@ -337,42 +344,27 @@ wxService.page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function (res) { onShareAppMessage: function (res) {
console.log(res)
if (res.from != 'menu') { if (res.from != 'menu') {
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 = 'subPackage/page/pages/friendShareList/friendShareList?i=' + id + '&t=' + tentacleId; var path = 'subPackage/page/pages/friendShareList/friendShareList?i=' + id + '&t=' + tentacleId;
console.log('id', this.data.currentShareContent.id) console.log('用户点击右上角分享', this.data.currentShareContent.id)
console.log(path) console.log(path)
return { return {
path: path, path: path,
imageUrl: this.data.proData[0].productImgUrl, // 可以更换分享的图片 imageUrl: this.data.proData[0].productImgUrl, // 可以更换分享的图片
} }
}else{ }else{
var path = '' //修改为参数memberId
let tentacleInfo = { var path = `pages/extendProduct/extendProduct`;
content: '推广商品', if (memberId){
title: '推广商品', let m = Integer.digit(memberId, 10, 64);
contentType: app.globalData.contants.SHARE_TYPE.PRODUCTS_PROMOTION, path = `pages/extendProduct/extendProduct?m=${m}`;
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销 }
};
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
path = `pages/extendProduct/extendProduct?t=${tentacleId}`;
console.log('222')
console.log('-------------', path)
return { return {
path: path, path: path,
imageUrl: this.data.extendProList[0].productImgUrl, imageUrl: this.data.extendProList[0].productImgUrl,
} }
} }
});
}
} }
}) })
\ No newline at end of file
...@@ -42,8 +42,19 @@ wxService.page({ ...@@ -42,8 +42,19 @@ wxService.page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad() { onLoad(options) {
let memberId = options.memberId;
if (memberId) {
let tentacleInfo = {
content: '内容列表',
title: '内容列表',
tentacleId: memberId,
contentType: app.globalData.contants.SHARE_TYPE.CONTENTS_LIST,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
this.generatePointObject(tentacleInfo);
}
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -230,23 +241,17 @@ wxService.page({ ...@@ -230,23 +241,17 @@ wxService.page({
path: path, path: path,
imageUrl: this.data.cardUrl, // 可以更换分享的图片 imageUrl: this.data.cardUrl, // 可以更换分享的图片
} }
} else{
//修改为参数memberId
var path = `pages/myShare/myShare`;
if (memberId) {
let m = Integer.digit(memberId, 10, 64);
path = `pages/myShare/myShare?m=${m}`;
} }
let tentacleInfo = {
content: '内容列表',
title: '内容列表',
contentType: app.globalData.contants.SHARE_TYPE.CONTENTS_LIST,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
this.data.currentShareContent.tentacleId = res.tentacleId;
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = `pages/myShare/myShare?t=${tentacleId}`;
return { return {
path : path path: path
} }
} }
});
} }
}) })
\ No newline at end of file
...@@ -3,6 +3,7 @@ const app = getApp() ...@@ -3,6 +3,7 @@ const app = getApp()
const wxService = require('../../utils/wxService') const wxService = require('../../utils/wxService')
const utils = require('../../utils/util') const utils = require('../../utils/util')
import { Integer } from '../../utils/integerDigitalConvertion' import { Integer } from '../../utils/integerDigitalConvertion'
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
wxService.page({ wxService.page({
/** /**
...@@ -43,7 +44,23 @@ wxService.page({ ...@@ -43,7 +44,23 @@ 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;
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);
}
}, },
// 集点详情 // 集点详情
getPointDetail(id) { getPointDetail(id) {
...@@ -310,20 +327,14 @@ wxService.page({ ...@@ -310,20 +327,14 @@ wxService.page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
let tentacleInfo = { //修改为参数memberId
content: '集点详情页面', var path = `pages/pointDetail/pointDetail`;
title: '集点详情页面', if (memberId) {
contentType: app.globalData.contants.SHARE_TYPE.SET_POINT_DETAILS, let m = Integer.digit(memberId, 10, 64);
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销 path = `pages/pointDetail/pointDetail?m=${m}`;
}; }
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = `pages/pointList/pointList?t=${tentacleId}`;
return { return {
path: path path: path
} }
} }
});
}
}) })
\ No newline at end of file
...@@ -3,7 +3,7 @@ const app = getApp() ...@@ -3,7 +3,7 @@ const app = getApp()
const wxService = require('../../utils/wxService') const wxService = require('../../utils/wxService')
const utils = require('../../utils/util') const utils = require('../../utils/util')
import { Integer } from '../../utils/integerDigitalConvertion' import { Integer } from '../../utils/integerDigitalConvertion'
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
wxService.page({ wxService.page({
/** /**
...@@ -18,7 +18,19 @@ wxService.page({ ...@@ -18,7 +18,19 @@ wxService.page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad() { }, onLoad(options) {
let memberId = options.memberId;
if (memberId) {
let tentacleInfo = {
content: '集点列表页面',
title: '集点列表',
tentacleId: memberId,
contentType: app.globalData.contants.SHARE_TYPE.SET_POINT_ACTIVITY,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
this.generatePointObject(tentacleInfo);
}
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
...@@ -157,20 +169,14 @@ wxService.page({ ...@@ -157,20 +169,14 @@ wxService.page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
let tentacleInfo = { //修改为参数memberId
content: '集点列表页面', var path = `pages/pointList/pointList`;
title: '集点列表', if (memberId) {
contentType: app.globalData.contants.SHARE_TYPE.SET_POINT_ACTIVITY, let m = Integer.digit(memberId, 10, 64);
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销 path = `pages/pointList/pointList?m=${m}`;
}; }
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = `pages/pointList/pointList?t=${tentacleId}`;
return { return {
path: path path: path
} }
} }
});
}
}) })
\ No newline at end of file
...@@ -3,6 +3,7 @@ var app = getApp() ...@@ -3,6 +3,7 @@ var app = getApp()
const wxService = require('../../utils/wxService') const wxService = require('../../utils/wxService')
import { Integer } from '../../utils/integerDigitalConvertion' import { Integer } from '../../utils/integerDigitalConvertion'
const utils = require('../../utils/util') const utils = require('../../utils/util')
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
wxService.page({ wxService.page({
/** /**
......
...@@ -4,6 +4,7 @@ const wxService = require('../../utils/wxService') ...@@ -4,6 +4,7 @@ const wxService = require('../../utils/wxService')
const utils = require('../../utils/util') const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo const envInfo = require('../../config/index').envInfo
import { Integer } from '../../utils/integerDigitalConvertion' import { Integer } from '../../utils/integerDigitalConvertion'
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
wxService.page({ wxService.page({
/** /**
...@@ -30,6 +31,27 @@ wxService.page({ ...@@ -30,6 +31,27 @@ wxService.page({
id: options.id id: options.id
}) })
} }
let memberId = options.memberId;
if (memberId) {
let content = {
title: this.data.contentInfo.headline,
id: this.data.contentInfo.id,
article: this.data.contentInfo.article,
url: this.data.contentInfo.shareShowPictureRESDTOList[0].url
}
let tentacleInfo = {
content: JSON.stringify(content),
contentId: this.data.contentInfo.id,
tentacleId: memberId,
contentType: app.globalData.contants.SHARE_TYPE.DETAILS_OF_THE_CONTENT, //内容类型
title: this.data.contentInfo.headline, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
this.generatePointObject(tentacleInfo);
}
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -187,33 +209,20 @@ wxService.page({ ...@@ -187,33 +209,20 @@ wxService.page({
path: path, path: path,
imageUrl: this.data.cardUrl, // 可以更换分享的图片 imageUrl: this.data.cardUrl, // 可以更换分享的图片
} }
}else{
//修改为参数memberId
var path = `pages/wantToBuyDetail/wantToBuyDetail`;
console.log('--------------------memberId-=---', memberId)
if (memberId) {
let m = Integer.digit(memberId, 10, 64);
let contentId = Integer.digit(this.data.contentInfo.id, 10, 64);
path = `pages/wantToBuyDetail/wantToBuyDetail?i=${contentId}&m=${m}`;
} }
let content = {
title: this.data.contentInfo.headline,
id: this.data.contentInfo.id,
article: this.data.contentInfo.article,
url: this.data.contentInfo.shareShowPictureRESDTOList[0].url
}
let tentacleInfo = {
content: JSON.stringify(content),
contentId: this.data.contentInfo.id,
contentType: app.globalData.contants.SHARE_TYPE.DETAILS_OF_THE_CONTENT, //内容类型
title: this.data.contentInfo.headline, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
this.data.currentShareContent.tentacleId = res.tentacleId;
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
return { return {
path: path, path: path,
imageUrl: this.data.cardUrl, // 可以更换分享的图片 imageUrl: this.data.cardUrl
} }
} }
});
} }
}) })
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var app = getApp() var app = getApp()
const wxService = require('../../../../utils/wxService') const wxService = require('../../../../utils/wxService')
import { Integer } from '../../../../utils/integerDigitalConvertion' import { Integer } from '../../../../utils/integerDigitalConvertion'
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
wxService.page({ wxService.page({
...@@ -52,6 +52,18 @@ wxService.page({ ...@@ -52,6 +52,18 @@ wxService.page({
'form.mallCategoryId': options.id 'form.mallCategoryId': options.id
}) })
} }
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);
}
}, },
/** /**
...@@ -156,21 +168,15 @@ wxService.page({ ...@@ -156,21 +168,15 @@ wxService.page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function (res) { onShareAppMessage: function (res) {
let tentacleInfo = {
content: '商品列表', //修改为参数memberId
title: '商品列表', var path = `subPackage/page/pages/categoryPro/categoryPro`;
contentType: app.globalData.contants.SHARE_TYPE.PRODUCT_LIST, if (memberId) {
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销 let m = Integer.digit(memberId, 10, 64);
}; path = `subPackage/page/pages/categoryPro/categoryPro?m=${m}`;
wxService.getTentacleContent(tentacleInfo).then(res => { }
if (res && res.tentacleId) {
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = `subPackage/page/pages/categoryPro/categoryPro?t=${tentacleId}`;
console.log(path)
return { return {
path: path path: path
} }
} }
});
}
}) })
\ No newline at end of file
...@@ -31,6 +31,18 @@ wxService.page({ ...@@ -31,6 +31,18 @@ wxService.page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
let memberId = options.memberId;
if (memberId) {
let tentacleInfo = {
content: '我的发布页面',
title: '我的发布',
tentacleId: memberId,
contentType: app.globalData.contants.SHARE_TYPE.CONTENTS_LIST,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
this.generatePointObject(tentacleInfo);
}
}, },
/** /**
...@@ -226,21 +238,17 @@ wxService.page({ ...@@ -226,21 +238,17 @@ wxService.page({
imageUrl: this.data.cardUrl // 可以更换分享的图片 imageUrl: this.data.cardUrl // 可以更换分享的图片
} }
} }
else {
let tentacleInfo = { //修改为参数memberId
content: '我的发布页面', var path = `subPackage/page/pages/myRelease/myRelease`;
title: '我的发布', if (memberId) {
contentType: app.globalData.contants.SHARE_TYPE.CONTENTS_LIST, let m = Integer.digit(memberId, 10, 64);
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销 path = `subPackage/page/pages/myRelease/myRelease?m=${m}`;
}; }
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = `subPackage/page/pages/myRelease/myRelease?t=${tentacleId}`;
return { return {
path: path path: path
} }
} }
});
} }
}) })
\ No newline at end of file
...@@ -23,7 +23,7 @@ wxService.page({ ...@@ -23,7 +23,7 @@ wxService.page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(options) console.log('mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm',options)
if (options && options.id) { if (options && options.id) {
this.setData({ this.setData({
id: options.id id: options.id
...@@ -31,6 +31,25 @@ wxService.page({ ...@@ -31,6 +31,25 @@ wxService.page({
this.getContentDetail() this.getContentDetail()
}) })
} }
let memberId = options.memberId;
if (memberId) {
let content = {
title: this.data.contentInfo.headline,
id: this.data.contentInfo.id,
article: this.data.contentInfo.article,
url: this.data.contentInfo.sspList[0].url
}
let tentacleInfo = {
content: JSON.stringify(content),
contentId: this.data.contentInfo.id,
tentacleId: memberId,
contentType: app.globalData.contants.SHARE_TYPE.DETAILS_OF_THE_CONTENT, //内容类型
title: this.data.contentInfo.headline, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
this.generatePointObject(tentacleInfo);
}
}, },
handleDel() { handleDel() {
this.setData({ this.setData({
...@@ -209,29 +228,21 @@ wxService.page({ ...@@ -209,29 +228,21 @@ wxService.page({
path: path, path: path,
imageUrl: this.data.contentInfo.sspList[0].url imageUrl: this.data.contentInfo.sspList[0].url
} }
}else{
//修改为参数memberId
var path = `pages/wantToBuyDetail/wantToBuyDetail`;
console.log('--------------------memberId-=---', memberId)
if (memberId) {
let m = Integer.digit(memberId, 10, 64);
let contentId = Integer.digit(this.data.contentInfo.id,10,64);
path = `pages/wantToBuyDetail/wantToBuyDetail?i=${contentId}&m=${m}`;
} }
let content = {
title: this.data.contentInfo.headline,
id: this.data.contentInfo.id,
article: this.data.contentInfo.article,
url: this.data.contentInfo.sspList[0].url
}
let tentacleInfo = {
content: JSON.stringify(content),
contentId: this.data.contentInfo.id,
contentType: app.globalData.contants.SHARE_TYPE.DETAILS_OF_THE_CONTENT, //内容类型
title: this.data.contentInfo.headline, //标题
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 = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
return { return {
path: path path: path,
imageUrl: this.data.contentInfo.sspList[0].url
} }
} }
});
} }
}) })
\ No newline at end of file
...@@ -575,6 +575,12 @@ class WXService extends Http { ...@@ -575,6 +575,12 @@ class WXService extends Http {
item['id'] = Integer.digit(item['i'], 64, 10); item['id'] = Integer.digit(item['i'], 64, 10);
} }
} }
if(item['m']){
item['memberId'] = Integer.digit(item['m'], 64, 10);
if (item['i']) {
item['id'] = Integer.digit(item['i'], 64, 10);
}
}
}); });
//如果打开的是分享界面则进行触点对象信息请求并存储到本地 放到后续的header中 //如果打开的是分享界面则进行触点对象信息请求并存储到本地 放到后续的header中
if (pageIsFromShare) { if (pageIsFromShare) {
...@@ -640,7 +646,44 @@ class WXService extends Http { ...@@ -640,7 +646,44 @@ class WXService extends Http {
//统一处理用户授权获取用户信息回调 //统一处理用户授权获取用户信息回调
_getUserInfo(res) { _getUserInfo(res) {
_self.getAuthUserInfo(res.detail) _self.getAuthUserInfo(res.detail)
},
//处理分享页面打开时参数为memberId时生成触点对象信息
generatePointObject(tentacleInfo){
console.log('---call 生成触点接口----')
console.log(tentacleInfo)
_self.getTentacleContent(tentacleInfo).then(res => {
console.log('-----处理分享页面打开时参数为memberId时生成触点对象信息------')
console.log('-----成功返回是------',res);
if (res && res.tentacleId) {
let data = res;
let TENTACLE_CONTENT = {
id: data.id,
tentacleType: data.type,
tentacleId: data.tentacleId,
contentType: data.contentType,
contentId: data.contentId
}
let storageObj = {
memberId: '',
obj: TENTACLE_CONTENT
} }
if (data.status == 1) {
var timestamp = Date.parse(new Date())
var expiration = timestamp + 1800000
wx.setStorageSync('TENTACLE_CONTENT', storageObj)
wx.setStorageSync('TIME_EXPIRATION', expiration)
}
else {
wx.removeStorageSync('TENTACLE_CONTENT')
wx.removeStorageSync('TIME_EXPIRATION')
}
}
});
},
} }
Page(Object.assign({}, config, CONFIG_PAPGE)) Page(Object.assign({}, config, CONFIG_PAPGE))
} }
......
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