Authored by 王水玲

node 星潮教室 二期

@@ -34,7 +34,7 @@ const renderData = { @@ -34,7 +34,7 @@ const renderData = {
34 module: 'guang', 34 module: 'guang',
35 title: '新潮教室', 35 title: '新潮教室',
36 pageHeader: headerData 36 pageHeader: headerData
37 -} 37 +};
38 38
39 const curHeadTab = (num) => { 39 const curHeadTab = (num) => {
40 let i = 0; 40 let i = 0;
@@ -95,7 +95,7 @@ exports.collocation = (req, res) => { @@ -95,7 +95,7 @@ exports.collocation = (req, res) => {
95 res.render('star/collocation', _.assign(renderData, { 95 res.render('star/collocation', _.assign(renderData, {
96 headTab: headTab 96 headTab: headTab
97 })); 97 }));
98 -} 98 +};
99 99
100 /** 100 /**
101 * 星搭配文章请求 101 * 星搭配文章请求
@@ -114,5 +114,5 @@ exports.collocationList = (req, res) => { @@ -114,5 +114,5 @@ exports.collocationList = (req, res) => {
114 collocationList: result 114 collocationList: result
115 })); 115 }));
116 }); 116 });
117 -  
118 -} 117 +
  118 +};
@@ -40,14 +40,14 @@ const getResources = (page) => { @@ -40,14 +40,14 @@ const getResources = (page) => {
40 */ 40 */
41 exports.getIndexData = () => { 41 exports.getIndexData = () => {
42 return getResources('index'); 42 return getResources('index');
43 -} 43 +};
44 44
45 /** 45 /**
46 * 星专题 46 * 星专题
47 */ 47 */
48 exports.getSpecialData = () => { 48 exports.getSpecialData = () => {
49 return getResources('special'); 49 return getResources('special');
50 -} 50 +};
51 51
52 /** 52 /**
53 * 星搭配 53 * 星搭配
@@ -59,12 +59,12 @@ exports.getCollocationListData = (params, uid) => { @@ -59,12 +59,12 @@ exports.getCollocationListData = (params, uid) => {
59 uid: uid 59 uid: uid
60 }, params))).then((result) => { 60 }, params))).then((result) => {
61 if (result && result.code === 200) { 61 if (result && result.code === 200) {
62 - return res; 62 + return result;
63 } else { 63 } else {
64 logger.error('获取星搭配文章列表返回 code 不是 200'); 64 logger.error('获取星搭配文章列表返回 code 不是 200');
65 return []; 65 return [];
66 } 66 }
67 }); 67 });
68 -} 68 +};
69 69
70 -// guang/api/v5/article/getStarClassroomArticleList  
  70 +// guang/api/v5/article/getStarClassroomArticleList
@@ -8,16 +8,16 @@ var $ = require('yoho-jquery'), @@ -8,16 +8,16 @@ var $ = require('yoho-jquery'),
8 tip = require('../plugin/tip'), 8 tip = require('../plugin/tip'),
9 loading = require('../plugin/loading'), 9 loading = require('../plugin/loading'),
10 lazyLoad = require('yoho-jquery-lazyload'), 10 lazyLoad = require('yoho-jquery-lazyload'),
11 - ellipsis = require('yoho-mlellipsis'),  
12 - stopLoading = false; 11 + ellipsis = require('yoho-mlellipsis');
13 12
14 -var page = 1; 13 +var stopLoading = false,
  14 + page = 1;
15 15
16 ellipsis.init(); 16 ellipsis.init();
17 17
18 $('body').addClass('star-class-body'); 18 $('body').addClass('star-class-body');
19 19
20 -function massageAJAX(page) { 20 +function massageAJAX(pageData) {
21 var $this, $title, $cont; 21 var $this, $title, $cont;
22 22
23 loading.showLoadingMask(); 23 loading.showLoadingMask();
@@ -25,7 +25,7 @@ function massageAJAX(page) { @@ -25,7 +25,7 @@ function massageAJAX(page) {
25 type: 'GET', 25 type: 'GET',
26 url: '/guang/star/collocation/list', 26 url: '/guang/star/collocation/list',
27 data: { 27 data: {
28 - page: page 28 + page: pageData
29 }, 29 },
30 dataType: 'html', 30 dataType: 'html',
31 success: function(data) { 31 success: function(data) {
@@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
84 } 84 }
85 85
86 .collected { 86 .collected {
87 - color: #D62927; 87 + color: #d62927;
88 } 88 }
89 89
90 .forward { 90 .forward {
@@ -104,6 +104,6 @@ @@ -104,6 +104,6 @@
104 .star-class-body { 104 .star-class-body {
105 background: #333; 105 background: #333;
106 width: 100%; 106 width: 100%;
107 - font: 12px/1.5 Arial,'黑体'; 107 + font: 12px/1.5 Arial, '黑体';
108 float: left; 108 float: left;
109 -}  
  109 +}
@@ -32,5 +32,3 @@ @@ -32,5 +32,3 @@
32 } 32 }
33 } 33 }
34 } 34 }
35 -  
36 -