Authored by zhangxiaoru

brand

@@ -21,8 +21,9 @@ const brand = require('../models/brand'); @@ -21,8 +21,9 @@ const brand = require('../models/brand');
21 const index = (req, res, next) => { 21 const index = (req, res, next) => {
22 let channel = req.query.brand || 1; 22 let channel = req.query.brand || 1;
23 let contentCode = 'd0149783b8dd2adaf083fd10556c39a9'; 23 let contentCode = 'd0149783b8dd2adaf083fd10556c39a9';
  24 + let appType = 1;
24 25
25 - brand.getListData(contentCode, channel).then((result) => { 26 + brand.getListData(contentCode, channel, appType).then((result) => {
26 res.display('index', { 27 res.display('index', {
27 module: 'brand', 28 module: 'brand',
28 page: 'index', 29 page: 'index',
@@ -42,6 +42,7 @@ const _processListData = (list) => { @@ -42,6 +42,7 @@ const _processListData = (list) => {
42 } 42 }
43 ); 43 );
44 }); 44 });
  45 + console.log(listData)
45 46
46 return listData; 47 return listData;
47 }; 48 };
@@ -96,9 +97,10 @@ const _getResources = (contentCode) => { @@ -96,9 +97,10 @@ const _getResources = (contentCode) => {
96 * @param channel 97 * @param channel
97 * @returns {*} 98 * @returns {*}
98 */ 99 */
99 -const _getBreakingSort = (channel) => { 100 +const _getBreakingSort = (channel, appType) => {
100 return api.get('', { 101 return api.get('', {
101 - yo_channel: channel, 102 + yh_channel: channel,
  103 + app_type: appType,
102 method: 'app.brand.newBrandList' 104 method: 'app.brand.newBrandList'
103 }).then((result) => { 105 }).then((result) => {
104 if (result && result.code === 200) { 106 if (result && result.code === 200) {
@@ -114,8 +116,8 @@ const _getBreakingSort = (channel) => { @@ -114,8 +116,8 @@ const _getBreakingSort = (channel) => {
114 * 获取品牌一览相关数据 116 * 获取品牌一览相关数据
115 * @returns {*} 117 * @returns {*}
116 */ 118 */
117 -const getListData = (contentCode, channel) => {  
118 - return Promise.all([_getResources(contentCode), _getBreakingSort(channel)]) 119 +const getListData = (contentCode, channel, appType) => {
  120 + return Promise.all([_getResources(contentCode), _getBreakingSort(channel, appType)])
119 .then((result) => { 121 .then((result) => {
120 122
121 return { 123 return {