Commit 6f8b4c1c by 赵雅纹

Merge branch 'feature-zyw-7.2.0' into 'dev_7.2.0'

Feature zyw 7.2.0

See merge request !176
parents d1c5bc7b d5778baf
......@@ -11,6 +11,10 @@ Component({
type: String,
value: ''
},
cardExplain:{ //文案
type: String,
value: ''
},
productDesc: { // 产品描述
type: String,
value: ''
......@@ -181,13 +185,32 @@ Component({
// title
console.log('productDesc', that.data.productDesc)
if (that.data.productDesc){
ctx.setFontSize(12);
ctx.setFillStyle('#333333');
ctx.setTextAlign('left');
ctx.fillText(that.data.productDesc, 61, 300);
ctx.setFontSize(12);
ctx.setFillStyle('#333333');
ctx.setTextAlign('left');
ctx.fillText(that.data.productDesc, 61, 300);
}else{
let explain = JSON.parse(that.data.cardExplain)
if (explain[0]){
ctx.setFontSize(12);
ctx.setFillStyle('#333333');
ctx.setTextAlign('left');
ctx.fillText(explain[0], 61, 300);
}
if (explain[1]) {
ctx.setFontSize(12);
ctx.setFillStyle('#333333');
ctx.setTextAlign('left');
ctx.fillText(explain[1], 61, 314);
}
if (explain[2]) {
ctx.setFontSize(12);
ctx.setFillStyle('#333333');
ctx.setTextAlign('left');
ctx.fillText(explain[2], 61, 326);
}
}
//产品金额
// if (that.data.price || that.data.price == 0) {
// ctx.setFontSize(25);
......
......@@ -201,7 +201,7 @@ wxService.page({
}else{
this.setData({
cardTitle: this.data.explain ? this.data.explain : this.data.proData[0].productName,
cardUrl: this.data.proData[0].productImgUrl,
cardUrl: this.data.proData[0].productImgUrl || 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/product_defalut.jpg',
pagePath: path,
scene: scene
});
......
......@@ -50,7 +50,7 @@
<view class="buy-product-content">
<view class="buy-list" wx:if="{{extendProList.length}}" wx:for="{{extendProList}}" wx:key="{{index}}">
<view class="prod-img">
<image src="{{item.productImgUrl}}" />
<image src="{{item.productImgUrl || 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/product_defalut.jpg'}}" />
</view>
<view class="prod-info">
<view class="prod-name">{{item.productName}}</view>
......@@ -185,7 +185,7 @@
page-path="{{pagePath}}"
scene="{{scene}}"
/>
<share-poster id="getPoster" bindmyevent="myEventListener" avater="{{cardUrl}}" productDesc="{{cardTitle}}" userAvatar="https://xiedemo.oss-cn-shanghai.aliyuncs.com/logo_head.jpg" bind:showMiniCard="_showMiniCard" pagePath="{{pagePath}}" code-img="{{codeImg}}"></share-poster>
<share-poster id="getPoster" bindmyevent="myEventListener" avater="{{cardUrl}}" cardExplain="{{cardTitle}}" userAvatar="https://xiedemo.oss-cn-shanghai.aliyuncs.com/logo_head.jpg" bind:showMiniCard="_showMiniCard" pagePath="{{pagePath}}" code-img="{{codeImg}}"></share-poster>
<!--goHome-->
<go-home/>
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