Commit f20759042977c07f9e8e059810b4c93884acbda6
Merge branch 'dev' into 'test'
Dev See merge request !717
Showing
3 changed files
with
37 additions
and
37 deletions
packageB/pages/luckactivity/luckinfo/luckinfo.js
... | ... | @@ -217,7 +217,8 @@ let imgDraw = { |
217 | 217 | |
218 | 218 | Page({ |
219 | 219 | data: { |
220 | - imgDraw: imgDraw, | |
220 | + imgDraw: {}, | |
221 | + | |
221 | 222 | start: false, |
222 | 223 | list: null, |
223 | 224 | isLoading: false, // 检测是否已经发送请求,防止重复发送请求 |
... | ... | @@ -257,21 +258,11 @@ Page({ |
257 | 258 | }, |
258 | 259 | |
259 | 260 | onLoad(options) { |
260 | - // wx.showLoading(); | |
261 | - // this.setData({ | |
262 | - // showMask2: true, | |
263 | - // }); | |
264 | - // console.log('imghost+++++', imghost); | |
265 | 261 | self = this; |
266 | 262 | let first_leader = null; |
267 | 263 | this.data.options = options; |
268 | 264 | |
269 | 265 | |
270 | - // this.setData({ | |
271 | - // options, | |
272 | - // imghost, | |
273 | - // }); | |
274 | - // console.log('this data', this.data.imghost); | |
275 | 266 | wx.setNavigationBarTitle({ |
276 | 267 | title: options.title, |
277 | 268 | }); |
... | ... | @@ -303,11 +294,7 @@ Page({ |
303 | 294 | } |
304 | 295 | }) |
305 | 296 | }; |
306 | - | |
307 | - | |
308 | - | |
309 | - | |
310 | - | |
297 | + | |
311 | 298 | }, |
312 | 299 | |
313 | 300 | onShow() { |
... | ... | @@ -315,6 +302,7 @@ Page({ |
315 | 302 | |
316 | 303 | if(app.globalData.userInfo) { |
317 | 304 | if(!this.data.isLogin) { |
305 | + | |
318 | 306 | // 下载头像 |
319 | 307 | let path = app.globalData.userInfo.head_pic; |
320 | 308 | path = path.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); |
... | ... | @@ -327,22 +315,33 @@ Page({ |
327 | 315 | self.setData({ |
328 | 316 | 'imgDraw.views[0].url': res.tempFilePath,//头像 |
329 | 317 | }); |
318 | + | |
330 | 319 | } |
331 | 320 | } |
332 | 321 | }); |
333 | 322 | |
323 | + | |
334 | 324 | this.setData({ |
325 | + imgDraw: imgDraw, | |
335 | 326 | userInfo: app.globalData.userInfo, |
336 | 327 | isLogin: true, |
337 | 328 | 'imgDraw.views[1].text': app.globalData.userInfo.nickname,//昵称 |
338 | 329 | }); |
330 | + | |
331 | + | |
339 | 332 | // console.log('imgDraw.views[1].text+++++++++', imgDraw.views[1], app.globalData.userInfo.nickname); |
340 | 333 | let user_id = app.globalData.userInfo.user_id; |
341 | 334 | let store_id = app.globalData.setting.stoid; |
342 | 335 | let id = this.data.options.id; |
343 | 336 | let url = `/api/weshop/marketing/marketingLuckForm/getLuckInfo/${store_id}/${id}/${user_id}`; |
344 | 337 | |
345 | - | |
338 | + //获取小程序码 | |
339 | + this.getMiniCode({ | |
340 | + url: app.globalData.setting.url, | |
341 | + store_id: app.globalData.setting.stoid, | |
342 | + user_id: app.globalData.userInfo.user_id, | |
343 | + id: this.data.options.id, | |
344 | + }); | |
346 | 345 | |
347 | 346 | |
348 | 347 | app.request.get(url, { |
... | ... | @@ -369,6 +368,8 @@ Page({ |
369 | 368 | // console.log('luckInfo', res.data.data); |
370 | 369 | let luckInfo = res.data.data; |
371 | 370 | |
371 | + | |
372 | + | |
372 | 373 | self.setData({ |
373 | 374 | 'imgDraw.views[3].text': self.data.luckInfo.act_name,//分享标题 |
374 | 375 | // 'imgDraw.views[4].text': '快来一起抽奖吧,精美奖品等着你!',//分享内容 |
... | ... | @@ -528,28 +529,27 @@ Page({ |
528 | 529 | }, |
529 | 530 | }); |
530 | 531 | |
531 | - let mainUrl = app.globalData.setting.url; | |
532 | - // let stoid = app.globalData.setting.stoid; | |
533 | - let cj_id = this.data.options.id; | |
534 | - // let user_id = app.globalData.userInfo.user_id; | |
535 | 532 | |
536 | - wx.getImageInfo({ | |
537 | - src: `${mainUrl}/api/wx/open/app/user/getWeAppEwm/${store_id}?sceneValue=${user_id}_${cj_id}&pageValue=pages/index/index/index`, | |
538 | - success (res) { | |
539 | - if(res.code != -1) { | |
540 | - self.setData({ | |
541 | - 'imgDraw.views[16].url': res.path, | |
542 | - }); | |
543 | - }; | |
544 | - | |
545 | - } | |
546 | - }); | |
547 | 533 | |
548 | 534 | |
549 | 535 | }; |
550 | 536 | }; |
551 | 537 | }, |
552 | 538 | |
539 | + //获取小程序码 | |
540 | + getMiniCode(objData) { | |
541 | + wx.getImageInfo({ | |
542 | + src: `${objData.url}/api/wx/open/app/user/getWeAppEwm/${objData.store_id}?sceneValue=${objData.user_id}_${objData.id}&pageValue=pages/index/index/index`, | |
543 | + success (res) { | |
544 | + if(res.code != -1) { | |
545 | + self.setData({ | |
546 | + 'imgDraw.views[16].url': res.path, | |
547 | + }); | |
548 | + }; | |
549 | + } | |
550 | + }); | |
551 | + }, | |
552 | + | |
553 | 553 | // 设置转盘奖品布局 |
554 | 554 | prizeLayout(award) { |
555 | 555 | let prizes = []; |
... | ... | @@ -768,7 +768,6 @@ Page({ |
768 | 768 | // 根据lbtype指定奖品类别图标 |
769 | 769 | prizeSrc(lbtype) { |
770 | 770 | let src = ''; |
771 | - // let imghost = this.data.imghost; | |
772 | 771 | switch(lbtype) { |
773 | 772 | case 1: { //积分 |
774 | 773 | src = imghost + 'miniapp/images/luckDraw/jf.png'; |
... | ... | @@ -1310,13 +1309,14 @@ Page({ |
1310 | 1309 | title: '生成海报中', |
1311 | 1310 | }); |
1312 | 1311 | setTimeout(function() { |
1313 | - wx.hideLoading(); | |
1314 | 1312 | self.setData({ |
1315 | 1313 | hiddenCanvas: true, |
1316 | 1314 | showMask: true, |
1317 | 1315 | showPoster: true, |
1318 | 1316 | }); |
1319 | - }, 3000); | |
1317 | + wx.hideLoading(); | |
1318 | + }, 3000) | |
1319 | + | |
1320 | 1320 | |
1321 | 1321 | }, |
1322 | 1322 | ... | ... |
packageB/pages/luckactivity/luckinfo/luckinfo.wxml
... | ... | @@ -189,7 +189,7 @@ |
189 | 189 | |
190 | 190 | |
191 | 191 | <!-- 海报 --> |
192 | - <view class="poster-container" wx:if="{{showPoster}}"> | |
192 | + <view class="poster-container" hidden="{{!showPoster}}"> | |
193 | 193 | <view class="t-r pdb20 white2"><text class="iconfont icon-close fs40" bindtap="closePoster"></text></view> |
194 | 194 | <image src="{{myimg}}" class="poster" show-menu-by-longpress lazy-load></image> |
195 | 195 | <view class="pdt10 fs26 white2"><text class="iconfont icon-zhiwen"></text> 长按图片保存至相册</view> | ... | ... |
packageB/pages/zuhegou/index/index.wxml
... | ... | @@ -79,7 +79,7 @@ |
79 | 79 | </block> |
80 | 80 | <block wx:else> |
81 | 81 | <view wx:if="{{all_num>0}}" class="t-c bg-fcfb c-fa8b2b fs28 pd20"> |
82 | - 再买{{act.zhbuyqty-all_num>need_to_buy?act.zhbuyqty-all_num:need_to_buy}}件,{{need_to_buy}}下单立享【{{act.zhprice}}元任选{{act.zhbuyqty}}件】 | |
82 | + 再买{{act.zhbuyqty-all_num>need_to_buy?act.zhbuyqty-all_num:need_to_buy}}件,下单立享【{{act.zhprice}}元任选{{act.zhbuyqty}}件】 | |
83 | 83 | </view> |
84 | 84 | <view wx:else class="t-c bg-fcfb c-fa8b2b fs28 pd20"> |
85 | 85 | 买{{act.zhbuyqty}}件,下单立享【{{act.zhprice}}元任选{{act.zhbuyqty}}件】 | ... | ... |