Commit f1071eaf82a7f158575a4ef82358617af39dd1a4

Authored by taiyuan
1 parent 55d2a0bb

幸运购修改4

packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
@@ -102,7 +102,7 @@ Page({ @@ -102,7 +102,7 @@ Page({
102 102
103 103
104 //先获取物流,再获取用户信息,再展示页面 104 //先获取物流,再获取用户信息,再展示页面
105 - th.get_wuliu(th.get_info(th.show_page)); 105 + this.get_wuliu(th.get_info(th.show_page));
106 }, 106 },
107 107
108 onUnload: function() { 108 onUnload: function() {
@@ -580,18 +580,24 @@ Page({ @@ -580,18 +580,24 @@ Page({
580 580
581 // 提交订单前弹出确认对话框 581 // 提交订单前弹出确认对话框
582 submitConfirm(e) { 582 submitConfirm(e) {
583 - wx.showModal({  
584 - title: '温馨提示',  
585 - content: this.data.param.alert,  
586 - success(res) {  
587 - if (res.confirm) {  
588 - console.log('用户点击确定');  
589 - self.submitForm(e);  
590 - } else if (res.cancel) {  
591 - console.log('用户点击取消'); 583 + // is_show为0不显示温馨提示,为1显示温馨提示
  584 + if(this.data.param.is_show == 1) {
  585 + wx.showModal({
  586 + title: '温馨提示',
  587 + content: this.data.param.alert,
  588 + success(res) {
  589 + if (res.confirm) {
  590 + console.log('用户点击确定');
  591 + self.submitForm(e);
  592 + } else if (res.cancel) {
  593 + console.log('用户点击取消');
  594 + }
592 } 595 }
593 - }  
594 - }) 596 + });
  597 + } else {
  598 + this.submitForm(e);
  599 + };
  600 +
595 }, 601 },
596 602
597 603
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.json
1 { 1 {
2 - "navigationBarTitleText": "填写订单", 2 + "navigationBarTitleText": "提交订单",
3 "enablePullDownRefresh": false, 3 "enablePullDownRefresh": false,
4 "usingComponents": { 4 "usingComponents": {
5 "warn": "/components/long_warn/long_warn" 5 "warn": "/components/long_warn/long_warn"
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
@@ -9,6 +9,8 @@ var t = require("../../../../utils/util.js"), @@ -9,6 +9,8 @@ var t = require("../../../../utils/util.js"),
9 o = s.globalData.setting, 9 o = s.globalData.setting,
10 os = o; 10 os = o;
11 var regeneratorRuntime = require('../../../../utils/runtime.js'); 11 var regeneratorRuntime = require('../../../../utils/runtime.js');
  12 +
  13 +let self = null;
12 14
13 Page({ 15 Page({
14 data: { 16 data: {
@@ -48,8 +50,13 @@ Page({ @@ -48,8 +50,13 @@ Page({
48 showRules: false, 50 showRules: false,
49 isSuccess: false, 51 isSuccess: false,
50 showPoster: false, 52 showPoster: false,
  53 +
  54 + luckyGoMembers: [],
  55 + team_id: 0,
51 }, 56 },
  57 +
52 onLoad: function (t) { 58 onLoad: function (t) {
  59 + self = this;
53 if(t.team_id != null && t.team_id !=undefined) { 60 if(t.team_id != null && t.team_id !=undefined) {
54 this.setData({ 61 this.setData({
55 team_id: t.team_id, 62 team_id: t.team_id,
@@ -71,7 +78,7 @@ Page({ @@ -71,7 +78,7 @@ Page({
71 this.init(order_sn); 78 this.init(order_sn);
72 79
73 //-- 自定义海报 -- 80 //-- 自定义海报 --
74 - getApp().request.promiseGet("/api/weshop/goods/poster/page",{ 81 + getApp().request.promiseGet("/api/weshop/goods/poster/page", {
75 data:{store_id:os.stoid, type:1, is_use:1 } 82 data:{store_id:os.stoid, type:1, is_use:1 }
76 }).then(res=>{ 83 }).then(res=>{
77 if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0] ){ 84 if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0] ){
@@ -110,6 +117,11 @@ Page({ @@ -110,6 +117,11 @@ Page({
110 if(this.data.luckyGoInfo.num && this.data.luckyGoInfo.num == 0) { 117 if(this.data.luckyGoInfo.num && this.data.luckyGoInfo.num == 0) {
111 wx.removeStorageSync('team_id'); 118 wx.removeStorageSync('team_id');
112 }; 119 };
  120 + // 如果是从会员中心的幸运购列表点击进来的,退出时清除storage里的team_id
  121 + if(this.data.param.from == 1) {
  122 + let team_id = wx.getStorageSync('team_id');
  123 + if(team_id != null && team_id != undefined) wx.removeStorageSync('team_id');
  124 + };
113 }, 125 },
114 126
115 //关闭展开列表 127 //关闭展开列表
@@ -169,7 +181,7 @@ Page({ @@ -169,7 +181,7 @@ Page({
169 pt_listno = "",//团编号 181 pt_listno = "",//团编号
170 pt_prom_id = 0, //活动id 182 pt_prom_id = 0, //活动id
171 ee = this, 183 ee = this,
172 - team_id = 0,//活动id 184 + //team_id = 0,//活动id
173 ordertx=[],//头像图片 185 ordertx=[],//头像图片
174 share_img=null,//分享图片 186 share_img=null,//分享图片
175 teamlist=null,//活动表 187 teamlist=null,//活动表
@@ -964,14 +976,14 @@ Page({ @@ -964,14 +976,14 @@ Page({
964 if (pagePath.indexOf('/') != 0) { 976 if (pagePath.indexOf('/') != 0) {
965 pagePath = '/' + pagePath; 977 pagePath = '/' + pagePath;
966 } 978 }
967 - if(getApp().globalData.user_id){ 979 + // if(getApp().globalData.user_id){
968 980
969 - if(pagePath.indexOf("?")>0){  
970 - pagePath+="&first_leader="+getApp().globalData.user_id;  
971 - }else{  
972 - pagePath+="?first_leader="+getApp().globalData.user_id;  
973 - }  
974 - } 981 + // if(pagePath.indexOf("?")>0){
  982 + // pagePath+="&first_leader="+getApp().globalData.user_id;
  983 + // }else{
  984 + // pagePath+="?first_leader="+getApp().globalData.user_id;
  985 + // }
  986 + // }
975 return { 987 return {
976 title: "邀你一起参加幸运购", 988 title: "邀你一起参加幸运购",
977 path: pagePath, 989 path: pagePath,
@@ -1146,30 +1158,49 @@ Page({ @@ -1146,30 +1158,49 @@ Page({
1146 id: this.data.param.group_id, 1158 id: this.data.param.group_id,
1147 } 1159 }
1148 }).then(res => { 1160 }).then(res => {
1149 - var luckyGoInfo = res.data.data.pageData[0];  
1150 - var team_id = luckyGoInfo.team_id;  
1151 -  
1152 - th.setData({  
1153 - luckyGoInfo,  
1154 - team_id,  
1155 - });  
1156 -  
1157 - //参团成功后,检查team_id  
1158 - //如果team_id为0, 表示当前已开启新的一期,文字提示应改为’参团成功,本期幸运购已开团,中奖结果可点击下方查看参团列表‘  
1159 - //如果team_id为0,取出之前保存的team_id替换掉,请求上一期已成团的幸运购活动  
1160 - if(team_id != 0) {  
1161 - wx.setStorage({  
1162 - key: 'team_id',  
1163 - data: team_id,  
1164 - });  
1165 - } else {  
1166 - let team_id = wx.getStorageSync('team_id'); 1161 + if(res.data.code == 0) {
  1162 + console.log('当前成团信息', res);
  1163 + var luckyGoInfo = res.data.data.pageData[0];
  1164 + var team_id;
  1165 +
  1166 + if(th.data.param.from == 1) {
  1167 + team_id = th.data.team_id;
  1168 + } else {
  1169 + team_id = luckyGoInfo.team_id;
  1170 + };
  1171 +
1167 th.setData({ 1172 th.setData({
1168 - team_id: team_id,  
1169 - isSuccess: true, 1173 + luckyGoInfo,
  1174 + team_id,
1170 }); 1175 });
  1176 +
  1177 + //参团成功后,检查team_id
  1178 + //如果team_id为0, 表示当前已开启新的一期,文字提示应改为’参团成功,本期幸运购已开团,中奖结果可点击下方查看参团列表‘
  1179 + //如果team_id为0,取出之前保存的team_id替换掉,请求上一期已成团的幸运购活动
  1180 + //如果从会员中心的幸运购列表邀请好友点击进来,不执行storage操作
  1181 + if(th.data.param.from == 1) return false;
  1182 + if(team_id != 0) {
  1183 + wx.setStorage({
  1184 + key: 'team_id',
  1185 + data: team_id,
  1186 + });
  1187 + console.log('存储team_id', team_id);
  1188 + } else {
  1189 + let team_id2 = wx.getStorageSync('team_id');
  1190 + console.log('获取team_id', team_id2);
  1191 + th.setData({
  1192 + team_id: team_id2,
  1193 + // isSuccess: true,
  1194 + });
  1195 + };
  1196 +
  1197 + // th.setData({
  1198 + // luckyGoInfo,
  1199 + // team_id,
  1200 + // });
  1201 +
1171 }; 1202 };
1172 - 1203 +
1173 }); 1204 });
1174 1205
1175 // 幸运购成团成员 1206 // 幸运购成团成员
@@ -1179,12 +1210,34 @@ Page({ @@ -1179,12 +1210,34 @@ Page({
1179 team_id: this.data.team_id, 1210 team_id: this.data.team_id,
1180 } 1211 }
1181 }).then(res => { 1212 }).then(res => {
1182 - th.setData({  
1183 - luckyGoMembers: res.data.data.pageData,  
1184 - }); 1213 + if(res.data.code == 0) {
  1214 + console.log('当前参团成员', res, );
  1215 + let myId = getApp().globalData.userInfo.user_id;
  1216 + let luckyGoMembers = res.data.data.pageData;
  1217 + th.setData({
  1218 + luckyGoMembers,
  1219 + });
  1220 +
  1221 + self.isMe(myId, luckyGoMembers);
  1222 + };
  1223 +
1185 }); 1224 });
1186 1225
1187 }, 1226 },
  1227 +
  1228 + // 判断自己是否中奖
  1229 + isMe(myId, list) {
  1230 + list.some((item, index) => {
  1231 + if(item.team_status == 2) {
  1232 + if(item.user_id == myId) {
  1233 + self.setData({
  1234 + iWin: true
  1235 + });
  1236 + return true;
  1237 + };
  1238 + }
  1239 + });
  1240 + },
1188 1241
1189 1242
1190 1243
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml
@@ -4,7 +4,8 @@ @@ -4,7 +4,8 @@
4 4
5 5
6 <view class="flex pd20 bg-white"> 6 <view class="flex pd20 bg-white">
7 - <view class="img-container shrink0" data-content="已团{{luckyGoInfo.group_joined}}件"> 7 + <!-- <view class="img-container shrink0" data-content="已团{{luckyGoInfo.group_joined}}件"> -->
  8 + <view class="img-container shrink0" data-content="">
8 <image class="img-block" src="{{iurl + luckyGoInfo.original_img}}" data-val="{{luckyGoInfo.original_img}}" 9 <image class="img-block" src="{{iurl + luckyGoInfo.original_img}}" data-val="{{luckyGoInfo.original_img}}"
9 data-errorimg="luckyGoInfo.original_img" binderror="bind_bnerr" lazy-load="true"></image> 10 data-errorimg="luckyGoInfo.original_img" binderror="bind_bnerr" lazy-load="true"></image>
10 </view> 11 </view>
@@ -24,8 +25,9 @@ @@ -24,8 +25,9 @@
24 </view> 25 </view>
25 <view class="xc-wc fs24"> 26 <view class="xc-wc fs24">
26 <view> 27 <view>
27 - <!-- <view class="">已拼{{teamlist.buy_num}}DDD件</view> -->  
28 - <view class="t-c">待成团</view> 28 + <!-- luckyGoMembers.create_time 为0,表示还没开团 -->
  29 + <view class="t-c" wx:if="{{luckyGoMembers[0].create_time > 0}}">已成团</view>
  30 + <view class="t-c" wx:else>待成团</view>
29 <view class="flex xc-valframe t-c"> 31 <view class="flex xc-valframe t-c">
30 <view class="xc-frame-img"> 32 <view class="xc-frame-img">
31 <image class="picture" src="{{iurl}}/miniapp/images/bai-ren.png"></image> 33 <image class="picture" src="{{iurl}}/miniapp/images/bai-ren.png"></image>
@@ -43,7 +45,7 @@ @@ -43,7 +45,7 @@
43 <view class="mgt20 bg-white pr"> 45 <view class="mgt20 bg-white pr">
44 <view class="rules fs24" bindtap="showRules">规则 <text class="iconfont icon-arrow_right fs24"></text></view> 46 <view class="rules fs24" bindtap="showRules">规则 <text class="iconfont icon-arrow_right fs24"></text></view>
45 <!-- 阶梯团 --> 47 <!-- 阶梯团 -->
46 - <view class='bodytop' wx:if="{{teamlist.kttype==3&& p_status==1}}"> 48 + <!-- <view class='bodytop' wx:if="{{teamlist.kttype==3&& p_status==1}}">
47 当前价格 49 当前价格
48 <text class="xc-wc">¥{{ct_price}}</text>, 50 <text class="xc-wc">¥{{ct_price}}</text>,
49 <block wx:if="{{max_num-ordertx.length>0}}"> 51 <block wx:if="{{max_num-ordertx.length>0}}">
@@ -52,11 +54,11 @@ @@ -52,11 +54,11 @@
52 <block wx:else> 54 <block wx:else>
53 该团已经拼购到最低价了哦~ 55 该团已经拼购到最低价了哦~
54 </block> 56 </block>
55 - </view> 57 + </view> -->
56 58
57 59
58 <!-- 拼团成功 --> 60 <!-- 拼团成功 -->
59 - <view class="xc-ptcomplete-ladder flex-level fs28" wx:if="{{teamlist.kttype==3&&p_status==2}}"> 61 + <!-- <view class="xc-ptcomplete-ladder flex-level fs28" wx:if="{{teamlist.kttype==3&&p_status==2}}">
60 <view class="xc-wc">拼团成功</view>,当前价格 62 <view class="xc-wc">拼团成功</view>,当前价格
61 <text class="xc-wc">¥{{ct_price}}</text> 63 <text class="xc-wc">¥{{ct_price}}</text>
62 <view class="xc-img-frame oh"> 64 <view class="xc-img-frame oh">
@@ -64,20 +66,26 @@ @@ -64,20 +66,26 @@
64 </view> 66 </view>
65 </view> 67 </view>
66 68
67 - <view style="height: 20rpx" wx:if="{{teamlist.kttype==3&&p_status==4}}"></view> 69 + <view style="height: 20rpx" wx:if="{{teamlist.kttype==3&&p_status==4}}"></view> -->
68 70
69 71
70 <!-- 阶梯团失败 --> 72 <!-- 阶梯团失败 -->
71 <!-- <view class="pdt50 pdb30 pdh20" wx:if="{{pay_f==1 || order.pt_status==3}}"> --> 73 <!-- <view class="pdt50 pdb30 pdh20" wx:if="{{pay_f==1 || order.pt_status==3}}"> -->
72 <view class="pdt50 pdb30 pdh20"> 74 <view class="pdt50 pdb30 pdh20">
73 <block wx:if="{{team_id != 0}}"> 75 <block wx:if="{{team_id != 0}}">
74 - <view class="fs28 t-c" wx:if="{{!isSuccess}}">参团成功,还差{{filters.show_default(luckyGoInfo.group_num, '0') - filters.show_default(luckyGoInfo.num, '0')}}人即可成团,请留意成员开奖通知!</view>  
75 - <view class="fs28 t-c" wx:else>参团成功,本期幸运购已开团!</view> 76 + <view class="fs28 t-c" wx:if="{{luckyGoMembers[0].create_time > 0}}">
  77 + <view>参团成功,本期幸运购已开团!</view>
  78 + <view class="fs26 t-c c-red">{{iWin ? '恭喜您团中该商品,请等待商家发货~':'很遗憾您未团中,可获得一份帮团奖励,再接再厉噢~'}}</view>
  79 + </view>
  80 + <view class="fs28 t-c" wx:else>您已参团成功,还差{{filters.show_default(luckyGoInfo.group_num, '0') - filters.show_default(luckyGoInfo.num, '0')}}人参与即可成团!</view>
76 </block> 81 </block>
  82 +
77 <block wx:if="{{team_id == 0 && param.from}}"> 83 <block wx:if="{{team_id == 0 && param.from}}">
78 <view class="fs28 t-c">组团中,还差{{filters.show_default(luckyGoInfo.group_num, '0') - filters.show_default(luckyGoInfo.num, '0')}}人即可成团!</view> 84 <view class="fs28 t-c">组团中,还差{{filters.show_default(luckyGoInfo.group_num, '0') - filters.show_default(luckyGoInfo.num, '0')}}人即可成团!</view>
79 </block> 85 </block>
80 - <view class="fs24 t-c c-red">未团中可获得帮团奖励</view> 86 +
  87 + <!-- <view class="fs26 t-c c-red">快去邀请小伙伴一起参与吧~</view> -->
  88 +
81 <!-- <view class="xc-img-frame oh" > 89 <!-- <view class="xc-img-frame oh" >
82 <image class="img" src="{{iurl}}/miniapp/images/xc-qtshibai.png"></image> 90 <image class="img" src="{{iurl}}/miniapp/images/xc-qtshibai.png"></image>
83 </view> --> 91 </view> -->
@@ -85,16 +93,16 @@ @@ -85,16 +93,16 @@
85 93
86 94
87 <!-- 拼团成功 --> 95 <!-- 拼团成功 -->
88 - <view class="xc-ptcomplete flex-level fs28" wx:if="{{p_status==2 && (teamlist.kttype==2||teamlist.kttype==1)}}"> 96 + <!-- <view class="xc-ptcomplete flex-level fs28" wx:if="{{p_status==2 && (teamlist.kttype==2||teamlist.kttype==1)}}">
89 <view class="xc-wc">拼团成功</view>,为您节省 97 <view class="xc-wc">拼团成功</view>,为您节省
90 <text class="xc-wc">{{filters.toFix(goods.market_price-teamlist.price,2)}}</text>元 98 <text class="xc-wc">{{filters.toFix(goods.market_price-teamlist.price,2)}}</text>元
91 <view class="xc-img-frame oh"> 99 <view class="xc-img-frame oh">
92 <image class="img" src="{{iurl}}/miniapp/images/xc_qtcg.png"></image> 100 <image class="img" src="{{iurl}}/miniapp/images/xc_qtcg.png"></image>
93 </view> 101 </view>
94 </view> 102 </view>
95 - <view></view> 103 + <view></view> -->
96 <!----//// //头像----> 104 <!----//// //头像---->
97 - <view class="flex_tou pdv30"> 105 + <view class="flex_tou pdv20">
98 <view class="flex jc-center"> 106 <view class="flex jc-center">
99 <view class="d" wx:if="{{team_id == 0 && param.from}}"> 107 <view class="d" wx:if="{{team_id == 0 && param.from}}">
100 <image class="img-block" src='{{iurl}}/miniapp/images/shafa.png'></image> 108 <image class="img-block" src='{{iurl}}/miniapp/images/shafa.png'></image>
@@ -166,7 +174,7 @@ @@ -166,7 +174,7 @@
166 <view class='fs30 xc-green' wx:if='{{teamlist.kttype==3&&p_status==2}}'> 174 <view class='fs30 xc-green' wx:if='{{teamlist.kttype==3&&p_status==2}}'>
167 拼团成功, 规定时间内支付尾款即发货 175 拼团成功, 规定时间内支付尾款即发货
168 </view> 176 </view>
169 - <view class="xc-wc fs30 t-c xc-onclik" wx:if="{{p_status==1}}"> 177 + <view class="xc-wc fs30 t-c xc-onclik" wx:if="{{!(luckyGoMembers[0].create_time > 0)}}">
170 点击下方按钮分享给小伙伴,可快速成团! 178 点击下方按钮分享给小伙伴,可快速成团!
171 </view> 179 </view>
172 180
@@ -192,11 +200,11 @@ @@ -192,11 +200,11 @@
192 <!-- </view> --> 200 <!-- </view> -->
193 <!-- </block> --> 201 <!-- </block> -->
194 <view class="flex jc-center ai-center fs26" hidden="{{hiddenName}}" bindtap="click"> 202 <view class="flex jc-center ai-center fs26" hidden="{{hiddenName}}" bindtap="click">
195 - 查看拼团列表<text class="down-arrow1"></text> 203 + 查看参团成员<text class="down-arrow1"></text>
196 </view> 204 </view>
197 205
198 <view class='bodyfoot'> 206 <view class='bodyfoot'>
199 - <view class="fs26" wx:if="{{zk}}" bindtap="czk">查看拼团列表<view class='down-arrow'></view></view> 207 + <view class="fs26" wx:if="{{zk}}" bindtap="czk">查看参团成员<view class='down-arrow'></view></view>
200 208
201 <!-- {{ordertx}} --> 209 <!-- {{ordertx}} -->
202 <view class="flex ai-center jc_sb pdh30 pdv20 fs26" hidden="{{hiddenName}}" wx:for="{{luckyGoMembers}}" wx:for-index="ky"> 210 <view class="flex ai-center jc_sb pdh30 pdv20 fs26" hidden="{{hiddenName}}" wx:for="{{luckyGoMembers}}" wx:for-index="ky">
@@ -233,7 +241,7 @@ @@ -233,7 +241,7 @@
233 <view class="pdh20 f1"> 241 <view class="pdh20 f1">
234 <button class="btn-red pdh20 fs24" bindtap="gohome">返回首页</button> 242 <button class="btn-red pdh20 fs24" bindtap="gohome">返回首页</button>
235 </view> 243 </view>
236 - <view class="pdh20 f1"> 244 + <view class="pdh20 f1" wx:if="{{!(luckyGoMembers[0].create_time > 0)}}">
237 <button class="btn-yellow pdh20 fs24" bindtap="clickShare">邀请好友参团</button> 245 <button class="btn-yellow pdh20 fs24" bindtap="clickShare">邀请好友参团</button>
238 </view> 246 </view>
239 <!-- <button class="btn-red pdh20 fs24" bindtap="gohome">返回首页</button> 247 <!-- <button class="btn-red pdh20 fs24" bindtap="gohome">返回首页</button>
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -275,6 +275,7 @@ Page({ @@ -275,6 +275,7 @@ Page({
275 275
276 luckGoInfo: {}, 276 luckGoInfo: {},
277 showDetails: false, 277 showDetails: false,
  278 + num_success: 0, //成团已中商品数量
278 279
279 }, 280 },
280 281
@@ -308,22 +309,7 @@ Page({ @@ -308,22 +309,7 @@ Page({
308 } 309 }
309 310
310 311
311 - // 检查是否已经购买参团  
312 - getApp().request.get("/api/weshop/prom/luckyOrder/getUserOrderInfo/" + o.stoid + "/" + oo.user_id + "/" + prom_id, {  
313 - success: function(res) {  
314 - console.log('505=====>', res.data.data);  
315 - if(res.data.code == 0) {  
316 - th.setData({  
317 - showDetails: true,  
318 - buyInfo: res.data.data,  
319 - });  
320 - } else {  
321 - th.setData({  
322 - showDetails: false,  
323 - });  
324 - };  
325 - }  
326 - }); 312 +
327 // api/weshop/prom/luckyOrder/getUserOrderInfo/{store_id}/{user_id}/{aid} 313 // api/weshop/prom/luckyOrder/getUserOrderInfo/{store_id}/{user_id}/{aid}
328 // getApp().request.promiseGet("/api/weshop/pickup/list", { 314 // getApp().request.promiseGet("/api/weshop/pickup/list", {
329 // data: { store_id: os.stoid, pickup_id: e.pickup_id, lat: th.data.lat, lon: th.data.lon,is_pos:1 }, 315 // data: { store_id: os.stoid, pickup_id: e.pickup_id, lat: th.data.lat, lon: th.data.lon,is_pos:1 },
@@ -1020,6 +1006,24 @@ Page({ @@ -1020,6 +1006,24 @@ Page({
1020 this.data.enterAddressPage && (this.data.enterAddressPage = !1); 1006 this.data.enterAddressPage && (this.data.enterAddressPage = !1);
1021 1007
1022 1008
  1009 + // 检查是否已经参团购买
  1010 + getApp().request.get("/api/weshop/prom/luckyOrder/getUserOrderInfo/" + o.stoid + "/" + oo.user_id + "/" + this.data.prom_id, {
  1011 + success: function(res) {
  1012 + console.log('当前幸运购活动是否已经参团', res.data.code);
  1013 + // if(res.data.code == 0) {
  1014 + // th.setData({
  1015 + // showDetails: true,
  1016 + // buyInfo: res.data.data,
  1017 + // });
  1018 + // } else {
  1019 + // th.setData({
  1020 + // showDetails: false,
  1021 + // });
  1022 + // };
  1023 + }
  1024 + });
  1025 +
  1026 +
1023 //获取单个活动已成团数量 1027 //获取单个活动已成团数量
1024 getApp().request.get(`/api/weshop/prom/luckyTeam/getCtNum/${o.stoid}/${this.data.group_id}`, { 1028 getApp().request.get(`/api/weshop/prom/luckyTeam/getCtNum/${o.stoid}/${this.data.group_id}`, {
1025 success: function (res) { 1029 success: function (res) {
@@ -1049,6 +1053,20 @@ Page({ @@ -1049,6 +1053,20 @@ Page({
1049 }); 1053 });
1050 1054
1051 1055
  1056 + //获取单个活动成团已中商品数量
  1057 + let url_num_success = `/api/weshop/prom/luckyOrder/countActNum/${os.stoid}/${this.data.group_id}`;
  1058 + getApp().request.get(url_num_success, {
  1059 + success: function (res) {
  1060 + if (res.data.code == 0) {
  1061 + console.log('成团已中商品数量汇总',res.data.data);
  1062 + th.setData({
  1063 + num_success: res.data.data,
  1064 + });
  1065 + }
  1066 + }
  1067 + });
  1068 +
  1069 +
1052 //获取单个活动成团信息 1070 //获取单个活动成团信息
1053 await getApp().request.promiseGet('/api/weshop/prom/luckyActivity/page', { 1071 await getApp().request.promiseGet('/api/weshop/prom/luckyActivity/page', {
1054 data: { 1072 data: {
@@ -3791,6 +3809,7 @@ Page({ @@ -3791,6 +3809,7 @@ Page({
3791 }, 3809 },
3792 3810
3793 //--点击弹起拼单-- 3811 //--点击弹起拼单--
  3812 + // ind == 1 为普通购买
3794 openSpecModel_pt: function (e) { 3813 openSpecModel_pt: function (e) {
3795 3814
3796 this.setData({ open_ind_store: 9, goodsInputNum: 1 }); 3815 this.setData({ open_ind_store: 9, goodsInputNum: 1 });
@@ -3898,6 +3917,9 @@ Page({ @@ -3898,6 +3917,9 @@ Page({
3898 3917
3899 //-----------------拼单生成方法--------------------- 3918 //-----------------拼单生成方法---------------------
3900 addCart_pt: function () { 3919 addCart_pt: function () {
  3920 + this.setData({
  3921 + openSpecModal_pt: 0,
  3922 + });
3901 if (this.data.is_normal == 0) { 3923 if (this.data.is_normal == 0) {
3902 //看一下有没有起购数,如果有起购数,要计算起购数 3924 //看一下有没有起购数,如果有起购数,要计算起购数
3903 // var qnum = parseFloat(th.data.prom_act.minbuynum); 3925 // var qnum = parseFloat(th.data.prom_act.minbuynum);
@@ -4094,7 +4116,7 @@ Page({ @@ -4094,7 +4116,7 @@ Page({
4094 buyNow_pt: function (e) { 4116 buyNow_pt: function (e) {
4095 s.set_b_now(e); 4117 s.set_b_now(e);
4096 wx.navigateTo({ 4118 wx.navigateTo({
4097 - url: "/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct?is_bnow=1&group_id=" + this.data.group_id +"&goods_id=" + e.goods_id + "&alert=" + this.data.luckGoInfo.lc_alert + '&goods_price=' + this.data.luckGoInfo.group_price/100, 4119 + url: "/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct?is_bnow=1&group_id=" + this.data.group_id +"&goods_id=" + e.goods_id + "&alert=" + this.data.luckGoInfo.lc_alert + '&goods_price=' + this.data.luckGoInfo.group_price/100 + '&is_show=' + this.data.luckGoInfo.is_show,
4098 }); 4120 });
4099 4121
4100 // getApp().goto("/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&group_id=" + th.data.group_id +"&goods_id=" + e.goods_id + "&alert=" + th.data.luckGoInfo.lc_alert); 4122 // getApp().goto("/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&group_id=" + th.data.group_id +"&goods_id=" + e.goods_id + "&alert=" + th.data.luckGoInfo.lc_alert);
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.json
1 { 1 {
2 - "navigationBarTitleText": "商品详情2", 2 + "navigationBarTitleText": "",
3 "enablePullDownRefresh": false, 3 "enablePullDownRefresh": false,
4 "usingComponents": { 4 "usingComponents": {
5 "nav_box": "/components/nav_box/nav_box", 5 "nav_box": "/components/nav_box/nav_box",
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
@@ -29,8 +29,8 @@ @@ -29,8 +29,8 @@
29 <image src="{{item.head_pic}}" class="img-block"></image> 29 <image src="{{item.head_pic}}" class="img-block"></image>
30 </view> 30 </view>
31 <view class="flex ai_c pd10"> 31 <view class="flex ai_c pd10">
32 - <view class="nickname ellipsis-1x">恭喜{{item.nickname}}</view>  
33 - <view style="flex-shrink: 0;">获得了"{{item.goods_name}}"</view> 32 + <view class="nickname ellipsis-1x">恭喜{{item.nickname}}获得了{{item.goods_name}}</view>
  33 + <!-- <view style="flex-shrink: 0;"></view> -->
34 </view> 34 </view>
35 </view> 35 </view>
36 </swiper-item> 36 </swiper-item>
@@ -273,7 +273,7 @@ @@ -273,7 +273,7 @@
273 273
274 274
275 <view class="goods-num"> 275 <view class="goods-num">
276 - <view class="sales">已售:{{data.sales_sum}}件</view> 276 + <view class="sales">已售:{{num_success}}件</view>
277 <!-- <view class="sales">销量:{{data.sales_sum}}件</view> --> 277 <!-- <view class="sales">销量:{{data.sales_sum}}件</view> -->
278 <!-- <view class="stock">折扣:{{data.disc}}折</view> --> 278 <!-- <view class="stock">折扣:{{data.disc}}折</view> -->
279 <view class="stock">{{categories3[0].num}}人评价</view> 279 <view class="stock">{{categories3[0].num}}人评价</view>
@@ -1253,9 +1253,10 @@ @@ -1253,9 +1253,10 @@
1253 </view> 1253 </view>
1254 </view> 1254 </view>
1255 <!-- 弹起来,购买积分购 --> 1255 <!-- 弹起来,购买积分购 -->
1256 -<view hidden="{{!openSpecModal_inte}}"> 1256 +<!-- <view hidden="{{!openSpecModal_inte}}">
1257 <include src="buy_integral.wxml" /> 1257 <include src="buy_integral.wxml" />
1258 -</view> 1258 +</view> -->
  1259 +
1259 <!-- 弹起来,购买积分购的普通购买 --> 1260 <!-- 弹起来,购买积分购的普通购买 -->
1260 <!-- <view hidden="{{!openSpecModal_inte_normal}}"> 1261 <!-- <view hidden="{{!openSpecModal_inte_normal}}">
1261 <include src="buy_integral_normal.wxml" /> 1262 <include src="buy_integral_normal.wxml" />
@@ -1264,6 +1265,8 @@ @@ -1264,6 +1265,8 @@
1264 <view hidden="{{!openSpecModal_pt}}"> 1265 <view hidden="{{!openSpecModal_pt}}">
1265 <include src="buy_pt.wxml" /> 1266 <include src="buy_pt.wxml" />
1266 </view> 1267 </view>
  1268 +
  1269 +
1267 <!-- --弹起来优惠信息---- --> 1270 <!-- --弹起来优惠信息---- -->
1268 <!-- <view hidden="{{!openPromModal}}"> 1271 <!-- <view hidden="{{!openPromModal}}">
1269 <view bindtap="closePromModal" class="cover-layer"></view> 1272 <view bindtap="closePromModal" class="cover-layer"></view>
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxml
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 <view class="list-item" wx:for="{{list.pageData}}"> 9 <view class="list-item" wx:for="{{list.pageData}}">
10 <!-- <view class="list-item" wx:for="{{list.pageData}}"> --> 10 <!-- <view class="list-item" wx:for="{{list.pageData}}"> -->
11 <view class="pd20" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}"> 11 <view class="pd20" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}">
  12 + <!-- <view class="fs28">{{item.act_name}} (第{{item.team_sn}}期) </view> -->
12 <view class="pdr40 arrow" wx:if="{{item.team_status == 0}}">参团中,还差<text class="c-red">{{filters.difference(item.num, item.group_num)}}</text>人</view> 13 <view class="pdr40 arrow" wx:if="{{item.team_status == 0}}">参团中,还差<text class="c-red">{{filters.difference(item.num, item.group_num)}}</text>人</view>
13 <view class="pdr40 arrow" wx:elif="{{item.team_status == 2}}">已团中,{{item.shipping_status == 0 ? '待发货':'已发货'}}</view> 14 <view class="pdr40 arrow" wx:elif="{{item.team_status == 2}}">已团中,{{item.shipping_status == 0 ? '待发货':'已发货'}}</view>
14 <view class="pdr40 arrow" wx:elif="{{item.team_status == 1}}">未团中,已退款</view> 15 <view class="pdr40 arrow" wx:elif="{{item.team_status == 1}}">未团中,已退款</view>
@@ -31,7 +32,7 @@ @@ -31,7 +32,7 @@
31 <view>共1件,实付金额:<text class="rmb">{{item.user_money}}</text></view> 32 <view>共1件,实付金额:<text class="rmb">{{item.user_money}}</text></view>
32 <view class="flex"> 33 <view class="flex">
33 <view class="btn gray" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}&team_status={{item.team_status}}">查看订单</view> 34 <view class="btn gray" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}&team_status={{item.team_status}}">查看订单</view>
34 - <view class="btn c-red mgl20" wx:if="{{item.team_status == 0}}" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_details/luckyGo_details?group_id={{item.aid}}&goods_id={{item.goods_id}}&goods_name={{item.goods_name}}&team_id={{item.team_id}}&&from=list">邀请好友</view> 35 + <view class="btn c-red mgl20" wx:if="{{item.team_status == 0}}" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_details/luckyGo_details?group_id={{item.aid}}&goods_id={{item.goods_id}}&goods_name={{item.goods_name}}&team_id={{item.team_id}}&&from=1">邀请好友</view>
35 <view class="btn c-red mgl20" wx:if="{{item.team_status == 1}}" bindtap="showReward" data-index="{{index}}" data-aid="{{item.aid}}">查看奖励</view> 36 <view class="btn c-red mgl20" wx:if="{{item.team_status == 1}}" bindtap="showReward" data-index="{{index}}" data-aid="{{item.aid}}">查看奖励</view>
36 </view> 37 </view>
37 </view> 38 </view>
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxss
@@ -49,7 +49,7 @@ page { @@ -49,7 +49,7 @@ page {
49 } 49 }
50 50
51 .title { 51 .title {
52 - height: 88rpx; 52 + /* max-height: 88rpx; */
53 } 53 }
54 54
55 .tab-bd { 55 .tab-bd {
packageC/pages/luckyGo/luckyGo_members/luckyGo_members.json
1 { 1 {
2 - "navigationBarTitleText": "参团成员", 2 + "navigationBarTitleText": "本期参团成员",
3 "enablePullDownRefresh": false, 3 "enablePullDownRefresh": false,
4 "usingComponents": {} 4 "usingComponents": {}
5 } 5 }
6 \ No newline at end of file 6 \ No newline at end of file
packageC/pages/luckyGo/luckyGo_winners/luckyGo_winners.wxss
@@ -8,11 +8,11 @@ page { @@ -8,11 +8,11 @@ page {
8 } 8 }
9 9
10 .img-container { 10 .img-container {
11 - width: 60rpx;  
12 - height: 60rpx; 11 + width: 80rpx;
  12 + height: 80rpx;
13 border-radius: 50%; 13 border-radius: 50%;
14 overflow: hidden; 14 overflow: hidden;
15 - margin-right: 10rpx; 15 + margin-right: 20rpx;
16 flex-shrink: 0; 16 flex-shrink: 0;
17 } 17 }
18 18
@@ -32,7 +32,7 @@ page { @@ -32,7 +32,7 @@ page {
32 display: flex; 32 display: flex;
33 align-items: center; 33 align-items: center;
34 text-align: center; 34 text-align: center;
35 - font-size: 26rpx; 35 + font-size: 28rpx;
36 } 36 }
37 37
38 .list-hd { 38 .list-hd {