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({
type: String,
value: ''
},
scene: {
type: String,
value: ''
}
},
/**
......@@ -53,9 +57,10 @@ Component({
let data = {
"autoColor": true,
"page": this.data.pagePath,
"scene": '123',
"scene": this.data.scene,
"width": 100
}
console.log(this.data.pagePath)
wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => {
const { result, data } = res.data
if (result == 0) {
......@@ -63,6 +68,7 @@ Component({
codeImg: app.globalData.imageUrl + data
// codeImg: "https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg"
})
console.log(this.data.codeImg)
if (this.data.codeImg) {
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({
success: function (res) {
wx.hideLoading();
if (res.statusCode === 200) {
console.log('000',res.tempFilePath)
var codeSrc = res.tempFilePath;
that.sharePosteCanvas(productSrc, codeSrc, imgInfo);
} else {
......@@ -128,6 +129,7 @@ Component({
//canvas绘制分享海报
sharePosteCanvas: function (avaterSrc, codeSrc, imgInfo) {
console.log('----', this.data.productDesc)
wx.showLoading({
title: '生成中...',
......@@ -168,6 +170,7 @@ Component({
// ctx.fillText(that.data.userAvatar, left - 15, imgheght + 110); //电话
}
// title
console.log('productDesc', that.data.productDesc)
if (that.data.productDesc){
ctx.setFontSize(12);
ctx.setFillStyle('#333333');
......
......@@ -26,6 +26,7 @@ wxService.page({
myExtendList:[],
myShareCount:'',
extendProBanner: '',
scene: '', //触点参数
proData : []
},
......@@ -176,23 +177,25 @@ wxService.page({
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.id) {
this.data.currentShareContent.tentacleId = res.id;
let id = Integer.digit(this.data.currentShareContent.id, 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){
this.setData({
showCardModal: true,
cardTitle: this.data.proData[0].productName,
cardUrl: this.data.proData[0].productImgUrl,
pagePath: path
pagePath: path,
scene: scene
});
}else{
this.setData({
cardTitle: this.data.proData[0].productName,
cardUrl: this.data.proData[0].productImgUrl,
pagePath: path
pagePath: path,
scene: scene
});
this.getMiniCode()
}
......@@ -211,7 +214,7 @@ wxService.page({
let data = {
"autoColor": true,
"page": this.data.pagePath,
"scene": '123',
"scene": this.data.scene,
"width": 100
}
wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => {
......
......@@ -157,6 +157,7 @@
card-title="{{cardTitle}}"
card-url="{{cardUrl}}"
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>
<!--goHome-->
......
......@@ -24,7 +24,8 @@ wxService.page({
pagePath:'',
contentList:[],
currentShareContent: null,
contentPermission: false
contentPermission: false,
scene: ''
},
// 点击切换
......@@ -226,12 +227,14 @@ wxService.page({
this.data.currentShareContent.tentacleId = res.id;
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;
var path = 'pages/wantToBuyDetail/wantToBuyDetail';
let scene = 'i=' + id + '&t=' + tentacleId
this.setData({
showCardModal: true,
cardTitle: e.detail.title,
cardUrl: e.detail.url,
pagePath: path
pagePath: path,
scene: scene
});
let params = {
contentId: e.detail.id,
......
......@@ -49,6 +49,7 @@
card-title="{{cardTitle}}"
card-url="{{cardUrl}}"
page-path="{{pagePath}}"
scene="{{scene}}"
/>
<!--goHome-->
......
......@@ -24,6 +24,7 @@ wxService.page({
showCardModal: false,
currentShareContent: null,
fromZc: false,
scene:'', //触点参数
},
/**
......@@ -130,12 +131,14 @@ wxService.page({
this.data.currentShareContent.tentacleId = res.id;
let id = Integer.digit(this.data.currentShareContent.id, 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({
showCardModal: true,
cardTitle: this.data.productInfo.productName,
cardUrl: this.data.productInfo.indexUrl,
pagePath: path
pagePath: path,
scene: scene
});
}
})
......
......@@ -176,6 +176,7 @@
card-title="{{cardTitle}}"
card-url="{{cardUrl}}"
page-path="{{pagePath}}"
scene="{{scene}}"
/>
<!-- <sku-popup
......
......@@ -30,8 +30,10 @@ wxService.page({
// cardMember: null,
pageBackgroundColor: 0,
guidePageModalShow: false,
shareBenefitModalShow: false,
currHomePageId: '',
skuVOList: []
skuVOList: [],
benefitData: ''
},
/**
* 生命周期函数--监听页面加载
......@@ -52,6 +54,29 @@ wxService.page({
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 @@
"guide-page-modal": "/component/guidePageModal/guidePageModal",
"bottom-tabs": "/component/bottomTabs/bottomTabs",
"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 @@
</block>
</view>
<guide-page-modal show="{{guidePageModalShow}}" />
<share-benefit-modal show="{{shareBenefitModalShow}}" benefit-data="{{benefitData}}"/>
<!--<authorization-modal isAuthorization='{{isAuthorization}}'/>-->
......@@ -19,8 +19,8 @@ wxService.page({
showCardModal: false,
currentShareContent: null,
pagePath:'',
loadingTime:''
loadingTime:'',
scene: ''
},
/**
......@@ -130,12 +130,13 @@ wxService.page({
// 分享
onTapShare() {
console.log('00000',this.data.contentInfo)
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
let content = {
title: this.data.contentInfo.headline,
id: this.data.contentInfo.id,
article: this.data.contentInfo.article,
url: this.data.contentInfo.url
url: this.data.contentInfo.shareShowPictureRESDTOList[0].url
}
let tentacleInfo = {
content: JSON.stringify(content),
......@@ -152,12 +153,14 @@ wxService.page({
this.data.currentShareContent.tentacleId = res.id;
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;
var path = 'pages/wantToBuyDetail/wantToBuyDetail';
let scene = 'i=' + id + '&t=' + tentacleId
this.setData({
showCardModal: true,
cardTitle: this.data.contentInfo.headline,
cardUrl: this.data.contentInfo.shareShowPictureRESDTOList[0].url,
pagePath: path
pagePath: path,
scene: scene
});
let params = {
contentId: this.data.contentInfo.id,
......
......@@ -44,6 +44,7 @@
card-title="{{cardTitle}}"
card-url="{{cardUrl}}"
page-path="{{pagePath}}"
scene="{{scene}}"
/>
<!--goHome-->
......
......@@ -25,7 +25,8 @@ wxService.page({
pagePath:'',
contentList: [],
contentPermission: false,
currentShareContent: null
currentShareContent: null,
scene:''
},
/**
......@@ -230,12 +231,14 @@ wxService.page({
this.data.currentShareContent.tentacleId = res.id;
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;
var path = 'pages/wantToBuyDetail/wantToBuyDetail';
let scene = 'i=' + id + '&t=' + tentacleId
this.setData({
showCardModal: true,
cardTitle: e.detail.title,
cardUrl: e.detail.url,
pagePath: path
pagePath: path,
scene: scene
});
let params = {
......
......@@ -41,5 +41,6 @@
card-title="{{cardTitle}}"
card-url="{{cardUrl}}"
page-path="{{pagePath}}"
scene="{{scene}}"
/>
......@@ -20,7 +20,8 @@ wxService.page({
loadingTime: '',
proList:[],
pageNo: 1,
pageSize: 10
pageSize: 10,
scene: ''
},
/**
......@@ -28,7 +29,6 @@ wxService.page({
*/
onLoad: function (options) {
wx.hideShareMenu();
console.log('mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm',options)
if (options && options.id) {
this.setData({
id: options.id
......@@ -69,7 +69,7 @@ wxService.page({
title: this.data.contentInfo.headline,
id: this.data.contentInfo.id,
article: this.data.contentInfo.article,
url: this.data.contentInfo.url
url: this.data.contentInfo.sspList[0].url
}
let tentacleInfo = {
content: JSON.stringify(content),
......@@ -87,12 +87,14 @@ wxService.page({
this.data.currentShareContent.tentacleId = res.id;
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;
var path = 'pages/wantToBuyDetail/wantToBuyDetail';
let scene = 'i=' + id + '&t=' + tentacleId
this.setData({
showCardModal: true,
cardTitle: this.data.contentInfo.headline,
cardUrl: this.data.contentInfo.sspList[0].url,
pagePath:path
pagePath:path,
scene: scene
});
let params = {
contentId: this.data.contentInfo.id,
......
......@@ -78,5 +78,6 @@
card-title="{{cardTitle}}"
card-url="{{cardUrl}}"
page-path="{{pagePath}}"
scene="{{scene}}"
/>
......@@ -94,7 +94,7 @@ wxService.page({
let data = {
"autoColor": true,
"page": 'pages/userCenter/userCenter',
"scene": '123',
"scene": 'type=' + app.globalData.contants.SHARE_TYPE.INVITE_FRIENDS,
"width": 100
}
wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => {
......
......@@ -552,6 +552,7 @@ class WXService extends Http {
watch.setWatcher(page);
//修改参数
let pageIsFromShare = false, id = null;
console.log('args',args)
args.forEach(item => {
if (item['t']) {
pageIsFromShare = true;
......@@ -566,6 +567,15 @@ class WXService extends Http {
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中
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