Authored by 毕凯

Merge remote-tracking branch 'origin/gray'

... ... @@ -454,17 +454,13 @@ class BuyNowController {
}
/**
* 输入优惠券码使用优惠券
* 兑换优惠券
*/
useCouponCode(req, res, next) {
co(function* () {
let result = yield req.ctx(BuyNowModel).usePromotionCode({
uid: req.user.uid,
product_sku: req.body.product_sku,
sku_type: req.body.sku_type,
buy_number: req.body.buy_number,
promotion_code: req.body.promotion_code
});
let result = yield req.ctx(shoppingModel).useCoupon(
req.user.uid, req.body.couponCode
);
res.json(result);
})().catch(next);
... ...
... ... @@ -267,7 +267,8 @@ const payAli = (req, res, next) => {
uid: req.user.uid,
udid: req.cookies.udid || require('yoho-md5')(req.ip) || 'yoho',
orderCode: req.query.out_trade_no,
contentCode: '78d0fb6c97d691863286edcb4d8abfa9'
contentCode: '78d0fb6c97d691863286edcb4d8abfa9',
client_id: req.cookies._yasvd || ''
};
// 如果没有uid,跳转到首页
... ...
... ... @@ -44,7 +44,7 @@ class payModel extends global.yoho.BaseModel {
return this.get({data: {
method: 'app.recommend.purchased',
productSkn: param.skn,
udid: param.uid,
uid: param.uid,
rec_pos: '100005',
limit: 2,
client_id: param.client_id
... ...
... ... @@ -267,7 +267,7 @@ class shoppingModel extends global.yoho.BaseModel {
}
/**
* 购物车结算--使用优惠券
* 购物车结算--兑换优惠券
* @param uid int 用户uid
* @param couponCode string 优惠券代码
* @return
... ...
... ... @@ -20,6 +20,11 @@ module.exports = (limiter, policy) => {
try {
blacklist = JSON.parse(args[0]);
} catch (error) {
logger.error(error);
}
try {
whitelist = JSON.parse(args[1]);
} catch (error) {
logger.error(error);
... ...
{
"name": "yohobuywap-node",
"version": "6.6.1",
"version": "6.6.2",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -64,12 +64,11 @@ function getGender() {
require('channel/maybe-like')({gender: getGender()});
// 你可能喜欢没有数据就隐藏
setTimeout(function() {
$(document).on('PAY_SUCCESS_PAGE_MAYBE_LIKE_LOAD', () => {
if ($('#goods-list').find('.good-info').length === 0) {
$('.maybe-like').hide();
}
}, 200);
});
function Marquee() {
prompt.scrollLeft(prompt.scrollLeft() + 1);
... ...
... ... @@ -213,8 +213,13 @@ module.exports = function(likeParameter) {
});
// 为您优选埋点 end
// 支付成功页,请求数据完成
$(document).trigger('PAY_SUCCESS_PAGE_MAYBE_LIKE_LOAD');
},
error: function() {
// 支付成功页,请求数据完成
$(document).trigger('PAY_SUCCESS_PAGE_MAYBE_LIKE_LOAD');
tip.show('网络断开连接了~');
searching = false;
loading.hideLoadingMask();
... ...
... ... @@ -46,6 +46,8 @@ const PARAMMAP = {
const getParams = (pathParams) => {
let params = {};
pathParams = _.replace(pathParams, '.html', '');
if (pathParams) {
let paramsRaw = _.split(pathParams, '-');
... ...