...
|
...
|
@@ -10,13 +10,13 @@ shopCoupon = { |
|
|
common: {
|
|
|
appVersion: window.queryString.app_version || window.queryString.appVersion,
|
|
|
uid: window.queryString.uid,
|
|
|
shopId: $('.shop-id').val() || '',
|
|
|
brandId: $('.brand-header').data('id') || '',
|
|
|
shopId: parseInt($('.shop-id').val(), 10) || null,
|
|
|
brandId: parseInt($('.brand-header').data('id'), 10) || null,
|
|
|
couponTemplate: require('product/shop/coupon.hbs')
|
|
|
},
|
|
|
init: function() {
|
|
|
// 如果都为空,则不请求
|
|
|
if (this.common.shopId === '' && this.common.brandId === '') {
|
|
|
if (!this.common.shopId && !this.common.brandId) {
|
|
|
return true;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -27,12 +27,12 @@ shopCoupon = { |
|
|
var that = this,
|
|
|
_url = location.protocol + '//m.yohobuy.com';
|
|
|
|
|
|
if (that.common.shopId === '') {
|
|
|
// 品牌领券
|
|
|
_url += '/product/index/getBrandCouponsList';
|
|
|
} else {
|
|
|
if (that.common.shopId) {
|
|
|
// 店铺领券
|
|
|
_url += '/product/index/getShopCouponsList';
|
|
|
} else {
|
|
|
// 品牌领券
|
|
|
_url += '/product/index/getBrandCouponsList';
|
|
|
}
|
|
|
|
|
|
$.ajax({
|
...
|
...
|
|