Authored by zhangxiaoru

shopcollect

... ... @@ -14,8 +14,10 @@ const shopList = (uid, tabName) => {
method: 'app.shops.promote',
uid: uid,
tab_name: tabName
}, {
code: 200,
cache: true
}).then((result) => {
if (result && result.code === 200) {
_.forEach(result.data, function(data) {
data.isFavorite = data.isFavorite === 'Y';
... ... @@ -31,8 +33,11 @@ const shopList = (uid, tabName) => {
const shopNav = () => {
return api.get('', {
method: 'app.shops.promoteTabNameList'
}, {
cache: true,
code: 200
}).then((result) => {
if (result && result.code === 200) {
if (result.data) {
return result.data;
}
});
... ... @@ -40,7 +45,7 @@ const shopNav = () => {
const banner = () => {
return service.get('operations/api/v5/resource/get', {
content_code: 'c0acf0296a3c329678fb45da958d9951'
content_code: 'ec9eb72eae121fcd6c1b7d1de75caff1'
}, {
cache: true
}).then((result) => {
... ...
... ... @@ -133,7 +133,7 @@ function shopNavData() {
// 加载第一页数据
if (navType.id) {
$('.shop-nav').find('li').each(function() {
if (navType.id === $(this).data('type')) {
if (decodeURI(navType.id) === $(this).data('type')) {
$(this).addClass('active');
shopListData($(this).data('type'));
}
... ... @@ -183,6 +183,4 @@ $(function() {
pagination: '.banner-top .pagination-inner'
});
}
});
... ...