Authored by 郝肖肖

优惠券搜索 coupon id

... ... @@ -171,6 +171,11 @@ const _searchGoods = (params) => {
method = 'app.student.discount';
}
// 个人中心优惠券立即使用 - 商品列表
if (params.coupon_id) {
method = 'app.search.coupon';
}
return api.get('', _.assign({
method: method
}, params), {
... ...
... ... @@ -37,7 +37,7 @@ var $input = $('#search-input input'),
$buriedpoint = $('.buriedpoint'),
$search = $('#search');
var shopId, sort, brand, outlets, app_type, age_level, msort, misort, coin, app_version, students;
var shopId, sort, brand, outlets, app_type, age_level, msort, misort, coin, app_version, students, couponId;
var size, color, style, standard, gender, price, p_d, query, limited, specialoffer, specialsale_id, promotion;
... ... @@ -246,6 +246,7 @@ specialoffer = getQueryString('specialoffer');
specialsale_id = getQueryString('specialsale_id');
promotion = getQueryString('promotion');
students = getQueryString('students');
couponId = getQueryString('coupon_id');
if ($fsgc.children().length > 0) {
var fsgcgoods = [],
... ... @@ -516,6 +517,10 @@ function search(opt) {
params.start = 12;
}
if (couponId) {
params.coupon_id = couponId;
}
$.extend(setting, defaultOpt, params);
searching = true;
loading.showLoadingMask();
... ... @@ -752,7 +757,6 @@ if ($brandHeader.data('isbaseshop') === true) {
Object.assign(defaultOpt, {shop_id: $brandHeader.data('id')});
}
// console.log(defaultOpt)
(function() {
var pars = {};
... ... @@ -836,6 +840,10 @@ if ($brandHeader.data('isbaseshop') === true) {
pars.shop_id = shopId;
}
if (couponId) {
pars.coupon_id = couponId;
}
$.extend(defaultOpt, pars);
$.ajax({
type: 'GET',
... ...