diff --git a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
index 50a27e4..09b2cd9 100644
--- a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
+++ b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
@@ -46,10 +46,16 @@ Page({
showRules: false,
+ isSuccess: false,
},
onLoad: function (t) {
// wx.setNavigationBarTitle({ title: "拼团订单",})
// console.log('options========>', t);
+ if(t.team_id != null && t.team_id !=undefined) {
+ this.setData({
+ team_id: t.team_id,
+ });
+ };
this.setData({
param: t,
});
@@ -93,6 +99,20 @@ Page({
})
},
+ onShow: function() {
+ this.get_team_info();
+ },
+
+
+
+
+ onUnload: function () {
+ // 开团成功后,清除storage里的team_id
+ if(this.data.luckyGoInfo.num == 0) {
+ wx.removeStorageSync('team_id');
+ };
+ },
+
//关闭展开列表
click:function(e){
this.setData({
@@ -164,116 +184,81 @@ Page({
// data: {orderSn:order_sn,storeId:os.stoid }
// })
- // 幸运购成团信息
- await getApp().request.promiseGet("/api/weshop/prom/luckyActivity/page", {
- data: {
- store_id: o.stoid,
- is_end: 0,
- timetype: 1,
- id: this.data.param.group_id,
- }
- }).then(res => {
- var luckyGoInfo = res.data.data.pageData[0];
- console.log('成团信息====>', luckyGoInfo);
- th.setData({
- luckyGoInfo,
- });
- //参团成功后,保存team_id
- wx.setStorage({
- key: 'team_id',
- data: luckyGoInfo.team_id,
- })
- //如果team_id为0, 表示当前已开启新的一期,文字提示应改为’参团成功,本期幸运购已开团,中奖结果可点击下方查看参团列表‘
- //如果team_id为0,取出之前保存的team_id替换掉,请求上一期已成团的幸运购活动
- })
-
- // 幸运购成团成员
- await getApp().request.promiseGet("/api/weshop/prom/luckyOrder/page", {
- data: {
- store_id: o.stoid,
- team_id: this.data.luckyGoInfo.team_id,
- }
- }).then(res => {
- console.log('成团成员====>', res.data.data.pageData);
- th.setData({
- luckyGoMembers: res.data.data.pageData,
- });
- })
//获取order信息根据订单编号order_sn
- await getApp().request.promiseGet("/api/weshop/order/page", {
- data: { store_id: o.stoid, order_sn: order_sn,}
- }).then(res => {
- console.log('获取order信息====>', order);
- order = res.data.data.pageData[0];
- pt_prom_id = order.pt_prom_id;
- pt_listno = order.pt_listno;
- })
-
- if (this.data.payf || order.pt_status == 3) p_status = 3; //失败
- if (order.pt_status == 2 || order.pt_status == 4 || order.pt_status == 5)
- p_status = 2; //成功
- if (order.pt_status < 2 && !this.data.payf)
- p_status = 1; //正在进行
- if ( order.pt_status == 6) p_status = 4; //支付尾款失败
-
- //多少人参团头像
- // await getApp().request.promiseGet("/api/weshop/order/pagePtList", {
- // data: { store_id: o.stoid, pt_listno: pt_listno, }
- // }).then(res => {
- // ordertx = res.data.data.pageData;
- // })
-
-
- var min_price=0;
- //获取活动表的信息根据活动pt_prom_id
- await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + pt_prom_id, {
- data: { }
- }).then(res => {
- if (res.data.code==0){
- teamlist = res.data.data;
- this.setData({teamlist: teamlist});
- //获取当前时间,并且判断剩余时间
- var nt = ut.gettimestamp();
- teamlist.status = 0;
- if (nt >= teamlist.start_time) teamlist.status = 1;
-
- goods_id = res.data.data.goods_id;
- id = res.data.data.id;
- share_img = ee.data.imageurl + res.data.data.share_imgurl;
-
- //----------查看阶梯团------------
- if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined){
- var ct_rylist = JSON.parse(teamlist.ct_rylist);
- var max=0; var pri=0;
- ct_rylist.forEach(function (val,ind) {
- if(val.rynum>max){
- max=val.rynum;
- pri = val.price;
- }
- })
- max_num=max;
- min_price=pri;
+ // await getApp().request.promiseGet("/api/weshop/order/page", {
+ // data: { store_id: o.stoid, order_sn: order_sn,}
+ // }).then(res => {
+ // console.log('获取order信息====>', order);
+ // order = res.data.data.pageData[0];
+ // pt_prom_id = order.pt_prom_id;
+ // pt_listno = order.pt_listno;
+ // })
+
+ // if (this.data.payf || order.pt_status == 3) p_status = 3; //失败
+ // if (order.pt_status == 2 || order.pt_status == 4 || order.pt_status == 5)
+ // p_status = 2; //成功
+ // if (order.pt_status < 2 && !this.data.payf)
+ // p_status = 1; //正在进行
+ // if ( order.pt_status == 6) p_status = 4; //支付尾款失败
+
+ // //多少人参团头像
+ // // await getApp().request.promiseGet("/api/weshop/order/pagePtList", {
+ // // data: { store_id: o.stoid, pt_listno: pt_listno, }
+ // // }).then(res => {
+ // // ordertx = res.data.data.pageData;
+ // // })
+
+
+ // var min_price=0;
+ // //获取活动表的信息根据活动pt_prom_id
+ // await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + pt_prom_id, {
+ // data: { }
+ // }).then(res => {
+ // if (res.data.code==0){
+ // teamlist = res.data.data;
+ // this.setData({teamlist: teamlist});
+ // //获取当前时间,并且判断剩余时间
+ // var nt = ut.gettimestamp();
+ // teamlist.status = 0;
+ // if (nt >= teamlist.start_time) teamlist.status = 1;
+
+ // goods_id = res.data.data.goods_id;
+ // id = res.data.data.id;
+ // share_img = ee.data.imageurl + res.data.data.share_imgurl;
+
+ // //----------查看阶梯团------------
+ // if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined){
+ // var ct_rylist = JSON.parse(teamlist.ct_rylist);
+ // var max=0; var pri=0;
+ // ct_rylist.forEach(function (val,ind) {
+ // if(val.rynum>max){
+ // max=val.rynum;
+ // pri = val.price;
+ // }
+ // })
+ // max_num=max;
+ // min_price=pri;
- }
+ // }
- //获取商品信息
- getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + goods_id, {
- }).then(res => {
- //商品地址
- original_img = ee.data.imageurl+ res.data.data.original_img,
- goods = res.data.data
+ // //获取商品信息
+ // getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + goods_id, {
+ // }).then(res => {
+ // //商品地址
+ // original_img = ee.data.imageurl+ res.data.data.original_img,
+ // goods = res.data.data
- ee.setData({goods: goods,image: original_img,})
+ // ee.setData({goods: goods,image: original_img,})
- })
+ // })
- }
- })
+ // }
+ // })
//只装5个
@@ -299,28 +284,28 @@ Page({
//获取活动从表信息team_id:305暂时
- await getApp().request.promiseGet("/api/weshop/teamgroup/page" , {
- data: { store_id: os.stoid, listno: pt_listno, team_id: pt_prom_id }
- }).then(res => {
- teamgroup = res.data.data.pageData[0];
- if (teamgroup){
- var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss");
- teamgroup.buy_start_date=buy_start_date;
- }
- })
+ // await getApp().request.promiseGet("/api/weshop/teamgroup/page" , {
+ // data: { store_id: os.stoid, listno: pt_listno, team_id: pt_prom_id }
+ // }).then(res => {
+ // teamgroup = res.data.data.pageData[0];
+ // if (teamgroup){
+ // var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss");
+ // teamgroup.buy_start_date=buy_start_date;
+ // }
+ // })
- var ct_price = 0,
- num_0 = ordertx.length;
- if (teamlist.kttype == 3){
- var js_data = JSON.parse(teamlist.ct_rylist);
- js_data.forEach(function (val,ind) {
- if (num_0<=val.rynum && ct_price==0){
- ct_price=val.price;
- }
- })
- if(ct_price==0) ct_price=min_price;
- }
+ // var ct_price = 0,
+ // num_0 = ordertx.length;
+ // if (teamlist.kttype == 3){
+ // var js_data = JSON.parse(teamlist.ct_rylist);
+ // js_data.forEach(function (val,ind) {
+ // if (num_0<=val.rynum && ct_price==0){
+ // ct_price=val.price;
+ // }
+ // })
+ // if(ct_price==0) ct_price=min_price;
+ // }
//获取大家都在团信息
getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , {
@@ -1017,8 +1002,6 @@ Page({
- onTouchMove() {},
-
// 显示幸运购规则
showRules: function() {
this.setData({
@@ -1032,6 +1015,66 @@ Page({
showRules: false,
});
},
+
+ async get_team_info () {
+ var th = this;
+ // 幸运购成团信息
+ await getApp().request.promiseGet("/api/weshop/prom/luckyActivity/page", {
+ data: {
+ store_id: o.stoid,
+ is_end: 0,
+ timetype: 1,
+ id: this.data.param.group_id,
+ }
+ }).then(res => {
+ var luckyGoInfo = res.data.data.pageData[0];
+ var team_id = luckyGoInfo.team_id;
+ console.log('成团信息====>', luckyGoInfo);
+ th.setData({
+ luckyGoInfo,
+ team_id,
+ });
+
+ //参团成功后,检查team_id
+ //如果team_id为0, 表示当前已开启新的一期,文字提示应改为’参团成功,本期幸运购已开团,中奖结果可点击下方查看参团列表‘
+ //如果team_id为0,取出之前保存的team_id替换掉,请求上一期已成团的幸运购活动
+ if(team_id != 0) {
+ wx.setStorage({
+ key: 'team_id',
+ data: team_id,
+ });
+ } else {
+ // if(th.data.param.from = 'list') {
+ // th.setData({
+ // team_id: 0,
+ // });
+ // } else {
+ let team_id = wx.getStorageSync('team_id');
+ th.setData({
+ team_id: team_id,
+ isSuccess: true,
+ });
+ // };
+
+ };
+
+
+ })
+
+
+ // 幸运购成团成员
+ await getApp().request.promiseGet("/api/weshop/prom/luckyOrder/page", {
+ data: {
+ store_id: o.stoid,
+ team_id: this.data.team_id,
+ }
+ }).then(res => {
+ console.log('成团成员====>', res.data.data.pageData);
+ th.setData({
+ luckyGoMembers: res.data.data.pageData,
+ });
+ })
+ },
diff --git a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml
index e0525f8..e9afd09 100644
--- a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml
+++ b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml
@@ -66,7 +66,13 @@
- 参团成功,还差{{filters.show_default(luckyGoInfo.group_num, '0')- filters.show_default(luckyGoInfo.num, '0')}}人即可成团,请留意成员开奖通知!
+
+ 参团成功,还差{{filters.show_default(luckyGoInfo.group_num, '0') - filters.show_default(luckyGoInfo.num, '0')}}人即可成团,请留意成员开奖通知!
+ 参团成功,本期幸运购已开团!
+
+
+ 组团中,还差{{filters.show_default(luckyGoInfo.group_num, '0') - filters.show_default(luckyGoInfo.num, '0')}}人即可成团!
+
未团中可获得帮团奖励
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
@@ -202,9 +207,9 @@
- {{filters.format_time(item.create_time, 1)}}
+ {{filters.format_time(item.add_time, 1)}}
待成团
- 未团中
+ 未团中
已团中
@@ -247,8 +252,7 @@
-
-
+
大家都在团
@@ -265,7 +269,7 @@
拼
- ¥11.00{{item.price}}
+ ¥11.00{{item.price}}
{{item.ct_num}}2
人参团
diff --git a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxss b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxss
index 20ddf4c..cdf7b56 100644
--- a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxss
+++ b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxss
@@ -1023,7 +1023,7 @@ height:40rpx;
font-size: 26rpx;
position: absolute;
color: white;
- background-color: rgba(255,103,103,.7);
+ background-color: #FE6867;
right: 0;
top: 0;
z-index: 1;
diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml b/packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
index 62168aa..44fbea1 100644
--- a/packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
+++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
@@ -186,7 +186,7 @@
库存不足
- 立即购买
+ 立即购买
@@ -203,7 +203,7 @@
配送不匹配
- 确定
+ 确定
diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
index a26e36e..b002453 100644
--- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
+++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -1702,9 +1702,9 @@ Page({
openSpecModal_pt: 0,
})
- if (e.prom_type == 4) {
+ if (e.prom_type == 9) {
s.set_b_now(e);
- var url = "/pages/cart/cart2_inte/cart2_inte?is_bnow=1&goods_id=" + e.goods_id;
+ var url = "/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&goods_id=" + e.goods_id;
getApp().goto(url);
} else {
//要判断积分购的普通购买有没有参加优惠活动
@@ -1954,6 +1954,8 @@ Page({
})
return false;
}
+
+
if(th.data.more_flash && open_store==1){
th.setData({is_pop_more:1});
@@ -3727,22 +3729,20 @@ Page({
//--点击弹起拼单--
openSpecModel_pt: function (e) {
-
- this.setData({ open_ind_store: 4, goodsInputNum: 1 });//拼团直接给4
-
+ this.setData({ open_ind_store: 9, goodsInputNum: 1 });
//--先判断会员状态--
var user_info = getApp().globalData.userInfo;
- if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
+ if (user_info == null || user_info.mobile == undefined || user_info.mobile == '' || user_info.mobile == null) {
wx.navigateTo({
url: '/pages/togoin/togoin',
})
return false;
- }
+ };
var th = this;
- var ind = parseInt(e.currentTarget.dataset.it);
- //如果是拼单活动的普通购买
+ var ind = parseInt(e.currentTarget.dataset.ind);
+ //ind == 1是普通购买
if (ind == 1) {
//如果拼单的sku data是空的,就要先获取一下
if (th.data.sku_g_pt) {
@@ -3759,9 +3759,11 @@ Page({
openSpecModal_pt: 1
});
});
- }
+ };
th.check_is_youhui(th.data.gid, 1);
- } else {
+ }
+
+ else {
//拼单商品从这里进,先判断有没有买过商品,
getApp().request.get("/api/weshop/order/page", {
@@ -4008,7 +4010,7 @@ Page({
buyNow_pt: function (e) {
s.set_b_now(e);
wx.navigateTo({
- url: "/pages/cart/cart2_pt/cart2_pt?is_bnow=1&goods_id=" + e.goods_id,
+ url: "/packageC/pages/luckyGo_cart/luckyGo_cart/luckyGo_cart?is_bnow=1&goods_id=" + e.goods_id,
});
},
@@ -6066,9 +6068,9 @@ Page({
// 查看奖励
showReward: function() {
- this.setData({
- showReward: true,
- });
+
+ this.getPrizes(this.data.luckGoInfo.type);
+
},
// 关闭奖励
@@ -6078,5 +6080,108 @@ Page({
});
},
+
+ // 获取优惠券奖励和服务项目奖励
+ getPrizes: function(type) {
+ // let currentItem = this.data.list.pageData[currentItemIndex];
+ // let type = type;
+ let self = this;
+ let app = getApp();
+ // 分割type字符串
+ let typeArr = this.splitStringToArr(type);
+ let prizesArr = [];
+ let promiseArr = [];
+ typeArr.forEach(function(item) {
+
+ let obj = {};
+ obj.type = item;
+
+ let promise = new Promise((resolve, reject) => {
+ switch(item) {
+ case 1: { //积分
+ obj.name = '积分';
+ obj.num = 'point';
+ prizesArr.push(obj);
+ resolve();
+ break;
+ };
+ case 2: { //成长值
+ obj.name = '成长值';
+ obj.num = 'grow';
+ prizesArr.push(obj);
+ resolve();
+ break;
+ };
+ case 3: { //优惠券
+ app.request.promiseGet('/api/weshop/prom/luckyCoupon/page', {
+ data: {
+ store_id: os.stoid,
+ aid: self.data.luckGoInfo.id,
+ }
+ }).then(res => {
+ if(res.data.code == 0) {
+ obj.couponList = res.data.data.pageData;
+ prizesArr.push(obj);
+ resolve();
+ };
+ });
+ break;
+ };
+ case 4: { //服务项目
+ app.request.promiseGet('/api/weshop/prom/luckyService/page', {
+ data: {
+ store_id: os.stoid,
+ aid: self.data.luckGoInfo.id,
+ }
+ }).then(res => {
+ if(res.data.code == 0) {
+ obj.serviceList = res.data.data.pageData;
+ prizesArr.push(obj);
+ resolve();
+ };
+ });
+ break;
+ };
+ case 5: { //预存金额
+ obj.name = 'prestore_name';
+ obj.num = 'prestore_money';
+ prizesArr.push(obj);
+ resolve();
+ break;
+ };
+ };
+ });
+
+ promiseArr.push(promise);
+
+
+ Promise.all(promiseArr).then(()=> {
+ self.setData({
+ prizesArr,
+ showReward: true,
+ });
+ });
+
+
+
+ });
+
+
+
+ },
+
+ // 将type字符串分割成数组
+ splitStringToArr: function(typeStr) {
+ var index;
+ var newTypeArr = [];
+ var typeStrArr = typeStr.split(',');
+ typeStrArr.forEach(function(item) {
+ index = parseInt(item);
+ newTypeArr.push(index);
+ });
+ // console.log('newTypeArr', newTypeArr);
+ return newTypeArr;
+ },
+
});
diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
index efa55e2..fb6ea24 100644
--- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
+++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
@@ -883,13 +883,14 @@
-
+
{{filters.toFix(data.market_price,2)}}
单独购买
- 立即参团2
+
+ 立即参团2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss
index d9c9dcb..f0e1546 100644
--- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss
+++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss
@@ -1130,8 +1130,8 @@ left:31rpx;}
}
/* 评价的用户边框 */
.middle-user-frame{
- height: 65rpx;
- overflow: hidden;
+ /* height: 65rpx;
+ overflow: hidden; */
}
.middle-user{
height: 25;
diff --git a/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.js b/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.js
index 9b2bc5f..8f0cdd3 100644
--- a/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.js
+++ b/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.js
@@ -17,20 +17,20 @@ let self = null;
Page({
data: {
- wu:false,
- imageurl: os.imghost,//有礼派图片地址,
- iurl: os.imghost,//有礼派图片地址,
- pt_state:0,
- order : null,//订单数据
- currentTab: 0,
- current:0,
- ordertx:[],//头像
- baseUrl: "/api/weshop/order/page?1=1",
- resourceUrl: e.globalData.setting.resourceUrl,
- currentPage: 1,
- requestData: null,
- original_img:null,
- timer:null,
+ // wu:false,
+ // imageurl: os.imghost,//有礼派图片地址,
+ // iurl: os.imghost,//有礼派图片地址,
+ // pt_state:0,
+ // order : null,//订单数据
+ // currentTab: 0,
+ // current:0,
+ // ordertx:[],//头像
+ // baseUrl: "/api/weshop/order/page?1=1",
+ // resourceUrl: e.globalData.setting.resourceUrl,
+ // currentPage: 1,
+ // requestData: null,
+ // original_img:null,
+ // timer:null,
@@ -44,6 +44,24 @@ Page({
noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据
pageNum: 1, // 当前页数
showReward: false,
+ prizesArr: [],
+
+ typeArr: [{
+ key: 'point',
+ name: '积分',
+ },{
+ key: 'grow',
+ name: '成长值',
+ },{
+ key: 'point',
+ name: '优惠券',
+ },{
+ key: 'prestore_name',
+ name: '项目服务',
+ },{
+ key: 'prestore_money',
+ name: '预存金额',
+ }],
},
onLoad: function () {
@@ -219,10 +237,29 @@ Page({
},
//查看奖励
- showReward: function() {
+ showReward: function(e) {
this.setData({
- showReward: true,
+ // showReward: true,
+ currentItemIndex: e.target.dataset.index,
+ currentItemAid: e.target.dataset.aid,
});
+ this.getPrizes(this.data.currentItemIndex);
+
+ // Promise.resolve(this.getPrizes(this.data.currentItemIndex))
+ // .then((data)=> {
+ // // self.setData({
+ // // prizesArr: data,
+ // // showReward: true,
+ // // });
+ // console.dir(data);
+ // setTimeout(function() {
+ // self.setData({
+ // prizesArr: data,
+ // showReward: true,
+ // },3000);
+ // });
+
+ // });
},
//关闭奖励
@@ -233,6 +270,113 @@ Page({
},
+ // 获取优惠券奖励和服务项目奖励
+ getPrizes: function(currentItemIndex) {
+ let currentItem = this.data.list.pageData[currentItemIndex];
+ let type = currentItem.type;
+
+ // 分割type字符串
+ let typeArr = this.splitStringToArr(type);
+ let prizesArr = [];
+ let promiseArr = [];
+ typeArr.forEach(function(item) {
+
+ let obj = {};
+ obj.type = item;
+
+ let promise = new Promise((resolve, reject) => {
+ switch(item) {
+ case 1: { //积分
+ obj.name = '积分';
+ obj.num = 'point';
+ prizesArr.push(obj);
+ resolve();
+ break;
+ };
+ case 2: { //成长值
+ obj.name = '成长值';
+ obj.num = 'grow';
+ prizesArr.push(obj);
+ resolve();
+ break;
+ };
+ case 3: { //优惠券
+ app.request.promiseGet('/api/weshop/prom/luckyCoupon/page', {
+ data: {
+ store_id: os.stoid,
+ aid: self.data.currentItemAid,
+ }
+ }).then(res => {
+ if(res.data.code == 0) {
+ obj.couponList = res.data.data.pageData;
+ prizesArr.push(obj);
+ resolve();
+ };
+ });
+ break;
+ };
+ case 4: { //服务项目
+ app.request.promiseGet('/api/weshop/prom/luckyService/page', {
+ data: {
+ store_id: os.stoid,
+ aid: self.data.currentItemAid,
+ }
+ }).then(res => {
+ if(res.data.code == 0) {
+ obj.serviceList = res.data.data.pageData;
+ prizesArr.push(obj);
+ resolve();
+ };
+ });
+ break;
+ };
+ case 5: { //预存金额
+ obj.name = 'prestore_name';
+ obj.num = 'prestore_money';
+ prizesArr.push(obj);
+ resolve();
+ break;
+ };
+ };
+ });
+
+ promiseArr.push(promise);
+
+
+ Promise.all(promiseArr).then(()=> {
+ self.setData({
+ prizesArr,
+ showReward: true,
+ });
+ });
+
+
+
+ });
+
+
+
+
+
+
+
+
+ },
+
+ // 将type字符串分割成数组
+ splitStringToArr: function(typeStr) {
+ var index;
+ var newTypeArr = [];
+ var typeStrArr = typeStr.split(',');
+ typeStrArr.forEach(function(item) {
+ index = parseInt(item);
+ newTypeArr.push(index);
+ });
+ // console.log('newTypeArr', newTypeArr);
+ return newTypeArr;
+ },
+
+
diff --git a/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxml b/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxml
index a80ab01..7d86b26 100644
--- a/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxml
+++ b/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxml
@@ -31,9 +31,11 @@
共1件,实付金额:{{item.user_money}}
查看订单
- 邀请好友
+ 邀请好友
+
+
- 查看奖励
+ 查看奖励
@@ -50,18 +52,56 @@
+
+
—— 已经到底啦 ——
diff --git a/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxss b/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxss
index 2290a94..982e0c5 100644
--- a/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxss
+++ b/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxss
@@ -127,7 +127,10 @@ page {
color: #AF481D;
}
-
+.popup-list {
+ max-height: 700rpx;
+ overflow-y: auto;
+}
.popup-list-item {
display: flex;