|
@@ -38,6 +38,7 @@ let $input = $('#search-input').find('input[name="query"]'), |
|
@@ -38,6 +38,7 @@ let $input = $('#search-input').find('input[name="query"]'), |
38
|
|
38
|
|
39
|
let shopId, sort, brand, outlets, app_type, age_level, msort, misort, coin, app_version, students, couponId, searchFrom;
|
39
|
let shopId, sort, brand, outlets, app_type, age_level, msort, misort, coin, app_version, students, couponId, searchFrom;
|
40
|
let size, color, style, standard, gender, price, p_d, oldquery, query, limited, specialoffer, specialsale_id, promotion;
|
40
|
let size, color, style, standard, gender, price, p_d, oldquery, query, limited, specialoffer, specialsale_id, promotion;
|
|
|
41
|
+let couponCode;
|
41
|
|
42
|
|
42
|
// 默认筛选条件
|
43
|
// 默认筛选条件
|
43
|
let defaultOpt = require('common/query-param');
|
44
|
let defaultOpt = require('common/query-param');
|
|
@@ -248,6 +249,7 @@ specialsale_id = getQueryString('specialsale_id'); |
|
@@ -248,6 +249,7 @@ specialsale_id = getQueryString('specialsale_id'); |
248
|
promotion = getQueryString('promotion');
|
249
|
promotion = getQueryString('promotion');
|
249
|
students = getQueryString('students');
|
250
|
students = getQueryString('students');
|
250
|
couponId = getQueryString('coupon_id');
|
251
|
couponId = getQueryString('coupon_id');
|
|
|
252
|
+couponCode = getQueryString('coupon_code');
|
251
|
searchFrom = getQueryString('from');
|
253
|
searchFrom = getQueryString('from');
|
252
|
|
254
|
|
253
|
if ($fsgc.children().length > 0) {
|
255
|
if ($fsgc.children().length > 0) {
|
|
@@ -523,6 +525,10 @@ function search(opt) { |
|
@@ -523,6 +525,10 @@ function search(opt) { |
523
|
params.coupon_id = couponId;
|
525
|
params.coupon_id = couponId;
|
524
|
}
|
526
|
}
|
525
|
|
527
|
|
|
|
528
|
+ if (couponCode) {
|
|
|
529
|
+ params.coupon_code = couponCode;
|
|
|
530
|
+ }
|
|
|
531
|
+
|
526
|
if (searchFrom) {
|
532
|
if (searchFrom) {
|
527
|
params.from = searchFrom;
|
533
|
params.from = searchFrom;
|
528
|
}
|
534
|
}
|
|
@@ -856,10 +862,17 @@ if ($brandHeader.data('isbaseshop') === true) { |
|
@@ -856,10 +862,17 @@ if ($brandHeader.data('isbaseshop') === true) { |
856
|
pars.coupon_id = couponId;
|
862
|
pars.coupon_id = couponId;
|
857
|
}
|
863
|
}
|
858
|
|
864
|
|
|
|
865
|
+ if (couponCode) {
|
|
|
866
|
+ pars.coupon_code = couponCode;
|
|
|
867
|
+ }
|
|
|
868
|
+
|
859
|
$.extend(defaultOpt, pars);
|
869
|
$.extend(defaultOpt, pars);
|
860
|
$.ajax({
|
870
|
$.ajax({
|
861
|
type: 'GET',
|
871
|
type: 'GET',
|
862
|
url: location.protocol + '//m.yohobuy.com/product/search/filter',
|
872
|
url: location.protocol + '//m.yohobuy.com/product/search/filter',
|
|
|
873
|
+ xhrFields: {
|
|
|
874
|
+ withCredentials: true
|
|
|
875
|
+ },
|
863
|
data: defaultOpt,
|
876
|
data: defaultOpt,
|
864
|
success: function(data) {
|
877
|
success: function(data) {
|
865
|
if (data === '') {
|
878
|
if (data === '') {
|