Authored by 李奇

拼团结果页修改

@@ -41,14 +41,21 @@ class GroupService extends global.yoho.BaseModel { @@ -41,14 +41,21 @@ class GroupService extends global.yoho.BaseModel {
41 // 5. 团已达成--你来晚了没能加入 41 // 5. 团已达成--你来晚了没能加入
42 // 6. 拼团失败--过期未达成 42 // 6. 拼团失败--过期未达成
43 // 7. 拼团失败--过期未达成 43 // 7. 拼团失败--过期未达成
44 -  
45 let yourJoinItem = detail.yourJoinItem; 44 let yourJoinItem = detail.yourJoinItem;
  45 + let lackNum = detail.lackNum;
46 let membershipItems = detail.membershipItems; 46 let membershipItems = detail.membershipItems;
47 47
48 if (!yourJoinItem) { 48 if (!yourJoinItem) {
49 detail.yourJoinItem = membershipItems[0]; 49 detail.yourJoinItem = membershipItems[0];
50 } 50 }
51 51
  52 + for (let i = 0; i < +lackNum; i++) {
  53 + detail.membershipItems.push({
  54 + empty: true
  55 + });
  56 + }
  57 +
  58 +
52 return { 59 return {
53 ...detail, 60 ...detail,
54 recommend 61 recommend
@@ -3,8 +3,28 @@ @@ -3,8 +3,28 @@
3 <div class="card"> 3 <div class="card">
4 <div class="inner-card"> 4 <div class="inner-card">
5 <img src="{{image2 yourJoinItem.productIcon w=200 h=282}}" alt="" class="card-pre-img"> 5 <img src="{{image2 yourJoinItem.productIcon w=200 h=282}}" alt="" class="card-pre-img">
  6 + <div class="info">
  7 + <div class="name">{{yourJoinItem.productName}}</div>
  8 + <div class="group-price">{{yourJoinItem.productGroupPrice}}</div>
  9 + <div class="single-buy-price">单人购买:<span class="line-through">{{yourJoinItem
  10 + .productSalePrice}}</span></div>
  11 + </div>
6 </div> 12 </div>
7 13
  14 + <div class="members">
  15 + {{#membershipItems}}
  16 + {{#if empty}}
  17 + <div class="meb-item empty"></div>
  18 + {{else}}
  19 + <div class="meb-item">
  20 + <img class="avatar" src="{{image2 headUrl w=160 h=160}}" alt="">
  21 + {{#if @first}}
  22 + <span class="leader-badge"></span>
  23 + {{/if}}
  24 + </div>
  25 + {{/if}}
  26 + {{/membershipItems}}
  27 + </div>
8 28
9 {{#ifcond pageGo '===' 7}} 29 {{#ifcond pageGo '===' 7}}
10 <div class="status-text">拼团失败</div> 30 <div class="status-text">拼团失败</div>
@@ -34,6 +54,12 @@ @@ -34,6 +54,12 @@
34 {{# @root.data.recommend.collageProductVoList}} 54 {{# @root.data.recommend.collageProductVoList}}
35 <div class="product-item"> 55 <div class="product-item">
36 <img src="{{image2 defaultImages w=200 h=282}}" alt="" class="prd-item-img"> 56 <img src="{{image2 defaultImages w=200 h=282}}" alt="" class="prd-item-img">
  57 + <div class="prd-info">
  58 + <div class="buy-btn">
  59 + <span class="num">{{peopleNum}}人成团</span>
  60 + <span class="immediate">立即购买</span>
  61 + </div>
  62 + </div>
37 </div> 63 </div>
38 {{/@root.data.recommend.collageProductVoList}} 64 {{/@root.data.recommend.collageProductVoList}}
39 </div> 65 </div>
@@ -55,6 +55,68 @@ @@ -55,6 +55,68 @@
55 height: 282px; 55 height: 282px;
56 } 56 }
57 57
  58 + .inner-card .info {
  59 + height: 282px;
  60 + padding: 34px 20px 0 230px;
  61 + box-sizing: border-box;
  62 +
  63 + .group-price {
  64 + font-size: 40px;
  65 + color: #d0021b;
  66 + font-weight: bold;
  67 + }
  68 +
  69 + .single-buy-price {
  70 + font-size: 20px;
  71 + color: #b0b0b0;
  72 + }
  73 +
  74 + .single-buy-price .line-through {
  75 + text-decoration: line-through;
  76 + }
  77 + }
  78 +
  79 + .members {
  80 + position: absolute;
  81 + top: 194px;
  82 + left: 0;
  83 + right: 0;
  84 + font-size: 0;
  85 + text-align: center;
  86 + }
  87 +
  88 + .meb-item {
  89 + position: relative;
  90 + display: inline-block;
  91 + width: 80px;
  92 + height: 80px;
  93 + margin-left: 40px;
  94 + border-radius: 40px;
  95 +
  96 + &:first-child {
  97 + margin-left: 0;
  98 + }
  99 +
  100 + &.empty {
  101 + background-image: url("img/activity/group/member-empty.png");
  102 + background-size: 80px 80px;
  103 + }
  104 +
  105 + .avatar {
  106 + border-radius: 40px;
  107 + }
  108 +
  109 + .leader-badge {
  110 + position: absolute;
  111 + top: 0;
  112 + left: 0;
  113 + width: 80px;
  114 + height: 80px;
  115 + background-image: url("img/activity/group/member-leader.png");
  116 + background-size: 80px 80px;
  117 + }
  118 + }
  119 +
58 .tip { 120 .tip {
59 position: absolute; 121 position: absolute;
60 right: 0; 122 right: 0;
@@ -104,5 +166,45 @@ @@ -104,5 +166,45 @@
104 height: 260px; 166 height: 260px;
105 width: 200px; 167 width: 200px;
106 } 168 }
  169 +
  170 + .prd-info {
  171 + padding-left: 220px;
  172 + height: 260px;
  173 + }
  174 +
  175 + .prd-info .buy-btn {
  176 + position: absolute;
  177 + bottom: 0;
  178 + right: 0;
  179 + width: 240px;
  180 + height: 60px;
  181 + font-size: 0;
  182 + border-radius: 30px;
  183 + border: 1px solid #d0021b;
  184 + }
  185 +
  186 + .buy-btn .num {
  187 + display: inline-block;
  188 + width: 50%;
  189 + height: 100%;
  190 + font-size: 24px;
  191 + color: #d0021b;
  192 + line-height: 58px;
  193 + text-align: center;
  194 + }
  195 +
  196 + .buy-btn .immediate {
  197 + display: inline-block;
  198 + width: 50%;
  199 + height: 100%;
  200 + font-size: 24px;
  201 + color: #fff;
  202 + line-height: 58px;
  203 + text-align: center;
  204 + letter-spacing: -0.34px;
  205 + background-color: #d0021b;
  206 + border-top-right-radius: 30px;
  207 + border-bottom-right-radius: 30px;
  208 + }
107 } 209 }
108 } 210 }