Commit 5033cd7c2b6b6c6e643848ddcc28b74f22f2e776

Authored by 前端开发-罗建龙
1 parent f89865a6

大转盘增加门店选择1

components/store_popup/store_popup.wxml
... ... @@ -28,7 +28,7 @@
28 28 <block wx:if="{{choice_sort_store==0}}">
29 29 <!-- 需要for循环 -->
30 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 32 <view class="store flex-vertical">
33 33 <!-- 需要点击事件 -->
34 34 <block wx:if="{{index==fir_pick_index}}">
... ... @@ -54,7 +54,7 @@
54 54 </view>
55 55 </block>
56 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 58 <view class="store flex-vertical">
59 59 <!-- 需要点击事件 -->
60 60 <block wx:if="{{index==fir_pick_index}}">
... ... @@ -82,7 +82,7 @@
82 82 </block>
83 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 86 <view class="store flex-vertical">
87 87 <!-- 需要点击事件 -->
88 88 <block wx:if="{{index==sec_pick_index}}">
... ... @@ -133,7 +133,7 @@
133 133 </view>
134 134 </view>
135 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 137 <view class="sort-store flex-vertical-between">
138 138 <view class="fs30" di>{{item.name}}</view>
139 139 <view class="black_rights-frame">
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.js
... ... @@ -228,8 +228,7 @@ Page({
228 228 imghost: imghost,
229 229 num: 3,
230 230 canStart: false,
231   -
232   -
  231 + // store:1,
233 232 prizes: [],
234 233 defaultConfig: {
235 234 offsetDegree: 22.5,
... ... @@ -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 1177 showPopup() {
1139 1178 this.setData({
1140 1179 list: null,
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.json
... ... @@ -2,7 +2,8 @@
2 2 "usingComponents": {
3 3 "lucky-wheel":"/packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index",
4 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 7 "painter": "/packageB/components/painter/painter"
7 8 },
8 9 "enablePullDownRefresh": false,
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.wxml
... ... @@ -179,7 +179,7 @@
179 179 </view>
180 180  
181 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 183 </view>
184 184  
185 185  
... ... @@ -201,5 +201,7 @@
201 201  
202 202 <qrcode id="qrcode" bind:close="closeQr"></qrcode>
203 203  
  204 +<!-- 门店选择弹窗 -->
  205 +<store_popup store="{{store}}" bindcallback="callback" ></store_popup>
204 206  
205 207 <painter style="position: absolute;left: -9999rpx;" palette="{{imgDraw}}" bind:imgOK="onImgOK"/>
206 208 \ No newline at end of file
... ...