Commit 1344a239c83e535921fb1ce6b1ba1bbd17bb1a07

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

优化

components/add_purchase/add_purchase.js
@@ -120,6 +120,7 @@ Component({ @@ -120,6 +120,7 @@ Component({
120 all_pick_list: null, //所有的门店先记录起来 120 all_pick_list: null, //所有的门店先记录起来
121 fir_def_store: null, //客户默认的门店的 121 fir_def_store: null, //客户默认的门店的
122 keyword: '', //门店搜索 122 keyword: '', //门店搜索
  123 + is_no_new: 1,
123 }, 124 },
124 125
125 /** 126 /**
@@ -3771,6 +3772,7 @@ Component({ @@ -3771,6 +3772,7 @@ Component({
3771 }, 3772 },
3772 //-- 选择规格下一步 -- 3773 //-- 选择规格下一步 --
3773 sele_spec_next(that, item, gid, nor) { 3774 sele_spec_next(that, item, gid, nor) {
  3775 + let th = this;
3774 if (!item.whsle_id && ([1, 2, 4, 6].indexOf(item.prom_type) == -1 || this.data.is_normal == 1)) 3776 if (!item.whsle_id && ([1, 2, 4, 6].indexOf(item.prom_type) == -1 || this.data.is_normal == 1))
3775 that.check_is_youhui(gid, that.data.is_normal, 1); 3777 that.check_is_youhui(gid, that.data.is_normal, 1);
3776 3778
@@ -5162,6 +5164,22 @@ Component({ @@ -5162,6 +5164,22 @@ Component({
5162 ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif"; 5164 ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif";
5163 this.setData(ob); 5165 this.setData(ob);
5164 }, 5166 },
  5167 + async getUserBuyPromNum(prom_id,is_zh) {
  5168 + var userInfo = getApp().globalData.userInfo;
  5169 + var url = `/api/weshop/ordergoods/getUserBuyPromNum?store_id=${os.stoid}&user_id=${userInfo.user_id}&prom_type=7&prom_id=${prom_id}`;
  5170 + let res = await getApp().request.promiseGet(url, {
  5171 + data: {}
  5172 + });
  5173 + let userbuynum = 0
  5174 + if (res.data.code == 0 && res.data.data) {
  5175 + userbuynum = res.data.data.userbuynum
  5176 + }
  5177 + this.setData({
  5178 + userbuynum
  5179 + })
  5180 + if(is_zh) this.data.user_zh_buy_num=userbuynum;
  5181 + // return userbuynum
  5182 + },
5165 5183
5166 5184
5167 } 5185 }
packageB/pages/zuhegou/index/index.wxml
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 <view class="c-red pdr10 {{item.haveAdded ? 'active':''}}" catchtap="addToCart" 61 <view class="c-red pdr10 {{item.haveAdded ? 'active':''}}" catchtap="addToCart"
62 data-index="{{index}}"> 62 data-index="{{index}}">
63 <text class="iconfont icon-gouwuche fs60"></text> 63 <text class="iconfont icon-gouwuche fs60"></text>
64 - </view> 64 + </view>
65 </view> 65 </view>
66 </view> 66 </view>
67 </view> 67 </view>
pages/goods/goodsList/goodsList.js
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 var regeneratorRuntime = require('../../../utils/runtime.js'); 6 var regeneratorRuntime = require('../../../utils/runtime.js');
7 var com_fil= require('../com_screen.js'); 7 var com_fil= require('../com_screen.js');
8 8
9 -Page({ 9 +Page({
10 data: { 10 data: {
11 url: e.globalData.setting.imghost, 11 url: e.globalData.setting.imghost,
12 resourceUrl: e.globalData.setting.resourceUrl, 12 resourceUrl: e.globalData.setting.resourceUrl,
@@ -44,6 +44,7 @@ Page({ @@ -44,6 +44,7 @@ Page({
44 limit_num:0, 44 limit_num:0,
45 gr_fir:0, //分组第一次 45 gr_fir:0, //分组第一次
46 share_imgurl:'', //分享图片 46 share_imgurl:'', //分享图片
  47 + add_purchase:false,
47 }, 48 },
48 49
49 onLoad: function(t) { 50 onLoad: function(t) {
@@ -601,7 +602,29 @@ Page({ @@ -601,7 +602,29 @@ Page({
601 open_more(e){ com_fil.open_more(e,this); }, 602 open_more(e){ com_fil.open_more(e,this); },
602 clear_fil(){ //清空 603 clear_fil(){ //清空
603 this.data.gr_fir=0;com_fil.clear_fil(this); 604 this.data.gr_fir=0;com_fil.clear_fil(this);
604 - } 605 + },
  606 + // 加购方法show
  607 + addPurchase(even){
  608 + this.setData({
  609 + add_purchase:true
  610 + })
  611 + let gid = even.currentTarget.dataset.gid
  612 + let prom_id = even.currentTarget.dataset.prom_id
  613 + let prom_type = even.currentTarget.dataset.prom_type
  614 + let goods_type= even.currentTarget.dataset.goods_type
  615 + let add_purchase = this.selectComponent("#add_purchase");
  616 + if (add_purchase) {
  617 + add_purchase.init(gid,prom_type,prom_id,goods_type)
  618 + }
  619 + },
  620 + // 加购方法 hide
  621 + hide_add_purchase(){
  622 + setTimeout(()=>{
  623 + this.setData({
  624 + add_purchase:false
  625 + })
  626 + },1000)
  627 + }
605 628
606 629
607 }); 630 });
608 \ No newline at end of file 631 \ No newline at end of file
pages/goods/goodsList/goodsList.json
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 "backgroundTextStyle": "dark", 2 "backgroundTextStyle": "dark",
3 "navigationBarTitleText": "商品列表", 3 "navigationBarTitleText": "商品列表",
4 "usingComponents": { 4 "usingComponents": {
5 - "share_box": "/components/share_box/share_box" 5 + "share_box": "/components/share_box/share_box",
  6 + "add_purchase": "/components/add_purchase/add_purchase"
6 } 7 }
7 -}  
8 \ No newline at end of file 8 \ No newline at end of file
  9 +}
9 \ No newline at end of file 10 \ No newline at end of file
pages/goods/goodsList/goodsList.wxml
1 <wxs module="g_filter" src="../g_filter.wxs"></wxs> 1 <wxs module="g_filter" src="../g_filter.wxs"></wxs>
  2 +<wxs module="filter" src="../../../utils/filter.wxs"></wxs>
2 <view class="container" wx:if="{{show_all}}"> 3 <view class="container" wx:if="{{show_all}}">
3 <view> 4 <view>
4 5
5 - <view wx:if="{{prom_goods_list}}" class="fs30"><text style="color: red;" wx:if="{{index==0 && limit_num>0}}">每人限参与{{limit_num}}次;</text></view>  
6 - <block wx:for="{{prom_goods_list}}">  
7 - <view class="fs30 ellipsis-1" style="padding: 20rpx 30rpx">  
8 - 满{{item.condition}}<text space="{{true}}" wx:if="{{item.prom_type==0}}">元 </text> <text space="{{true}}" wx:else>件 </text>  
9 - <text space="{{true}}" wx:if="{{item.content.is_money && item.content.is_money!='0'}}">减{{item.content.money}}元 </text>  
10 - <text space="{{true}}" wx:if="{{item.content.past && item.content.past!='0'}}">包邮 </text>  
11 - <text space="{{true}}" wx:if="{{item.content.is_sale && item.content.is_sale!='0'}}">打{{item.content.sale}}折 </text>  
12 - <text space="{{true}}" wx:if="{{item.content.is_int && item.content.is_int!='0'}}">送{{item.content.int}}积分 </text>  
13 - <text space="{{true}}" wx:if="{{item.content.is_coupon && item.content.is_coupon!='0'}}">送{{item.content.coupon_money}}元优惠券 </text>  
14 - <text space="{{true}}" wx:if="{{item.content.is_gift && item.content.is_gift!='0'}}">送{{item.content.zp_mode==1?'多赠品':item.content.gift_name}} </text>  
15 - <text space="{{true}}" wx:if="{{item.content.is_libao && item.content.is_libao!='0'}}">送{{item.content.lb_name}} </text>  
16 - <text space="{{true}}" wx:if="{{item.content.is_zxlibao && item.content.is_zxlibao!='0'}}">送{{item.content.zxlb_name}} </text>  
17 - <text space="{{true}}" wx:if="{{item.content.is_monthgiftbag && item.content.is_monthgiftbag!='0'}}">送{{item.content.monthgift_name}} </text>  
18 - </view>  
19 - </block>  
20 -  
21 - <!-- 新增 -->  
22 - <view wx:if="{{jieti_prom}}" class="fs30 ellipsis-1" style="padding: 20rpx">阶梯促销:{{jieti_prom}}</view> 6 + <view wx:if="{{prom_goods_list}}" class="fs30"><text style="color: red;" wx:if="{{index==0 && limit_num>0}}">每人限参与{{limit_num}}次;</text></view>
  7 + <block wx:for="{{prom_goods_list}}">
  8 + <view class="fs30 ellipsis-1" style="padding: 20rpx 30rpx">
  9 + 满{{item.condition}}<text space="{{true}}" wx:if="{{item.prom_type==0}}">元 </text> <text space="{{true}}" wx:else>件 </text>
  10 + <text space="{{true}}" wx:if="{{item.content.is_money && item.content.is_money!='0'}}">减{{item.content.money}}元 </text>
  11 + <text space="{{true}}" wx:if="{{item.content.past && item.content.past!='0'}}">包邮 </text>
  12 + <text space="{{true}}" wx:if="{{item.content.is_sale && item.content.is_sale!='0'}}">打{{item.content.sale}}折 </text>
  13 + <text space="{{true}}" wx:if="{{item.content.is_int && item.content.is_int!='0'}}">送{{item.content.int}}积分 </text>
  14 + <text space="{{true}}" wx:if="{{item.content.is_coupon && item.content.is_coupon!='0'}}">送{{item.content.coupon_money}}元优惠券 </text>
  15 + <text space="{{true}}" wx:if="{{item.content.is_gift && item.content.is_gift!='0'}}">送{{item.content.zp_mode==1?'多赠品':item.content.gift_name}} </text>
  16 + <text space="{{true}}" wx:if="{{item.content.is_libao && item.content.is_libao!='0'}}">送{{item.content.lb_name}} </text>
  17 + <text space="{{true}}" wx:if="{{item.content.is_zxlibao && item.content.is_zxlibao!='0'}}">送{{item.content.zxlb_name}} </text>
  18 + <text space="{{true}}" wx:if="{{item.content.is_monthgiftbag && item.content.is_monthgiftbag!='0'}}">送{{item.content.monthgift_name}} </text>
  19 + </view>
  20 + </block>
  21 +
  22 + <!-- 新增 -->
  23 + <view wx:if="{{jieti_prom}}" class="fs30 ellipsis-1" style="padding: 20rpx">阶梯促销:{{jieti_prom}}</view>
23 24
24 </view> 25 </view>
25 - <view class="pd20 flex ai-center jc_sb search_fixed">  
26 - <!-- 搜索框 -->  
27 - <view class="search-box f1">  
28 - <view hover-class="none" data-url="/packageG/pages/goods/search/search?ladder_id={{ladder_id}}" bindtap="go_url"><text class="iconfont icon-sousuo pdr10"></text>请输入商品关键字</view>  
29 - </view>  
30 - <!-- 单列/双列 显示切换 -->  
31 - <text class="iconfont {{isToggle ? 'icon-fenlie':'icon-fenxiang'}} pdl30 fs36" bindtap="bindToggleDisplay"></text>  
32 - </view>  
33 -  
34 - <view class="nav-box">  
35 - <view class="nav">  
36 -  
37 -  
38 - <navigator class="nav-item">  
39 - <picker bindchange="bind_pk_sort" value="{{index}}" range="{{more_sort_arr}}" range-key="name">  
40 - <text wx:if="{{tabname=='on_time'}}">新品</text>  
41 - <text wx:elif="{{tabname=='comment_count'}}">评论</text>  
42 - <text wx:else>综合</text>  
43 - </picker>  
44 - <view class="arrow_down"></view>  
45 -  
46 - </navigator>  
47 -  
48 -  
49 - <navigator bindtap="changeTab" class="nav-item" data-href="sales_sum" data-ad="{{adname}}">销量  
50 -<!-- <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}">-->  
51 -<!-- <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>-->  
52 -<!-- <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>-->  
53 -<!-- </view>-->  
54 - <view>  
55 - <view class="arrow_up {{tabname=='sales_sum' && adname=='asc'?'on':'' }} "></view>  
56 - <view class="arrow_down {{tabname=='sales_sum' && adname=='desc'?'on':'' }} "></view>  
57 - </view>  
58 -  
59 - </navigator>  
60 - <navigator bindtap="changeTab" class="nav-item" data-href="final_price" data-ad="{{adname}}">  
61 - 价格  
62 -<!-- <view class="ico-dg" wx:if="{{tabname=='final_price'}}">-->  
63 -<!-- <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>-->  
64 -<!-- <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>-->  
65 -<!-- </view>-->  
66 - <view>  
67 - <view class="arrow_up {{tabname=='final_price' && adname=='asc'?'on':'' }} "></view>  
68 - <view class="arrow_down {{tabname=='final_price' && adname=='desc'?'on':'' }} "></view>  
69 - </view>  
70 - </navigator>  
71 - <navigator bindtap="openFilterModal" class="nav-item">  
72 - 筛选<view class="ico-filter">  
73 - <image class="wh100" src="{{iurl}}/miniapp/images/xx.png"></image>  
74 - </view>  
75 - </navigator>  
76 -  
77 - <!-- <navigator class="nav-item search" url="/packageG/pages/goods/search/search"> 26 + <view class="pd20 flex ai-center jc_sb search_fixed">
  27 + <!-- 搜索框 -->
  28 + <view class="search-box f1">
  29 + <view hover-class="none" data-url="/packageG/pages/goods/search/search?ladder_id={{ladder_id}}" bindtap="go_url"><text class="iconfont icon-sousuo pdr10"></text>请输入商品关键字</view>
  30 + </view>
  31 + <!-- 单列/双列 显示切换 -->
  32 + <text class="iconfont {{isToggle ? 'icon-fenlie':'icon-fenxiang'}} pdl30 fs36" bindtap="bindToggleDisplay"></text>
  33 + </view>
  34 +
  35 + <view class="nav-box">
  36 + <view class="nav">
  37 +
  38 +
  39 + <navigator class="nav-item">
  40 + <picker bindchange="bind_pk_sort" value="{{index}}" range="{{more_sort_arr}}" range-key="name">
  41 + <text wx:if="{{tabname=='on_time'}}">新品</text>
  42 + <text wx:elif="{{tabname=='comment_count'}}">评论</text>
  43 + <text wx:else>综合</text>
  44 + </picker>
  45 + <view class="arrow_down"></view>
  46 +
  47 + </navigator>
  48 +
  49 +
  50 + <navigator bindtap="changeTab" class="nav-item" data-href="sales_sum" data-ad="{{adname}}">销量
  51 + <!-- <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}">-->
  52 + <!-- <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>-->
  53 + <!-- <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>-->
  54 + <!-- </view>-->
  55 + <view>
  56 + <view class="arrow_up {{tabname=='sales_sum' && adname=='asc'?'on':'' }} "></view>
  57 + <view class="arrow_down {{tabname=='sales_sum' && adname=='desc'?'on':'' }} "></view>
  58 + </view>
  59 +
  60 + </navigator>
  61 + <navigator bindtap="changeTab" class="nav-item" data-href="final_price" data-ad="{{adname}}">
  62 + 价格
  63 + <!-- <view class="ico-dg" wx:if="{{tabname=='final_price'}}">-->
  64 + <!-- <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>-->
  65 + <!-- <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>-->
  66 + <!-- </view>-->
  67 + <view>
  68 + <view class="arrow_up {{tabname=='final_price' && adname=='asc'?'on':'' }} "></view>
  69 + <view class="arrow_down {{tabname=='final_price' && adname=='desc'?'on':'' }} "></view>
  70 + </view>
  71 + </navigator>
  72 + <navigator bindtap="openFilterModal" class="nav-item">
  73 + 筛选<view class="ico-filter">
  74 + <image class="wh100" src="{{iurl}}/miniapp/images/xx.png"></image>
  75 + </view>
  76 + </navigator>
  77 +
  78 + <!-- <navigator class="nav-item search" url="/packageG/pages/goods/search/search">
78 <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image> 79 <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image>
79 </navigator> --> 80 </navigator> -->
80 - </view>  
81 - </view>  
82 -  
83 - <view class="choice_list" wx:if="{{!isToggle}}"> 81 + </view>
  82 + </view>
  83 +
  84 + <view class="choice_list" style="position: relative;" wx:if="{{!isToggle}}">
84 <navigator class="choice_item" url="{{g_filter.get_goods_url(item)}}" wx:for="{{requestData}}" wx:key="{{index}}"> 85 <navigator class="choice_item" url="{{g_filter.get_goods_url(item)}}" wx:for="{{requestData}}" wx:key="{{index}}">
85 <view class="img-wrap"> 86 <view class="img-wrap">
86 <image src="{{item.original_img}}" binderror="bind_bnerr2" data-url="{{url+item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image> 87 <image src="{{item.original_img}}" binderror="bind_bnerr2" data-url="{{url+item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image>
@@ -89,24 +90,142 @@ @@ -89,24 +90,142 @@
89 <view class="title ellipsis-2">{{item.goods_name}}</view> 90 <view class="title ellipsis-2">{{item.goods_name}}</view>
90 <!-- 判断是否有活动价 --> 91 <!-- 判断是否有活动价 -->
91 <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=3 && item.prom_type!=5 && item.prom_type!=7 && item.prom_type!=10 }}"> 92 <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=3 && item.prom_type!=5 && item.prom_type!=7 && item.prom_type!=10 }}">
92 - <view class="flex on">  
93 - <!-- 活动价 -->  
94 - <view class="price">  
95 - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>  
96 - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>  
97 - <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>  
98 - </view>  
99 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24 no_line_c">{{item.market_price}}</view>  
100 - </view>  
101 -  
102 - 93 + <view class="flex on">
  94 + <!-- 活动价 -->
  95 + <view class="price">
  96 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  97 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  98 + <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
  99 + </view>
  100 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24 no_line_c">{{item.market_price}}</view>
  101 + </view>
  102 +
  103 +
  104 + <view class="comment pdt10">
  105 + <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> -->
  106 + <view class="fs24 t-r">
  107 + <span>评论{{item.comment_count}}</span>
  108 + <span class="pdl30">已售{{item.sales_sum}}</span>
  109 + </view>
  110 + </view>
  111 + </block>
  112 + <block wx:else>
  113 + <!-- 商品价格,先判断下是后又等级价-->
  114 + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">
  115 + <!-- 当会员是等级卡的时候 -->
  116 + <block wx:if="{{card_field}}">
  117 + <!-- 等级价>0 -->
  118 + <block wx:if="{{item[card_field]>0}}">
  119 + <view class="flex ai-center">
  120 + <view class="price rmb">{{item[card_field]}}</view>
  121 + <view class="card_bg ellipsis-1">
  122 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  123 + <text class="card_name">{{card_name}}</text>
  124 + </view>
  125 + </view>
  126 + <view class="comment">
  127 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
  128 + <view class="fs24 t-r">
  129 + <span>评论{{item.comment_count}}</span>
  130 + <span class="pdl30">已售{{item.sales_sum}}</span>
  131 + </view>
  132 + </view>
  133 + </block>
  134 + <block wx:else>
  135 + <view class="price rmb">{{item.shop_price}}</view>
  136 + <view class="comment">
  137 + <!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>-->
  138 + <view class="fs24 t-r">
  139 + <span>评论{{item.comment_count}}</span>
  140 + <span class="pdl30">已售{{item.sales_sum}}</span>
  141 + </view>
  142 + </view>
  143 + </block>
  144 + </block>
  145 + <block wx:else>
  146 + <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">
  147 + <view class="flex ai-center">
  148 + <view class="price rmb">{{item.shop_price}}</view>
  149 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb no_line_c">{{item.market_price}}</view>
  150 + </view>
  151 + <view class="comment">
  152 + <view class="flex ai-center">
  153 + <view class="rmb">{{g_filter.get_card_price(item,card_list,0)}}</view>
  154 + <view class="card_bg ellipsis-1">
  155 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  156 + <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text>
  157 + </view>
  158 + </view>
  159 + <view class="fs24 pdt10 t-r">
  160 + <span class="">评论{{item.comment_count}}</span>
  161 + <span class="pdl30">已售{{item.sales_sum}}</span>
  162 + </view>
  163 + </view>
  164 + </view>
  165 + <block wx:else>
  166 + <view>
  167 + <view class="price rmb">{{item.shop_price}}</view>
  168 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
  169 + </view>
  170 + <!-- <view class="price">¥{{item.shop_price}}</view> -->
  171 + <view class="comment pdt10">
  172 + <view class="fs24 t-r">
  173 + <span>评论{{item.comment_count}}</span>
  174 + <span class="pdl30">已售{{item.sales_sum}}</span>
  175 + </view>
  176 + </view>
  177 + </block>
  178 + </block>
  179 + </block>
  180 + <view wx:else>
  181 + <view class="flex ai-center">
  182 + <view class="price rmb">{{item.shop_price}}</view>
  183 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>
  184 + </view>
  185 +
103 <view class="comment pdt10"> 186 <view class="comment pdt10">
104 - <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> -->  
105 <view class="fs24 t-r"> 187 <view class="fs24 t-r">
106 - <span>评论{{item.comment_count}}</span>  
107 - <span class="pdl30">已售{{item.sales_sum}}</span>  
108 - </view> 188 + <span>评论{{item.comment_count}}</span>
  189 + <span class="pdl30">已售{{item.sales_sum}}</span>
  190 + </view>
109 </view> 191 </view>
  192 + </view>
  193 + </block>
  194 + </view>
  195 + <view class="gicon" catchtap="addPurchase" wx:if="{{filter.has_add_goods(item.prom_type)}}" data-gid="{{item.goods_id}}" data-prom_id="{{item.id}}" data-prom_type="{{item.prom_type}}" data-goods_type="{{item.goods_type}}">
  196 + <text class="iconfont icon-gouwuche fs60" style="color: #f23030;"></text>
  197 + </view>
  198 + </navigator>
  199 + </view>
  200 +
  201 +
  202 + <view class="choice_list on" wx:else>
  203 + <navigator class="choice_item" url="{{g_filter.get_goods_url(item)}}" wx:for="{{requestData}}" wx:key="{{index}}">
  204 + <view class="img-wrap">
  205 + <image src="{{item.original_img}}" binderror="bind_bnerr2" data-url="{{url+item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image>
  206 + </view>
  207 + <view class="item-cont" style="position: relative;">
  208 + <view class="title ellipsis-2">{{item.goods_name}}</view>
  209 + <!-- 判断是否有活动价 -->
  210 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}">
  211 + <view class="flex on">
  212 + <!-- 活动价 -->
  213 + <view class="price">
  214 + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
  215 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  216 + <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
  217 + </view>
  218 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24 no_line_c">{{item.market_price}}</view>
  219 + </view>
  220 +
  221 +
  222 + <view class="comment pdt10">
  223 + <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>-->
  224 + <view class="fs24 t-r">
  225 + <span>评论{{item.comment_count}}</span>
  226 + <span class="pdl30">已售{{item.sales_sum}}</span>
  227 + </view>
  228 + </view>
110 </block> 229 </block>
111 <block wx:else> 230 <block wx:else>
112 <!-- 商品价格,先判断下是后又等级价--> 231 <!-- 商品价格,先判断下是后又等级价-->
@@ -125,19 +244,19 @@ @@ -125,19 +244,19 @@
125 <view class="comment"> 244 <view class="comment">
126 <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view> 245 <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
127 <view class="fs24 t-r"> 246 <view class="fs24 t-r">
128 - <span>评论{{item.comment_count}}</span>  
129 - <span class="pdl30">已售{{item.sales_sum}}</span>  
130 - </view> 247 + <span>评论{{item.comment_count}}</span>
  248 + <span class="pdl30">已售{{item.sales_sum}}</span>
  249 + </view>
131 </view> 250 </view>
132 </block> 251 </block>
133 <block wx:else> 252 <block wx:else>
134 <view class="price rmb">{{item.shop_price}}</view> 253 <view class="price rmb">{{item.shop_price}}</view>
135 <view class="comment"> 254 <view class="comment">
136 -<!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>--> 255 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
137 <view class="fs24 t-r"> 256 <view class="fs24 t-r">
138 - <span>评论{{item.comment_count}}</span>  
139 - <span class="pdl30">已售{{item.sales_sum}}</span>  
140 - </view> 257 + <span>评论{{item.comment_count}}</span>
  258 + <span class="pdl30">已售{{item.sales_sum}}</span>
  259 + </view>
141 </view> 260 </view>
142 </block> 261 </block>
143 </block> 262 </block>
@@ -156,176 +275,73 @@ @@ -156,176 +275,73 @@
156 </view> 275 </view>
157 </view> 276 </view>
158 <view class="fs24 pdt10 t-r"> 277 <view class="fs24 pdt10 t-r">
159 - <span class="">评论{{item.comment_count}}</span>  
160 - <span class="pdl30">已售{{item.sales_sum}}</span>  
161 - </view> 278 + <span class="">评论{{item.comment_count}}</span>
  279 + <span class="pdl30">已售{{item.sales_sum}}</span>
  280 + </view>
162 </view> 281 </view>
163 </view> 282 </view>
164 <block wx:else> 283 <block wx:else>
165 - <view>  
166 - <view class="price rmb">{{item.shop_price}}</view>  
167 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>  
168 - </view> 284 + <view>
  285 + <view class="price rmb">{{item.shop_price}}</view>
  286 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>
  287 + </view>
169 <!-- <view class="price">¥{{item.shop_price}}</view> --> 288 <!-- <view class="price">¥{{item.shop_price}}</view> -->
170 <view class="comment pdt10"> 289 <view class="comment pdt10">
171 <view class="fs24 t-r"> 290 <view class="fs24 t-r">
172 - <span>评论{{item.comment_count}}</span>  
173 - <span class="pdl30">已售{{item.sales_sum}}</span>  
174 - </view> 291 + <span>评论{{item.comment_count}}</span>
  292 + <span class="pdl30">已售{{item.sales_sum}}</span>
  293 + </view>
175 </view> 294 </view>
176 </block> 295 </block>
177 </block> 296 </block>
178 </block> 297 </block>
179 <view wx:else> 298 <view wx:else>
180 - <view class="flex ai-center">  
181 - <view class="price rmb">{{item.shop_price}}</view>  
182 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>  
183 - </view>  
184 - 299 + <view class="">
  300 + <view class="price rmb">{{item.shop_price}}</view>
  301 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>
  302 + </view>
185 <view class="comment pdt10"> 303 <view class="comment pdt10">
186 <view class="fs24 t-r"> 304 <view class="fs24 t-r">
187 - <span>评论{{item.comment_count}}</span>  
188 - <span class="pdl30">已售{{item.sales_sum}}</span>  
189 - </view> 305 + <span>评论{{item.comment_count}}</span>
  306 + <span class="pdl30">已售{{item.sales_sum}}</span>
  307 + </view>
190 </view> 308 </view>
191 </view> 309 </view>
192 </block> 310 </block>
  311 +
  312 + <view class="gicon2" catchtap="addPurchase" wx:if="{{filter.has_add_goods(item.prom_type)}}" data-gid="{{item.goods_id}}" data-prom_id="{{item.id}}" data-prom_type="{{item.prom_type}}" data-goods_type="{{item.goods_type}}">
  313 + <text class="iconfont icon-gouwuche fs60" style="color: #f23030;"></text>
193 </view> 314 </view>
  315 + </view>
194 </navigator> 316 </navigator>
195 - </view>  
196 -  
197 -  
198 - <view class="choice_list on" wx:else>  
199 - <navigator class="choice_item" url="{{g_filter.get_goods_url(item)}}" wx:for="{{requestData}}" wx:key="{{index}}">  
200 - <view class="img-wrap">  
201 - <image src="{{item.original_img}}" binderror="bind_bnerr2" data-url="{{url+item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image>  
202 - </view>  
203 - <view class="item-cont">  
204 - <view class="title ellipsis-2">{{item.goods_name}}</view>  
205 - <!-- 判断是否有活动价 -->  
206 - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}">  
207 - <view class="flex on">  
208 - <!-- 活动价 -->  
209 - <view class="price">  
210 - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>  
211 - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>  
212 - <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>  
213 - </view>  
214 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24 no_line_c">{{item.market_price}}</view>  
215 - </view>  
216 -  
217 -  
218 - <view class="comment pdt10">  
219 -<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>-->  
220 - <view class="fs24 t-r">  
221 - <span>评论{{item.comment_count}}</span>  
222 - <span class="pdl30">已售{{item.sales_sum}}</span>  
223 - </view>  
224 - </view>  
225 - </block>  
226 - <block wx:else>  
227 - <!-- 商品价格,先判断下是后又等级价-->  
228 - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">  
229 - <!-- 当会员是等级卡的时候 -->  
230 - <block wx:if="{{card_field}}">  
231 - <!-- 等级价>0 -->  
232 - <block wx:if="{{item[card_field]>0}}">  
233 - <view class="flex ai-center">  
234 - <view class="price rmb">{{item[card_field]}}</view>  
235 - <view class="card_bg ellipsis-1">  
236 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
237 - <text class="card_name">{{card_name}}</text>  
238 - </view>  
239 - </view>  
240 - <view class="comment">  
241 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>  
242 - <view class="fs24 t-r">  
243 - <span>评论{{item.comment_count}}</span>  
244 - <span class="pdl30">已售{{item.sales_sum}}</span>  
245 - </view>  
246 - </view>  
247 - </block>  
248 - <block wx:else>  
249 - <view class="price rmb">{{item.shop_price}}</view>  
250 - <view class="comment">  
251 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>  
252 - <view class="fs24 t-r">  
253 - <span>评论{{item.comment_count}}</span>  
254 - <span class="pdl30">已售{{item.sales_sum}}</span>  
255 - </view>  
256 - </view>  
257 - </block>  
258 - </block>  
259 - <block wx:else>  
260 - <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">  
261 - <view class="flex ai-center">  
262 - <view class="price rmb">{{item.shop_price}}</view>  
263 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb no_line_c">{{item.market_price}}</view>  
264 - </view>  
265 - <view class="comment">  
266 - <view class="flex ai-center">  
267 - <view class="rmb">{{g_filter.get_card_price(item,card_list,0)}}</view>  
268 - <view class="card_bg ellipsis-1">  
269 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
270 - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text>  
271 - </view>  
272 - </view>  
273 - <view class="fs24 pdt10 t-r">  
274 - <span class="">评论{{item.comment_count}}</span>  
275 - <span class="pdl30">已售{{item.sales_sum}}</span>  
276 - </view>  
277 - </view>  
278 - </view>  
279 - <block wx:else>  
280 - <view>  
281 - <view class="price rmb">{{item.shop_price}}</view>  
282 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb no_line_c">{{item.market_price}}</view>  
283 - </view>  
284 - <!-- <view class="price">¥{{item.shop_price}}</view> -->  
285 - <view class="comment pdt10">  
286 - <view class="fs24 t-r">  
287 - <span>评论{{item.comment_count}}</span>  
288 - <span class="pdl30">已售{{item.sales_sum}}</span>  
289 - </view>  
290 - </view>  
291 - </block>  
292 - </block>  
293 - </block>  
294 - <view wx:else>  
295 - <view class="">  
296 - <view class="price rmb">{{item.shop_price}}</view>  
297 - <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10 no_line_c">{{item.market_price}}</view>  
298 - </view>  
299 - <view class="comment pdt10">  
300 - <view class="fs24 t-r">  
301 - <span>评论{{item.comment_count}}</span>  
302 - <span class="pdl30">已售{{item.sales_sum}}</span>  
303 - </view>  
304 - </view>  
305 - </view>  
306 - </block>  
307 - </view>  
308 - </navigator>  
309 - </view>  
310 -  
311 -  
312 -  
313 -  
314 -  
315 - <view class="no-data" wx:if="{{(!requestData||requestData.length==0) && is_go}}">  
316 - <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>  
317 - <view class="no-data-title">暂无相关商品</view>  
318 - <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index">回到首页</navigator>  
319 - </view>  
320 </view> 317 </view>
321 318
  319 +
  320 +
  321 +
  322 +
  323 + <view class="no-data" wx:if="{{(!requestData||requestData.length==0) && is_go}}">
  324 + <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>
  325 + <view class="no-data-title">暂无相关商品</view>
  326 + <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index">回到首页</navigator>
  327 + </view>
  328 +</view>
  329 +
322 <include src="../com_screen.wxml" /> 330 <include src="../com_screen.wxml" />
323 331
324 <share_box id="share"></share_box> 332 <share_box id="share"></share_box>
325 <view class="t-c fs32" wx:if="{{err_txt}}"> 333 <view class="t-c fs32" wx:if="{{err_txt}}">
326 - <view class="no-data">  
327 - <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>  
328 - <view class="no-data-title">{{err_txt}}</view>  
329 - <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index">回到首页</navigator>  
330 - </view>  
331 -</view>  
332 \ No newline at end of file 334 \ No newline at end of file
  335 + <view class="no-data">
  336 + <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image>
  337 + <view class="no-data-title">{{err_txt}}</view>
  338 + <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index">回到首页</navigator>
  339 + </view>
  340 +</view>
  341 +
  342 +
  343 +<!-- 加购 -->
  344 +<add_purchase id="add_purchase" bindhide_add_purchase="hide_add_purchase" wx:if="{{add_purchase}}"></add_purchase>
  345 +
  346 +
  347 +
  348 +
pages/goods/goodsList/goodsList.wxss
@@ -48,7 +48,7 @@ page { @@ -48,7 +48,7 @@ page {
48 top: 0; 48 top: 0;
49 /* width: 95%; */ 49 /* width: 95%; */
50 background-color: #f0f0f0; 50 background-color: #f0f0f0;
51 - z-index: 999; 51 + z-index: 11;
52 } 52 }
53 53
54 .nav-box { 54 .nav-box {
@@ -56,7 +56,7 @@ page { @@ -56,7 +56,7 @@ page {
56 top: 114rpx; 56 top: 114rpx;
57 /* width: 95%; */ 57 /* width: 95%; */
58 background-color: #f0f0f0; 58 background-color: #f0f0f0;
59 - z-index: 999; 59 + z-index: 11;
60 } 60 }
61 61
62 .ico-dir { 62 .ico-dir {
@@ -294,5 +294,20 @@ page { @@ -294,5 +294,20 @@ page {
294 color: white; 294 color: white;
295 padding: 20rpx 50rpx; 295 padding: 20rpx 50rpx;
296 } 296 }
297 - 297 +.gicon{
  298 + position: absolute;
  299 + right: 20rpx;
  300 + top: 0;
  301 + bottom: 0;
  302 + display: flex;
  303 + align-items: center;
  304 +}
  305 +.gicon2{
  306 + position: absolute;
  307 + right: 20rpx;
  308 + top: 0;
  309 + bottom: 0;
  310 + display: flex;
  311 + align-items: center;
  312 +}
298 @import '../com_screen.wxss'; 313 @import '../com_screen.wxss';
299 \ No newline at end of file 314 \ No newline at end of file