Authored by 张文文

一件代发商品提示下载app购买 review by lea.guo

... ... @@ -120,6 +120,9 @@
{{#if preferenceUrl}}
<input id="preferenceUrl" type="hidden" value="{{preferenceUrl}}">
{{/if}}
{{#if sellOneType}}
<input id="sellOneType" type="hidden" value="{{sellOneType}}">
{{/if}}
<input id="productSkn" type="hidden" value="{{productSkn}}">
<input id="brand-id" type="hidden" value="{{brandId}}">
... ...
... ... @@ -19,8 +19,12 @@
<div class="tip{{#unless @root.isCollect}} opa{{/unless}}">{{#if @root.isCollect}}已收藏{{else}}收藏{{/if}}</div>
</a>
<span class="btn-c">
{{#if addToCartUrl}}
<a id="addtoCart" href="javascript:;" class="addto-cart add-to-cart-url">加入购物车</a>
{{#if isSellOneType}}
<a href="javascript:;" class="addto-cart">下载APP购买</a>
{{else}}
{{#if addToCartUrl}}
<a id="addtoCart" href="javascript:;" class="addto-cart add-to-cart-url">加入购物车</a>
{{/if}}
{{/if}}
{{#if tickets}}
<a id="ticketsToCart" href="javascript:;" class="addto-cart add-to-cart-url">立即购买</a>
... ...
... ... @@ -3,6 +3,7 @@ import {toAppPageDialog} from 'js/common/open-app';
let $ = require('yoho-jquery'),
tip = require('js/plugin/tip');
let productId = $('#productId').val();
let sellOneType = $('#sellOneType').val();
let goodsId = $('#goodsId').val();
let productSkn = $('#productSkn').val();
let brandId = $('#brand-id').val();
... ... @@ -91,6 +92,9 @@ setTimeout(() => {
if (!data) {
return;
}
data.cartInfo.isSellOneType = sellOneType === '30' ? true : false;
let dbClass = 'data-bind';
let infoDataHbs = require('hbs/product/detail/infodata.hbs'),
priceDataHbs = require('hbs/product/detail/pricedata.hbs');
... ...
... ... @@ -34,6 +34,9 @@ class DetailProcess {
dest.shelveTime = _.get(origin, 'shelveTime', 0);
// 一件代发
dest.sellOneType = _.get(origin, 'sellType', 0);
// 商品标签
if (origin.tags) {
let productTags = {};
... ...