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,7 +217,8 @@ let imgDraw = { | ||
217 | 217 | ||
218 | Page({ | 218 | Page({ |
219 | data: { | 219 | data: { |
220 | - imgDraw: imgDraw, | 220 | + imgDraw: {}, |
221 | + | ||
221 | start: false, | 222 | start: false, |
222 | list: null, | 223 | list: null, |
223 | isLoading: false, // 检测是否已经发送请求,防止重复发送请求 | 224 | isLoading: false, // 检测是否已经发送请求,防止重复发送请求 |
@@ -257,21 +258,11 @@ Page({ | @@ -257,21 +258,11 @@ Page({ | ||
257 | }, | 258 | }, |
258 | 259 | ||
259 | onLoad(options) { | 260 | onLoad(options) { |
260 | - // wx.showLoading(); | ||
261 | - // this.setData({ | ||
262 | - // showMask2: true, | ||
263 | - // }); | ||
264 | - // console.log('imghost+++++', imghost); | ||
265 | self = this; | 261 | self = this; |
266 | let first_leader = null; | 262 | let first_leader = null; |
267 | this.data.options = options; | 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 | wx.setNavigationBarTitle({ | 266 | wx.setNavigationBarTitle({ |
276 | title: options.title, | 267 | title: options.title, |
277 | }); | 268 | }); |
@@ -303,11 +294,7 @@ Page({ | @@ -303,11 +294,7 @@ Page({ | ||
303 | } | 294 | } |
304 | }) | 295 | }) |
305 | }; | 296 | }; |
306 | - | ||
307 | - | ||
308 | - | ||
309 | - | ||
310 | - | 297 | + |
311 | }, | 298 | }, |
312 | 299 | ||
313 | onShow() { | 300 | onShow() { |
@@ -315,6 +302,7 @@ Page({ | @@ -315,6 +302,7 @@ Page({ | ||
315 | 302 | ||
316 | if(app.globalData.userInfo) { | 303 | if(app.globalData.userInfo) { |
317 | if(!this.data.isLogin) { | 304 | if(!this.data.isLogin) { |
305 | + | ||
318 | // 下载头像 | 306 | // 下载头像 |
319 | let path = app.globalData.userInfo.head_pic; | 307 | let path = app.globalData.userInfo.head_pic; |
320 | path = path.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | 308 | path = path.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); |
@@ -327,22 +315,33 @@ Page({ | @@ -327,22 +315,33 @@ Page({ | ||
327 | self.setData({ | 315 | self.setData({ |
328 | 'imgDraw.views[0].url': res.tempFilePath,//头像 | 316 | 'imgDraw.views[0].url': res.tempFilePath,//头像 |
329 | }); | 317 | }); |
318 | + | ||
330 | } | 319 | } |
331 | } | 320 | } |
332 | }); | 321 | }); |
333 | 322 | ||
323 | + | ||
334 | this.setData({ | 324 | this.setData({ |
325 | + imgDraw: imgDraw, | ||
335 | userInfo: app.globalData.userInfo, | 326 | userInfo: app.globalData.userInfo, |
336 | isLogin: true, | 327 | isLogin: true, |
337 | 'imgDraw.views[1].text': app.globalData.userInfo.nickname,//昵称 | 328 | 'imgDraw.views[1].text': app.globalData.userInfo.nickname,//昵称 |
338 | }); | 329 | }); |
330 | + | ||
331 | + | ||
339 | // console.log('imgDraw.views[1].text+++++++++', imgDraw.views[1], app.globalData.userInfo.nickname); | 332 | // console.log('imgDraw.views[1].text+++++++++', imgDraw.views[1], app.globalData.userInfo.nickname); |
340 | let user_id = app.globalData.userInfo.user_id; | 333 | let user_id = app.globalData.userInfo.user_id; |
341 | let store_id = app.globalData.setting.stoid; | 334 | let store_id = app.globalData.setting.stoid; |
342 | let id = this.data.options.id; | 335 | let id = this.data.options.id; |
343 | let url = `/api/weshop/marketing/marketingLuckForm/getLuckInfo/${store_id}/${id}/${user_id}`; | 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 | app.request.get(url, { | 347 | app.request.get(url, { |
@@ -369,6 +368,8 @@ Page({ | @@ -369,6 +368,8 @@ Page({ | ||
369 | // console.log('luckInfo', res.data.data); | 368 | // console.log('luckInfo', res.data.data); |
370 | let luckInfo = res.data.data; | 369 | let luckInfo = res.data.data; |
371 | 370 | ||
371 | + | ||
372 | + | ||
372 | self.setData({ | 373 | self.setData({ |
373 | 'imgDraw.views[3].text': self.data.luckInfo.act_name,//分享标题 | 374 | 'imgDraw.views[3].text': self.data.luckInfo.act_name,//分享标题 |
374 | // 'imgDraw.views[4].text': '快来一起抽奖吧,精美奖品等着你!',//分享内容 | 375 | // 'imgDraw.views[4].text': '快来一起抽奖吧,精美奖品等着你!',//分享内容 |
@@ -528,28 +529,27 @@ Page({ | @@ -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 | prizeLayout(award) { | 554 | prizeLayout(award) { |
555 | let prizes = []; | 555 | let prizes = []; |
@@ -768,7 +768,6 @@ Page({ | @@ -768,7 +768,6 @@ Page({ | ||
768 | // 根据lbtype指定奖品类别图标 | 768 | // 根据lbtype指定奖品类别图标 |
769 | prizeSrc(lbtype) { | 769 | prizeSrc(lbtype) { |
770 | let src = ''; | 770 | let src = ''; |
771 | - // let imghost = this.data.imghost; | ||
772 | switch(lbtype) { | 771 | switch(lbtype) { |
773 | case 1: { //积分 | 772 | case 1: { //积分 |
774 | src = imghost + 'miniapp/images/luckDraw/jf.png'; | 773 | src = imghost + 'miniapp/images/luckDraw/jf.png'; |
@@ -1310,13 +1309,14 @@ Page({ | @@ -1310,13 +1309,14 @@ Page({ | ||
1310 | title: '生成海报中', | 1309 | title: '生成海报中', |
1311 | }); | 1310 | }); |
1312 | setTimeout(function() { | 1311 | setTimeout(function() { |
1313 | - wx.hideLoading(); | ||
1314 | self.setData({ | 1312 | self.setData({ |
1315 | hiddenCanvas: true, | 1313 | hiddenCanvas: true, |
1316 | showMask: true, | 1314 | showMask: true, |
1317 | showPoster: true, | 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,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 | <view class="t-r pdb20 white2"><text class="iconfont icon-close fs40" bindtap="closePoster"></text></view> | 193 | <view class="t-r pdb20 white2"><text class="iconfont icon-close fs40" bindtap="closePoster"></text></view> |
194 | <image src="{{myimg}}" class="poster" show-menu-by-longpress lazy-load></image> | 194 | <image src="{{myimg}}" class="poster" show-menu-by-longpress lazy-load></image> |
195 | <view class="pdt10 fs26 white2"><text class="iconfont icon-zhiwen"></text> 长按图片保存至相册</view> | 195 | <view class="pdt10 fs26 white2"><text class="iconfont icon-zhiwen"></text> 长按图片保存至相册</view> |
packageB/pages/zuhegou/index/index.wxml
@@ -79,7 +79,7 @@ | @@ -79,7 +79,7 @@ | ||
79 | </block> | 79 | </block> |
80 | <block wx:else> | 80 | <block wx:else> |
81 | <view wx:if="{{all_num>0}}" class="t-c bg-fcfb c-fa8b2b fs28 pd20"> | 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 | </view> | 83 | </view> |
84 | <view wx:else class="t-c bg-fcfb c-fa8b2b fs28 pd20"> | 84 | <view wx:else class="t-c bg-fcfb c-fa8b2b fs28 pd20"> |
85 | 买{{act.zhbuyqty}}件,下单立享【{{act.zhprice}}元任选{{act.zhbuyqty}}件】 | 85 | 买{{act.zhbuyqty}}件,下单立享【{{act.zhprice}}元任选{{act.zhbuyqty}}件】 |