Commit 7d9b05fc by 赵雅纹

Merge branch 'feature-zyw-sc' into 'dev_7.1.0'

Feature zyw sc

See merge request !110
parents fef3e646 ca33789d
......@@ -32,7 +32,7 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
wx.hideShareMenu()
if (options && options.id){
wx.setNavigationBarTitle({
title: '编辑地址'
......
......@@ -24,6 +24,7 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad() {
wx.hideShareMenu()
wxService.getSystemInfo().then(res => {
const { statusBarHeight } = res
const { currentHeight, currentMarginTop, currentPaddingTop } = this.data
......
......@@ -119,7 +119,7 @@ wxService.page({
let tentacleInfo = {
content: '分类',
title: '分类',
contentType: app.globalData.contants.SHARE_TYPE.PAGE,
contentType: app.globalData.contants.SHARE_TYPE.CLASSIFY,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
......
......@@ -31,7 +31,6 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
......@@ -49,10 +48,11 @@ wxService.page({
}
// 可使用
if (current == 0) {
wx.showShareMenu()
this.getExtendProList(1,10)
} else if (current == 1) {
// 我的推广
// wx.hideShareMenu();
wx.hideShareMenu();
this.getMyShareCount()
this.getMyExtendOrderList(1,10)
}
......@@ -146,7 +146,7 @@ wxService.page({
let tentacleInfo = {
content: JSON.stringify(this.data.proData),
contentId: data.id,
contentType: app.globalData.contants.SHARE_TYPE.GOODS, //内容类型 1.文章 2.商品 3.页面
contentType: app.globalData.contants.SHARE_TYPE.PRODUCTS_PROMOTION, //内容类型
title: this.data.proData[0].productName,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
......@@ -218,20 +218,21 @@ wxService.page({
wx.hideLoading()
data.content.forEach((item) =>{
//内容类型 1.文章 2.商品 3.页面
if (item.content){
if (item.contentType == 3){
item.content = item.content
}else{
let content = JSON.parse(item.content)
item.contentArr = [content]
}
}
// if (item.content){
// if (item.contentType == 3){
// item.content = item.content
// }else{
// let content = JSON.parse(item.content)
// item.contentArr = content
// }
// }
})
this.setData({
myExtendList: this.data.pageNum == 1 ? [...data.content] : [...this.data.myExtendList, ...data.content],
myTotalPages: data.totalPages
}, () => {
})
console.log('00000',this.data.myExtendList)
}
}
})
......@@ -351,7 +352,7 @@ wxService.page({
let tentacleInfo = {
content: '推广商品',
title: '推广商品',
contentType: app.globalData.contants.SHARE_TYPE.PAGE,
contentType: app.globalData.contants.SHARE_TYPE.PRODUCTS_PROMOTION,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
......
......@@ -112,19 +112,19 @@
wx:key="{{index}}"
wx:for-item="extendItem"
>
<navigator url="/subPackage/page/pages/orderBenefit/orderBenefit" hover-class="none">
<navigator url="/subPackage/page/pages/orderBenefit/orderBenefit?type={{extendItem.type}}&id={{extendItem.id}}" hover-class="none">
<view class="order-header">
<view class="order-number">
<text>{{extendItem.createTime}}</text>
</view>
<text class="order-status">查看收益</text>
</view>
<view class="pro-list" wx:if="{{extendItem.contentArr}}" wx:for="{{extendItem.contentArr}}" wx:for-item="contentItem" wx:key="{{index}}" >
<image class="pro-img" src="{{contentItem.url}}" />
<view class="pro-list" wx:if="{{extendItem.contentArr}}" >
<image class="pro-img" wx:for="{{extendItem.contentArr}}" wx:for-item="contentItem" wx:key="{{index}}" src="{{contentItem.url}}" />
<!-- <image class="pro-img" />
<image class="pro-img" />
<image class="pro-img" /> -->
<text class="pro-img-dot">...</text>
<text class="pro-img-dot" wx:if="{{extendItem.contentArr.length > 4}}">...</text>
</view>
<view class="pro-list" wx:if="{{!extendItem.contentArr}}">
......
......@@ -217,12 +217,13 @@ swiper {
.pro-list{
margin-top: 16rpx;
display: flex;
justify-content: space-between;
}
.pro-img{
width: 140rpx;
height: 140rpx;
/* border:1px solid red; */
margin-right: 15rpx;
vertical-align: middle;
}
.pro-img-dot{
......
......@@ -22,7 +22,7 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
wx.hideShareMenu()
},
handelCheckShopAddress(e) {
const index = e.currentTarget.dataset.index
......
......@@ -140,7 +140,7 @@ wxService.page({
let tentacleInfo = {
content: JSON.stringify(e.detail),
contentId: e.detail.id,
contentType: app.globalData.contants.SHARE_TYPE.CONTENT, //内容类型 1.文章 2.商品 3.页面
contentType: app.globalData.contants.SHARE_TYPE.DETAILS_OF_THE_CONTENT, //内容类型
title: e.detail.title, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
......@@ -201,9 +201,9 @@ wxService.page({
}
let tentacleInfo = {
content: this.route,
title: this.route,
contentType: app.globalData.contants.SHARE_TYPE.PAGE,
content: '内容列表',
title: '内容列表',
contentType: app.globalData.contants.SHARE_TYPE.CONTENTS_LIST,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
......
......@@ -310,11 +310,10 @@ wxService.page({
* 用户点击右上角分享
*/
onShareAppMessage: function () {
console.log('00000', app.globalData.contants)
let tentacleInfo = {
content: '集点详情',
title: '集点详情',
contentType: app.globalData.contants.SHARE_TYPE.PAGE,
content: '集点详情页面',
title: '集点详情页面',
contentType: app.globalData.contants.SHARE_TYPE.SET_POINT_DETAILS,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
......
......@@ -157,11 +157,10 @@ wxService.page({
* 用户点击右上角分享
*/
onShareAppMessage: function () {
console.log('00000', app.globalData.contants)
let tentacleInfo = {
content: '集点列表',
content: '集点列表页面',
title: '集点列表',
contentType: app.globalData.contants.SHARE_TYPE.PAGE,
contentType: app.globalData.contants.SHARE_TYPE.SET_POINT_ACTIVITY,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
......
......@@ -30,6 +30,7 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
wx.hideShareMenu();
if (options && options.id) {
this.setData({
productId: options.id,
......@@ -75,7 +76,7 @@ wxService.page({
let tentacleInfo = {
content: JSON.stringify(content),
contentId: this.data.productInfo.productId,
contentType: app.globalData.contants.SHARE_TYPE.GOODS, //内容类型 1.文章 2.商品 3.页面
contentType: app.globalData.contants.SHARE_TYPE.PRODUCT_DETAIL, //内容类型
title: this.data.productInfo.productName, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
......
......@@ -229,9 +229,9 @@ wxService.page({
*/
onShareAppMessage: function (res) {
let tentacleInfo = {
content: this.route,
title: this.route,
contentType: 3,
content: '首页',
title: '首页',
contentType: app.globalData.contants.SHARE_TYPE.HOME,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
......
......@@ -66,7 +66,7 @@ wxService.page({
// 分享
onTapShare() {
let content = {
headline: this.data.contentInfo.headline,
title: this.data.contentInfo.headline,
id: this.data.contentInfo.id,
article: this.data.contentInfo.article,
url: this.data.contentInfo.url
......@@ -74,7 +74,7 @@ wxService.page({
let tentacleInfo = {
content: JSON.stringify(content),
contentId: this.data.contentInfo.id,
contentType: app.globalData.contants.SHARE_TYPE.CONTENT, //内容类型 1.文章 2.商品 3.页面
contentType: app.globalData.contants.SHARE_TYPE.DETAILS_OF_THE_CONTENT, //内容类型
title: this.data.contentInfo.headline, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
......@@ -179,13 +179,39 @@ wxService.page({
* 用户点击右上角分享
*/
onShareAppMessage: function (res) {
if (res.from != 'menu') {
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;
console.log(path)
return {
path: path
}
}
let content = {
title: this.data.contentInfo.headline,
id: this.data.contentInfo.id,
article: this.data.contentInfo.article,
url: this.data.contentInfo.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 {
path: path
}
}
});
}
})
\ No newline at end of file
......@@ -2,6 +2,7 @@
"navigationBarTitleText": "",
"usingComponents": {
"go-home": "/component/goHome/goHome",
"card-modal": "/component/cardModal/cardModal",
"buy-image-swiper": "/component/buyImageSwiper/buyImageSwiper"
}
}
\ No newline at end of file
......@@ -29,6 +29,10 @@ wxService.page({
type: 'new'
},
{
name: '最热',
type: 'hot'
},
{
name: '价格',
type: 'price'
},
......@@ -155,7 +159,7 @@ wxService.page({
let tentacleInfo = {
content: '商品列表',
title: '商品列表',
contentType: app.globalData.contants.SHARE_TYPE.PAGE,
contentType: app.globalData.contants.SHARE_TYPE.PRODUCT_LIST,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
......
......@@ -99,9 +99,10 @@ wxService.page({
item.id = item.productId
})
let tentacleInfo = {
content: JSON.stringify(this.data.proList),
content: '推广商品列表',
title: '推广商品',
contentType: 3,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
......
......@@ -27,6 +27,7 @@ wxService.page({
this.getYesterdayInviteNumber()
this.getInviteMemberList()
this.getInviteBanner()
wx.hideShareMenu()
},
// 获取当前邀请人数
......
......@@ -18,7 +18,7 @@
</navigator>
<view class="order-benefit-wrap">
<view class="order-benefit-list" wx:for="{{inviteMemberList}}" wx:key="{{index}}">
<navigator url="/subPackage/page/pages/orderBenefit/orderBenefit" hover-class="none">
<navigator url="/subPackage/page/pages/orderBenefit/orderBenefit?type=10" hover-class="none">
<view class="top-info">
<image class="invite-avatar" src="{{item.headimgurl}}"></image>
<view class="invite-phone">
......
......@@ -154,7 +154,7 @@ wxService.page({
let tentacleInfo = {
content: JSON.stringify(e.detail),
contentId: e.detail.id,
contentType: app.globalData.contants.SHARE_TYPE.CONETNT, //内容类型 1.文章 2.商品 3.页面
contentType: app.globalData.contants.SHARE_TYPE.DETAILS_OF_THE_CONTENT, //内容类型 1.文章 2.商品 3.页面
title: e.detail.title, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
......@@ -214,9 +214,9 @@ wxService.page({
}
let tentacleInfo = {
content: '我的发布',
content: '我的发布页面',
title: '我的发布',
contentType: app.globalData.contants.SHARE_TYPE.PAGE,
contentType: app.globalData.contants.SHARE_TYPE.CONTENTS_LIST,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
......
......@@ -41,7 +41,7 @@ wxService.page({
// 分享
onTapShare(){
let content = {
headline: this.data.contentInfo.headline,
title: this.data.contentInfo.headline,
id: this.data.contentInfo.id,
article: this.data.contentInfo.article,
url: this.data.contentInfo.url
......@@ -49,7 +49,7 @@ wxService.page({
let tentacleInfo = {
content: JSON.stringify(content),
contentId: this.data.contentInfo.id,
contentType: app.globalData.contants.SHARE_TYPE.CONETNT, //内容类型 1.文章 2.商品 3.页面
contentType: app.globalData.contants.SHARE_TYPE.DETAILS_OF_THE_CONTENT, //内容类型
title: this.data.contentInfo.headline, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
......@@ -210,16 +210,23 @@ wxService.page({
}
}
let content = {
title: this.data.contentInfo.headline,
id: this.data.contentInfo.id,
article: this.data.contentInfo.article,
url: this.data.contentInfo.url
}
let tentacleInfo = {
content: '种草详情',
title: '种草详情',
contentType: app.globalData.contants.SHARE_TYPE.PAGE,
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?t=${tentacleId}`;
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
return {
path: path
}
......
......@@ -32,7 +32,9 @@
<view class="action-edit"> 编辑 </view>
</navigator>
</view>
<view class="action-check"> 查看收益 </view>
<navigator url="/subPackage/page/pages/orderBenefit/orderBenefit?id={{contentInfo.id}}&type=6" hover-class="none">
<view class="action-check"> 查看收益 </view>
</navigator>
</view>
</view>
</view>
......
......@@ -13,14 +13,29 @@ wxService.page({
pageNum: 1,
pageSize: 10,
totalPages: 0,
orderBenefitList:[]
orderBenefitList:[],
id:'',
type:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
wx.hideShareMenu()
if(options){
if(options.id){
this.setData({
id: options.id
})
}
if (options.type){
this.setData({
type: options.type
})
}
}
},
/**
......@@ -42,9 +57,12 @@ wxService.page({
title: '加载中',
mask: true
})
wxService.post(`/marketing/awardRecord/queryAward?pageNum=${pageNum}&pageSize=${pageSize}`, {
userId: memberId
}).then(res => {
let params = {
userId: memberId,
type: this.data.type,
sourceId: this.data.id
}
wxService.post(`/marketing/awardRecord/queryAward?pageNum=${pageNum}&pageSize=${pageSize}`, params).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
......
......@@ -78,11 +78,10 @@ wxService.page({
* 用户点击右上角分享
*/
onShareAppMessage: function () {
console.log('00000', app.globalData.contants)
let tentacleInfo = {
content: 'plus购买页',
title: 'plus购买页',
contentType: app.globalData.contants.SHARE_TYPE.PAGE,
contentType: app.globalData.contants.SHARE_TYPE.PLUS,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
......
......@@ -32,7 +32,7 @@ wxService.page({
onShow: function () {
this.getShareImg()
this.getMiniCode()
wx.hideShareMenu()
},
//轮播图的切换事件
......@@ -108,8 +108,8 @@ wxService.page({
// 保存海报
savePoster(){
let tentacleInfo = {
content: "我的邀请",
contentType: app.globalData.contants.SHARE_TYPE.PAGE, //内容类型 1.文章 2.商品 3.页面
content: "我的邀请页面",
contentType: app.globalData.contants.SHARE_TYPE.INVITE_FRIENDS, //内容类型
title: '我的邀请', //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
......
......@@ -2,11 +2,30 @@
const contants = {
SHARE_TYPE : {
CONETNT: 1, //内容
GOODS: 2, //商品
PAGE: 3 //页面
HOME: 1, //首页
CLASSIFY: 2, //分类
PRODUCT_LIST: 3, //商品列表页面
PRODUCT_DETAIL: 4, //商品详情页面
CONTENTS_LIST: 5, //内容列表页面
DETAILS_OF_THE_CONTENT: 6, //"内容详情页面"
PRODUCTS_PROMOTION: 7, //"商品推广页面"
SET_POINT_ACTIVITY: 8, // "集点活动页面"
SET_POINT_DETAILS: 9,// "集点详情页面"
INVITE_FRIENDS: 10, //"邀请好友页面"
PLUS: 11,// "plus购买页面"
BE_INVITED: 12,// "被邀请注册"
SHARE_THE_GOODS: 13,// "分享商品"
POST_REWARDS: 14,// "种草奖励"
FOR_THE_FIRST_TIME: 15,// "首单"
TRANSMIT: 16,// "转发统计"
ENJOY: 17,// "点赞统计"
READ: 18, //"阅读统计"
}
}
module.exports = contants
\ No newline at end of file
module.exports = contants
......@@ -277,6 +277,10 @@ class WXService extends Http {
wx.setStorageSync('TENTACLE_CONTENT', storageObj)
wx.setStorageSync('TIME_EXPIRATION', expiration)
}
else{
wx.removeStorageSync('TENTACLE_CONTENT')
wx.removeStorageSync('TIME_EXPIRATION')
}
}).finally(() => {
})
......
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