UserData.js
862 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
'use strict';
const api = global.yoho.API;
const privateKeyList={
'android':'fd4ad5fcfa0de589ef238c0e7331b585',
'iphone':'a85bb0674e08986c6b115d5e3a4884fa',
'ipad':'ad9fcda2e679cf9229e37feae2cdcf80',
'web':'0ed29744ed318fd28d2c07985d3ba633',
'h5':'fd4ad5fcfa0de589ef238c0e7331b585'
}
const getVIPInfoByUid = (uid)=>{
let options = {
method: 'app.passport.vip',
uid: uid,
private_key:"0ed29744ed318fd28d2c07985d3ba633"
};
return api.get('', options);
};
const getCouponsList=(uid,type,page,limit)=>{
page=page||1;
type=type||'notuse';
limit=limit||10;
let options = {
method: 'app.coupons.lists',
uid: uid,
type:type,
page:page,
limit:limit
};
return api.get('', options);
}
module.exports = {
getVIPInfoByUid,
getCouponsList
};