Authored by huangyCode

修改商品详情

@@ -139,6 +139,7 @@ function goodsDetail(req, res, next) { @@ -139,6 +139,7 @@ function goodsDetail(req, res, next) {
139 finalResult.shopInfo = result.shopInfo; 139 finalResult.shopInfo = result.shopInfo;
140 finalResult.support = result.support; 140 finalResult.support = result.support;
141 finalResult.floor = result.floor; 141 finalResult.floor = result.floor;
  142 + finalResult.storage_sum = result.storage_sum;
142 return res.render('group/goodsDetail', { 143 return res.render('group/goodsDetail', {
143 page: 'group-goodsDetail', 144 page: 'group-goodsDetail',
144 nodownload: true, 145 nodownload: true,
@@ -124,113 +124,61 @@ @@ -124,113 +124,61 @@
124 {{/ifcond}} 124 {{/ifcond}}
125 {{/each}} 125 {{/each}}
126 </div> 126 </div>
127 - {{#if periodOfMarket}}  
128 - <div class="period-of-market">  
129 - <h1>上市期:</h1>  
130 - <h1>{{periodOfMarket}}</h1>  
131 - </div>  
132 - {{/if}}  
133 -  
134 - <div class="price-date data-bind">  
135 - <div class="student-price">  
136 - <i class="student-name">学生价</i><span class="student-value"></span> 127 + <div id="productDesc" {{#if limit}}class="limit"{{/if}}> </div>
  128 +
  129 + <div class="bottom">
  130 + <div class="count-down">
  131 + {{#if storage_sum}}
  132 + <div data-current="{{activityIdDetail.currentTime}}"
  133 + data-begin="{{activityIdDetail.beginTime}}"
  134 + data-end="{{activityIdDetail.endTime}}"
  135 + class="comp-count-dow-by-now">
  136 + <span id="label"></span>
  137 + <span class="number" id="days"></span>
  138 + <span class="number" id="hours"></span>
  139 + <span class="number" id="minutes"></span>
  140 + <span class="number" id="seconds"></span>
  141 + </div>
  142 + {{/if}}
137 </div> 143 </div>
138 - </div>  
139 -  
140 - {{!-- {{#if studentCoinNum}}  
141 - <div class="price-date">  
142 - <div class="student-price">  
143 - <i class="student-name">返</i> 学生返币{{ studentCoinNum}}个 144 + <div class='shoppint-cart-icon'>
  145 + <img src="//img10.static.yhbimg.com/yhb-img01/2019/02/21/01/016b3f1cbc1b946fa0acbb1523f6386435.png"
  146 + class="shoppint-cart-icon-image"/>
144 </div> 147 </div>
145 - </div>  
146 - {{else}}  
147 - {{#commodityReturn}}  
148 - <div class="price-date">  
149 - <div class="student-price">  
150 - <i class="student-name">返</i> 返{{studentCoinNum}}个YOHO币  
151 - </div> 148 + {{#if isShowPop}}
  149 + <div class='old-customer-tips'>
  150 + <img style='width:100%;height:100%' src='/static/images/group/PT_tip@3x.png'/>
152 </div> 151 </div>
153 - {{/commodityReturn}}  
154 - {{/if}} --}}  
155 -  
156 - <ul class="vip-level data-bind clearfix">  
157 - <li class="icons-item">  
158 - <span class="vip-img">  
159 - </span>  
160 - <span class="vip-price"></span>  
161 - </li>  
162 - </ul>  
163 -  
164 - {{! 品牌优惠券}}  
165 - <div class="brand-coupon hide">  
166 - <i class="iconfont font-right pull-right">&#xe614;</i>  
167 - <i class="iconfont font-quan">&#xe902;</i><span>领取优惠券</span>  
168 - </div>  
169 -  
170 -  
171 - <div class="goods-discount data-bind" id="goodsDiscount">  
172 - <h1 class="first-item short-text tap-hightlight"><span class="icon-down iconfont dropdown">&#xe609;</span>  
173 - </h1>  
174 - <div class="discount-folder">  
175 - <h1 class="folder-item tap-hightlight"></h1>  
176 - </div>  
177 - </div>  
178 -  
179 - {{# feedbacks}}  
180 - <div class="feedback-list ">  
181 - {{#if commentsNum}}  
182 - {{> detail/feedback-tab}}  
183 - {{else}}  
184 - {{#if consultsNum}}  
185 - {{> detail/feedback-tab}} 152 + {{/if}}
  153 + {{#if storage_sum }}
  154 + <button class='shoppint-cart-add'
  155 + bindtap="selfBuy" style='border-radius: 0;'>
  156 + {{#if groupNo}}
  157 + <span class="bottom-title">{{activityIdDetail.formatCollagePrice}}</span>
  158 + <span class="bottom-title">自己开团</span>
186 {{else}} 159 {{else}}
187 - <div class="nodata tap-hightlight" id="goto-consult">  
188 - <span>暂无商品评价和咨询</span>  
189 - <a href="{{consultsUrl}}" class="go-consult">我要咨询<span class="iconfont">&#xe604;</span></a>  
190 - </div> 160 + <span class="bottom-title">{{realPrice}}</span>
  161 + <span class="bottom-title">单人购买</span>
191 {{/if}} 162 {{/if}}
192 - {{/if}}  
193 - </div>  
194 - {{/ feedbacks}} 163 + </button>
195 164
196 - {{# enterStore}}  
197 - <div id="enter-store" class="enter-store page-block tap-hightlight">  
198 - <a class="store-logo" href="{{url}}" style="">  
199 - <img class="lazy" data-original="{{image2 img w=47 h=47 q=60}}" alt="{{storeName}}">  
200 - </a>  
201 - <a class="store-name" href="{{url}}">{{storeName}}</a>  
202 - <a class="store-link" href="{{url}}">进入店铺<span class="iconfont">&#xe604;</span></a>  
203 - </div>  
204 - {{/ enterStore}}  
205 - {{# bundleData}}  
206 - {{> detail/bundle}}  
207 - {{/ bundleData}}  
208 - {{# discountBuy}}  
209 - <input type="hidden" id="discount-buy" value="{{num}}">  
210 - <input type="hidden" id="promotion-phrase" value="{{promotionPhrase}}">  
211 - {{/ discountBuy}}  
212 - <div id="productDesc" {{#if limit}}class="limit"{{/if}}></div>  
213 - {{> detail/recommend-for-you}}  
214 - <div class="chose-panel"></div>  
215 -  
216 - <div class="cart-bar data-bind">  
217 - {{#unless @root.wap.common.removeCartCount}}  
218 - <input type="hidden" id="remove-cart-count" value="1">  
219 - {{/unless}}  
220 - <a href="" class="num-incart iconfont"><span class="num-tag hide"></span>&#xe62c;</a>  
221 - <a id="addtoCart" href="javascript:;" class="addto-cart add-to-cart-url data-bind"></a>  
222 - <a id="soldOut" href="javascript:;" class="sold-out data-bind">已售罄</a>  
223 - <a id="notForSale" href="javascript:;" class="sold-out data-bind">非卖品</a>  
224 - <a id="limitNotForSale" href="javascript:;" class="sold-out limit data-bind">即将发售</a>  
225 - <a id="preSale" href="javascript:;" class="sold-out limit data-bind">即将开售</a>  
226 - <a href="javascript:;" id="addtoCart" class="addto-cart can-buy-limit data-bind">立即购买</a>  
227 - <a id="noLimitCode" href="javascript:;" class="sold-out limit data-bind">立即购买</a>  
228 - <input type="hidden" id="limitCodeUrl" name="limitCodeUrl" value="">  
229 - <input type="hidden" id="limitProductPay" name="limitProductPay" value="">  
230 - <input type="hidden" id="limitProductCode" class="data-bind" name="limitProductCode" value="">  
231 -  
232 - <a href="javascript:;" id="likeBtn" class="favorite iconfont ">&#xe605;</a> 165 + <button class="buynow join-group-btn"
  166 + bindtap="buyAction">
  167 + <span class="bottom-title">{{activityIdDetail.formatCollagePrice}}</span>
  168 + {{#if groupNo}}
  169 + <span class="bottom-title">确认参团{{#if activityIdDetail.joinLimit '==1'}},仅限新人{{/if}}</span>
  170 + {{else}}
  171 + <div class="bottom-title">{{activityIdDetail.peopleNum}}人成团</div>
  172 + {{/if}}
  173 + </button>
  174 + {{else}}
  175 + <div class='soldOut disable'>
  176 + <span class="bottom-title mainText">已售罄</span>
  177 + <span class="bottom-title subText">还有机会</span>
  178 + </div>
  179 + {{/if}}
233 </div> 180 </div>
  181 +
234 {{#if introUrl}} 182 {{#if introUrl}}
235 <input id="introUrl" type="hidden" value="{{introUrl}}"> 183 <input id="introUrl" type="hidden" value="{{introUrl}}">
236 {{/if}} 184 {{/if}}
@@ -221,4 +221,110 @@ @@ -221,4 +221,110 @@
221 .floors { 221 .floors {
222 margin-bottom: 14px; 222 margin-bottom: 14px;
223 } 223 }
  224 +
  225 + .bottom {
  226 + display: flex;
  227 + position: fixed;
  228 + flex-direction: row;
  229 + width: 100%;
  230 + height: 100px;
  231 + bottom: 0;
  232 + background-color: #fff;
  233 + border-top: 1px solid rgb(242, 242, 242);
  234 + z-index: 1000;
  235 +
  236 + .count-down {
  237 + position: absolute;
  238 + top: -88px;
  239 + left: 0;
  240 + right: 0;
  241 + height: 88px;
  242 +
  243 + .comp-count-dow-by-now {
  244 + height: 88px;
  245 + line-height: 88px;
  246 + color: #fff;
  247 + font-size: 24px;
  248 + text-align: center;
  249 + background-color: rgba(34, 34, 34, 0.8);
  250 + }
  251 +
  252 + .number {
  253 + display: inline-block;
  254 + font-size: 40px;
  255 + vertical-align: bottom;
  256 + }
  257 + }
  258 +
  259 + .shoppint-cart-icon {
  260 + position: relative;
  261 + width: 160px;
  262 + background-color: #fff;
  263 + vertical-align: center;
  264 + justify-content: center;
  265 + text-align: center;
  266 + }
  267 +
  268 + .shoppint-cart-icon-image {
  269 + display: inline;
  270 + position: absolute;
  271 + width: 50px;
  272 + height: 50px;
  273 + align-items: center;
  274 + z-index: 10;
  275 + margin-top: 30px;
  276 + margin-left: -30px;
  277 + }
  278 +
  279 + .badge {
  280 + position: absolute;
  281 + right: 15px;
  282 + width: 15px;
  283 + height: 15px;
  284 + line-height: 15px;
  285 + background: #f00;
  286 + color: #fff;
  287 + border-radius: 50%;
  288 + text-align: center;
  289 + font-size: 8px;
  290 + margin-top: 15px;
  291 + }
  292 +
  293 + .shoppint-cart-add {
  294 + flex: 1;
  295 + border-radius: 0;
  296 + background-color: #444;
  297 + vertical-align: center;
  298 + justify-content: center;
  299 + flex-direction: column;
  300 + display: flex;
  301 + text-align: center;
  302 + }
  303 +
  304 + .bottom-title {
  305 + display: flex;
  306 + color: white;
  307 + font-size: 30px;
  308 + width: 100%;
  309 + text-align: center;
  310 + align-items: center;
  311 + justify-content: center;
  312 + border-radius: 0;
  313 + }
  314 +
  315 + .join-group-btn {
  316 + background-color: #d0021b;
  317 + border-radius: 0;
  318 + }
  319 +
  320 + .buynow {
  321 + flex: 1;
  322 + vertical-align: center;
  323 + justify-content: center;
  324 + background-color: #d0021b;
  325 + flex-direction: column;
  326 + display: flex;
  327 + text-align: center;
  328 + }
  329 + }
224 } 330 }