Authored by 陈峰

Merge branch 'feature/cart' into 'release/5.4.1'

Feature/cart



See merge request !217
... ... @@ -8,6 +8,7 @@ const userModel = require('../../serverAPI/user');
const addressModel = require('../../serverAPI/user/address');
const orderModel = require('../models/order');
const crypto = global.yoho.crypto;
const authcode = require(global.utils + '/authcode');
exports.orderEnsure = (req, res, next) => {
let headerData = headerModel.setNav({
... ... @@ -180,7 +181,7 @@ exports.orderSub = (req, res) => {
if (testQyhUnion.client_id) {
unionKey = encryData;
} else {
// unionKey = helpers.unionDecode(req.cookies._QYH_UNION, 'q_union_yohobuy'); // TODO 这个方法没有
unionKey = authcode(req.cookies._QYH_UNION, 'q_union_yohobuy');
}
} else {
unionKey = '{"client_id":' + req.cookies.mkt_code + '}';
... ...
... ... @@ -6,11 +6,9 @@
{{#promotions}}
<div class="promo-item" data-id="{{promotionId}}" data-title="{{promotionOriginTitle}}" data-type="{{promotionType}}" data-status="{{status}}">
<div class="info"><i class="iconfont cuxiao"></i>{{promotionTitle}}</div>
{{#if optTitle}}
<div class="opt to-gift">
<a href="javascript:;">{{optTitle}}</a><i class="iconfont to-arrow"></i>
</div>
{{/if}}
</div>
{{/promotions}}
<div class="down-arrow">
... ...
... ... @@ -236,7 +236,6 @@
.activity-title {
background-color: #fff;
border-top: 1PX solid #e0e0e0;
font-size: 32px;
padding: 20px 20px 0;
}
... ... @@ -265,7 +264,7 @@
padding: 20px;
border-top: 1px solid #e0e0e0;
font-size: 28px;
margin-bottom: 38px;
margin-bottom: 20px;
.title {
display: inline-block;
... ...
... ... @@ -14,8 +14,8 @@ const getTimestamp = function() {
return parseInt(unixtimeMs / 1000, 10);
};
module.exports = function(str, operation, key, expiry) {
operation = operation ? operation : 'encode';
module.exports = function(str, key, expiry, operation) {
operation = operation ? operation : 'decode';
key = key ? key : '';
expiry = expiry ? expiry : 0;
let tmpstr, tmp;
... ... @@ -115,5 +115,3 @@ module.exports = function(str, operation, key, expiry) {
return s;
};
// console.log(module.exports('abcdef123', 'encode', 'key123', 99))
... ...