Commit da5dd35d by 谢中龙

修改分享bug

parent 5be28ac5
......@@ -9,12 +9,17 @@
const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre
//仅生产环境时 配置 :
//3001 3001 , wx313ec36b710125d4
//泰华 2006 , wx40fec8944623c8b3
//多多一上 2007, wxf7bc302c51166dc0
//雪岛书屋 2008 wx207f8a95bbc9d3ab
//苏州邻里 2003, wxe7770946f9d93d38
//2006 泰华 , wx40fec8944623c8b3
//2007 多多一上 , wxf7bc302c51166dc0
//2008 雪岛书屋 wx207f8a95bbc9d3ab
//2003 苏州邻里 , wxe7770946f9d93d38
//2012 悦芙媞 wxfe14ebde4a6eea3d
//2010 热风 wxe6d270a3e399ade9
//2009 拉如 wxa0db9cb42b1cbdc9
//2013 阿特里里
//2014 包鞋
//2015 花在花园
//2016 阿吉豆
const BRANCH_ID = 3001
const isMall = true
......@@ -178,6 +183,21 @@ const prod_brand_config = {
shareTitle: '【苏州邻里】',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png',
},
//拉如小程序
2009 : {
appId: 'wxa0db9cb42b1cbdc9',// 小程序AppID
tunnelToken: '2c626cb97cd05b635ae85ace7acb5608',//商户默认token
brandId: 2009,//商户ID
plusIsOpen: false,//下单和下单状态界面是否显示购买plus
contactUsIsOpen: false,//是否开启联系我
contactUsPluginId: '',//联系我们插件PluginID
hasTrial: false,// 是否有体验账号
isMall: isMall,// 商城或门户 true 商城 false 门户
orderingMustOpenCard: false,//下单是否必须卡开
isOpenSelfMention: false, // 是否开启门店自提
shareTitle: '【LA RUTA DE VIA】',//分享海报上显示的小程序title
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/laru.jpg',//商户logo
},
//热风
2010 : {
appId: 'wxe6d270a3e399ade9',
......@@ -207,7 +227,69 @@ const prod_brand_config = {
isOpenSelfMention: false, // 是否开启门店自提
shareTitle: '【悦芙媞微商城】',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/yufuti_logo.png',
}
},
//阿特里里
2013 : {
appId: '',
tunnelToken: 'ef7bf4d1adcf8ee5d57a2450255ecc27',
brandId: 2013,
plusIsOpen: false,
contactUsIsOpen: true,
contactUsPluginId: '',
hasTrial: false,
isMall: isMall,
orderingMustOpenCard: false,
isOpenSelfMention: false, // 是否开启门店自提
shareTitle: '【阿特里里微商城】',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png',
},
//包鞋
2014: {
appId: '',
tunnelToken: 'd1637a225cfe0f61a72967a74a872a7f',
brandId: 2014,
plusIsOpen: false,
contactUsIsOpen: true,
contactUsPluginId: '',
hasTrial: false,
isMall: isMall,
orderingMustOpenCard: false,
isOpenSelfMention: false, // 是否开启门店自提
shareTitle: '【包鞋微商城】',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png',
},
//花在花园
2015 : {
appId: '',
tunnelToken: 'fa2816369abd2726d18b2a0dd51736f4',
brandId: 2015,
plusIsOpen: false,
contactUsIsOpen: true,
contactUsPluginId: '',
hasTrial: false,
isMall: isMall,
orderingMustOpenCard: false,
isOpenSelfMention: false, // 是否开启门店自提
shareTitle: '【花在花园微商城】',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png',
},
//阿吉豆
2016: {
appId: '',
tunnelToken: 'bac535a06a04adaa8e6660e22c64b257',
brandId: 2016,
plusIsOpen: false,
contactUsIsOpen: true,
contactUsPluginId: '',
hasTrial: false,
isMall: isMall,
orderingMustOpenCard: false,
isOpenSelfMention: false, // 是否开启门店自提
shareTitle: '【阿吉豆微商城】',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png',
},
}
//默认分享logo
......
......@@ -162,6 +162,8 @@ wxService.page({
wx.showLoading({
title: '加载中'
})
//获取商品详情
console.log('productId-----', this.data.productId)
wxService.get(`/sale/product/buyer/findByProductId?productId=${this.data.productId}`).then(res => {
const { result, data } = res.data
if (result == 0) {
......@@ -350,8 +352,11 @@ wxService.page({
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
if (memberId) {
let m = Integer.digit(memberId, 10, 64);
let contentId = Integer.digit(this.data.productInfo.productId, 10, 64);
path = `pages/productDetail/productDetail?i=${contentId}&m=${m}`;
// let contentId = Integer.digit(this.data.productInfo.productId, 10, 64);
path = `pages/productDetail/productDetail?id=${this.data.productInfo.productId}&m=${m}`;
}
else{
path = `pages/productDetail/productDetail?id=${this.data.productInfo.productId}`;
}
return {
title: this.data.productInfo.productName,
......
......@@ -312,6 +312,9 @@ wxService.page({
}
}).finally(() => {
wx.hideLoading();
this.setData({
loading: false
});
})
},
/**
......
......@@ -139,7 +139,6 @@ wxService.page({
loadingText : this.data.loadingText
})
}
}
});
},
......@@ -237,7 +236,7 @@ wxService.page({
let tentacleInfo = {
content: JSON.stringify(content),
contentId: item.id,
contentType: app.globalData.contants.SHARE_TYPE.PRODUCT_DETAIL, //内容类型 STAFF_RECOMMAND
contentType: app.globalData.contants.SHARE_TYPE.STAFF_RECOMMAND, //内容类型 STAFF_RECOMMAND
title: item.title, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
......@@ -277,7 +276,7 @@ wxService.page({
let tentacleInfo = {
content: JSON.stringify(content),
contentId: item.id,
contentType: app.globalData.contants.SHARE_TYPE.PRODUCT_DETAIL, //内容类型 STAFF_RECOMMAND
contentType: app.globalData.contants.SHARE_TYPE.STAFF_RECOMMAND, //内容类型 STAFF_RECOMMAND
title: item.title, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
......@@ -361,7 +360,7 @@ wxService.page({
let tentacleInfo = {
content: JSON.stringify(content),
contentId: item.productId,
contentType: app.globalData.contants.SHARE_TYPE.PRODUCT_DETAIL, //内容类型
contentType: app.globalData.contants.SHARE_TYPE.STAFF_RECOMMAND, //内容类型
title: item.productName, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
......@@ -396,7 +395,7 @@ wxService.page({
let tentacleInfo = {
content: JSON.stringify(content),
contentId: item.productId,
contentType: app.globalData.contants.SHARE_TYPE.PRODUCT_DETAIL, //内容类型
contentType: app.globalData.contants.SHARE_TYPE.STAFF_RECOMMAND, //内容类型
title: item.productName, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
......
......@@ -107,6 +107,9 @@ wxService.page({
});
let pageNo = this.data.pageNo,
pageSize = this.data.pageSize;
console.log('pageNo----', pageNo)
console.log('pageSize----', pageSize)
console.log('form-----', this.data.form)
wxService.post(`/sale/product/buyer/listPageByCategoryId?pageNo=${pageNo}&pageSize=${pageSize}`, this.data.form).then(res => {
const { result, data } = res.data
if (result == 0 && data.content) {
......@@ -166,13 +169,13 @@ wxService.page({
//修改为参数memberId
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
var path = `subPackage/page/pages/categoryPro/categoryPro`;
var path = `subPackage/page/pages/categoryPro/categoryPro?id=${this.data.form.mallCategoryId}`;
if (memberId) {
let m = Integer.digit(memberId, 10, 64);
path = `subPackage/page/pages/categoryPro/categoryPro?m=${m}`;
path = `subPackage/page/pages/categoryPro/categoryPro?m=${m}&id=${this.data.form.mallCategoryId}`;
}
return {
title: '商品列表',
title: '我给你分享了一些商品,赶紧去看看吧~',
path: path
}
}
......
......@@ -80,7 +80,6 @@ wxService.page({
isInput : false,
inputText : '',
sourceText : '',
},
/**
......@@ -338,16 +337,7 @@ wxService.page({
else{
ctx.fillText('¥', rpx2px(30), rpx2px(280 + (imageSize.height - 30) * 2));
}
// if (ratio < 0.55) {
// ctx.fillText('¥', rpx2px(30), rpx2px(190 + (imageSize.height - 30) * 2));
// }
// else if (ratio > 0.62) {
// ctx.fillText('¥', rpx2px(30), rpx2px(240 + (imageSize.height-30) * 2));
// }
// else {
// ctx.fillText('¥', rpx2px(30), rpx2px(180 + (imageSize.height-30) * 2));
// }
ctx.setFillStyle('red');
ctx.setTextAlign('left');
ctx.font = 'bold 24px sans-serif';
......@@ -357,15 +347,6 @@ wxService.page({
else{
ctx.fillText(price, rpx2px(60), rpx2px(280 + (imageSize.height - 30) * 2));
}
// if (ratio < 0.55) {
// ctx.fillText(price, rpx2px(60), rpx2px(190 + (imageSize.height - 30) * 2));
// }
// else if (ratio > 0.62) {
// ctx.fillText(price, rpx2px(60), rpx2px(240 + (imageSize.height -30) * 2));
// }
// else {
// ctx.fillText(price, rpx2px(60), rpx2px(180 + (imageSize.height -30) * 2));
// }
}
else{
ctx.setFillStyle('#333333');
......@@ -396,16 +377,6 @@ wxService.page({
else{
ctx.fillText(item, rpx2px(30), rpx2px(330 + (deviceWidth - 30) * 2) + rpx2px(index * 35));
}
// if (ratio < 0.55) {
// ctx.fillText(item, rpx2px(30), rpx2px(280 + (imageSize.height -30) * 2) + rpx2px(index * 35));
// }
// else if (ratio > 0.62) {
// ctx.fillText(item, rpx2px(30), rpx2px(320 + (imageSize.height -30) * 2) + rpx2px(index * 35));
// }
// else {
// ctx.fillText(item, rpx2px(30), rpx2px(250 + (imageSize.height -30) * 2) + rpx2px(index * 35));
// }
})
}
......@@ -434,7 +405,6 @@ wxService.page({
canvasId: 'myCanvas',
quality: 1,
success: result => {
console.log(result)
self.data.btnIsDisabled = false;
self.data.canvasTempFileUrl = result.tempFilePath;
self.setData({
......
......@@ -28,6 +28,21 @@ wxService.page({
},
//复制
onTapCopy(e) {
let value = e.currentTarget.dataset.value;
wx.setClipboardData({
//准备复制的数据
data: value,
success: function (res) {
wx.showToast({
title: '复制成功',
icon: 'none'
});
}
});
},
//获取购买记录
getBuyRecordsList(refresh){
const { memberId } = wx.getStorageSync('_baseUserInfo');
......
......@@ -7,7 +7,8 @@
wx:key="*this">
<view class='records-item-lf'>
<view class='records-title'>{{item.activityName}}</view>
<view class="records-desc">超值卡号:{{item.supValCardId}}</view>
<view class="records-desc">超值卡号:{{item.supValCardId}}
<text class="copy" data-value="{{item.supValCardId}}" bindtap="onTapCopy">复制</text></view>
<view class="records-desc">购买时间:{{item.payOrderTime}}</view>
<view class="records-desc">有效时间:{{item.startTime}} 至 {{item.endTime}}</view>
</view>
......
......@@ -52,7 +52,23 @@ view{
.records-desc{
font-size: 24rpx;
color: #999999;
margin-bottom: 4rpx;
margin-bottom: 8rpx;
display: flex;
align-items: center;
}
.records-desc .copy{
display: block;
font-size: 22rpx;
padding: 2rpx 10rpx;
border: solid 1rpx #ff2222;
color: #ff2222;
border-radius: 4rpx;
margin-left: 10rpx;
}
.records-desc .copy:active{
opacity: 0.7;
}
......
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