Authored by 郝肖肖

优惠券搜索 coupon id

@@ -171,6 +171,11 @@ const _searchGoods = (params) => { @@ -171,6 +171,11 @@ const _searchGoods = (params) => {
171 method = 'app.student.discount'; 171 method = 'app.student.discount';
172 } 172 }
173 173
  174 + // 个人中心优惠券立即使用 - 商品列表
  175 + if (params.coupon_id) {
  176 + method = 'app.search.coupon';
  177 + }
  178 +
174 return api.get('', _.assign({ 179 return api.get('', _.assign({
175 method: method 180 method: method
176 }, params), { 181 }, params), {
@@ -37,7 +37,7 @@ var $input = $('#search-input input'), @@ -37,7 +37,7 @@ var $input = $('#search-input input'),
37 $buriedpoint = $('.buriedpoint'), 37 $buriedpoint = $('.buriedpoint'),
38 $search = $('#search'); 38 $search = $('#search');
39 39
40 -var shopId, sort, brand, outlets, app_type, age_level, msort, misort, coin, app_version, students; 40 +var shopId, sort, brand, outlets, app_type, age_level, msort, misort, coin, app_version, students, couponId;
41 41
42 var size, color, style, standard, gender, price, p_d, query, limited, specialoffer, specialsale_id, promotion; 42 var size, color, style, standard, gender, price, p_d, query, limited, specialoffer, specialsale_id, promotion;
43 43
@@ -246,6 +246,7 @@ specialoffer = getQueryString('specialoffer'); @@ -246,6 +246,7 @@ specialoffer = getQueryString('specialoffer');
246 specialsale_id = getQueryString('specialsale_id'); 246 specialsale_id = getQueryString('specialsale_id');
247 promotion = getQueryString('promotion'); 247 promotion = getQueryString('promotion');
248 students = getQueryString('students'); 248 students = getQueryString('students');
  249 +couponId = getQueryString('coupon_id');
249 250
250 if ($fsgc.children().length > 0) { 251 if ($fsgc.children().length > 0) {
251 var fsgcgoods = [], 252 var fsgcgoods = [],
@@ -516,6 +517,10 @@ function search(opt) { @@ -516,6 +517,10 @@ function search(opt) {
516 params.start = 12; 517 params.start = 12;
517 } 518 }
518 519
  520 + if (couponId) {
  521 + params.coupon_id = couponId;
  522 + }
  523 +
519 $.extend(setting, defaultOpt, params); 524 $.extend(setting, defaultOpt, params);
520 searching = true; 525 searching = true;
521 loading.showLoadingMask(); 526 loading.showLoadingMask();
@@ -752,7 +757,6 @@ if ($brandHeader.data('isbaseshop') === true) { @@ -752,7 +757,6 @@ if ($brandHeader.data('isbaseshop') === true) {
752 Object.assign(defaultOpt, {shop_id: $brandHeader.data('id')}); 757 Object.assign(defaultOpt, {shop_id: $brandHeader.data('id')});
753 } 758 }
754 759
755 -// console.log(defaultOpt)  
756 (function() { 760 (function() {
757 var pars = {}; 761 var pars = {};
758 762
@@ -836,6 +840,10 @@ if ($brandHeader.data('isbaseshop') === true) { @@ -836,6 +840,10 @@ if ($brandHeader.data('isbaseshop') === true) {
836 pars.shop_id = shopId; 840 pars.shop_id = shopId;
837 } 841 }
838 842
  843 + if (couponId) {
  844 + pars.coupon_id = couponId;
  845 + }
  846 +
839 $.extend(defaultOpt, pars); 847 $.extend(defaultOpt, pars);
840 $.ajax({ 848 $.ajax({
841 type: 'GET', 849 type: 'GET',