user-data.js
1.3 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
'use strict';
module.exports = class extends global.yoho.BaseModel {
constructor(ctx) {
super(ctx);
}
getVIPInfoByUid(uid) {
let options = {
method: 'app.passport.growthvip',
uid: uid
};
return this.get({data: options});
}
/**
* [vip累计记录]
* @param {[uid:uid,limit:每页数量, page:第几页]} params [参数]
* @return {[type]} [description]
*/
getVipRecord(params) {
let options = {
method: 'app.passport.growthhistory'
};
if (params.type === 2) {
options = Object.assign({method: 'app.passport.growthvip'});
delete params.type;
}
return this.get({data: Object.assign(options, params)});
}
getVipRecordDemo(params) {
let options = {
method: 'app.inbox.getlistnew'
};
return this.get({data: Object.assign(options, params)});
}
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 this.get({data: options});
}
};