dynamic-data.js
809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* 动态获取页面数据
* @author liuchuanyang
* @date 2016/10/09
*/
var $ = require('yoho-jquery');
function getDynamicById(id) {
'use strict';
var param = {
return_type: 'jsonp',
id: id
};
return $.getJSON('//guang.yohobuy.com/guang/suggest?callback=?', param);
}
function getDynamicByIds(ids) {
'use strict';
var param = {
return_type: 'jsonp',
ids: ids
};
return $.getJSON('//guang.yohobuy.com/guang/suggest?callback=?', param);
}
function getDynamicCommentList(id, page) {
'use strict';
var param = {
id: id,
page: page
};
return $.getJSON('//guang.yohobuy.com/guang/suggest?callback=?', param);
}
module.exports = {
getDynamicById,
getDynamicByIds,
getDynamicCommentList
};