diff --git a/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxml b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxml
index 236948d..f3e7128 100644
--- a/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxml
+++ b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.wxml
@@ -34,18 +34,25 @@
{{items.giftTitle}}
-
- {{"¥"+items.payMoney}}
+
+ {{"¥"+items.payMoney}}+{{items.payIntegral}}积分
-
- /
-
-
-
- {{items.payIntegral}}
- 积分
-
+
+
+ {{"¥"+items.payMoney}}
+
+
+ /
+
+
+
+ {{items.payIntegral}}
+ 积分
+
+
+
+
{{"零售价:¥"+items.giftPosPrice}}
@@ -69,17 +76,10 @@
-
-
-
+
+
-
-
-
-
-
-
diff --git a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
index 85fbbe5..1cb22f3 100644
--- a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
+++ b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
@@ -99,11 +99,56 @@ Page({
}
+ var th = this;
+ this.setData({
+ getUserID: d.user_id,
+ getStorageID: a.stoid,
+ })
+
+ if(!options.lbId && options.scene){
+ var gid_str = decodeURIComponent(options.scene);
+ gid_str = gid_str.split("_");
+ options.lbId=gid_str[0];
+ options.id=gid_str[0];
+ options.first_leader=gid_str[1];
+ options.isBuy=1;
+ }
+
this.setData({
params: options,
getGiftID:options.id
})
+
+ this.setData({
+ isBuy: options.isBuy,
+ getGiftID: options.lbId,
+ orderSn: options.orderSn,
+ flag: options.flag, // 如果从商品详情页的促销处点击专享礼包跳转到此页,则flag为1
+ record_list_id:options.record_list_id,
+ is_receive:options.is_receive
+ })
+ if (options.lbId) th.data.lbId = options.lbId;
+ //-- 获取分享人的ID --
+ var first_leader = options.first_leader || getApp().globalData.first_leader;
+ if (first_leader) {
+ this.setData({
+ first_leader,
+ })
+ //-- user_id代过来免登录 --
+ getApp().globalData.first_leader = first_leader;
+ //调用接口判断是不是会员
+ getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
+ if (res.data.code == 0) {
+ getApp().globalData.guide_id = res.data.data.id;
+ getApp().globalData.guide_pick_id= res.data.data.pickup_id
+ }
+ })
+ }
+ th.close();
+
+
+
getApp().getConfig(function (e) {
th.setData({sto_sele_name_1: e.store_name})
})
@@ -148,7 +193,7 @@ Page({
// sele_g:monthgiftbag,
// def_pick_store:monthgiftba_defpick
// })
- let scene = wx.getLaunchOptionsSync().scene;
+ let scene=wx.getLaunchOptionsSync().scene;
if (scene==1154) {
this.setData({
scene
@@ -157,50 +202,8 @@ Page({
}
},
init() {
- let options = this.data?.params; // this.data == null ? undefined:this.data.params
- var th = this;
- this.setData({
- getUserID: d.user_id,
- getStorageID: a.stoid,
- })
-
- if(!options.lbId && options.scene){
- var gid_str = decodeURIComponent(options.scene);
- gid_str = gid_str.split("_");
-
- options.lbId=gid_str[0];
- options.first_leader=gid_str[1];
- options.isBuy=1;
- }
-
- this.setData({
- isBuy: options.isBuy,
- getGiftID: options.lbId,
- orderSn: options.orderSn,
- flag: options.flag, // 如果从商品详情页的促销处点击专享礼包跳转到此页,则flag为1
- record_list_id:options.record_list_id,
- is_receive:options.is_receive
- })
- if (options.lbId) th.data.lbId = options.lbId;
- //-- 获取分享人的ID --
- var first_leader = options.first_leader || getApp().globalData.first_leader;
- if (first_leader) {
- this.setData({
- first_leader,
- })
- //-- user_id代过来免登录 --
- getApp().globalData.first_leader = first_leader;
- //调用接口判断是不是会员
- getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
- if (res.data.code == 0) {
- getApp().globalData.guide_id = res.data.data.id;
- getApp().globalData.guide_pick_id= res.data.data.pickup_id
- }
- })
- }
- th.close();
-
+ var th=this;
//-- 检测一下有没有门店 --
th.check_guide(function (){
com.wait_for_store_config(th);
@@ -944,12 +947,16 @@ Page({
//--- 分享设置 --
onShareAppMessage: function (e) {
getApp().globalData.no_clear = 1;
+
+ var ee=this;
var curPage = this;
var pagePath = curPage.route; //当前页面url
if (pagePath.indexOf('/') != 0) {
pagePath = '/' + pagePath;
}
- pagePath += "?isBuy=1" + "&id=" + this.data.options.id + "&first_leader=" + this.data.getUserID;
+
+
+ pagePath += "?isBuy=1" + "&id=" + this.data.sele_g.id + "&first_leader=" + this.data.getUserID;
console.log('分享路径');
console.log(pagePath);
// if (this.data.isBuy == 0) {
@@ -958,9 +965,14 @@ Page({
// pagePath += "&lbId=" + this.data.getGiftID;
// }
// console.log('pagePath', pagePath);
+
+ var img =ee.data.iurl+(ee.data.sele_g.cover_img ? ee.data.sele_g.cover_img : ee.data.giftImage);
+
+
return {
title: "礼包详情",
path: pagePath,
+ imageUrl: img,
}
},
@@ -970,13 +982,17 @@ Page({
onShareTimeline() {
getApp().globalData.no_clear = 1;
- var pagePath = "&isBuy=1" + "&id=" + this.data.options.id + "&first_leader=" + this.data.getUserID;
+ var ee=this;
+ var pagePath = "&isBuy=1" + "&id=" + this.data.sele_g.id + "&first_leader=" + this.data.getUserID;
var user_id = getApp().globalData.user_id;
if (!user_id) user_id = 0;
+ var img =ee.data.iurl+(ee.data.sele_g.cover_img ? ee.data.sele_g.cover_img : ee.data.giftImage);
+
return {
title: "礼包详情",
- query: 'first_leader=' + user_id + pagePath
+ query: 'first_leader=' + user_id + pagePath,
+ imageUrl: img,
}
},
@@ -1489,7 +1505,7 @@ Page({
var app = getApp();
var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
- var scene = th.data.lbId + "";
+ var scene = th.data.sele_g.id + "";
var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0;
if (user_id > 0) {
@@ -1497,7 +1513,7 @@ Page({
}
///二微码
var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
- os.stoid + "?sceneValue=" + scene + "&pageValue=pages/giftpack/giftpacklist/giftpacklist";
+ os.stoid + "?sceneValue=" + scene + "&pageValue=packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo";
// 读取文件成功则OK--
wx.getImageInfo({
@@ -1606,7 +1622,7 @@ Page({
let src = '';
context.beginPath();
if (type == 0) { // 普通
- src = '../../../images/share/q_tj.png';
+ src = '/images/share/q_tj.png';
context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit);
context.setFontSize(16 * unit)
context.setFillStyle("white")
@@ -1615,8 +1631,8 @@ Page({
}
- let price = this.data.giftPrice;
- let giftIntegral = this.data.giftIntegral;
+ let price = this.data.sele_g.payMoney;
+ let giftIntegral = this.data.sele_g.payIntegral;
context.setFontSize(32 * unit);
context.setFillStyle('#DE1117');
@@ -1683,7 +1699,8 @@ Page({
tt();
return false;
}
- var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage;
+ var img_url =ee.data.iurl+(ee.data.sele_g.cover_img ? ee.data.sele_g.cover_img : ee.data.giftImage);
+
//获取商品是分享图信息
wx.getImageInfo({
src: img_url,
diff --git a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml
index fdbba35..aaa388c 100644
--- a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml
+++ b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml
@@ -10,13 +10,12 @@
- {{monthgiftbag.giftTitle}}
-
+ {{monthgiftbag.giftTitle}}
-
+
@@ -45,16 +44,21 @@
+
+ {{"¥"+monthgiftbag.lbPrice}}+{{monthgiftbag.payIntegral+"积分"}}
+
+
+
+ {{"¥"+monthgiftbag.lbPrice}}
+
+
+ /
+
+
+ {{monthgiftbag.payIntegral+"积分"}}
+
+
-
- {{"¥"+monthgiftbag.lbPrice}}
-
-
- /
-
-
- {{monthgiftbag.payIntegral+"积分"}}
-
@@ -154,32 +158,34 @@
diff --git a/packageE/pages/user/monthgiftbag/public/buy_com.js b/packageE/pages/user/monthgiftbag/public/buy_com.js
index 0b6c428..6a53a8e 100644
--- a/packageE/pages/user/monthgiftbag/public/buy_com.js
+++ b/packageE/pages/user/monthgiftbag/public/buy_com.js
@@ -244,7 +244,11 @@ module.exports = {
//-- 分享导购要记录 --
if (getApp().globalData.guide_id) {
json.guide_id = getApp().globalData.guide_id;
- }
+ }
+ //-- 如果是且的购买每月礼包的话 --
+ if(th.data.sele_g.money_type>0){
+ json.exchangeintegral=th.data.sele_g.payIntegral
+ }
// var url ="/api/weshop/marketing/buy/receive/gift/record/insert";
var url ="/api/weshop/marketing/marketingMonthgiftbagRecord/createOrder";
diff --git a/packageE/pages/user/monthgiftbag/public/buy_com.wxml b/packageE/pages/user/monthgiftbag/public/buy_com.wxml
index ea69ed4..68e0e47 100644
--- a/packageE/pages/user/monthgiftbag/public/buy_com.wxml
+++ b/packageE/pages/user/monthgiftbag/public/buy_com.wxml
@@ -157,19 +157,26 @@
{{sele_g.giftTitle}}
-
- {{"¥"+sele_g.payMoney}}
-
-
- /
+
+
+ {{"¥"+sele_g.payMoney}}+{{sele_g.payIntegral}}积分
-
-
- {{sele_g.payIntegral}}
- 积分
-
+
+
+ {{"¥"+sele_g.payMoney}}
+
+
+ /
+
+
+
+ {{sele_g.payIntegral}}
+ 积分
+
+
+