Authored by 毕凯

Merge branch 'feature/ticketRecode' into 'release/5.9'

Feature/ticket recode



See merge request !695
... ... @@ -17,7 +17,8 @@ const ticketsConfirm = (req, res) => {
// pageFooter: true,
localCss: true,
navBtn: false
navBtn: false,
width750: true
};
let params = {
... ...
... ... @@ -2,6 +2,7 @@
const api = global.yoho.API;
const helpers = global.yoho.helpers;
const _ = require('lodash');
// 展览票(单日票)skn
const SINGLE_TICKETS_SKN = 51335912;
... ... @@ -14,8 +15,6 @@ const checkTickets = (param) => {
buy_number: param.buyNumber,
use_yoho_coin: param.useYohoCoin || 0,
yoho_coin_mode: param.yohoCoinMode ? param.yohoCoinMode : 0
}, {
code: 200
}).then((result) => {
return result;
});
... ... @@ -71,7 +70,7 @@ const ticketsConfirm = (param) => {
orderEnsurePage: true
};
if (result && result[0] && result[0].data) {
if (_.get(result, '[0].data.goods_list', false)) {
let bulid = [];
result[0].data.goods_list.forEach((val) => {
... ...
... ... @@ -11,7 +11,7 @@
<p class="name row">{{name}}</p>
<p class="row">
{{#if color}}
<span class="color">
<span class="color{{#if tickets}} date{{/if}}">
{{#if tickets}}日期{{else}}颜色{{/if}}:{{color}}
</span>
{{/if}}
... ...
... ... @@ -8,10 +8,6 @@ const _ = require('lodash');
* 门票
* @type {{SINGLE_TICKETS_SKN: number}}
*/
const TICKETS = {
SINGLE_TICKETS_SKN: 51335912, // 展览票(单日票)skn
PACKAGE_TICKETS_SKN: 51335908 // 套票skn
};
/**
* 格式化价格
... ... @@ -25,7 +21,7 @@ const transPrice = (price, isSepcialZero) => {
* 格式化订单商品
* @private
*/
const _formatOrderGoods = (orderGoods, count, haveLink, tickets) => {
const _formatOrderGoods = (orderGoods, count, haveLink) => {
let result = [];
_.forEach(orderGoods, value => {
... ... @@ -79,12 +75,7 @@ const _formatOrderGoods = (orderGoods, count, haveLink, tickets) => {
count += parseInt(value.buy_number, 10);
/* 门票 */
if (tickets) {
/* 展览票不显示区域 */
if (value.product_skn === TICKETS.SINGLE_TICKETS_SKN) {
delete goods.size;
}
if (value.goods_type === 'ticket') {
Object.assign(goods, {
tickets: true
});
... ...
... ... @@ -153,7 +153,6 @@ const orderDetailData = (uid, orderCode) => {
uid: uid,
order_code: orderCode
}).then(result => {
if (result && result.code === 200) {
let orderDetail = camelCase(result.data);
let goods = [];
... ... @@ -185,7 +184,8 @@ const orderDetailData = (uid, orderCode) => {
size: data.sizeName,
payPrice: data.realPayPrice,
salePrice: parseFloat(data.salesPrice).toFixed(2),
count: count
count: count,
tickets: data.goodsType === 'ticket'
// isVipPrice: data.discountTag === 'V',
// isStudebt: data.discountTag === 'S'
... ...
... ... @@ -14,7 +14,7 @@ const singleAPI = global.yoho.SingleAPI;
const helpers = global.yoho.helpers;
const productProcess = require(`${utils}/product-process`);
const SINGLE_TICKETS_SKN = 51335912; // 展览票
// const SINGLE_TICKETS_SKN = 51335912; // 展览票
/**
* 获取用户数据信息
... ... @@ -625,17 +625,19 @@ const _detailDataPkgAsync = (origin, uid, vipLevel, ua) => {
}).then(result => {
// 虚拟商品(门票)
if (origin.attribute * 1 === 3) {
result.cartInfo.addToCartUrl = false;
result.tickets = result.cartInfo.tickets = true;
if (result.cartInfo.addToCartUrl) {
result.cartInfo.addToCartUrl = false;
result.tickets = result.cartInfo.tickets = true;
}
result.ticketsConfirm = helpers.urlFormat('/cart/index/ticketsConfirm');
// 展览票
if (origin.product_skn * 1 === SINGLE_TICKETS_SKN) {
result.single = true;
} else {
// 套票
result.package = true;
}
// if (origin.product_skn * 1 === SINGLE_TICKETS_SKN) {
// result.single = true;
// } else {
// // 套票
// result.package = true;
// }
// 购票限制
result.cartInfo.limit = 4;
... ...
... ... @@ -11,7 +11,7 @@
<p class="name row">{{name}}</p>
<p class="row">
{{#if color}}
<span class="color">
<span class="color{{#if tickets}} date{{/if}}">
{{#if tickets}}日期{{else}}颜色{{/if}}:{{color}}
</span>
{{/if}}
... ...
... ... @@ -11,7 +11,7 @@
<p class="name row">{{name}}</p>
<p class="row">
{{#if color}}
<span class="color">
<span class="color{{#if tickets}} date{{/if}}">
{{#if tickets}}日期{{else}}颜色{{/if}}:{{color}}
</span>
{{/if}}
... ...
... ... @@ -31,7 +31,7 @@
<span class="btn del">删除订单</span>
{{else if lookQrcode}}
<a class="locHref" href="{{link}}">
<span class="btn check-logistics">查看二维码</span>
<span class="btn check-logistics check-ewm">查看二维码</span>
</a>
{{else if afterService}}
<span class="btn after-sales">申请售后</span>
... ...
... ... @@ -22,7 +22,7 @@
<a id="addtoCart" href="javascript:;" class="addto-cart add-to-cart-url">加入购物车</a>
{{/if}}
{{#if tickets}}
<a id="addtoCart" href="javascript:;" class="addto-cart add-to-cart-url">立即购买</a>
<a id="ticketsToCart" href="javascript:;" class="addto-cart add-to-cart-url">立即购买</a>
{{/if}}
{{#if isDepositAdvance}}
<a id="isDepositAdvance" href="javascript:;" class="addto-cart add-to-cart-url">立即购买</a>
... ...
... ... @@ -155,7 +155,7 @@ setTimeout(() => {
let chosePanel = require('common/chose-panel-new');
$('#addtoCart').on('touchstart', function() {
$('#addtoCart, #ticketsToCart').on('touchstart', function() {
let productCode = $('#limitProductCode').val();
let seckill = $('.seckill-time').length;
... ...
... ... @@ -451,6 +451,11 @@
color: #b6b6b6;
}
.date {
max-width: none !important;
display: block !important;
}
.price-wrap {
position: absolute;
top: 20px;
... ...
... ... @@ -20,7 +20,7 @@
h4 {
width: 95%;
margin-left: 5%;
margin: 0 2.5%;
font-size: 30px;
color: #b0b0b0;
margin-bottom: 20px;
... ... @@ -28,8 +28,8 @@
}
.yoho-coin {
margin-left: 5%;
width: 90%;
margin: 0 2.5%;
width: 95%;
overflow: hidden;
border-bottom: 1px solid #e0e0e0;
... ... @@ -41,7 +41,8 @@
.dispatch {
.sub-block {
h3 {
width: 90%;
width: 95% !important;
margin: 0 2.5% !important;
span {
color: #afafaf;
... ...
... ... @@ -400,6 +400,11 @@
border-radius: 5PX;
margin-left: 15px;
margin-top: 5px;
&.check-ewm {
width: auto;
padding: 0 10px;
}
}
.pay {
... ...
... ... @@ -338,6 +338,11 @@
color: #b6b6b6;
}
.date {
max-width: none !important;
display: block !important;
}
.price-wrap {
position: absolute;
top: 0;
... ...