Commit b55cd24b by 赵雅纹

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

Fixbug zyw

See merge request !160
parents 16d3eb7f 9752ed9a
...@@ -25,6 +25,10 @@ Component({ ...@@ -25,6 +25,10 @@ Component({
type: String, type: String,
value: '' value: ''
}, },
scene: {
type: String,
value: ''
}
}, },
/** /**
...@@ -53,9 +57,10 @@ Component({ ...@@ -53,9 +57,10 @@ Component({
let data = { let data = {
"autoColor": true, "autoColor": true,
"page": this.data.pagePath, "page": this.data.pagePath,
"scene": '123', "scene": this.data.scene,
"width": 100 "width": 100
} }
console.log(this.data.pagePath)
wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => { wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => {
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
...@@ -63,6 +68,7 @@ Component({ ...@@ -63,6 +68,7 @@ Component({
codeImg: app.globalData.imageUrl + data codeImg: app.globalData.imageUrl + data
// codeImg: "https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg" // codeImg: "https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg"
}) })
console.log(this.data.codeImg)
if (this.data.codeImg) { if (this.data.codeImg) {
this.selectComponent('#getPoster').getAvaterInfo() this.selectComponent('#getPoster').getAvaterInfo()
} }
......
// component/shareBebefitModal/shareBebefitModal.js
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
value: ''
},
benefitData: {
type: Object,
value: ''
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
closeCardModal() {
this.setData({
show: false
})
},
_getUserInfo(res = {}) {
this.setData({
show: false
})
this.triggerEvent('getAuth', res);
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--component/cardModal/cardModal.wxml-->
<view>
<view class="commodity_screen2" bindtap='closeCardModal' style='opacity: 0.5;' hidden="{{!show}}" catchtouchmove='true'></view>
<view class="card-modal" hidden="{{!show}}" catchtouchmove='true'>
<view class="card-modal-content">
<image mode="widthFix" class="benefit-image" src="{{benefitData.inviteePage}}"></image>
<view wx:if="{{!benefitData.receiveAwardJumpType}}">
<button class="btn btn-primary" bindgetuserinfo="_getUserInfo" data-jflag="false" open-type='getUserInfo'>立即领取</button>
</view>
<view wx:else>
<button class="btn btn-primary" bindtap="closeCardModal">立即领取</button>
</view>
</view>
</view>
</view>
/* component/cardModal/cardModal.wxss */
@import "/app.wxss";
.commodity_screen2 {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
opacity: 0.65;
overflow: hidden;
z-index: 9999;
color: #fff;
}
.card-modal{
position: fixed;
top:100rpx;
left: 100rpx;
z-index: 9999;
/* width: 640rpx; */
}
.card-modal-content{
/* width: 640rpx; */
height: 1000rpx;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 4rpx 17rpx 0px rgba(0, 0, 0, 0.12);
}
\ No newline at end of file
...@@ -104,6 +104,7 @@ Component({ ...@@ -104,6 +104,7 @@ Component({
success: function (res) { success: function (res) {
wx.hideLoading(); wx.hideLoading();
if (res.statusCode === 200) { if (res.statusCode === 200) {
console.log('000',res.tempFilePath)
var codeSrc = res.tempFilePath; var codeSrc = res.tempFilePath;
that.sharePosteCanvas(productSrc, codeSrc, imgInfo); that.sharePosteCanvas(productSrc, codeSrc, imgInfo);
} else { } else {
...@@ -128,6 +129,7 @@ Component({ ...@@ -128,6 +129,7 @@ Component({
//canvas绘制分享海报 //canvas绘制分享海报
sharePosteCanvas: function (avaterSrc, codeSrc, imgInfo) { sharePosteCanvas: function (avaterSrc, codeSrc, imgInfo) {
console.log('----', this.data.productDesc)
wx.showLoading({ wx.showLoading({
title: '生成中...', title: '生成中...',
...@@ -168,6 +170,7 @@ Component({ ...@@ -168,6 +170,7 @@ Component({
// ctx.fillText(that.data.userAvatar, left - 15, imgheght + 110); //电话 // ctx.fillText(that.data.userAvatar, left - 15, imgheght + 110); //电话
} }
// title // title
console.log('productDesc', that.data.productDesc)
if (that.data.productDesc){ if (that.data.productDesc){
ctx.setFontSize(12); ctx.setFontSize(12);
ctx.setFillStyle('#333333'); ctx.setFillStyle('#333333');
......
...@@ -26,6 +26,7 @@ wxService.page({ ...@@ -26,6 +26,7 @@ wxService.page({
myExtendList:[], myExtendList:[],
myShareCount:'', myShareCount:'',
extendProBanner: '', extendProBanner: '',
scene: '', //触点参数
proData : [] proData : []
}, },
...@@ -176,23 +177,25 @@ wxService.page({ ...@@ -176,23 +177,25 @@ wxService.page({
wxService.getTentacleContent(tentacleInfo).then(res => { wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.id) { if (res && res.id) {
this.data.currentShareContent.tentacleId = res.id; 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 = 'subPackage/page/pages/friendShareList/friendShareList?i=' + id + '&t=' + tentacleId; var path = 'subPackage/page/pages/friendShareList/friendShareList';
var scene = 'i=' + id + '&t=' + tentacleId
if(type == 1){ if(type == 1){
this.setData({ this.setData({
showCardModal: true, showCardModal: true,
cardTitle: this.data.proData[0].productName, cardTitle: this.data.proData[0].productName,
cardUrl: this.data.proData[0].productImgUrl, cardUrl: this.data.proData[0].productImgUrl,
pagePath: path pagePath: path,
scene: scene
}); });
}else{ }else{
this.setData({ this.setData({
cardTitle: this.data.proData[0].productName, cardTitle: this.data.proData[0].productName,
cardUrl: this.data.proData[0].productImgUrl, cardUrl: this.data.proData[0].productImgUrl,
pagePath: path pagePath: path,
scene: scene
}); });
this.getMiniCode() this.getMiniCode()
} }
...@@ -211,7 +214,7 @@ wxService.page({ ...@@ -211,7 +214,7 @@ wxService.page({
let data = { let data = {
"autoColor": true, "autoColor": true,
"page": this.data.pagePath, "page": this.data.pagePath,
"scene": '123', "scene": this.data.scene,
"width": 100 "width": 100
} }
wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => { wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => {
......
...@@ -157,6 +157,7 @@ ...@@ -157,6 +157,7 @@
card-title="{{cardTitle}}" card-title="{{cardTitle}}"
card-url="{{cardUrl}}" card-url="{{cardUrl}}"
page-path="{{pagePath}}" page-path="{{pagePath}}"
scene="{{scene}}"
/> />
<share-poster id="getPoster" bindmyevent="myEventListener" avater="{{cardUrl}}" productDesc="{{cardTitle}}" userAvatar="http://t2.hddhhn.com/uploads/tu/201806/9999/91480c0c87.jpg" bind:showMiniCard="_showMiniCard" pagePath="{{pagePath}}" code-img="{{codeImg}}"></share-poster> <share-poster id="getPoster" bindmyevent="myEventListener" avater="{{cardUrl}}" productDesc="{{cardTitle}}" userAvatar="http://t2.hddhhn.com/uploads/tu/201806/9999/91480c0c87.jpg" bind:showMiniCard="_showMiniCard" pagePath="{{pagePath}}" code-img="{{codeImg}}"></share-poster>
<!--goHome--> <!--goHome-->
......
...@@ -24,7 +24,8 @@ wxService.page({ ...@@ -24,7 +24,8 @@ wxService.page({
pagePath:'', pagePath:'',
contentList:[], contentList:[],
currentShareContent: null, currentShareContent: null,
contentPermission: false contentPermission: false,
scene: ''
}, },
// 点击切换 // 点击切换
...@@ -226,12 +227,14 @@ wxService.page({ ...@@ -226,12 +227,14 @@ wxService.page({
this.data.currentShareContent.tentacleId = res.id; 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';
let scene = 'i=' + id + '&t=' + tentacleId
this.setData({ this.setData({
showCardModal: true, showCardModal: true,
cardTitle: e.detail.title, cardTitle: e.detail.title,
cardUrl: e.detail.url, cardUrl: e.detail.url,
pagePath: path pagePath: path,
scene: scene
}); });
let params = { let params = {
contentId: e.detail.id, contentId: e.detail.id,
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
card-title="{{cardTitle}}" card-title="{{cardTitle}}"
card-url="{{cardUrl}}" card-url="{{cardUrl}}"
page-path="{{pagePath}}" page-path="{{pagePath}}"
scene="{{scene}}"
/> />
<!--goHome--> <!--goHome-->
......
...@@ -24,6 +24,7 @@ wxService.page({ ...@@ -24,6 +24,7 @@ wxService.page({
showCardModal: false, showCardModal: false,
currentShareContent: null, currentShareContent: null,
fromZc: false, fromZc: false,
scene:'', //触点参数
}, },
/** /**
...@@ -130,12 +131,14 @@ wxService.page({ ...@@ -130,12 +131,14 @@ wxService.page({
this.data.currentShareContent.tentacleId = res.id; 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';
var scene = 'i=' + id + '&t=' + tentacleId
this.setData({ this.setData({
showCardModal: true, showCardModal: true,
cardTitle: this.data.productInfo.productName, cardTitle: this.data.productInfo.productName,
cardUrl: this.data.productInfo.indexUrl, cardUrl: this.data.productInfo.indexUrl,
pagePath: path pagePath: path,
scene: scene
}); });
} }
}) })
......
...@@ -176,6 +176,7 @@ ...@@ -176,6 +176,7 @@
card-title="{{cardTitle}}" card-title="{{cardTitle}}"
card-url="{{cardUrl}}" card-url="{{cardUrl}}"
page-path="{{pagePath}}" page-path="{{pagePath}}"
scene="{{scene}}"
/> />
<!-- <sku-popup <!-- <sku-popup
......
...@@ -30,8 +30,10 @@ wxService.page({ ...@@ -30,8 +30,10 @@ wxService.page({
// cardMember: null, // cardMember: null,
pageBackgroundColor: 0, pageBackgroundColor: 0,
guidePageModalShow: false, guidePageModalShow: false,
shareBenefitModalShow: false,
currHomePageId: '', currHomePageId: '',
skuVOList: [] skuVOList: [],
benefitData: ''
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -52,6 +54,29 @@ wxService.page({ ...@@ -52,6 +54,29 @@ wxService.page({
this.generatePointObject(tentacleInfo); this.generatePointObject(tentacleInfo);
} }
// 邀请奖励弹框
if (options && options.type == 10){
this.setData({
shareBenefitModalShow: true
})
this.getShareImg()
}
},
// 获取邀请奖励图片
getShareImg() {
wxService.get(`/member/share/inviteFriends/buyer/getValid`).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
let initiatorPage = JSON.parse(data.initiatorPage)
this.setData({
benefitData: data
})
}
}
})
}, },
/** /**
* 监听子组件事件 * 监听子组件事件
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
"guide-page-modal": "/component/guidePageModal/guidePageModal", "guide-page-modal": "/component/guidePageModal/guidePageModal",
"bottom-tabs": "/component/bottomTabs/bottomTabs", "bottom-tabs": "/component/bottomTabs/bottomTabs",
"authorization-modal": "/component/authorization-modal/authorization-modal", "authorization-modal": "/component/authorization-modal/authorization-modal",
"plus": "/component/plus/plus" "plus": "/component/plus/plus",
"share-benefit-modal": "/component/shareBenefitModal/shareBenefitModal"
} }
} }
\ No newline at end of file
...@@ -32,4 +32,5 @@ ...@@ -32,4 +32,5 @@
</block> </block>
</view> </view>
<guide-page-modal show="{{guidePageModalShow}}" /> <guide-page-modal show="{{guidePageModalShow}}" />
<share-benefit-modal show="{{shareBenefitModalShow}}" benefit-data="{{benefitData}}"/>
<!--<authorization-modal isAuthorization='{{isAuthorization}}'/>--> <!--<authorization-modal isAuthorization='{{isAuthorization}}'/>-->
...@@ -19,8 +19,8 @@ wxService.page({ ...@@ -19,8 +19,8 @@ wxService.page({
showCardModal: false, showCardModal: false,
currentShareContent: null, currentShareContent: null,
pagePath:'', pagePath:'',
loadingTime:'' loadingTime:'',
scene: ''
}, },
/** /**
...@@ -130,12 +130,13 @@ wxService.page({ ...@@ -130,12 +130,13 @@ wxService.page({
// 分享 // 分享
onTapShare() { onTapShare() {
console.log('00000',this.data.contentInfo)
const { memberId, member } = wx.getStorageSync('_baseUserInfo') const { memberId, member } = wx.getStorageSync('_baseUserInfo')
let content = { let content = {
title: this.data.contentInfo.headline, title: this.data.contentInfo.headline,
id: this.data.contentInfo.id, id: this.data.contentInfo.id,
article: this.data.contentInfo.article, article: this.data.contentInfo.article,
url: this.data.contentInfo.url url: this.data.contentInfo.shareShowPictureRESDTOList[0].url
} }
let tentacleInfo = { let tentacleInfo = {
content: JSON.stringify(content), content: JSON.stringify(content),
...@@ -152,12 +153,14 @@ wxService.page({ ...@@ -152,12 +153,14 @@ wxService.page({
this.data.currentShareContent.tentacleId = res.id; 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';
let scene = 'i=' + id + '&t=' + tentacleId
this.setData({ this.setData({
showCardModal: true, showCardModal: true,
cardTitle: this.data.contentInfo.headline, cardTitle: this.data.contentInfo.headline,
cardUrl: this.data.contentInfo.shareShowPictureRESDTOList[0].url, cardUrl: this.data.contentInfo.shareShowPictureRESDTOList[0].url,
pagePath: path pagePath: path,
scene: scene
}); });
let params = { let params = {
contentId: this.data.contentInfo.id, contentId: this.data.contentInfo.id,
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
card-title="{{cardTitle}}" card-title="{{cardTitle}}"
card-url="{{cardUrl}}" card-url="{{cardUrl}}"
page-path="{{pagePath}}" page-path="{{pagePath}}"
scene="{{scene}}"
/> />
<!--goHome--> <!--goHome-->
......
...@@ -25,7 +25,8 @@ wxService.page({ ...@@ -25,7 +25,8 @@ wxService.page({
pagePath:'', pagePath:'',
contentList: [], contentList: [],
contentPermission: false, contentPermission: false,
currentShareContent: null currentShareContent: null,
scene:''
}, },
/** /**
...@@ -230,12 +231,14 @@ wxService.page({ ...@@ -230,12 +231,14 @@ wxService.page({
this.data.currentShareContent.tentacleId = res.id; 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';
let scene = 'i=' + id + '&t=' + tentacleId
this.setData({ this.setData({
showCardModal: true, showCardModal: true,
cardTitle: e.detail.title, cardTitle: e.detail.title,
cardUrl: e.detail.url, cardUrl: e.detail.url,
pagePath: path pagePath: path,
scene: scene
}); });
let params = { let params = {
......
...@@ -41,5 +41,6 @@ ...@@ -41,5 +41,6 @@
card-title="{{cardTitle}}" card-title="{{cardTitle}}"
card-url="{{cardUrl}}" card-url="{{cardUrl}}"
page-path="{{pagePath}}" page-path="{{pagePath}}"
scene="{{scene}}"
/> />
...@@ -20,7 +20,8 @@ wxService.page({ ...@@ -20,7 +20,8 @@ wxService.page({
loadingTime: '', loadingTime: '',
proList:[], proList:[],
pageNo: 1, pageNo: 1,
pageSize: 10 pageSize: 10,
scene: ''
}, },
/** /**
...@@ -28,7 +29,6 @@ wxService.page({ ...@@ -28,7 +29,6 @@ wxService.page({
*/ */
onLoad: function (options) { onLoad: function (options) {
wx.hideShareMenu(); wx.hideShareMenu();
console.log('mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm',options)
if (options && options.id) { if (options && options.id) {
this.setData({ this.setData({
id: options.id id: options.id
...@@ -69,7 +69,7 @@ wxService.page({ ...@@ -69,7 +69,7 @@ wxService.page({
title: this.data.contentInfo.headline, title: this.data.contentInfo.headline,
id: this.data.contentInfo.id, id: this.data.contentInfo.id,
article: this.data.contentInfo.article, article: this.data.contentInfo.article,
url: this.data.contentInfo.url url: this.data.contentInfo.sspList[0].url
} }
let tentacleInfo = { let tentacleInfo = {
content: JSON.stringify(content), content: JSON.stringify(content),
...@@ -87,12 +87,14 @@ wxService.page({ ...@@ -87,12 +87,14 @@ wxService.page({
this.data.currentShareContent.tentacleId = res.id; 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';
let scene = 'i=' + id + '&t=' + tentacleId
this.setData({ this.setData({
showCardModal: true, showCardModal: true,
cardTitle: this.data.contentInfo.headline, cardTitle: this.data.contentInfo.headline,
cardUrl: this.data.contentInfo.sspList[0].url, cardUrl: this.data.contentInfo.sspList[0].url,
pagePath:path pagePath:path,
scene: scene
}); });
let params = { let params = {
contentId: this.data.contentInfo.id, contentId: this.data.contentInfo.id,
......
...@@ -78,5 +78,6 @@ ...@@ -78,5 +78,6 @@
card-title="{{cardTitle}}" card-title="{{cardTitle}}"
card-url="{{cardUrl}}" card-url="{{cardUrl}}"
page-path="{{pagePath}}" page-path="{{pagePath}}"
scene="{{scene}}"
/> />
...@@ -94,7 +94,7 @@ wxService.page({ ...@@ -94,7 +94,7 @@ wxService.page({
let data = { let data = {
"autoColor": true, "autoColor": true,
"page": 'pages/userCenter/userCenter', "page": 'pages/userCenter/userCenter',
"scene": '123', "scene": 'type=' + app.globalData.contants.SHARE_TYPE.INVITE_FRIENDS,
"width": 100 "width": 100
} }
wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => { wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => {
......
...@@ -552,6 +552,7 @@ class WXService extends Http { ...@@ -552,6 +552,7 @@ class WXService extends Http {
watch.setWatcher(page); watch.setWatcher(page);
//修改参数 //修改参数
let pageIsFromShare = false, id = null; let pageIsFromShare = false, id = null;
console.log('args',args)
args.forEach(item => { args.forEach(item => {
if (item['t']) { if (item['t']) {
pageIsFromShare = true; pageIsFromShare = true;
...@@ -566,6 +567,15 @@ class WXService extends Http { ...@@ -566,6 +567,15 @@ class WXService extends Http {
item['id'] = Integer.digit(item['i'], 64, 10); item['id'] = Integer.digit(item['i'], 64, 10);
} }
} }
if(item['scene']){
let idParam = decodeURIComponent(item['scene']).split('&')[0]
let shareId = idParam && idParam.split('=')[1] || 0
item['id'] = Integer.digit(shareId, 64, 10)
console.log('idParam', idParam)
console.log('shareId', shareId)
console.log('id', item['id'])
}
}); });
//如果打开的是分享界面则进行触点对象信息请求并存储到本地 放到后续的header中 //如果打开的是分享界面则进行触点对象信息请求并存储到本地 放到后续的header中
if (pageIsFromShare) { if (pageIsFromShare) {
......
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