Authored by 郝肖肖

Merge branch 'release/5.2' into feature/homeOptimization

... ... @@ -353,7 +353,7 @@ const shopIntro = (req, res, next) => {
let appVersion = req.body.appVersion || false;
let params = {};
if (shopId) {
if (parseInt(shopId, 10)) {
listModel.getShopIntro(shopId).then(result => {
if (appVersion) {
params = {
... ...
... ... @@ -147,5 +147,5 @@
{{> common/suspend-cart}}
{{/ goodList}}
<input type="text" class="domain" style="display:none" value={{domain}}>
<input type="hidden" class="domain" value={{domain}}>
<input type="hidden" class="shopId shop-id" value={{shopId}}>
... ...
... ... @@ -110,7 +110,7 @@ ellipsis.init();
tip.show('网络断开连接了~');
}
});
} else if ($('.shopId').val().length > 0) {
} else if ($('.shopId').val() && $('.shopId').val() !== 'undefined') {
$.ajax({
url: '/product/index/baseShopFav',
data: {
... ...
... ... @@ -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({
... ...