Commit a565a272b327b99f1d68c944327766394b78a6f2
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
3 changed files
with
22 additions
and
14 deletions
packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index.js
@@ -314,15 +314,18 @@ Component({ | @@ -314,15 +314,18 @@ Component({ | ||
314 | this.toPlay(x, y); | 314 | this.toPlay(x, y); |
315 | }, | 315 | }, |
316 | toPlay: function toPlay(x, y) { | 316 | toPlay: function toPlay(x, y) { |
317 | - var ctx = this.ctx; | ||
318 | - ctx.beginPath(); | ||
319 | - ctx.arc(0, 0, this.$lucky.maxBtnRadius, 0, Math.PI * 2, false); | ||
320 | - if (!ctx.isPointInPath(x * this.dpr, y * this.dpr)) return; | ||
321 | - // 隐藏图片并显示canvas | ||
322 | - this.showCanvas = true; | ||
323 | - this.setData({ luckyImg: '' }); | ||
324 | - // 触发 lucky-canvas 的抽奖逻辑 | ||
325 | - this.$lucky.startCallback(); | 317 | + var th=this; |
318 | + setTimeout(function () { | ||
319 | + var ctx = th.ctx; | ||
320 | + ctx.beginPath(); | ||
321 | + ctx.arc(0, 0, th.$lucky.maxBtnRadius, 0, Math.PI * 2, false); | ||
322 | + if (!ctx.isPointInPath(x * th.dpr, y * th.dpr)) return; | ||
323 | + // 隐藏图片并显示canvas | ||
324 | + th.showCanvas = true; | ||
325 | + th.setData({ luckyImg: '' }); | ||
326 | + // 触发 lucky-canvas 的抽奖逻辑 | ||
327 | + th.$lucky.startCallback(); | ||
328 | + },400) | ||
326 | }, | 329 | }, |
327 | play: function play() { | 330 | play: function play() { |
328 | var _$lucky; | 331 | var _$lucky; |
packageB/pages/user/choice_guide/choice_guide.js
1 | var a = getApp(), | 1 | var a = getApp(), |
2 | os = a.globalData.setting, | 2 | os = a.globalData.setting, |
3 | - util = require("../../../utils/util.js"), | 3 | + util = require("../../../../utils/util.js"), |
4 | ut = util; | 4 | ut = util; |
5 | Page({ | 5 | Page({ |
6 | data: { | 6 | data: { |
@@ -28,7 +28,6 @@ Page({ | @@ -28,7 +28,6 @@ Page({ | ||
28 | onShareAppMessage: function(t) { | 28 | onShareAppMessage: function(t) { |
29 | return o.share; | 29 | return o.share; |
30 | }, | 30 | }, |
31 | - | ||
32 | get_list: function() { | 31 | get_list: function() { |
33 | var th = this, e = th; | 32 | var th = this, e = th; |
34 | var r_data={ | 33 | var r_data={ |
pages/goods/categoryList/categoryList.wxml
@@ -48,7 +48,10 @@ | @@ -48,7 +48,10 @@ | ||
48 | <view class='f_item' | 48 | <view class='f_item' |
49 | bindtap="go_nation" data-nid="{{bitem.id}}" | 49 | bindtap="go_nation" data-nid="{{bitem.id}}" |
50 | wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx"> | 50 | wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx"> |
51 | - <view><image class='n_img' src='{{iurl}}{{bitem.logo}}'></image> | 51 | + <view> |
52 | + <image wx:if="{{bitem.imgtype==1}}" class='n_img' src='{{bitem.logo}}'></image> | ||
53 | + <image wx:else class='n_img' src='{{iurl}}{{bitem.logo}}'></image> | ||
54 | + | ||
52 | <view class='nation_box'> | 55 | <view class='nation_box'> |
53 | <view class='nt_1'><text class="nt_1_t">{{bitem.name}}</text></view> | 56 | <view class='nt_1'><text class="nt_1_t">{{bitem.name}}</text></view> |
54 | <view class='nt_2'>{{bitem.enname}}</view> | 57 | <view class='nt_2'>{{bitem.enname}}</view> |
@@ -165,7 +168,9 @@ | @@ -165,7 +168,9 @@ | ||
165 | </view> | 168 | </view> |
166 | <view class=" classify_content-frame flex-space-between " > | 169 | <view class=" classify_content-frame flex-space-between " > |
167 | <view bindtap="go_nation" class="country_img-frame rel outer_location"wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx" data-nid="{{bitem.id}}" > | 170 | <view bindtap="go_nation" class="country_img-frame rel outer_location"wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx" data-nid="{{bitem.id}}" > |
168 | - <image class="country_img" src="{{iurl}}{{bitem.logo}}"></image> | 171 | + <image wx:if="{{bitem.imgtype==1}}" class="country_img" src="{{bitem.logo}}"></image> |
172 | + <image wx:else class="country_img" src="{{iurl}}{{bitem.logo}}"></image> | ||
173 | + | ||
169 | <view class='nation_box abs box'> | 174 | <view class='nation_box abs box'> |
170 | <view class='nt_1 t-c line-height' style="height:50rpx"> | 175 | <view class='nt_1 t-c line-height' style="height:50rpx"> |
171 | <text class="nation_z_name ellipsis-1 nt_1_t height fs24">{{bitem.name}}</text> | 176 | <text class="nation_z_name ellipsis-1 nt_1_t height fs24">{{bitem.name}}</text> |
@@ -349,7 +354,8 @@ | @@ -349,7 +354,8 @@ | ||
349 | </view> | 354 | </view> |
350 | <view class=" classify_content-frame flex-space-between " > | 355 | <view class=" classify_content-frame flex-space-between " > |
351 | <view bindtap="go_nation" class="country_img-frame rel outer_location"wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx" data-nid="{{bitem.id}}" > | 356 | <view bindtap="go_nation" class="country_img-frame rel outer_location"wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx" data-nid="{{bitem.id}}" > |
352 | - <image class="country_img" src="{{iurl}}{{bitem.logo}}"></image> | 357 | + <image wx:if="{{bitem.imgtype==1}}" class="country_img" src="{{bitem.logo}}"></image> |
358 | + <image wx:else class="country_img" src="{{iurl}}{{bitem.logo}}"></image> | ||
353 | <view class='nation_box abs box'> | 359 | <view class='nation_box abs box'> |
354 | <view class='nt_1 t-c line-height' style="height:50rpx"> | 360 | <view class='nt_1 t-c line-height' style="height:50rpx"> |
355 | <text class="nation_z_name ellipsis-1 nt_1_t height fs24">{{bitem.name}}</text> | 361 | <text class="nation_z_name ellipsis-1 nt_1_t height fs24">{{bitem.name}}</text> |