activate.js
901 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
/**
* 激活点击统计 models
* @author: wsl<shuiling.wang@yoho.cn>
* @date: 2017/03/21
*/
'use strict';
const unionApi = new global.yoho.ApiBase(global.yoho.config.domains.unionApi, {
name: 'union',
cache: global.yoho.cache,
useCache: false
});
const canLogin = (uid) => {
return unionApi.post('/union/ActivateUnionRest/canlogin', {
uid: uid
}).then(result => {
if (result && result.code === 200) {
return result.data.canLogin;
} else {
return Promise.reject(result);
}
});
};
const getList = (params) => {
return unionApi.post('/union/ActivateUnionRest/queryYHActivateDeviceId', params).then(result => {
if (result && result.code === 200) {
return result;
} else {
return Promise.reject(result);
}
});
};
module.exports = {
canLogin,
getList
};