Commit 9f7bd590bad2eebb92d69a8e7641e3b9a4f38870

Authored by 前端开发-罗建龙
1 parent 902ebe9e

oa秒杀海报

pages/goods/goodsInfo/goodsInfo.js
@@ -31,6 +31,7 @@ Page({ @@ -31,6 +31,7 @@ Page({
31 color_type_one: 0, 31 color_type_one: 0,
32 color_type_two: 1, 32 color_type_two: 1,
33 is_no_plus: 1, 33 is_no_plus: 1,
  34 + is_share_text:1,
34 gid: "", 35 gid: "",
35 stoid: o.stoid, 36 stoid: o.stoid,
36 url: o.url, 37 url: o.url,
@@ -3358,7 +3359,9 @@ Page({ @@ -3358,7 +3359,9 @@ Page({
3358 if (res.data.code == 0) { 3359 if (res.data.code == 0) {
3359 prom = res.data.data; 3360 prom = res.data.data;
3360 prom.price = prom.user_price; 3361 prom.price = prom.user_price;
3361 - 3362 + this.setData({
  3363 + is_share_text:prom.is_share_text
  3364 + })
3362 } 3365 }
3363 }) 3366 })
3364 } 3367 }
@@ -4240,6 +4243,9 @@ Page({ @@ -4240,6 +4243,9 @@ Page({
4240 ee.get_normal(gid); 4243 ee.get_normal(gid);
4241 return false; 4244 return false;
4242 } 4245 }
  4246 + ee.setData({
  4247 + is_share_text:t.data.data.is_share_text
  4248 + })
4243 //----已经结束----- 4249 //----已经结束-----
4244 if (t.data.data.is_end == 1) { 4250 if (t.data.data.is_end == 1) {
4245 ee.get_normal(gid); 4251 ee.get_normal(gid);
@@ -5636,9 +5642,12 @@ Page({ @@ -5636,9 +5642,12 @@ Page({
5636 context.fillText('强烈推荐', 64 * unit, 668 * unit); 5642 context.fillText('强烈推荐', 64 * unit, 668 * unit);
5637 } 5643 }
5638 5644
5639 - if (type == 1) { // 秒杀  
5640 - src = '../../../images/share/miao_share.png';  
5641 - context.drawImage(src, 54 * unit, 648 * unit, 200 * unit, 36 * unit); 5645 + if (type == 1) { // 秒杀
  5646 +
  5647 + if(this.data.is_share_text==1){
  5648 + src = '../../../images/share/miao_share.png';
  5649 + context.drawImage(src, 54 * unit, 648 * unit, 200 * unit, 36 * unit);
  5650 + }
5642 context.setTextAlign('left'); 5651 context.setTextAlign('left');
5643 } 5652 }
5644 5653
@@ -6176,8 +6185,11 @@ Page({ @@ -6176,8 +6185,11 @@ Page({
6176 context.stroke(); 6185 context.stroke();
6177 6186
6178 //画秒杀的图片 6187 //画秒杀的图片
6179 - var miaos_path = '../../../images/share/miao_share.png';  
6180 - context.drawImage(miaos_path, 43 * unit, 690 * unit, 222 * unit, 40 * unit); 6188 + if(th.data.is_share_text){
  6189 + var miaos_path = '../../../images/share/miao_share.png';
  6190 + context.drawImage(miaos_path, 43 * unit, 690 * unit, 222 * unit, 40 * unit);
  6191 + }
  6192 +
6181 6193
6182 context.setFillStyle("black") 6194 context.setFillStyle("black")
6183 context.setFontSize(24 * unit) 6195 context.setFontSize(24 * unit)
@@ -7690,7 +7702,7 @@ Page({ @@ -7690,7 +7702,7 @@ Page({
7690 await getApp().request.promiseGet(url, {}).then(rs => { 7702 await getApp().request.promiseGet(url, {}).then(rs => {
7691 if (rs.data.code == 0) { 7703 if (rs.data.code == 0) {
7692 f_more[i].price = rs.data.data.user_price; 7704 f_more[i].price = rs.data.data.user_price;
7693 - 7705 +
7694 } 7706 }
7695 }) 7707 })
7696 } 7708 }