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