Commit d5cd7a75ecd755ca8e163908b35e8e91c17663a0
1 parent
a4acbec5
oa
Showing
5 changed files
with
57 additions
and
50 deletions
components/diy_picMax/diy_picMax.js
@@ -9,28 +9,36 @@ Component({ | @@ -9,28 +9,36 @@ Component({ | ||
9 | data: { | 9 | data: { |
10 | // 这里是一些组件内部数据 | 10 | // 这里是一些组件内部数据 |
11 | someData: {}, | 11 | someData: {}, |
12 | - pic_height:0,//图片组合的高度 | ||
13 | - is_yspan:0, //是否要严格按照比例来实现 | 12 | + pic_height: 0,//图片组合的高度 |
13 | + is_yspan: 0, //是否要严格按照比例来实现 | ||
14 | }, | 14 | }, |
15 | ready: function () { | 15 | ready: function () { |
16 | - //-- console.log(this.data.object.data) -- | ||
17 | - //-- 计算图片组合占用的高度 -- | ||
18 | - var height=0; | ||
19 | - var is_yspan=0; | ||
20 | - this.properties.object.data.forEach(function (val,ind) { | ||
21 | - if(val.fir.x==0){ | ||
22 | - height+=val.y_span*187; | ||
23 | - } | ||
24 | - if(val.y_span>1) is_yspan=1; | ||
25 | - | ||
26 | - }) | ||
27 | - this.setData({pic_height:height,is_yspan:is_yspan}) | 16 | + //-- console.log(this.data.object.data) -- |
17 | + //-- 计算图片组合占用的高度 -- | ||
18 | + var height = 0; | ||
19 | + var is_yspan = 0; | ||
20 | + this.properties.object.data.forEach(function (val, ind) { | ||
21 | + if (val.fir.x == 0) { | ||
22 | + height += val.y_span * 187; | ||
23 | + } | ||
24 | + if (val.y_span > 1) is_yspan = 1; | ||
25 | + | ||
26 | + }) | ||
27 | + this.setData({ pic_height: height, is_yspan: is_yspan }) | ||
28 | }, | 28 | }, |
29 | methods: { | 29 | methods: { |
30 | //-- 智能跳转到页面 -- | 30 | //-- 智能跳转到页面 -- |
31 | gopage(e) { | 31 | gopage(e) { |
32 | var url = e.currentTarget.dataset.url; | 32 | var url = e.currentTarget.dataset.url; |
33 | getApp().goto(url); | 33 | getApp().goto(url); |
34 | + }, | ||
35 | + | ||
36 | + previewImage(e){ | ||
37 | + let src =e.currentTarget.dataset.src; | ||
38 | + wx.previewImage({ | ||
39 | + current: src, // 当前显示图片的http链接 | ||
40 | + urls: [src] ,// 需要预览的图片http链接列表 | ||
41 | + }); | ||
34 | } | 42 | } |
35 | } | 43 | } |
36 | }) | 44 | }) |
37 | \ No newline at end of file | 45 | \ No newline at end of file |
components/diy_picMax/diy_picMax.wxml
1 | -<!--图片组合--> | 1 | +<!-- 图片组合 --> |
2 | <wxs module="g_filter" src="../diy_notice/g_filter.wxs"></wxs> | 2 | <wxs module="g_filter" src="../diy_notice/g_filter.wxs"></wxs> |
3 | <!-- 如果有纵向合并的时候,要求要按照绝对布局来实现 --> | 3 | <!-- 如果有纵向合并的时候,要求要按照绝对布局来实现 --> |
4 | <block wx:if="{{is_yspan}}"> | 4 | <block wx:if="{{is_yspan}}"> |
5 | - <view class="picMax2" style="height: {{pic_height}}rpx; font-size: 0" > | ||
6 | - <view wx:for="{{object.data}}" class="pic_item2 width_{{item.x_span}} height_{{item.y_span}} mar_x{{item.fir.x}} mar_y{{item.fir.y}} mgt2"> | ||
7 | - <block wx:if="{{g_filter.has_char(item.wxapp_url,'plugin')>=0}}" > | ||
8 | - <navigator url="{{item.wxapp_url}}"> | ||
9 | - <image src="{{item.src}}" style="display: block; height: 100%; width: 100%;" ></image> | ||
10 | - </navigator> | ||
11 | - </block> | ||
12 | - <block wx:else> | ||
13 | - <image bindtap='gopage' data-url="{{item.wxapp_url}}" src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image> | ||
14 | - </block> | ||
15 | - </view> | ||
16 | - </view> | ||
17 | -</block> | ||
18 | -<block wx:else> | ||
19 | -<view class="picMax" > | ||
20 | - <view wx:for="{{object.data}}" class="pic_item width_{{item.x_span}} mgt2"> | ||
21 | - <block wx:if="{{g_filter.has_char(item.wxapp_url,'plugin')>=0}}" > | ||
22 | - <navigator url="{{item.wxapp_url}}"> | ||
23 | - <image src="{{item.src}}" mode="widthFix" style="display: block;" ></image> | ||
24 | - </navigator> | ||
25 | - </block> | ||
26 | - <block wx:else> | ||
27 | - <image bindtap='gopage' data-url="{{item.wxapp_url}}" src="{{item.src}}" mode="widthFix" style="display: block;" ></image> | ||
28 | - </block> | ||
29 | - </view> | ||
30 | - <view class="picMax-clear"></view> | ||
31 | -</view> | ||
32 | - | ||
33 | - | 5 | + <view class="picMax2" style="height: {{pic_height}}rpx; font-size: 0"> |
6 | + <view wx:for="{{object.data}}" class="pic_item2 width_{{item.x_span}} height_{{item.y_span}} mar_x{{item.fir.x}} mar_y{{item.fir.y}} mgt2"> | ||
7 | + <block wx:if="{{g_filter.has_char(item.wxapp_url,'plugin')>=0}}"> | ||
8 | + <navigator url="{{item.wxapp_url}}"> | ||
9 | + <image src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image> | ||
10 | + </navigator> | ||
11 | + </block> | ||
12 | + <block wx:else> | ||
13 | + <image bindtap='gopage' wx:if="{{item.wxapp_url}}" data-url="{{item.wxapp_url}}" src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image> | ||
14 | + <image bindtap='previewImage' wx:else data-src="{{item.src}}" src="{{item.src}}" style="display: block; height: 100%; width: 100%;"></image> | ||
15 | + </block> | ||
16 | + </view> | ||
17 | + </view> | ||
34 | </block> | 18 | </block> |
19 | +<block wx:else> | ||
20 | + <view class="picMax"> | ||
21 | + <view wx:for="{{object.data}}" class="pic_item width_{{item.x_span}} mgt2"> | ||
22 | + <block wx:if="{{g_filter.has_char(item.wxapp_url,'plugin')>=0}}"> | ||
23 | + <navigator url="{{item.wxapp_url}}"> | ||
24 | + <image src="{{item.src}}" mode="widthFix" style="display: block;"></image> | ||
25 | + </navigator> | ||
26 | + </block> | ||
27 | + <block wx:else> | ||
28 | + <image bindtap='gopage' data-url="{{item.wxapp_url}}" src="{{item.src}}" mode="widthFix" style="display: block;"></image> | ||
29 | + </block> | ||
30 | + </view> | ||
31 | + <view class="picMax-clear"></view> | ||
32 | + </view> | ||
33 | +</block> | ||
35 | \ No newline at end of file | 34 | \ No newline at end of file |
pages/cart/cart2/cart2.js
@@ -408,7 +408,7 @@ Page({ | @@ -408,7 +408,7 @@ Page({ | ||
408 | 408 | ||
409 | //-----真的获取购物车,入口-------- | 409 | //-----真的获取购物车,入口-------- |
410 | get_cart: function () { | 410 | get_cart: function () { |
411 | - var th = this, app = getApp(); | 411 | + var th = this, app = getApp(); |
412 | var state = 0; | 412 | var state = 0; |
413 | if (th.data.state) state = 1; | 413 | if (th.data.state) state = 1; |
414 | a.get("/api/weshop/cart/list", { | 414 | a.get("/api/weshop/cart/list", { |
@@ -3794,8 +3794,8 @@ Page({ | @@ -3794,8 +3794,8 @@ Page({ | ||
3794 | 3794 | ||
3795 | for (var i in goodlist) { | 3795 | for (var i in goodlist) { |
3796 | var gd = goodlist[i]; | 3796 | var gd = goodlist[i]; |
3797 | - //--如果是秒杀就跳出,如果是赠品,如果是组合购,如果是限制使用优惠券-- | ||
3798 | - if (gd.prom_type == 1 || gd.is_gift || (gd.prom_type == 7 && gd.act.is_xz_yh)) { | 3797 | + //--如果是秒杀就跳出,如果是赠品,如果是组合购限制使用优惠券-- |
3798 | + if (gd.prom_type == 1 || gd.is_gift || (gd.prom_type == 7 && gd.act.is_xz_yh) || gd.is_xz_yh == 1) { | ||
3799 | continue; | 3799 | continue; |
3800 | } | 3800 | } |
3801 | 3801 | ||
@@ -3811,7 +3811,7 @@ Page({ | @@ -3811,7 +3811,7 @@ Page({ | ||
3811 | } | 3811 | } |
3812 | } | 3812 | } |
3813 | 3813 | ||
3814 | - //--如果是团购,要判断有没有限制使用优惠券 | 3814 | + //--如果是阶梯购,要判断有没有限制使用优惠券 |
3815 | if (gd.prom_type == 10) { | 3815 | if (gd.prom_type == 10) { |
3816 | var prom1 = null; | 3816 | var prom1 = null; |
3817 | await getApp().request.promiseGet("/api/weshop/prom/ladderForm/getNew/" + os.stoid + "/" + user_id + "/" + gd.prom_id, { | 3817 | await getApp().request.promiseGet("/api/weshop/prom/ladderForm/getNew/" + os.stoid + "/" + user_id + "/" + gd.prom_id, { |
pages/goods/goodsInfo/goodsInfo.js
@@ -3566,7 +3566,7 @@ Page({ | @@ -3566,7 +3566,7 @@ Page({ | ||
3566 | data: get_datas | 3566 | data: get_datas |
3567 | }).then(res => { | 3567 | }).then(res => { |
3568 | if (res.data.code == 0) { | 3568 | if (res.data.code == 0) { |
3569 | - integrals = res.data.data.Integral; | 3569 | + integrals = res.data.data?.Integral?res.data.data?.Integral:0; |
3570 | } | 3570 | } |
3571 | }) | 3571 | }) |
3572 | 3572 |
pages/goods/goodsInfo/goodsInfo.wxml
@@ -596,7 +596,7 @@ | @@ -596,7 +596,7 @@ | ||
596 | </block> | 596 | </block> |
597 | </block> | 597 | </block> |
598 | <!-- 许程 7.24暂时注释 --> | 598 | <!-- 许程 7.24暂时注释 --> |
599 | - <view class="bdt16" wx:if="{{prom_type!=1&& prom_type!=1 && prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1}}"> | 599 | + <view class="bdt16" wx:if="{{prom_type!=1&& prom_type!=1 && prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1 && sele_g.is_xz_yh !=1}}"> |
600 | <view class="cx-frame flex" style="position: relative" wx:if="{{fir_quan.length>0}}"> | 600 | <view class="cx-frame flex" style="position: relative" wx:if="{{fir_quan.length>0}}"> |
601 | <view class="cx-sizs fs30">领券</view> | 601 | <view class="cx-sizs fs30">领券</view> |
602 | <view class="flex ai_c f1 pdh20"> | 602 | <view class="flex ai_c f1 pdh20"> |