Commit 5033cd7c2b6b6c6e643848ddcc28b74f22f2e776
1 parent
f89865a6
大转盘增加门店选择1
Showing
4 changed files
with
51 additions
and
9 deletions
components/store_popup/store_popup.wxml
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | <block wx:if="{{choice_sort_store==0}}"> | 28 | <block wx:if="{{choice_sort_store==0}}"> |
| 29 | <!-- 需要for循环 --> | 29 | <!-- 需要for循环 --> |
| 30 | <block wx:if="{{is_show_sto_cat==1}}"> | 30 | <block wx:if="{{is_show_sto_cat==1}}"> |
| 31 | - <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | 31 | + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" wx:key="{{index}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> |
| 32 | <view class="store flex-vertical"> | 32 | <view class="store flex-vertical"> |
| 33 | <!-- 需要点击事件 --> | 33 | <!-- 需要点击事件 --> |
| 34 | <block wx:if="{{index==fir_pick_index}}"> | 34 | <block wx:if="{{index==fir_pick_index}}"> |
| @@ -54,7 +54,7 @@ | @@ -54,7 +54,7 @@ | ||
| 54 | </view> | 54 | </view> |
| 55 | </block> | 55 | </block> |
| 56 | <block wx:else> | 56 | <block wx:else> |
| 57 | - <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | 57 | + <view class="store_choose flex" wx:for="{{only_pk}}" wx:key="{{index}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> |
| 58 | <view class="store flex-vertical"> | 58 | <view class="store flex-vertical"> |
| 59 | <!-- 需要点击事件 --> | 59 | <!-- 需要点击事件 --> |
| 60 | <block wx:if="{{index==fir_pick_index}}"> | 60 | <block wx:if="{{index==fir_pick_index}}"> |
| @@ -82,7 +82,7 @@ | @@ -82,7 +82,7 @@ | ||
| 82 | </block> | 82 | </block> |
| 83 | <block wx:else> | 83 | <block wx:else> |
| 84 | <!-- 如果是点击选择门店分类后显示分类下的门店 --> | 84 | <!-- 如果是点击选择门店分类后显示分类下的门店 --> |
| 85 | - <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store"> | 85 | + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" wx:key="{{index}}" data-ind="{{index}}" bindtap="choose_for_store"> |
| 86 | <view class="store flex-vertical"> | 86 | <view class="store flex-vertical"> |
| 87 | <!-- 需要点击事件 --> | 87 | <!-- 需要点击事件 --> |
| 88 | <block wx:if="{{index==sec_pick_index}}"> | 88 | <block wx:if="{{index==sec_pick_index}}"> |
| @@ -133,7 +133,7 @@ | @@ -133,7 +133,7 @@ | ||
| 133 | </view> | 133 | </view> |
| 134 | </view> | 134 | </view> |
| 135 | <view class="sort_store_list"> | 135 | <view class="sort_store_list"> |
| 136 | - <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}"> | 136 | + <view class="sort-store-frame" wx:for="{{all_sto}}" wx:key="{{index}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}"> |
| 137 | <view class="sort-store flex-vertical-between"> | 137 | <view class="sort-store flex-vertical-between"> |
| 138 | <view class="fs30" di>{{item.name}}</view> | 138 | <view class="fs30" di>{{item.name}}</view> |
| 139 | <view class="black_rights-frame"> | 139 | <view class="black_rights-frame"> |
packageB/pages/luckactivity/luckinfo/luckinfo.js
| @@ -228,8 +228,7 @@ Page({ | @@ -228,8 +228,7 @@ Page({ | ||
| 228 | imghost: imghost, | 228 | imghost: imghost, |
| 229 | num: 3, | 229 | num: 3, |
| 230 | canStart: false, | 230 | canStart: false, |
| 231 | - | ||
| 232 | - | 231 | + // store:1, |
| 233 | prizes: [], | 232 | prizes: [], |
| 234 | defaultConfig: { | 233 | defaultConfig: { |
| 235 | offsetDegree: 22.5, | 234 | offsetDegree: 22.5, |
| @@ -1134,7 +1133,47 @@ Page({ | @@ -1134,7 +1133,47 @@ Page({ | ||
| 1134 | 1133 | ||
| 1135 | 1134 | ||
| 1136 | }, | 1135 | }, |
| 1137 | - | 1136 | + //门店回调 |
| 1137 | + async callback(e){ | ||
| 1138 | + let item = e.detail; | ||
| 1139 | + console.log('门店信息'); | ||
| 1140 | + console.log(item); | ||
| 1141 | + if (item && item.pickup_no) { | ||
| 1142 | + // let qr_code_object=this.data.qr_code_object | ||
| 1143 | + // let data={ | ||
| 1144 | + // store_id:os.stoid,//商家编号 | ||
| 1145 | + // user_id:getApp().globalData.user_id, //会员编号 | ||
| 1146 | + // storageId:item.keyid, | ||
| 1147 | + // writeOffCode:qr_code_object.WriteOffCode,//核销码 | ||
| 1148 | + // } | ||
| 1149 | + // let res = await getApp().request.promisePut("/api/weshop/users/grade/storage/update", { | ||
| 1150 | + // data: data | ||
| 1151 | + // }); | ||
| 1152 | + // if (res && res.data && res.data.code==0) { | ||
| 1153 | + // let text='qr_code_object.StorageID' | ||
| 1154 | + // this.setData({ | ||
| 1155 | + // [text]:item.keyid | ||
| 1156 | + // }) | ||
| 1157 | + // }else{ | ||
| 1158 | + // wx.showToast({ | ||
| 1159 | + // title: '门店选择失败', | ||
| 1160 | + // icon: 'none', | ||
| 1161 | + // duration: 2000 | ||
| 1162 | + // }) | ||
| 1163 | + // } | ||
| 1164 | + }else{ | ||
| 1165 | + wx.showToast({ | ||
| 1166 | + title: '门店选择失败', | ||
| 1167 | + icon: 'none', | ||
| 1168 | + duration: 2000 | ||
| 1169 | + }) | ||
| 1170 | + } | ||
| 1171 | + }, | ||
| 1172 | + select_product(){ | ||
| 1173 | + this.setData({ | ||
| 1174 | + store:1 | ||
| 1175 | + }) | ||
| 1176 | + }, | ||
| 1138 | showPopup() { | 1177 | showPopup() { |
| 1139 | this.setData({ | 1178 | this.setData({ |
| 1140 | list: null, | 1179 | list: null, |
packageB/pages/luckactivity/luckinfo/luckinfo.json
| @@ -2,7 +2,8 @@ | @@ -2,7 +2,8 @@ | ||
| 2 | "usingComponents": { | 2 | "usingComponents": { |
| 3 | "lucky-wheel":"/packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index", | 3 | "lucky-wheel":"/packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index", |
| 4 | "qrcode": "/components/my-qrcode/my-qrcode", | 4 | "qrcode": "/components/my-qrcode/my-qrcode", |
| 5 | - "nodata": "/components/nodata/nodata", | 5 | + "nodata": "/components/nodata/nodata", |
| 6 | + "store_popup":"/components/store_popup/store_popup", | ||
| 6 | "painter": "/packageB/components/painter/painter" | 7 | "painter": "/packageB/components/painter/painter" |
| 7 | }, | 8 | }, |
| 8 | "enablePullDownRefresh": false, | 9 | "enablePullDownRefresh": false, |
packageB/pages/luckactivity/luckinfo/luckinfo.wxml
| @@ -179,7 +179,7 @@ | @@ -179,7 +179,7 @@ | ||
| 179 | </view> | 179 | </view> |
| 180 | 180 | ||
| 181 | <view class="pdt40" wx:if="{{currentLbtype == 5}}"> | 181 | <view class="pdt40" wx:if="{{currentLbtype == 5}}"> |
| 182 | - <view class="btn btn2" bindtap="clickReceive">立即兑换</view> | 182 | + <view class="btn btn2" bindtap="select_product">立即兑换</view> |
| 183 | </view> | 183 | </view> |
| 184 | 184 | ||
| 185 | 185 | ||
| @@ -201,5 +201,7 @@ | @@ -201,5 +201,7 @@ | ||
| 201 | 201 | ||
| 202 | <qrcode id="qrcode" bind:close="closeQr"></qrcode> | 202 | <qrcode id="qrcode" bind:close="closeQr"></qrcode> |
| 203 | 203 | ||
| 204 | +<!-- 门店选择弹窗 --> | ||
| 205 | +<store_popup store="{{store}}" bindcallback="callback" ></store_popup> | ||
| 204 | 206 | ||
| 205 | <painter style="position: absolute;left: -9999rpx;" palette="{{imgDraw}}" bind:imgOK="onImgOK"/> | 207 | <painter style="position: absolute;left: -9999rpx;" palette="{{imgDraw}}" bind:imgOK="onImgOK"/> |
| 206 | \ No newline at end of file | 208 | \ No newline at end of file |