Authored by hongyong.zhao

修改分享等问题

@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 </view> 5 </view>
6 6
7 <view class="desc-content"> 7 <view class="desc-content">
8 - <view class="banner" bindtap="_jumpBanner" wx:if="{{bannerSrc != null}}"> 8 + <view class="banner" bindtap="_jumpBanner" wx:if="{{bannerSrc != null && bannerSrc !== ''}}">
9 <image class="banner-img" src="{{bannerSrc}}"></image> 9 <image class="banner-img" src="{{bannerSrc}}"></image>
10 </view> 10 </view>
11 <block wx:for="{{list}}"> 11 <block wx:for="{{list}}">
@@ -154,9 +154,22 @@ Page(Object.assign({ @@ -154,9 +154,22 @@ Page(Object.assign({
154 154
155 return this.service.getMyList({type, page}).then(result => { 155 return this.service.getMyList({type, page}).then(result => {
156 156
  157 + if(result.code !== 200 || result.data.length === 0) {
  158 + if(type == 0) {
  159 + this.setData({
  160 + footText: '您还没有参与的抽奖,赶紧去参加吧'
  161 + });
  162 + } else {
  163 + this.setData({
  164 + footText: '暂无已公布活动,请继续参加活动'
  165 + });
  166 + }
  167 + } else {
157 this.setData({ 168 this.setData({
158 footText: '' 169 footText: ''
159 }); 170 });
  171 + }
  172 +
160 173
161 if (result.code !== 200) { 174 if (result.code !== 200) {
162 return []; 175 return [];
@@ -227,7 +240,7 @@ Page(Object.assign({ @@ -227,7 +240,7 @@ Page(Object.assign({
227 return { 240 return {
228 title: params.TITLE, // 分享标题 241 title: params.TITLE, // 分享标题
229 desc: params.DESC, // 分享描述 242 desc: params.DESC, // 分享描述
230 - path: `/page/subPackage/pages/zeroSell/detail?actPrizeId=${this.data.shareProduct.act_prize_id}`, 243 + path: `pages/zeroSell/detail?actPrizeId=${this.data.shareProduct.act_prize_id}`,
231 imageUrl: this.data.shareProduct.cover_img, 244 imageUrl: this.data.shareProduct.cover_img,
232 success: function() { 245 success: function() {
233 }, 246 },
@@ -240,7 +253,7 @@ Page(Object.assign({ @@ -240,7 +253,7 @@ Page(Object.assign({
240 return { 253 return {
241 title: params.TITLE, // 分享标题 254 title: params.TITLE, // 分享标题
242 desc: params.DESC, // 分享描述 255 desc: params.DESC, // 分享描述
243 - path: `/page/subPackage/pages/zeroSell/detail?actPrizeId=${this.data.shareProduct.act_prize_id}&shareUid=${app.getUid()}`, 256 + path: `/pages/zeroSell/detail?actPrizeId=${this.data.shareProduct.act_prize_id}&shareUid=${app.getUid()}`,
244 imageUrl: this.data.shareProduct.cover_img, 257 imageUrl: this.data.shareProduct.cover_img,
245 success: function() { 258 success: function() {
246 }, 259 },
@@ -176,28 +176,37 @@ Page({ @@ -176,28 +176,37 @@ Page({
176 176
177 this.drawLongText(this.data.product_name, pCtx, 187.5 * scale, 412 * scale, '#444444', 20, 20); 177 this.drawLongText(this.data.product_name, pCtx, 187.5 * scale, 412 * scale, '#444444', 20, 20);
178 178
179 - pCtx.drawImage('./images/y@2x.png', 128.5 * scale, 465 * scale, 60 * scale, 25 * scale); 179 + // pCtx.drawImage('./images/y@2x.png', 128.5 * scale, 465 * scale, 60 * scale, 25 * scale);
  180 +
  181 + pCtx.setFillStyle('#D0021B')
  182 + pCtx.setFontSize(12)
  183 + pCtx.fillText('¥', 128.5 * scale, 465 * scale)
  184 +
  185 + pCtx.setFillStyle('#D0021B')
  186 + pCtx.setFontSize(26)
  187 + pCtx.fillText('0', 143 * scale, 465 * scale)
  188 +
180 189
181 pCtx.setFillStyle('#b0b0b0'); 190 pCtx.setFillStyle('#b0b0b0');
182 // pCtx.setTextAlign('center'); 191 // pCtx.setTextAlign('center');
183 const fontSize = 18; 192 const fontSize = 18;
184 pCtx.setFontSize(fontSize); 193 pCtx.setFontSize(fontSize);
185 let text = `${this.data.product_price}`; 194 let text = `${this.data.product_price}`;
186 - pCtx.fillText(text, (137.5 + 120) * scale, 485 * scale); 195 + pCtx.fillText(text, 205 * scale, 465 * scale);
187 196
188 let textRect = {width: 70}; 197 let textRect = {width: 70};
189 if (pCtx.measureText) { 198 if (pCtx.measureText) {
190 textRect = pCtx.measureText(text); 199 textRect = pCtx.measureText(text);
191 } 200 }
192 201
193 - this.drawLine(pCtx, ((137.5 + 120) * scale) - (30 * scale), (485 - 15/2) * scale, textRect.width); 202 + this.drawLine(pCtx, (205 * scale) - (30 * scale), (465 - 15/2) * scale, textRect.width);
194 pCtx.setFillStyle('black') 203 pCtx.setFillStyle('black')
195 pCtx.fillRect(47 * scale, 562 * scale, 280 * scale, 90 * scale) 204 pCtx.fillRect(47 * scale, 562 * scale, 280 * scale, 90 * scale)
196 // this.drawRoundedRect(this.Rect(25 * scale, 562* scale, 280 * scale, 90 * scale), 0, pCtx); 205 // this.drawRoundedRect(this.Rect(25 * scale, 562* scale, 280 * scale, 90 * scale), 0, pCtx);
197 wx.getImageInfo({ 206 wx.getImageInfo({
198 src: this.data.product_qrCode, 207 src: this.data.product_qrCode,
199 success: function(res) { 208 success: function(res) {
200 - pCtx.drawImage(res.path, 25 * scale, 550.5 * scale, 85 * scale, 85 * scale); 209 + pCtx.drawImage(res.path, 53 * scale, 567.5 * scale, 80 * scale, 80 * scale);
201 pCtx.draw(true); 210 pCtx.draw(true);
202 } 211 }
203 }); 212 });
@@ -15,7 +15,10 @@ @@ -15,7 +15,10 @@
15 <view class="product-name">{{product_name}}</view> 15 <view class="product-name">{{product_name}}</view>
16 16
17 <view class="product-price"> 17 <view class="product-price">
18 - <image class="price0" src="./images/y@2x.png"></image> 18 + <view class="price0">
  19 + <text class="dollarSign">¥</text>
  20 + <text class="textZero">0</text>
  21 + </view>
19 <view class="price">{{product_price}}</view> 22 <view class="price">{{product_price}}</view>
20 </view> 23 </view>
21 </view> 24 </view>