Authored by 陈峰

Merge branch 'feature/shop-optim' of http://git.yoho.cn/fe/yohobuywap-node into feature/shop-optim

... ... @@ -116,7 +116,7 @@ const _getShopInfo = (shopId, uid) => {
method: 'app.shops.getIntro',
shop_id: shopId,
uid: uid || 0
}, {code: 200}).then((result) => {
}, {code: 200, cache: true}).then((result) => {
return result.data;
});
};
... ... @@ -147,7 +147,7 @@ const _getShopCategory = (shopId, channel, gender) => {
yh_channel: yhChannel[channel],
gender: gender || '1,3',
shop_id: shopId
}, {code: 200}).then(result => {
}, {code: 200, cache: true}).then(result => {
return result.data;
});
};
... ... @@ -259,7 +259,7 @@ const getShopBrands = (shopId) => {
return api.get('', {
method: 'app.shops.getShopsBrands',
shop_id: shopId
}, {code: 200}).then((result) => {
}, {code: 200, cache: true}).then((result) => {
if (result[0]) {
return result[0].brand_id;
}
... ... @@ -276,7 +276,7 @@ const searchProductBySkn = (productSkn) => {
return api.get('', {
method: 'h5.product.batch',
productSkn: productSkn
}, {code: 200}).then(result => {
}, {code: 200, cache: true}).then(result => {
return _.get(result, 'data.product_list', []);
});
};
... ... @@ -673,6 +673,7 @@ const getBrandIntro = (brandId, uid) => {
let param = {
uid: uid
};
return api.get('', _.assign({
method: 'app.brand.getBrandIntro',
brand_id: brandId
... ...
'use strict';
const fs = require('fs');
let devHost = '172.16.9.195';
let devHost = '127.0.0.1';
fs.readFile('.devhost', (err, buf)=> {
if (!err) {
... ...
... ... @@ -228,7 +228,9 @@ $.extend({
a.async = 1;
a.src = j;
setTimeout(function() {
m.parentNode.insertBefore(a, m);
}, 50);
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https' : 'http') + '://cdn.yoho.cn/yas-jssdk/1.0.18/yas.js', '_yas'));
(function() {
... ...
... ... @@ -15,8 +15,10 @@ shopCoupon = {
couponTemplate: require('product/shop/coupon.hbs')
},
init: function() {
setTimeout(function() {
this.loginCoupon();
this.getShopCouponsList();
}.bind(shopCoupon), 400);
},
getShopCouponsList: function() {
var that = this,
... ...