Commit 939237475b8924bb3accc03144c61c3bca59cf56
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
6 changed files
with
118 additions
and
73 deletions
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxss
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
... | ... | @@ -113,16 +113,17 @@ Page({ |
113 | 113 | |
114 | 114 | |
115 | 115 | onUnload: function () { |
116 | - console.log('999999999999999999999onUnolad~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~',this.data.luckyGoInfo); | |
117 | 116 | // 开团成功后,清除storage里的team_id |
118 | - if(this.data.luckyGoInfo && this.data.luckyGoInfo.num == 0) { | |
119 | - wx.removeStorageSync('team_id'); | |
120 | - }; | |
121 | - // 如果是从会员中心的幸运购列表点击进来的,退出时清除storage里的team_id | |
122 | - if(this.data.param.from == 1) { | |
123 | - let team_id = wx.getStorageSync('team_id'); | |
124 | - if(team_id != null && team_id != undefined) wx.removeStorageSync('team_id'); | |
125 | - }; | |
117 | + // if(this.data.luckyGoInfo && this.data.luckyGoInfo.num == 0) { | |
118 | + // wx.removeStorageSync('team_id'); | |
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 | + // }; | |
125 | + | |
126 | + wx.removeStorageSync('team_id'); | |
126 | 127 | }, |
127 | 128 | |
128 | 129 | //关闭展开列表 |
... | ... | @@ -1149,78 +1150,115 @@ Page({ |
1149 | 1150 | |
1150 | 1151 | // 获取幸运购参团情况 |
1151 | 1152 | async get_team_info () { |
1152 | - var th = this; | |
1153 | - // wx.removeStorageSync('team_id'); | |
1154 | - // 幸运购成团信息 | |
1155 | - await getApp().request.promiseGet("/api/weshop/prom/luckyActivity/page", { | |
1156 | - data: { | |
1157 | - store_id: o.stoid, | |
1158 | - is_end: 0, | |
1159 | - timetype: 1, | |
1160 | - id: this.data.param.group_id, | |
1161 | - } | |
1162 | - }).then(res => { | |
1163 | - if(res.data.code == 0) { | |
1164 | - console.log('当前成团信息', res); | |
1165 | - var luckyGoInfo = res.data.data.pageData[0]; | |
1166 | - var team_id; | |
1167 | - | |
1168 | - if(th.data.param.from == 1) { | |
1169 | - team_id = th.data.team_id; | |
1170 | - } else { | |
1171 | - team_id = luckyGoInfo.team_id; | |
1172 | - if(luckyGoInfo.team_id == 0) { | |
1173 | - team_id = wx.getStorageSync('team_id'); | |
1174 | - }; | |
1175 | - // else { | |
1176 | - // team_id = luckyGoInfo.team_id; | |
1153 | + var th = this; | |
1154 | + var team_id; | |
1155 | + var luckyGoInfo; | |
1156 | + var user_id = getApp().globalData.user_id; | |
1157 | + | |
1158 | + | |
1159 | + | |
1160 | + // 邀请链接待完善 | |
1161 | + | |
1162 | + getApp().request.promiseGet("/api/weshop/prom/luckyActivity/page", { | |
1163 | + data: { | |
1164 | + store_id: o.stoid, | |
1165 | + is_end: 0, | |
1166 | + timetype: 1, | |
1167 | + id: th.data.param.group_id, | |
1168 | + } | |
1169 | + }).then(res => { | |
1170 | + if(res.data.code == 0) { | |
1171 | + | |
1172 | + luckyGoInfo = res.data.data.pageData[0]; | |
1173 | + | |
1174 | + | |
1175 | + | |
1176 | + // else { | |
1177 | + // team_id = luckyGoInfo.team_id; | |
1178 | + | |
1179 | + // // 待完善 | |
1180 | + // if(luckyGoInfo.team_id == 0) { | |
1181 | + // team_id = wx.getStorageSync('team_id'); | |
1182 | + // }; | |
1183 | + | |
1184 | + // }; | |
1185 | + | |
1186 | + th.setData({ | |
1187 | + luckyGoInfo, | |
1188 | + }); | |
1189 | + | |
1190 | + //参团成功后,检查team_id | |
1191 | + //如果team_id为0, 表示当前已开启新的一期,文字提示应改为’参团成功,本期幸运购已开团,中奖结果可点击下方查看参团列表‘ | |
1192 | + //如果team_id为0,取出之前保存的team_id替换掉,请求上一期已成团的幸运购活动 | |
1193 | + //如果从会员中心的幸运购列表邀请好友点击进来,不执行storage操作 | |
1194 | + if(th.data.param.from == 1) return false; | |
1195 | + // if(team_id > 0) { | |
1196 | + // wx.setStorage({ | |
1197 | + // key: 'team_id', | |
1198 | + // data: team_id, | |
1199 | + // }); | |
1200 | + // console.log('存储team_id', team_id); | |
1201 | + // } else { | |
1202 | + // let team_id2 = wx.getStorageSync('team_id'); | |
1203 | + // console.log('获取team_id', team_id2); | |
1204 | + // th.setData({ | |
1205 | + // team_id: team_id2, | |
1206 | + // // isSuccess: true, | |
1207 | + // }); | |
1208 | + // }; | |
1209 | + | |
1210 | + // th.setData({ | |
1211 | + // luckyGoInfo, | |
1212 | + // team_id, | |
1213 | + // }); | |
1214 | + | |
1215 | + }; | |
1216 | + | |
1217 | + }); | |
1218 | + | |
1219 | + if(th.data.param.from == 1) { | |
1220 | + team_id = th.data.param.team_id; | |
1221 | + } else { | |
1222 | + | |
1223 | + // 单独获取最新的team_id; | |
1224 | + await getApp().request.promiseGet("/api/weshop/prom/luckyOrder/getUserOrderLastInfo/" + o.stoid + "/" + user_id + "/" + th.data.param.group_id, { | |
1225 | + data: { | |
1226 | + } | |
1227 | + }).then(res => { | |
1228 | + | |
1229 | + if(res.data.code == 0) { | |
1230 | + | |
1231 | + // if(th.data.param.from == 1) { | |
1232 | + // team_id = luckyGoInfo.team_id; | |
1233 | + // } else { | |
1234 | + // team_id = res.data.data.team_id; | |
1177 | 1235 | // }; |
1178 | - // team_id = wx.getStorageSync('team_id'); | |
1236 | + | |
1237 | + team_id = res.data.data.team_id; | |
1238 | + | |
1239 | + | |
1240 | + th.setData({ | |
1241 | + team_id, | |
1242 | + }); | |
1243 | + | |
1179 | 1244 | }; |
1180 | 1245 | |
1181 | - th.setData({ | |
1182 | - luckyGoInfo, | |
1183 | - team_id, | |
1184 | - }); | |
1185 | - | |
1186 | - //参团成功后,检查team_id | |
1187 | - //如果team_id为0, 表示当前已开启新的一期,文字提示应改为’参团成功,本期幸运购已开团,中奖结果可点击下方查看参团列表‘ | |
1188 | - //如果team_id为0,取出之前保存的team_id替换掉,请求上一期已成团的幸运购活动 | |
1189 | - //如果从会员中心的幸运购列表邀请好友点击进来,不执行storage操作 | |
1190 | - if(th.data.param.from == 1) return false; | |
1191 | - // if(team_id > 0) { | |
1192 | - // wx.setStorage({ | |
1193 | - // key: 'team_id', | |
1194 | - // data: team_id, | |
1195 | - // }); | |
1196 | - // console.log('存储team_id', team_id); | |
1197 | - // } else { | |
1198 | - // let team_id2 = wx.getStorageSync('team_id'); | |
1199 | - // console.log('获取team_id', team_id2); | |
1200 | - // th.setData({ | |
1201 | - // team_id: team_id2, | |
1202 | - // // isSuccess: true, | |
1203 | - // }); | |
1204 | - // }; | |
1205 | - | |
1206 | - // th.setData({ | |
1207 | - // luckyGoInfo, | |
1208 | - // team_id, | |
1209 | - // }); | |
1210 | - | |
1211 | - }; | |
1246 | + }); | |
1212 | 1247 | |
1213 | - }); | |
1248 | + }; | |
1249 | + // wx.removeStorageSync('team_id'); | |
1250 | + | |
1251 | + | |
1214 | 1252 | |
1215 | 1253 | // 幸运购成团成员 |
1216 | 1254 | await getApp().request.promiseGet("/api/weshop/prom/luckyOrder/page", { |
1217 | 1255 | data: { |
1218 | 1256 | store_id: o.stoid, |
1219 | - team_id: this.data.team_id, | |
1257 | + team_id: team_id, | |
1220 | 1258 | } |
1221 | 1259 | }).then(res => { |
1222 | 1260 | if(res.data.code == 0) { |
1223 | - console.log('当前参团成员', res, self.data.team_id); | |
1261 | + console.log('当前参团成员', res, team_id); | |
1224 | 1262 | let myId = getApp().globalData.userInfo.user_id; |
1225 | 1263 | let luckyGoMembers = res.data.data.pageData; |
1226 | 1264 | th.setData({ |
... | ... | @@ -1230,7 +1268,10 @@ Page({ |
1230 | 1268 | self.isMe(myId, luckyGoMembers); |
1231 | 1269 | }; |
1232 | 1270 | |
1233 | - }); | |
1271 | + }); | |
1272 | + | |
1273 | + | |
1274 | + | |
1234 | 1275 | |
1235 | 1276 | }, |
1236 | 1277 | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
... | ... | @@ -922,7 +922,7 @@ |
922 | 922 | <!-- openSpecModel_pt --> |
923 | 923 | <view class="xc-ash-b f1 flex ai-center jc-center white fs26" wx:if="{{isTimeUp}}">活动已经结束</view> |
924 | 924 | <block wx:else> |
925 | - <view class="btn-red f1 flex ai-center jc-center" bindtap="go" data-it="0" data-url="/packageC/pages/luckyGo/luckyGo_details/luckyGo_details?group_id={{luckGoInfo.id}}&goods_id={{luckGoInfo.goods_id}}&goods_name={{data.goods_name}}&team_id={{buyInfo.team_id}}&&from=list" wx:if="{{showDetails}}">查看详情</view> | |
925 | + <view class="btn-red f1 flex ai-center jc-center" bindtap="go" data-it="0" data-url="/packageC/pages/luckyGo/luckyGo_details/luckyGo_details?group_id={{luckGoInfo.id}}&goods_id={{luckGoInfo.goods_id}}&goods_name={{data.goods_name}}&team_id={{buyInfo.team_id}}" wx:if="{{showDetails}}">查看详情</view> | |
926 | 926 | <view class="btn-red f1 flex ai-center jc-center" bindtap="openSpecModel_pt" data-it="0" wx:elif="{{!showDetails && surplus != 0 && canBuy}}">立即参团</view> |
927 | 927 | <view class="f1 flex ai-center jc-center xc-ash-b fs26 white" wx:elif="{{!showDetails && surplus == 0}}">已经抢光了</view> |
928 | 928 | <view class="f1 flex ai-center jc-center xc-ash-b fs26 white" wx:elif="{{!showDetails && surplus != 0 && !canBuy}}">已超限购次数</view> | ... | ... |
pages/index/index/index.wxss
pages/user/user_spsy/user_spsy.js
... | ... | @@ -83,7 +83,8 @@ Page({ |
83 | 83 | userId: getApp().globalData.user_id, |
84 | 84 | } |
85 | 85 | const res = await getApp().request.promiseGet("/api/weshop/users/grade/wechat/wares/page", { |
86 | - data: req_data | |
86 | + data: req_data, | |
87 | + isShowLoading:true, | |
87 | 88 | }); |
88 | 89 | |
89 | 90 | if (ut.ajax_ok(res)) { | ... | ... |
pages/user/userqy/userqy.wxml
... | ... | @@ -88,12 +88,13 @@ |
88 | 88 | </view> |
89 | 89 | </view> |
90 | 90 | |
91 | + | |
91 | 92 | <view class="project-frame"> |
92 | 93 | <view class="item t-c" wx:for="{{qy_list}}" data-no="{{item.PrivilegeType}}" |
93 | 94 | data-img="{{item.PrivilegeImageUrl}}" |
94 | 95 | bindtap="go_url" data-ind="{{index}}" data-name='{{item.PrivilegeName}}' > |
95 | 96 | <image class="xc-project-img {{item.ishas==1?'':'img_gray'}} " src="{{item.PrivilegeICOUrl}}"></image> |
96 | - <view class="three-level-word xc-project-word">{{item.PrivilegeName}}</view> | |
97 | + <view class="three-level-word xc-project-word ellipsis-1">{{item.PrivilegeName}}</view> | |
97 | 98 | </view> |
98 | 99 | </view> |
99 | 100 | </view> | ... | ... |