diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
index e13ff41..65d3955 100644
--- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
+++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -317,6 +317,39 @@ Page({
//检查测肤
getApp().check_skin_face(t,0,gid);
+ //-- 自定义海报 --
+ getApp().request.promiseGet("/api/weshop/goods/poster/page", {
+ data: {store_id: os.stoid, type: 1, is_use: 1}
+ }).then(res => {
+ if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0]) {
+
+ var poster_data = res.data.data.pageData[0];
+ var json_str = poster_data.jsonStr;
+
+ if (json_str) {
+ var json_data = JSON.parse(json_str);
+ console.log('自定义海报参数-------');
+ console.log(json_data);
+ if (json_data.bg_img) {
+
+ //-- 把图片那到本地 --
+ wx.getImageInfo({
+ src: json_data.bg_img,
+ success: function (res) {
+ var path = res.path;
+
+ th.setData({share_b_img: path})
+ },
+ fail: function (res) {
+ }
+ });
+ }
+ th.setData({poster: json_data})
+
+ }
+ }
+ })
+
//---获取手机地址坐标--
//--如果tg_id是空的话,分享回来--
// console.log('扫描海报gid');
@@ -4648,7 +4681,7 @@ Page({
// 8.商品标题
context.setFontSize(20 * unit);
context.setFillStyle('#898989');
- this.draw_Text(context, this.data.data.goods_name,
+ getApp().draw_Text(context, this.data.data.goods_name,
54 * unit, 770 * unit, 240 * unit, 240 * unit, unit);
// 9.小程序码
context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit);
@@ -4745,7 +4778,7 @@ Page({
// context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
- if (type == 0) { // 如果是普通商品,绘制新海报
+ if (!th.data.share_b_img && (type == 9)) { // 如果是普通商品,绘制新海报
th.drawPoster(context, unit, th.data.share_goods_img, vpath);
} else {
context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
@@ -4755,7 +4788,7 @@ Page({
//-- 是自定义海报的情况下 --
- if (type != 0) {
+ if (th.data.share_b_img || type != 0) {
@@ -4786,10 +4819,10 @@ Page({
}
} else {
//--昵称---
- context.setFontSize(24 * unit);
- context.setFillStyle("black");
- context.fillText(app.globalData.userInfo.nickname, 152 * unit, 60 * unit);
- var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit;
+ // context.setFontSize(24 * unit);
+ // context.setFillStyle("black");
+ // context.fillText(app.globalData.userInfo.nickname, 152 * unit, 60 * unit);
+ // var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit;
//强烈推荐 改许程
// var tj_path = "../../../../images/share/q_tj.png";
// let txt_gn = th.data.luckGoInfo.group_num + '人团';
@@ -4800,9 +4833,9 @@ Page({
// context.setFillStyle("white");
// context.fillText(txt_gn, 149 * unit + width + 15 * unit, 75 * unit);
// 发出幸运购活动邀请
- context.setFillStyle("#7f7f7f")
- context.setFontSize(21.3 * unit)
- context.fillText("向您发出幸运购邀请", 152 * unit, 90 * unit);
+ // context.setFillStyle("#7f7f7f")
+ // context.setFontSize(21.3 * unit)
+ // context.fillText("向您发出幸运购邀请", 152 * unit, 90 * unit);
}
@@ -4819,7 +4852,7 @@ Page({
//---产品名称---
//文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度
- if (type != 4 && type != 0) {
+ if (th.data.share_b_img || (type != 4 && type != 9)) {
context.setFillStyle("black");
context.setFontSize(21.3 * unit)
th.draw_Text(context, share_title,
@@ -4880,11 +4913,29 @@ Page({
}
//---中间大图---
- if (type != 0) {
+ if ( th.data.share_b_img || type != 9) {
context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit);
};
+ //---自定义海报 产品质量保证
+ if(th.data.share_b_img && th.data.poster.show_quality==1 ){
+ var g_path = "../../../../images/share/s_gou.png";
+ context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit);
+ context.setFillStyle("red")
+ context.setFontSize(18 * unit)
+ context.fillText("正品保证", 84 * unit, 690 * unit);
+ context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit);
+ context.setFillStyle("red")
+ context.setFontSize(18 * unit)
+ context.fillText("纯实体店", 246 * unit, 690 * unit);
+
+ context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit);
+ context.setFillStyle("red")
+ context.setFontSize(18 * unit)
+ context.fillText("官方验证", 420 * unit, 690 * unit);
+
+ }
//-------大图后面就不一样了-----------
switch (type) {
@@ -5101,74 +5152,76 @@ Page({
case 9:
+ if(th.data.share_b_img){
- //---画线---
- context.setLineWidth(1 * unit)
- context.moveTo(32 * unit, 680 * unit)
- context.lineTo(520 * unit, 680 * unit)
- context.stroke();
-
- //---文字---
- context.setFillStyle("black")
- context.setFontSize(24 * unit)
- context.font = 'normal bold 18px';
- context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit);
-
- //还差N人,即可成团
- let group_num = th.data.luckGoInfo.group_num;
- let num_joined = th.data.luckGoInfo.num;
- let delta1 = group_num - num_joined;
- let width_delta1 = ut.measureText(delta1, 15);
- context.setFillStyle("black");
- context.setFontSize(21.3 * unit);
- context.fillText(group_num + "人团,还差", 40 * unit, 772 * unit);
- context.setFillStyle("#FF6768");
- context.setFontSize(21.3 * unit);
- context.fillText(delta1, 160 * unit, 772 * unit);
- context.setFillStyle("black");
- context.setFontSize(21.3 * unit);
- context.fillText("人,即可成团", (170 + width_delta1) * unit, 772 * unit);
-
- // N人得商品,N人全额退款
- let group_win = th.data.luckGoInfo.group_win;
- let delta2 = group_num - group_win;
- let width_delta2 = ut.measureText(delta2, 16);
- let width_groupNum = ut.measureText(group_num, 15);
- let width_groupWin = ut.measureText(group_win, 15);
- context.setFillStyle("#FF6768");
- context.setFontSize(21.3 * unit);
- context.fillText(group_win, 40 * unit, 806 * unit);
- context.setFillStyle("black");
- context.setFontSize(21.3 * unit);
- context.fillText("人得商品,", (54 + width_groupWin) * unit, 806 * unit);
- context.setFillStyle("#FF6768");
- context.setFontSize(21.3 * unit);
- context.fillText(delta2, 160 * unit, 806 * unit);
- context.setFillStyle("black");
- context.setFontSize(21.3 * unit);
- context.fillText("人全额退款", (170 + width_delta2) * unit, 806 * unit);
-
- // 并得帮团惊喜礼品
- context.setFillStyle("black")
- context.setFontSize(21.3 * unit)
- context.fillText("并得帮团", 40 * unit, 840 * unit);
- context.setFillStyle("#FF6768")
- context.setFontSize(21.3 * unit)
- context.fillText("惊喜礼品", 130 * unit, 840 * unit);
- context.setFillStyle("black")
- context.setFontSize(21.3 * unit)
- context.fillText("!", 220 * unit, 840 * unit);
+
+ //---画线---
+ context.setLineWidth(1 * unit)
+ context.moveTo(32 * unit, 680 * unit)
+ context.lineTo(520 * unit, 680 * unit)
+ context.stroke();
+ //---文字---
+ context.setFillStyle("black")
+ context.setFontSize(24 * unit)
+ context.font = 'normal bold 18px';
+ context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit);
+
+ //还差N人,即可成团
+ let group_num = th.data.luckGoInfo.group_num;
+ let num_joined = th.data.luckGoInfo.num;
+ let delta1 = group_num - num_joined;
+ let width_delta1 = ut.measureText(delta1, 15);
+ context.setFillStyle("black");
+ context.setFontSize(21.3 * unit);
+ context.fillText(group_num + "人团,还差", 40 * unit, 772 * unit);
+ context.setFillStyle("#FF6768");
+ context.setFontSize(21.3 * unit);
+ context.fillText(delta1, 160 * unit, 772 * unit);
+ context.setFillStyle("black");
+ context.setFontSize(21.3 * unit);
+ context.fillText("人,即可成团", (170 + width_delta1) * unit, 772 * unit);
+
+ // N人得商品,N人全额退款
+ let group_win = th.data.luckGoInfo.group_win;
+ let delta2 = group_num - group_win;
+ let width_delta2 = ut.measureText(delta2, 16);
+ let width_groupNum = ut.measureText(group_num, 15);
+ let width_groupWin = ut.measureText(group_win, 15);
+ context.setFillStyle("#FF6768");
+ context.setFontSize(21.3 * unit);
+ context.fillText(group_win, 40 * unit, 806 * unit);
+ context.setFillStyle("black");
+ context.setFontSize(21.3 * unit);
+ context.fillText("人得商品,", (54 + width_groupWin) * unit, 806 * unit);
+ context.setFillStyle("#FF6768");
+ context.setFontSize(21.3 * unit);
+ context.fillText(delta2, 160 * unit, 806 * unit);
+ context.setFillStyle("black");
+ context.setFontSize(21.3 * unit);
+ context.fillText("人全额退款", (170 + width_delta2) * unit, 806 * unit);
+
+ // 并得帮团惊喜礼品
+ context.setFillStyle("black")
+ context.setFontSize(21.3 * unit)
+ context.fillText("并得帮团", 40 * unit, 840 * unit);
+ context.setFillStyle("#FF6768")
+ context.setFontSize(21.3 * unit)
+ context.fillText("惊喜礼品", 130 * unit, 840 * unit);
+ context.setFillStyle("black")
+ context.setFontSize(21.3 * unit)
+ context.fillText("!", 220 * unit, 840 * unit);
+ }
//---二维吗图---
//-- 自定义海报 --
- if (th.data.poster) {
+ if (th.data.share_b_img && th.data.poster) {
var erm_x = parseFloat(th.data.poster.ewm_x) * 2;
var erm_y = parseFloat(th.data.poster.ewm_y) * 2;
context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit);
} else {
//---二维吗图---
- context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit);
+ // context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit);
}
break;
@@ -5178,7 +5231,7 @@ Page({
//--- 如果是自定义海报的时候 ---
- if (type != 0) {
+ if ( th.data.share_b_img || type != 9) {
if (th.data.poster && parseInt(th.data.poster.style) == 2) {
@@ -5352,7 +5405,7 @@ Page({
- //--获取头像的本地缓存,回调写法--
+ //--获取头像的本地缓存,回调写法--
get_head_temp: function (tt, func) {
var ee = this;
if (ee.data.share_head) {
diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
index ba1fc77..2ea6553 100644
--- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
+++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
@@ -899,7 +899,7 @@
- {{cartGoodsNum}}
+
购物车
diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.wxml b/packageC/pages/presell/goodsInfo/goodsInfo.wxml
index cbcef19..9c34892 100644
--- a/packageC/pages/presell/goodsInfo/goodsInfo.wxml
+++ b/packageC/pages/presell/goodsInfo/goodsInfo.wxml
@@ -939,7 +939,7 @@
-
+
@@ -951,7 +951,10 @@
-
+
+
+
+
diff --git a/packageD/pages/user/coupons/coupons.js b/packageD/pages/user/coupons/coupons.js
index 4b40c14..680eb67 100644
--- a/packageD/pages/user/coupons/coupons.js
+++ b/packageD/pages/user/coupons/coupons.js
@@ -118,7 +118,7 @@ Page({
let url = `/pages/goods/goodsInfo/goodsInfo?goods_id=${item.goods_id}&prom_type=${item.prom_type}&prom_id=${item.prom_id}`
getApp().goto(url)
}else{
- getApp().showWarning("未找到该商品");
+ getApp().showWarning("该商品不存在");
}
}
}
diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js
index ce1f9c8..ae82373 100644
--- a/pages/goods/goodsInfo/goodsInfo.js
+++ b/pages/goods/goodsInfo/goodsInfo.js
@@ -5030,11 +5030,15 @@ Page({
if (this.data.card_field && this.data.data[this.data.card_field]) {
price = this.data.data[this.data.card_field];
}
- if (this.data.prom_act) price = this.data.prom_price;
+ if (this.data.prom_act) price = this.data.prom_price;
price = parseFloat(price).toFixed(2);
context.setFontSize(32 * unit);
- context.setFillStyle('#DE1117');
- context.fillText('¥' + price, 54 * unit, 735 * unit);
+ context.setFillStyle('#DE1117');
+ if (this.data.prom_type == 4 && this.data.prom_integral){
+ context.fillText(this.data.prom_integral+'积分+¥' + price, 54 * unit, 735 * unit);
+ }else{
+ context.fillText('¥' + price, 54 * unit, 735 * unit);
+ }
};
@@ -5225,6 +5229,11 @@ Page({
var wd1 = th.data.screenWidth - ut.measureText(pri0, 31 * unit) - 25;
context.fillText("¥", wd1 - 15, 185 * unit);
context.setFontSize(31 * unit)
+ // if(th.data.prom_type==4){
+ // context.fillText(th.data.prom_integral+'积分'+pri0, wd1, 185 * unit);
+ // }else{
+ // context.fillText(pri0, wd1, 185 * unit);
+ // }
context.fillText(pri0, wd1, 185 * unit);
//---市场价划掉---