@freelog/tools-lib 0.1.128 → 0.1.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +103 -103
- package/dist/service-API/activities.d.ts +12 -0
- package/dist/service-API/contracts.d.ts +8 -0
- package/dist/service-API/index.d.ts +2 -0
- package/dist/service-API/policies.d.ts +12 -0
- package/dist/tools-lib.cjs.development.js +350 -686
- package/dist/tools-lib.cjs.development.js.map +1 -1
- package/dist/tools-lib.cjs.production.min.js +1 -1
- package/dist/tools-lib.cjs.production.min.js.map +1 -1
- package/dist/tools-lib.esm.js +350 -686
- package/dist/tools-lib.esm.js.map +1 -1
- package/package.json +66 -66
- package/src/i18n/I18nNext.ts +154 -154
- package/src/i18n/index.ts +7 -7
- package/src/index.ts +9 -9
- package/src/service-API/activities.ts +231 -201
- package/src/service-API/captcha.ts +30 -30
- package/src/service-API/collections.ts +81 -81
- package/src/service-API/contracts.ts +101 -84
- package/src/service-API/events.ts +18 -18
- package/src/service-API/i18n.ts +35 -35
- package/src/service-API/index.ts +39 -37
- package/src/service-API/informalNodes.ts +238 -238
- package/src/service-API/nodes.ts +65 -65
- package/src/service-API/policies.ts +72 -39
- package/src/service-API/presentables.ts +287 -287
- package/src/service-API/recombinations/index.ts +69 -69
- package/src/service-API/statistics.ts +20 -20
- package/src/service-API/storages.ts +358 -358
- package/src/service-API/testQualifications.ts +109 -109
- package/src/service-API/tools/index.ts +10 -10
- package/src/service-API/transactions.ts +109 -109
- package/src/service-API/user.ts +270 -270
- package/src/utils/axios.ts +145 -145
- package/src/utils/format.ts +98 -98
- package/src/utils/index.ts +20 -20
- package/src/utils/predefined.ts +37 -37
- package/src/utils/regexp.ts +52 -52
|
@@ -1,201 +1,231 @@
|
|
|
1
|
-
import FUtil from '../utils';
|
|
2
|
-
|
|
3
|
-
// 列出活动
|
|
4
|
-
interface List4ClientParamsType {
|
|
5
|
-
skip?: number;
|
|
6
|
-
limit?: number;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function list4Client(params: List4ClientParamsType) {
|
|
10
|
-
return FUtil.Request({
|
|
11
|
-
method: 'GET',
|
|
12
|
-
url: `/v2/activities/list4Client`,
|
|
13
|
-
params: params,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// 查询活动
|
|
18
|
-
interface Find4ClientParamsType {
|
|
19
|
-
_id: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function find4Client(params: Find4ClientParamsType) {
|
|
23
|
-
return FUtil.Request({
|
|
24
|
-
method: 'GET',
|
|
25
|
-
url: `/v2/activities/find4Client`,
|
|
26
|
-
params: params,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// 列出广告
|
|
31
|
-
interface AdsListParamsType {
|
|
32
|
-
skip?: number;
|
|
33
|
-
limit?: number;
|
|
34
|
-
place: 1 | 2 | 3 | 4; // 投放位置 1:顶部公告栏 2:右侧浮窗 3:概览页 4:发现页
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function adsList(params: AdsListParamsType) {
|
|
39
|
-
return FUtil.Request({
|
|
40
|
-
method: 'GET',
|
|
41
|
-
url: `/v2/activities/ads/list4Client`,
|
|
42
|
-
params: params,
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// 查询广告
|
|
47
|
-
interface AdsDetailsParamsType {
|
|
48
|
-
skip?: number;
|
|
49
|
-
limit?: number;
|
|
50
|
-
place: 1 | 2 | 3 | 4; // 投放位置 1:顶部公告栏 2:右侧浮窗 3:概览页 4:发现页
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function adsDetails(params: AdsDetailsParamsType) {
|
|
54
|
-
return FUtil.Request({
|
|
55
|
-
method: 'GET',
|
|
56
|
-
url: `/v2/activities/ads/find4Client`,
|
|
57
|
-
params: params,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// 获取基本任务详情
|
|
62
|
-
interface GetBaseTaskInfoParamsType {
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export function getBaseTaskInfo(params: GetBaseTaskInfoParamsType = {}) {
|
|
66
|
-
return FUtil.Request({
|
|
67
|
-
method: 'GET',
|
|
68
|
-
url: `/v2/activities/facade/getBaseTaskInfo`,
|
|
69
|
-
params: params,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// 获取资源任务详情
|
|
74
|
-
interface GetResourceTaskInfoParamsType {
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function getResourceTaskInfo(params: GetResourceTaskInfoParamsType = {}) {
|
|
78
|
-
return FUtil.Request({
|
|
79
|
-
method: 'GET',
|
|
80
|
-
url: `/v2/activities/facade/getResourceTaskInfo`,
|
|
81
|
-
params: params,
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// 获取节点任务详情
|
|
86
|
-
interface GetNodeTaskInfoParamsType {
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export function getNodeTaskInfo(params: GetNodeTaskInfoParamsType = {}) {
|
|
90
|
-
return FUtil.Request({
|
|
91
|
-
method: 'GET',
|
|
92
|
-
url: `/v2/activities/facade/getNodeTaskInfo`,
|
|
93
|
-
params: params,
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// 获取奖励记录详情
|
|
98
|
-
interface GetRewardRecordInfoParamsType {
|
|
99
|
-
rewardConfigCode: string;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export function getRewardRecordInfo(params: GetRewardRecordInfoParamsType) {
|
|
103
|
-
return FUtil.Request({
|
|
104
|
-
method: 'GET',
|
|
105
|
-
url: `/v2/activities/facade/getRewardRecordInfo`,
|
|
106
|
-
params: params,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// 推送任务消息埋点
|
|
111
|
-
interface PushMessageTaskParamsType {
|
|
112
|
-
taskConfigCode: string;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export function pushMessageTask(params: PushMessageTaskParamsType) {
|
|
116
|
-
return FUtil.Request({
|
|
117
|
-
method: 'POST',
|
|
118
|
-
url: `/v2/activities/facade/pushMessage4Task`,
|
|
119
|
-
data: params,
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// 运营钱包详情
|
|
124
|
-
interface GetCoinAccountParamsType {
|
|
125
|
-
type: 1;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export function getCoinAccount(params: GetCoinAccountParamsType) {
|
|
129
|
-
return FUtil.Request({
|
|
130
|
-
method: 'GET',
|
|
131
|
-
url: `/v2/activities/coin/account/find4Client`,
|
|
132
|
-
params: params,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// 运营钱包提现
|
|
137
|
-
interface WithdrawCoinAccountParamsType {
|
|
138
|
-
reUserName: string;
|
|
139
|
-
amount: number;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export function withdrawCoinAccount(params: WithdrawCoinAccountParamsType) {
|
|
143
|
-
return FUtil.Request({
|
|
144
|
-
method: 'POST',
|
|
145
|
-
url: `/v2/activities/coin/account/cash4Client`,
|
|
146
|
-
data: params,
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// 运营钱包流水
|
|
151
|
-
interface GetCoinAccountRecordsParamsType {
|
|
152
|
-
skip?: number;
|
|
153
|
-
limit?: number;
|
|
154
|
-
coinAccountType: 1;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export function getCoinAccountRecords(params: GetCoinAccountRecordsParamsType) {
|
|
158
|
-
return FUtil.Request({
|
|
159
|
-
method: 'GET',
|
|
160
|
-
url: `/v2/activities/coin/record/list4Client`,
|
|
161
|
-
params: params,
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// 获取公众号绑定信息
|
|
166
|
-
interface GetWechatOfficialAccountInfoParamsType {
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
export function getWechatOfficialAccountInfo(params: GetWechatOfficialAccountInfoParamsType = {}) {
|
|
170
|
-
return FUtil.Request({
|
|
171
|
-
method: 'GET',
|
|
172
|
-
url: `/v2/extensions/wechat/getRelationship4Client`,
|
|
173
|
-
params: params,
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// 列出抽奖结果
|
|
178
|
-
interface LotteryListParamsType {
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export function lotteryList(params: LotteryListParamsType = {}) {
|
|
182
|
-
return FUtil.Request({
|
|
183
|
-
method: 'GET',
|
|
184
|
-
url: `/v2/activities/lottery/resource/list`,
|
|
185
|
-
params: params,
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
// 显示抽奖结果
|
|
190
|
-
interface LotteryShowParamsType {
|
|
191
|
-
startDate: string;
|
|
192
|
-
limitDate: string;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export function lotteryShow(params: LotteryShowParamsType) {
|
|
196
|
-
return FUtil.Request({
|
|
197
|
-
method: 'GET',
|
|
198
|
-
url: `/v2/activities/lottery/resource/show`,
|
|
199
|
-
params: params,
|
|
200
|
-
});
|
|
201
|
-
}
|
|
1
|
+
import FUtil from '../utils';
|
|
2
|
+
|
|
3
|
+
// 列出活动
|
|
4
|
+
interface List4ClientParamsType {
|
|
5
|
+
skip?: number;
|
|
6
|
+
limit?: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function list4Client(params: List4ClientParamsType) {
|
|
10
|
+
return FUtil.Request({
|
|
11
|
+
method: 'GET',
|
|
12
|
+
url: `/v2/activities/list4Client`,
|
|
13
|
+
params: params,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// 查询活动
|
|
18
|
+
interface Find4ClientParamsType {
|
|
19
|
+
_id: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function find4Client(params: Find4ClientParamsType) {
|
|
23
|
+
return FUtil.Request({
|
|
24
|
+
method: 'GET',
|
|
25
|
+
url: `/v2/activities/find4Client`,
|
|
26
|
+
params: params,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// 列出广告
|
|
31
|
+
interface AdsListParamsType {
|
|
32
|
+
skip?: number;
|
|
33
|
+
limit?: number;
|
|
34
|
+
place: 1 | 2 | 3 | 4; // 投放位置 1:顶部公告栏 2:右侧浮窗 3:概览页 4:发现页
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function adsList(params: AdsListParamsType) {
|
|
39
|
+
return FUtil.Request({
|
|
40
|
+
method: 'GET',
|
|
41
|
+
url: `/v2/activities/ads/list4Client`,
|
|
42
|
+
params: params,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// 查询广告
|
|
47
|
+
interface AdsDetailsParamsType {
|
|
48
|
+
skip?: number;
|
|
49
|
+
limit?: number;
|
|
50
|
+
place: 1 | 2 | 3 | 4; // 投放位置 1:顶部公告栏 2:右侧浮窗 3:概览页 4:发现页
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function adsDetails(params: AdsDetailsParamsType) {
|
|
54
|
+
return FUtil.Request({
|
|
55
|
+
method: 'GET',
|
|
56
|
+
url: `/v2/activities/ads/find4Client`,
|
|
57
|
+
params: params,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// 获取基本任务详情
|
|
62
|
+
interface GetBaseTaskInfoParamsType {
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function getBaseTaskInfo(params: GetBaseTaskInfoParamsType = {}) {
|
|
66
|
+
return FUtil.Request({
|
|
67
|
+
method: 'GET',
|
|
68
|
+
url: `/v2/activities/facade/getBaseTaskInfo`,
|
|
69
|
+
params: params,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// 获取资源任务详情
|
|
74
|
+
interface GetResourceTaskInfoParamsType {
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function getResourceTaskInfo(params: GetResourceTaskInfoParamsType = {}) {
|
|
78
|
+
return FUtil.Request({
|
|
79
|
+
method: 'GET',
|
|
80
|
+
url: `/v2/activities/facade/getResourceTaskInfo`,
|
|
81
|
+
params: params,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// 获取节点任务详情
|
|
86
|
+
interface GetNodeTaskInfoParamsType {
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function getNodeTaskInfo(params: GetNodeTaskInfoParamsType = {}) {
|
|
90
|
+
return FUtil.Request({
|
|
91
|
+
method: 'GET',
|
|
92
|
+
url: `/v2/activities/facade/getNodeTaskInfo`,
|
|
93
|
+
params: params,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 获取奖励记录详情
|
|
98
|
+
interface GetRewardRecordInfoParamsType {
|
|
99
|
+
rewardConfigCode: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function getRewardRecordInfo(params: GetRewardRecordInfoParamsType) {
|
|
103
|
+
return FUtil.Request({
|
|
104
|
+
method: 'GET',
|
|
105
|
+
url: `/v2/activities/facade/getRewardRecordInfo`,
|
|
106
|
+
params: params,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// 推送任务消息埋点
|
|
111
|
+
interface PushMessageTaskParamsType {
|
|
112
|
+
taskConfigCode: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function pushMessageTask(params: PushMessageTaskParamsType) {
|
|
116
|
+
return FUtil.Request({
|
|
117
|
+
method: 'POST',
|
|
118
|
+
url: `/v2/activities/facade/pushMessage4Task`,
|
|
119
|
+
data: params,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// 运营钱包详情
|
|
124
|
+
interface GetCoinAccountParamsType {
|
|
125
|
+
type: 1;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function getCoinAccount(params: GetCoinAccountParamsType) {
|
|
129
|
+
return FUtil.Request({
|
|
130
|
+
method: 'GET',
|
|
131
|
+
url: `/v2/activities/coin/account/find4Client`,
|
|
132
|
+
params: params,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// 运营钱包提现
|
|
137
|
+
interface WithdrawCoinAccountParamsType {
|
|
138
|
+
reUserName: string;
|
|
139
|
+
amount: number;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function withdrawCoinAccount(params: WithdrawCoinAccountParamsType) {
|
|
143
|
+
return FUtil.Request({
|
|
144
|
+
method: 'POST',
|
|
145
|
+
url: `/v2/activities/coin/account/cash4Client`,
|
|
146
|
+
data: params,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// 运营钱包流水
|
|
151
|
+
interface GetCoinAccountRecordsParamsType {
|
|
152
|
+
skip?: number;
|
|
153
|
+
limit?: number;
|
|
154
|
+
coinAccountType: 1;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function getCoinAccountRecords(params: GetCoinAccountRecordsParamsType) {
|
|
158
|
+
return FUtil.Request({
|
|
159
|
+
method: 'GET',
|
|
160
|
+
url: `/v2/activities/coin/record/list4Client`,
|
|
161
|
+
params: params,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// 获取公众号绑定信息
|
|
166
|
+
interface GetWechatOfficialAccountInfoParamsType {
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export function getWechatOfficialAccountInfo(params: GetWechatOfficialAccountInfoParamsType = {}) {
|
|
170
|
+
return FUtil.Request({
|
|
171
|
+
method: 'GET',
|
|
172
|
+
url: `/v2/extensions/wechat/getRelationship4Client`,
|
|
173
|
+
params: params,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// 列出抽奖结果
|
|
178
|
+
interface LotteryListParamsType {
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export function lotteryList(params: LotteryListParamsType = {}) {
|
|
182
|
+
return FUtil.Request({
|
|
183
|
+
method: 'GET',
|
|
184
|
+
url: `/v2/activities/lottery/resource/list`,
|
|
185
|
+
params: params,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// 显示抽奖结果
|
|
190
|
+
interface LotteryShowParamsType {
|
|
191
|
+
startDate: string;
|
|
192
|
+
limitDate: string;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export function lotteryShow(params: LotteryShowParamsType) {
|
|
196
|
+
return FUtil.Request({
|
|
197
|
+
method: 'GET',
|
|
198
|
+
url: `/v2/activities/lottery/resource/show`,
|
|
199
|
+
params: params,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// 列出邀请好友详情
|
|
204
|
+
type ListInviteFriendInfosParamsType = {
|
|
205
|
+
userId: number;
|
|
206
|
+
username: string;
|
|
207
|
+
createDate: string;
|
|
208
|
+
}[];
|
|
209
|
+
|
|
210
|
+
export function listInviteFriendInfos(params: ListInviteFriendInfosParamsType) {
|
|
211
|
+
return FUtil.Request({
|
|
212
|
+
method: 'POST',
|
|
213
|
+
url: `/v2/activities/facade/listInviteFriendInfos`,
|
|
214
|
+
data: params,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// 获取奖励记录详情列表
|
|
219
|
+
interface GetRewardRecordInfosParamsType {
|
|
220
|
+
rewardGroupCode?: string;
|
|
221
|
+
rewardConfigCode?: string;
|
|
222
|
+
status?: 1 | 2 | 3; //奖励记录状态 1:未领取 2:可领取 3:已领取;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export function getRewardRecordInfos(params: GetRewardRecordInfosParamsType) {
|
|
226
|
+
return FUtil.Request({
|
|
227
|
+
method: 'POST',
|
|
228
|
+
url: `/v2/activities/facade/getRewardRecordInfos`,
|
|
229
|
+
data: params,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import FUtil from '../utils';
|
|
2
|
-
|
|
3
|
-
// 发送短信或邮件验证码
|
|
4
|
-
interface SendVerificationCodeParamsType {
|
|
5
|
-
loginName: string;
|
|
6
|
-
authCodeType: 'register' | 'resetPassword' | 'activateTransactionAccount' | 'updateTransactionAccountPwd' | 'updateMobileOrEmail';
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function sendVerificationCode(params: SendVerificationCodeParamsType) {
|
|
10
|
-
return FUtil.Request({
|
|
11
|
-
method: 'POST',
|
|
12
|
-
url: `/v2/messages/send`,
|
|
13
|
-
data: params,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// 校验短信或邮件验证码
|
|
18
|
-
interface VerifyVerificationCodeParamsType {
|
|
19
|
-
authCode: string;
|
|
20
|
-
address: string;
|
|
21
|
-
authCodeType: 'register' | 'resetPassword' | 'activateTransactionAccount' | 'updateTransactionAccountPwd' | 'updateMobileOrEmail';
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function verifyVerificationCode(params: VerifyVerificationCodeParamsType): Promise<any> {
|
|
25
|
-
return FUtil.Request({
|
|
26
|
-
method: 'GET',
|
|
27
|
-
url: `/v2/messages/verify`,
|
|
28
|
-
params: params,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
1
|
+
import FUtil from '../utils';
|
|
2
|
+
|
|
3
|
+
// 发送短信或邮件验证码
|
|
4
|
+
interface SendVerificationCodeParamsType {
|
|
5
|
+
loginName: string;
|
|
6
|
+
authCodeType: 'register' | 'resetPassword' | 'activateTransactionAccount' | 'updateTransactionAccountPwd' | 'updateMobileOrEmail';
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function sendVerificationCode(params: SendVerificationCodeParamsType) {
|
|
10
|
+
return FUtil.Request({
|
|
11
|
+
method: 'POST',
|
|
12
|
+
url: `/v2/messages/send`,
|
|
13
|
+
data: params,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// 校验短信或邮件验证码
|
|
18
|
+
interface VerifyVerificationCodeParamsType {
|
|
19
|
+
authCode: string;
|
|
20
|
+
address: string;
|
|
21
|
+
authCodeType: 'register' | 'resetPassword' | 'activateTransactionAccount' | 'updateTransactionAccountPwd' | 'updateMobileOrEmail';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function verifyVerificationCode(params: VerifyVerificationCodeParamsType): Promise<any> {
|
|
25
|
+
return FUtil.Request({
|
|
26
|
+
method: 'GET',
|
|
27
|
+
url: `/v2/messages/verify`,
|
|
28
|
+
params: params,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import FUtil from '../utils';
|
|
2
|
-
|
|
3
|
-
// 收藏资源
|
|
4
|
-
interface CollectResourceParamsType {
|
|
5
|
-
resourceId: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function collectResource(params: CollectResourceParamsType) {
|
|
9
|
-
// return FUtil.Axios.post('/v2/collections/resources', params);
|
|
10
|
-
return FUtil.Request({
|
|
11
|
-
method: 'POST',
|
|
12
|
-
url: `/v2/collections/resources`,
|
|
13
|
-
data: params,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// 查看收藏的资源列表
|
|
18
|
-
interface CollectionResourcesParamsType {
|
|
19
|
-
skip?: number;
|
|
20
|
-
limit?: number;
|
|
21
|
-
keywords?: string;
|
|
22
|
-
resourceType?: string;
|
|
23
|
-
omitResourceType?: string;
|
|
24
|
-
resourceStatus?: 0 | 1 | 2;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function collectionResources(params: CollectionResourcesParamsType) {
|
|
28
|
-
// return FUtil.Axios.get('/v2/collections/resources', {
|
|
29
|
-
// params
|
|
30
|
-
// });
|
|
31
|
-
return FUtil.Request({
|
|
32
|
-
method: 'GET',
|
|
33
|
-
url: `/v2/collections/resources`,
|
|
34
|
-
params: params,
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// 删除收藏的资源
|
|
40
|
-
interface DeleteCollectResourceParamsType {
|
|
41
|
-
resourceId: string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export function deleteCollectResource({resourceId}: DeleteCollectResourceParamsType) {
|
|
45
|
-
// return FUtil.Axios.delete(`/v2/collections/resources/${resourceId}`);
|
|
46
|
-
return FUtil.Request({
|
|
47
|
-
method: 'DELETE',
|
|
48
|
-
url: `/v2/collections/resources/${resourceId}`,
|
|
49
|
-
// params: params,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// 批量查询资源是否收藏
|
|
54
|
-
interface IsCollectedParamsType {
|
|
55
|
-
resourceIds: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function isCollected(params: IsCollectedParamsType) {
|
|
59
|
-
// return FUtil.Axios.get('/v2/collections/resources/isCollected', {
|
|
60
|
-
// params
|
|
61
|
-
// });
|
|
62
|
-
return FUtil.Request({
|
|
63
|
-
method: 'GET',
|
|
64
|
-
url: `/v2/collections/resources/isCollected`,
|
|
65
|
-
params: params,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// 查询资源总收藏数量
|
|
70
|
-
interface CollectedCountParamsType {
|
|
71
|
-
resourceId: string;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export function collectedCount({resourceId}: CollectedCountParamsType) {
|
|
75
|
-
// return FUtil.Axios.get(`/v2/collections/resources/${resourceId}/count`);
|
|
76
|
-
return FUtil.Request({
|
|
77
|
-
method: 'GET',
|
|
78
|
-
url: `/v2/collections/resources/${resourceId}/count`,
|
|
79
|
-
// params: params,
|
|
80
|
-
});
|
|
81
|
-
}
|
|
1
|
+
import FUtil from '../utils';
|
|
2
|
+
|
|
3
|
+
// 收藏资源
|
|
4
|
+
interface CollectResourceParamsType {
|
|
5
|
+
resourceId: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function collectResource(params: CollectResourceParamsType) {
|
|
9
|
+
// return FUtil.Axios.post('/v2/collections/resources', params);
|
|
10
|
+
return FUtil.Request({
|
|
11
|
+
method: 'POST',
|
|
12
|
+
url: `/v2/collections/resources`,
|
|
13
|
+
data: params,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// 查看收藏的资源列表
|
|
18
|
+
interface CollectionResourcesParamsType {
|
|
19
|
+
skip?: number;
|
|
20
|
+
limit?: number;
|
|
21
|
+
keywords?: string;
|
|
22
|
+
resourceType?: string;
|
|
23
|
+
omitResourceType?: string;
|
|
24
|
+
resourceStatus?: 0 | 1 | 2;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function collectionResources(params: CollectionResourcesParamsType) {
|
|
28
|
+
// return FUtil.Axios.get('/v2/collections/resources', {
|
|
29
|
+
// params
|
|
30
|
+
// });
|
|
31
|
+
return FUtil.Request({
|
|
32
|
+
method: 'GET',
|
|
33
|
+
url: `/v2/collections/resources`,
|
|
34
|
+
params: params,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// 删除收藏的资源
|
|
40
|
+
interface DeleteCollectResourceParamsType {
|
|
41
|
+
resourceId: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function deleteCollectResource({resourceId}: DeleteCollectResourceParamsType) {
|
|
45
|
+
// return FUtil.Axios.delete(`/v2/collections/resources/${resourceId}`);
|
|
46
|
+
return FUtil.Request({
|
|
47
|
+
method: 'DELETE',
|
|
48
|
+
url: `/v2/collections/resources/${resourceId}`,
|
|
49
|
+
// params: params,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// 批量查询资源是否收藏
|
|
54
|
+
interface IsCollectedParamsType {
|
|
55
|
+
resourceIds: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function isCollected(params: IsCollectedParamsType) {
|
|
59
|
+
// return FUtil.Axios.get('/v2/collections/resources/isCollected', {
|
|
60
|
+
// params
|
|
61
|
+
// });
|
|
62
|
+
return FUtil.Request({
|
|
63
|
+
method: 'GET',
|
|
64
|
+
url: `/v2/collections/resources/isCollected`,
|
|
65
|
+
params: params,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// 查询资源总收藏数量
|
|
70
|
+
interface CollectedCountParamsType {
|
|
71
|
+
resourceId: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function collectedCount({resourceId}: CollectedCountParamsType) {
|
|
75
|
+
// return FUtil.Axios.get(`/v2/collections/resources/${resourceId}/count`);
|
|
76
|
+
return FUtil.Request({
|
|
77
|
+
method: 'GET',
|
|
78
|
+
url: `/v2/collections/resources/${resourceId}/count`,
|
|
79
|
+
// params: params,
|
|
80
|
+
});
|
|
81
|
+
}
|