config.js
752 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
var domain = document.location.href.indexOf('localhost') >= 0 ? '//yoho-activity-platform.test3.ingress.dev.yohocorp.com' : '//action.yoho.cn';
var listApi = domain + '/article/listNoUser';
var likeApi = domain + '/article/like';
var Api = {
getList: function(params) {
var data = Object.assign({
actId: 20,
pageNo: 1,
pageSize: 6,
order: 'asc'
}, params);
return $.ajax({
url: listApi,
method: 'get',
data: data
});
},
addLike: function(params) {
var data = Object.assign({
actId: 20,
articleId: 0,
vcase: 1
}, params);
if (data.articleId) {
return $.ajax({
url: likeApi,
method: 'post',
data: data
});
}
}
};