Commit 5b8b2084 by 赵雅纹

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

Fixbug zyw

See merge request !131
parents fb15f2b0 c4e1c6e7
......@@ -43,7 +43,6 @@ Component({
showCardModal:false
})
this.getMiniCode();
},
//获取二维码
......
......@@ -3,7 +3,7 @@
<view class="card-modal" hidden="{{!showCardModal}}">
<view class="card-modal-content">
<view class="modal-header">
<image class="brand-img"></image>
<image class="brand-img" src="http://t2.hddhhn.com/uploads/tu/201806/9999/91480c0c87.jpg"></image>
<view class="brand-title">{{cardTitle}}</view>
</view>
<view class="card-img-wrap">
......
......@@ -94,6 +94,7 @@ Component({
imagewidth: imageSize.imageWidth,
imageheight: imageSize.imageHeight
})
console.log('-----', imageSize)
},
preview(event) {
utilLink.currentLinkRouter(event)
......
......@@ -20,7 +20,7 @@
>
<image
class="pic-img hhh"
style="width: {{100}}%;height: {{100}}px;"
style="width: {{100}}%;"
src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}"
data-appid="{{item.link.appid}}"
data-path="{{item.link.url}}"
......@@ -28,13 +28,15 @@
data-item="{{item}}"
bindload="imageLoad"
bindtap='preview'
mode="widthFix"
/>
</button>
<image
wx:if="{{currentHasUserInfo}}"
class="pic-img yyyy"
style="width: {{100}}%;height: {{100}}px;"
style="width: {{100}}%;"
src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}"
data-appid="{{item.link.appid}}"
data-path="{{item.link.url}}"
......@@ -42,12 +44,14 @@
data-item="{{item}}"
bindload="imageLoad"
bindtap='preview'
mode="widthFix"
/>
</view>
<view wx:else>
<image
class="pic-img ttt"
style="width: {{100}}%;height: {{100}}px;"
style="width: {{100}}%;"
src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}"
data-appid="{{item.link.appid}}"
data-path="{{item.link.url}}"
......@@ -55,6 +59,7 @@
data-item="{{item}}"
bindload="imageLoad"
bindtap='preview'
mode="widthFix"
/>
</view>
</view>
......
......@@ -90,8 +90,6 @@ Component({
}
},
//下载二维码
getQrCode: function (productSrc, imgInfo = "") {
wx.showLoading({
......
......@@ -94,6 +94,14 @@ wxService.page({
})
},
_showMiniCard(e) {
console.log(e)
this.setData({
showCardModal: true
})
},
//全选
allSelect() {
this.setData({
......@@ -120,14 +128,11 @@ wxService.page({
//生成海报
onTapPoster(){
console.log('111')
this.setData({
showShareModal: true
})
this.getChooseExtendPro(2)
},
// 获取选择推广的商品
getChooseExtendPro(){
getChooseExtendPro(type){
if (!this.data.proData) {
wx.showToast({
title: '请先选择商品',
......@@ -174,14 +179,49 @@ wxService.page({
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;
if(type == 1){
this.setData({
showCardModal: true,
cardTitle: this.data.proData[0].productName,
cardUrl: this.data.proData[0].productImgUrl,
pagePath: path
});
}else{
this.setData({
cardTitle: this.data.proData[0].productName,
cardUrl: this.data.proData[0].productImgUrl,
pagePath: path
});
this.getMiniCode()
}
}
})
}
}
})
},
//获取二维码
getMiniCode() {
const urls = utils.getCurrentPageUrlWithArgs()
const page = urls && urls.split("?")[0]
let data = {
"autoColor": true,
"page": this.data.pagePath,
"scene": '123',
"width": 100
}
wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => {
const { result, data } = res.data
if (result == 0) {
this.setData({
codeImg: app.globalData.imageUrl + data
// codeImg: "https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg"
})
if (this.data.codeImg) {
this.selectComponent('#getPoster').getAvaterInfo()
}
}
})
......@@ -189,7 +229,7 @@ wxService.page({
//快速分享
onTapShare() {
this.getChooseExtendPro()
this.getChooseExtendPro(1)
},
// 获取推广商品列表
......@@ -228,23 +268,13 @@ wxService.page({
if (result == 0) {
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
// }
// }
wxService.getContentByContentType(item)
wxService.getContentByContentType(item.tentacleContent)
})
this.setData({
myExtendList: this.data.pageNum == 1 ? [...data.content] : [...this.data.myExtendList, ...data.content],
myTotalPages: data.totalPages
}, () => {
})
console.log('00000',this.data.myExtendList)
}
}
})
......
......@@ -4,6 +4,7 @@
"usingComponents": {
"card-modal": "/component/cardModal/cardModal",
"share-modal": "/component/shareModal/shareModal",
"go-home": "/component/goHome/goHome"
"go-home": "/component/goHome/goHome",
"share-poster": "/component/sharePoster/sharePoster"
}
}
\ No newline at end of file
......@@ -61,7 +61,7 @@
wx:for-index="idx"
wx:key="{{idx}}"
>
<text class="benefit-num " >{{shareItem.couponSettingTitle}} </text>
<text class="benefit-num" >{{shareItem.couponSettingTitle}}</text>
</block>
</view>
</view>
......@@ -80,13 +80,15 @@
</view>
</view>
<view class="share-wrap" wx:if="{{extendProList.length}}">
<!-- <view class="share-wrap" wx:if="{{extendProList.length}}"> -->
<view class="share-wrap">
<view class="share-button" bindtap="onTapShare">
<image mode="widthFix" />
<image mode="widthFix" src="/assets/imgs/7_1_0/quick-share-black.jpg" />
<text>快速分享</text>
</view>
<view class="share-button" bindtap="onTapPoster">
<image mode="widthFix" />
<image mode="widthFix" src="/assets/imgs/7_1_0/poster-black.jpg"/>
<text>生成海报</text>
</view>
</view>
......@@ -156,6 +158,7 @@
card-url="{{cardUrl}}"
page-path="{{pagePath}}"
/>
<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-->
<go-home/>
......@@ -162,8 +162,10 @@ swiper {
font-size: 26rpx;
}
.share-button image{
width: 18rpx;
height: 18rpx;
width: 28rpx;
height: 28rpx;
margin-right: 24rpx;
vertical-align: middle;
}
/* *************** 我的推广 ****************** */
......
......@@ -52,6 +52,16 @@ wxService.page({
})
},
// 立即开通plus
openPlus(){
wxService.post(`/merchant/modelPage/mainSetting/page?brandId=${app.globalData.brandId}&isMain=3&type=2`).then(res => {
const { result, data } = res.data
if (result == 0){
wxService.router(`/subPackage/page/pages/subPage/subPage?pageId=${data.page.pageId}`)
}
})
},
addCart: function (event) {
this.setData({
showSkuPopup: true,
......
......@@ -58,7 +58,7 @@
}}</text>
<!-- <text class="reduce-price">本次立减¥60</text> -->
</view>
<view class="open">
<view class="open" bindtap="openPlus">
<text class="open-text">立即开通</text>
<image class="big-arrow" src="/assets/imgs/big-arrow-right.png" />
</view>
......
......@@ -39,7 +39,7 @@
"list": []
},
"miniprogram": {
"current": 34,
"current": 13,
"list": [
{
"id": -1,
......@@ -123,7 +123,7 @@
"id": 13,
"name": "subPage",
"pathName": "subPackage/page/pages/subPage/subPage",
"query": "pageId=17",
"query": "pageId=39",
"scene": null
},
{
......
......@@ -54,7 +54,12 @@ wxService.page({
handlerDataOnPage = new utils.HandlerDataOnPage()
renderPage = require('../../../../utils/renderPage').getRenderPage()
handlerDataOnPage.init(this, 'pages')
this.setData({
pageId: this.options.pageId
},()=>{
this.initPage(this.data.pageId)
})
},
/**
* 监听子组件事件
......@@ -74,6 +79,7 @@ wxService.page({
*/
onShow() {
console.log('user=============', this.options)
// 取会员卡号
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
const cardMember = wx.getStorageSync('_cardMember')
......@@ -177,8 +183,8 @@ wxService.page({
wx.showLoading({
title: '加载中'
})
// wxService.post(`/merchant/modelPage/getDetailById?pageId=${pageId}&brandId=${app.globalData.brandId}`).then(res => {
wxService.post(`/merchant/modelPage/mainSetting/mall?brandId=${app.globalData.brandId}`).then(res => {
wxService.post(`/merchant/modelPage/getDetailById?pageId=${pageId}&brandId=${app.globalData.brandId}`).then(res => {
// wxService.post(`/merchant/modelPage/mainSetting/mall?brandId=${app.globalData.brandId}`).then(res => {
if (!res) return false
const { result, data } = res.data
if (result == 0) {
......
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