一件代发商品提示下载app购买 review by lea.guo
Showing
4 changed files
with
14 additions
and
0 deletions
@@ -120,6 +120,9 @@ | @@ -120,6 +120,9 @@ | ||
120 | {{#if preferenceUrl}} | 120 | {{#if preferenceUrl}} |
121 | <input id="preferenceUrl" type="hidden" value="{{preferenceUrl}}"> | 121 | <input id="preferenceUrl" type="hidden" value="{{preferenceUrl}}"> |
122 | {{/if}} | 122 | {{/if}} |
123 | + {{#if sellOneType}} | ||
124 | + <input id="sellOneType" type="hidden" value="{{sellOneType}}"> | ||
125 | + {{/if}} | ||
123 | 126 | ||
124 | <input id="productSkn" type="hidden" value="{{productSkn}}"> | 127 | <input id="productSkn" type="hidden" value="{{productSkn}}"> |
125 | <input id="brand-id" type="hidden" value="{{brandId}}"> | 128 | <input id="brand-id" type="hidden" value="{{brandId}}"> |
@@ -19,9 +19,13 @@ | @@ -19,9 +19,13 @@ | ||
19 | <div class="tip{{#unless @root.isCollect}} opa{{/unless}}">{{#if @root.isCollect}}已收藏{{else}}收藏{{/if}}</div> | 19 | <div class="tip{{#unless @root.isCollect}} opa{{/unless}}">{{#if @root.isCollect}}已收藏{{else}}收藏{{/if}}</div> |
20 | </a> | 20 | </a> |
21 | <span class="btn-c"> | 21 | <span class="btn-c"> |
22 | + {{#if isSellOneType}} | ||
23 | + <a href="javascript:;" class="addto-cart">下载APP购买</a> | ||
24 | + {{else}} | ||
22 | {{#if addToCartUrl}} | 25 | {{#if addToCartUrl}} |
23 | <a id="addtoCart" href="javascript:;" class="addto-cart add-to-cart-url">加入购物车</a> | 26 | <a id="addtoCart" href="javascript:;" class="addto-cart add-to-cart-url">加入购物车</a> |
24 | {{/if}} | 27 | {{/if}} |
28 | + {{/if}} | ||
25 | {{#if tickets}} | 29 | {{#if tickets}} |
26 | <a id="ticketsToCart" href="javascript:;" class="addto-cart add-to-cart-url">立即购买</a> | 30 | <a id="ticketsToCart" href="javascript:;" class="addto-cart add-to-cart-url">立即购买</a> |
27 | {{/if}} | 31 | {{/if}} |
@@ -3,6 +3,7 @@ import {toAppPageDialog} from 'js/common/open-app'; | @@ -3,6 +3,7 @@ import {toAppPageDialog} from 'js/common/open-app'; | ||
3 | let $ = require('yoho-jquery'), | 3 | let $ = require('yoho-jquery'), |
4 | tip = require('js/plugin/tip'); | 4 | tip = require('js/plugin/tip'); |
5 | let productId = $('#productId').val(); | 5 | let productId = $('#productId').val(); |
6 | +let sellOneType = $('#sellOneType').val(); | ||
6 | let goodsId = $('#goodsId').val(); | 7 | let goodsId = $('#goodsId').val(); |
7 | let productSkn = $('#productSkn').val(); | 8 | let productSkn = $('#productSkn').val(); |
8 | let brandId = $('#brand-id').val(); | 9 | let brandId = $('#brand-id').val(); |
@@ -91,6 +92,9 @@ setTimeout(() => { | @@ -91,6 +92,9 @@ setTimeout(() => { | ||
91 | if (!data) { | 92 | if (!data) { |
92 | return; | 93 | return; |
93 | } | 94 | } |
95 | + | ||
96 | + data.cartInfo.isSellOneType = sellOneType === '30' ? true : false; | ||
97 | + | ||
94 | let dbClass = 'data-bind'; | 98 | let dbClass = 'data-bind'; |
95 | let infoDataHbs = require('hbs/product/detail/infodata.hbs'), | 99 | let infoDataHbs = require('hbs/product/detail/infodata.hbs'), |
96 | priceDataHbs = require('hbs/product/detail/pricedata.hbs'); | 100 | priceDataHbs = require('hbs/product/detail/pricedata.hbs'); |
@@ -34,6 +34,9 @@ class DetailProcess { | @@ -34,6 +34,9 @@ class DetailProcess { | ||
34 | 34 | ||
35 | dest.shelveTime = _.get(origin, 'shelveTime', 0); | 35 | dest.shelveTime = _.get(origin, 'shelveTime', 0); |
36 | 36 | ||
37 | + // 一件代发 | ||
38 | + dest.sellOneType = _.get(origin, 'sellType', 0); | ||
39 | + | ||
37 | // 商品标签 | 40 | // 商品标签 |
38 | if (origin.tags) { | 41 | if (origin.tags) { |
39 | let productTags = {}; | 42 | let productTags = {}; |
-
Please register or login to post a comment