Authored by zhangxiaoru

shopcollect

@@ -14,8 +14,10 @@ const shopList = (uid, tabName) => { @@ -14,8 +14,10 @@ const shopList = (uid, tabName) => {
14 method: 'app.shops.promote', 14 method: 'app.shops.promote',
15 uid: uid, 15 uid: uid,
16 tab_name: tabName 16 tab_name: tabName
  17 + }, {
  18 + code: 200,
  19 + cache: true
17 }).then((result) => { 20 }).then((result) => {
18 -  
19 if (result && result.code === 200) { 21 if (result && result.code === 200) {
20 _.forEach(result.data, function(data) { 22 _.forEach(result.data, function(data) {
21 data.isFavorite = data.isFavorite === 'Y'; 23 data.isFavorite = data.isFavorite === 'Y';
@@ -31,8 +33,11 @@ const shopList = (uid, tabName) => { @@ -31,8 +33,11 @@ const shopList = (uid, tabName) => {
31 const shopNav = () => { 33 const shopNav = () => {
32 return api.get('', { 34 return api.get('', {
33 method: 'app.shops.promoteTabNameList' 35 method: 'app.shops.promoteTabNameList'
  36 + }, {
  37 + cache: true,
  38 + code: 200
34 }).then((result) => { 39 }).then((result) => {
35 - if (result && result.code === 200) { 40 + if (result.data) {
36 return result.data; 41 return result.data;
37 } 42 }
38 }); 43 });
@@ -40,7 +45,7 @@ const shopNav = () => { @@ -40,7 +45,7 @@ const shopNav = () => {
40 45
41 const banner = () => { 46 const banner = () => {
42 return service.get('operations/api/v5/resource/get', { 47 return service.get('operations/api/v5/resource/get', {
43 - content_code: 'c0acf0296a3c329678fb45da958d9951' 48 + content_code: 'ec9eb72eae121fcd6c1b7d1de75caff1'
44 }, { 49 }, {
45 cache: true 50 cache: true
46 }).then((result) => { 51 }).then((result) => {
@@ -133,7 +133,7 @@ function shopNavData() { @@ -133,7 +133,7 @@ function shopNavData() {
133 // 加载第一页数据 133 // 加载第一页数据
134 if (navType.id) { 134 if (navType.id) {
135 $('.shop-nav').find('li').each(function() { 135 $('.shop-nav').find('li').each(function() {
136 - if (navType.id === $(this).data('type')) { 136 + if (decodeURI(navType.id) === $(this).data('type')) {
137 $(this).addClass('active'); 137 $(this).addClass('active');
138 shopListData($(this).data('type')); 138 shopListData($(this).data('type'));
139 } 139 }
@@ -183,6 +183,4 @@ $(function() { @@ -183,6 +183,4 @@ $(function() {
183 pagination: '.banner-top .pagination-inner' 183 pagination: '.banner-top .pagination-inner'
184 }); 184 });
185 } 185 }
186 -  
187 -  
188 }); 186 });