Authored by 郭成尧

del-brand

@@ -11,12 +11,11 @@ shopCoupon = { @@ -11,12 +11,11 @@ shopCoupon = {
11 appVersion: window.queryString.app_version || window.queryString.appVersion, 11 appVersion: window.queryString.app_version || window.queryString.appVersion,
12 uid: window.queryString.uid, 12 uid: window.queryString.uid,
13 shopId: parseInt($('.shop-id').val() || $('.shopId').val(), 10) || null, 13 shopId: parseInt($('.shop-id').val() || $('.shopId').val(), 10) || null,
14 - brandId: parseInt($('.brand-header').data('id'), 10) || null,  
15 couponTemplate: require('product/shop/coupon.hbs') 14 couponTemplate: require('product/shop/coupon.hbs')
16 }, 15 },
17 init: function() { 16 init: function() {
18 - // 如果都为空,则不请求  
19 - if (!this.common.shopId && !this.common.brandId) { 17 + // 如果为空,则不请求
  18 + if (!this.common.shopId) {
20 return true; 19 return true;
21 } 20 }
22 21
@@ -27,26 +26,17 @@ shopCoupon = { @@ -27,26 +26,17 @@ shopCoupon = {
27 }, 26 },
28 getShopCouponsList: function() { 27 getShopCouponsList: function() {
29 let that = this, 28 let that = this,
30 - _url = location.protocol + '//m.yohobuy.com'; 29 + _url = location.protocol + '//m.yohobuy.com/product/index/getShopCouponsList';
31 30
32 if ($('.coupon-group').length <= 0) { 31 if ($('.coupon-group').length <= 0) {
33 return false; 32 return false;
34 } 33 }
35 34
36 - if (that.common.shopId) {  
37 - // 店铺领券  
38 - _url += '/product/index/getShopCouponsList';  
39 - } else {  
40 - // 品牌领券  
41 - _url += '/product/index/getBrandCouponsList';  
42 - }  
43 -  
44 $.ajax({ 35 $.ajax({
45 method: 'GET', 36 method: 'GET',
46 url: _url, 37 url: _url,
47 data: { 38 data: {
48 shopId: that.common.shopId, 39 shopId: that.common.shopId,
49 - brandId: that.common.brandId,  
50 uid: that.common.uid 40 uid: that.common.uid
51 }, 41 },
52 xhrFields: { 42 xhrFields: {