Commit a8d4cedfd8601c15401dbda253608bb7bcea2eb7

Authored by F5VT98DI7XY4X12\Administrator
1 parent 266136ab

购物车,拼团详情页,拼团参团页的修改

pages/cart/cart2/cart2.js
... ... @@ -1192,6 +1192,13 @@ Page({
1192 1192 th.calculatePrice();
1193 1193 }
1194 1194 th.setData({open_quan:0});
  1195 + },
  1196 +
  1197 + cart_set_err:function(e){
  1198 + var txt = e.currentTarget.dataset.err;
  1199 + var ob={};
  1200 + ob[txt] = this.data.imgUrl + "/miniapp/images/default_g_img.gif";
  1201 + this.setData(ob);
1195 1202 }
1196 1203  
1197 1204 });
... ...
pages/cart/cart2/cart2.wxml
... ... @@ -34,7 +34,8 @@
34 34 <view class="order-detail" wx:for="{{item.goods}}" wx:for-index="idx" wx:for-item="items">
35 35 <!----商品图片----->
36 36 <view class="goods-img">
37   - <image class="wh100" src="{{items.original_img}}"></image>
  37 + <image class="wh100" src="{{items.original_img}}" binderror='cart_set_err'
  38 + data-err='cartlist[{{pidx}}].goods[{{idx}}].original_img' ></image>
38 39 </view>
39 40 <!----商品名称规格---->
40 41 <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}">
... ... @@ -108,7 +109,7 @@
108 109 <image class="dp" src='{{imgUrl}}/miniapp/images/dianpu.png'> </image> <view>门店:{{bn_pickname}}</view></view>
109 110 <view class="order-detail">
110 111 <view class="goods-img">
111   - <image class="wh100" src="{{bn_goods.original_img}}"></image>
  112 + <image class="wh100" src="{{bn_goods.original_img}}" binderror='cart_set_err' data-err="bn_goods.original_img"></image>
112 113 </view>
113 114 <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}">
114 115 <view class="goods-name">{{bn_goods.goods_name}}</view>
... ...
pages/cart/cart2_pt/cart2_pt.js
... ... @@ -617,5 +617,13 @@ Page({
617 617 var ind=e.detail.value, txt = e.currentTarget.dataset.txt;
618 618 this.setData({ [txt]: ind });
619 619 this.calculatePrice();
620   - }
  620 + },
  621 +
  622 + cart_set_err: function (e) {
  623 + var txt = e.currentTarget.dataset.err;
  624 + var ob = {};
  625 + ob[txt] = this.data.imgUrl + "/miniapp/images/default_g_img.gif";
  626 + this.setData(ob);
  627 + }
  628 +
621 629 });
... ...
pages/cart/cart2_pt/cart2_pt.wxml
... ... @@ -31,7 +31,8 @@
31 31 <image class="dp" src='{{imgUrl}}/miniapp/images/dianpu.png'> </image> <view>门店:{{bn_pickname}}</view></view>
32 32 <view class="order-detail">
33 33 <view class="goods-img">
34   - <image class="wh100" src="{{bn_goods.original_img}}"></image>
  34 + <image class="wh100" src="{{bn_goods.original_img}}"
  35 + binderror='cart_set_err' data-err="bn_goods.original_img"></image>
35 36 </view>
36 37 <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}">
37 38 <view class="goods-name">{{bn_goods.goods_name}}</view>
... ...
pages/team/team_show/team_show.js
... ... @@ -293,6 +293,8 @@ Page({
293 293 teamlist = null, //活动表
294 294 goods = null, //商品
295 295 teamgroup = null, //活動从表
  296 + max_num = 0,
  297 + min_price = 0,
296 298 th=this;
297 299  
298 300 //获取活动从表信息team_id,listno团编号(券号)
... ... @@ -365,6 +367,21 @@ Page({
365 367 if (res.data.code == 0) {
366 368 teamlist = res.data.data;
367 369 goods_id = res.data.data.goods_id;
  370 +
  371 + //----------查看阶梯团------------
  372 + if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined) {
  373 + var ct_rylist = JSON.parse(teamlist.ct_rylist);
  374 + var max = 0; var pri = 0;
  375 + ct_rylist.forEach(function (val, ind) {
  376 + if (val.rynum > max) {
  377 + max = val.rynum;
  378 + pri = val.price;
  379 + }
  380 + })
  381 + max_num = max;
  382 + min_price = pri;
  383 + }
  384 +
368 385 }
369 386 })
370 387  
... ... @@ -403,6 +420,26 @@ Page({
403 420 goods = res.data.data
404 421 })
405 422  
  423 + //只装5个
  424 + var ordertx2 = [], sf_num = 0, ct_nun = teamlist.ct_num;
  425 + if (max_num) {
  426 + ct_nun = parseInt(max_num);
  427 + if (ct_nun < ordertx.length) ct_nun = ordertx.length;
  428 + }
  429 +
  430 + if (ct_nun > 5) ct_nun = 5;
  431 + for (var i = 0; i < ct_nun; i++) {
  432 + if (i >= ordertx.length) sf_num++
  433 + else
  434 + ordertx2.push(ordertx[i]);
  435 + }
  436 +
  437 + var sf_arr = [];
  438 + for (var i = 0; i < sf_num; i++) {
  439 + sf_arr.push(i);
  440 + }
  441 +
  442 +
406 443  
407 444 if(th.data.is_group_end==1 || th.data.is_group_end==2 ){
408 445 getApp().confirmBox(th.data.end_text);
... ... @@ -446,6 +483,7 @@ Page({
446 483 //获取下redis长度,如果团已经弄完,或者拼单已经卖完
447 484 //设置值
448 485 ee.setData({
  486 + ordertx2: ordertx2,
449 487 ordertx: ordertx,
450 488 teamlist: teamlist,
451 489 teamgroup: teamgroup,
... ... @@ -453,6 +491,7 @@ Page({
453 491 pageteam: pageteam,
454 492 image: original_img,
455 493 is_show:1,
  494 + sf_arr: sf_arr
456 495 });
457 496 ee.countDown2();
458 497 //---设置门店---
... ...
pages/team/team_show/team_show.wxml
... ... @@ -55,18 +55,20 @@
55 55 </view>
56 56 <!--头像-->
57 57 <view class="flex_tou">
58   - <view class='bodyimg flex-level' wx:for="{{ordertx}}" wx:key>
  58 + <view class='bodyimg flex-level' wx:for="{{ordertx2}}" wx:key>
59 59 <view class='d'>
60 60 <image src='{{item.head_pic}}'></image>
61 61 <span wx:if="{{item.is_pt_tz==1}}">团长</span>
62 62 </view>
63 63 </view>
64   - <view class='xc-ellipsis-img' wx:if="{{length>5}}">
  64 + <view class='d' wx:for="{{sf_arr}}" >
  65 + <image src='{{iurl}}/miniapp/images/shafa.png'></image>
  66 + </view>
  67 + <view class='xc-ellipsis-img' wx:if="{{ordertx.length>5}}">
65 68 <image style='width:56rpx;height:56rpx;margin-left:10rpx;' src="{{imageurl}}/miniapp/images/xc_ellipsis.png"></image>
66   - </view>
  69 + </view>
67 70  
68 71  
69   -
70 72 </view>
71 73  
72 74 <view class='bodytime'>
... ...
pages/team/team_success/team_success.js
... ... @@ -188,6 +188,7 @@ Page({
188 188 var ordertx2=[],sf_num=0,ct_nun=teamlist.ct_num;
189 189 if(max_num){
190 190 ct_nun=parseInt(max_num);
  191 + if (ct_nun < ordertx.length) ct_nun = ordertx.length;
191 192 }
192 193  
193 194 if(ct_nun>5) ct_nun=5;
... ...