Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinhaitao
taobao-mini-template
Commits
8024dc1b
Commit
8024dc1b
authored
Nov 02, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:
🎸
check重构
parent
b417c6c6
Changes
29
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
217 additions
and
246 deletions
+217
-246
awards.controller.d.ts
v2.0/dist/controller/awards.controller.d.ts
+1
-1
awards.controller.js
v2.0/dist/controller/awards.controller.js
+7
-8
awards.controller.js.map
v2.0/dist/controller/awards.controller.js.map
+1
-1
base.controller.js
v2.0/dist/controller/base.controller.js
+2
-2
share.controller.js
v2.0/dist/controller/share.controller.js
+8
-12
share.controller.js.map
v2.0/dist/controller/share.controller.js.map
+1
-1
stat.controller.d.ts
v2.0/dist/controller/stat.controller.d.ts
+1
-1
stat.controller.js
v2.0/dist/controller/stat.controller.js
+2
-4
stat.controller.js.map
v2.0/dist/controller/stat.controller.js.map
+1
-1
task.controller.js
v2.0/dist/controller/task.controller.js
+19
-29
task.controller.js.map
v2.0/dist/controller/task.controller.js.map
+1
-1
user.controller.js
v2.0/dist/controller/user.controller.js
+9
-5
user.controller.js.map
v2.0/dist/controller/user.controller.js.map
+1
-1
index.d.ts
v2.0/dist/index.d.ts
+2
-2
awards.controller.ts
v2.0/src/controller/awards.controller.ts
+8
-9
base.controller.ts
v2.0/src/controller/base.controller.ts
+3
-3
share.controller.ts
v2.0/src/controller/share.controller.ts
+6
-10
stat.controller.ts
v2.0/src/controller/stat.controller.ts
+1
-2
task.controller.ts
v2.0/src/controller/task.controller.ts
+20
-30
user.controller.ts
v2.0/src/controller/user.controller.ts
+8
-6
check.ts
v2.0/src/decorator/common/check.ts
+0
-89
checkParams.ts
v2.0/src/decorator/common/checkParams.ts
+26
-0
index.ts
v2.0/src/decorator/common/index.ts
+2
-1
noCheckUser.ts
v2.0/src/decorator/common/noCheckUser.ts
+9
-0
preCheck.ts
v2.0/src/decorator/common/preCheck.ts
+4
-4
registeInfos.ts
v2.0/src/decorator/common/registeInfos.ts
+18
-12
services.ts
v2.0/src/decorator/common/services.ts
+29
-9
index.d.ts
v2.0/src/typings/index.d.ts
+6
-1
checkActivityTime.ts
v2.0/src/utils/check/checkActivityTime.ts
+21
-1
No files found.
v2.0/dist/controller/awards.controller.d.ts
View file @
8024dc1b
...
...
@@ -33,7 +33,7 @@ export default class AwardsController {
/**
* 权益重新领取
*/
receiveEnamePrize
(
context
:
IContext
<
IReceiveEnameParams
>
,
{}:
{},
[
awardSer
]:
[
AwardsService
]):
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
object
[]
|
number
[]
|
string
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
CodeType
|
IAwards
,
true
>>
;
receiveEnamePrize
(
context
:
IContext
<
IReceiveEnameParams
>
,
{}:
{},
[
awardSer
]:
[
AwardsService
]):
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
string
[]
|
object
[]
|
number
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
IAwards
|
CodeType
,
true
>>
;
/**
* 概率抽奖
*/
...
...
v2.0/dist/controller/awards.controller.js
View file @
8024dc1b
...
...
@@ -51,6 +51,8 @@ var sdk_1 = require("../sdk");
var
service_1
=
require
(
"../service"
);
var
constants_1
=
require
(
"../constants"
);
var
utils_1
=
require
(
"../utils"
);
var
preCheck_1
=
require
(
"../decorator/common/preCheck"
);
var
checkActivityTime_1
=
require
(
"../utils/check/checkActivityTime"
);
var
AwardsController
=
/** @class */
(
function
()
{
function
AwardsController
()
{
}
...
...
@@ -208,33 +210,30 @@ var AwardsController = /** @class */ (function () {
});
};
__decorate
([
common_1
.
paramsCheck
([
'activityId'
]),
common_1
.
userCheck
({
intercept
:
true
}),
common_1
.
checkParams
([
'activityId'
]),
common_1
.
services
([
service_1
.
AwardsService
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
],
AwardsController
.
prototype
,
"getMyPrizeList"
,
null
);
__decorate
([
common_1
.
paramsCheck
([
'activityId'
,
'id'
,
'name'
,
'phone'
,
'province'
,
'city'
,
'area'
,
'addressDetail'
,
'streetName'
]),
common_1
.
userCheck
({
intercept
:
true
}),
common_1
.
checkParams
([
'activityId'
,
'id'
,
'name'
,
'phone'
,
'province'
,
'city'
,
'area'
,
'addressDetail'
,
'streetName'
]),
common_1
.
services
([
service_1
.
AwardsService
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
],
AwardsController
.
prototype
,
"receiveObjectPrize"
,
null
);
__decorate
([
common_1
.
paramsCheck
([
'activityId'
,
'id'
]),
common_1
.
userCheck
({
intercept
:
true
}),
common_1
.
checkParams
([
'activityId'
,
'id'
]),
common_1
.
services
([
service_1
.
AwardsService
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
],
AwardsController
.
prototype
,
"receiveEnamePrize"
,
null
);
__decorate
([
common_1
.
paramsCheck
([
'activityId'
,
'prizeDataType'
]),
common_1
.
activityTimeCheck
,
common_1
.
checkParams
([
'activityId'
,
'prizeDataType'
]),
common_1
.
services
([
service_1
.
AwardsService
]),
preCheck_1
.
preCheck
([
checkActivityTime_1
.
checkActivityTime
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
...
...
v2.0/dist/controller/awards.controller.js.map
View file @
8024dc1b
{"version":3,"file":"awards.controller.js","sourceRoot":"","sources":["../../src/controller/awards.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,8CAAyF;AACzF,8BAAqC;AACrC,sCAA0C;AAC1C,0CAAkE;AAClE,kCAA2C;AAwB3C;IAAA;IA+IA,CAAC;IA9IC;;OAEG;IAIG,yCAAc,GAApB,UACE,OAAmC,EACnC,EAAE,EACF,EAA2B;YAA1B,QAAQ,QAAA;;;;;;wBAGP,MAAM,GAEJ,OAAO,OAFH,EACE,UAAU,GAChB,OAAO,gBADS,CACT;wBACE,qBAAM,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,QAAA,EAAE,UAAU,YAAA,EAAE,CAAC,EAAA;;wBAA9D,MAAM,GAAG,SAAqD;wBAClE,sBAAO,kBAAY,CAAC,OAAO,CAAC;gCAC1B,IAAI,EAAE,MAAM;6BACb,CAAC,EAAA;;;;KACH;IAED;;OAEG;IAIG,6CAAkB,GAAxB,UACE,OAAsC,EACtC,EAAE,EACF,EAA2B;YAA1B,QAAQ,QAAA;;;;;;wBAEL,KAAmF,OAAO,CAAC,IAAI,EAA7F,QAAQ,cAAA,EAAE,IAAI,UAAA,EAAE,IAAI,UAAA,EAAE,UAAU,gBAAA,EAAE,aAAa,mBAAA,EAAE,EAAE,QAAA,EAAE,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,UAAU,gBAAA,CAAiB;wBAEtF,qBAAM,QAAQ,CAAC,kBAAkB,CAAC,EAAE,EAAE;gCACjD,UAAU,YAAA;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BA/IoB,gBAAgB"}
\ No newline at end of file
{"version":3,"file":"awards.controller.js","sourceRoot":"","sources":["../../src/controller/awards.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,8CAA2D;AAC3D,8BAAqC;AACrC,sCAA0C;AAC1C,0CAAkE;AAClE,kCAA2C;AAE3C,yDAAuD;AACvD,sEAAoE;AAuBpE;IAAA;IA4IA,CAAC;IA3IC;;OAEG;IAGG,yCAAc,GAApB,UACE,OAAmC,EACnC,EAAE,EACF,EAA2B;YAA1B,QAAQ,QAAA;;;;;;wBAGP,MAAM,GAEJ,OAAO,OAFH,EACE,UAAU,GAChB,OAAO,gBADS,CACT;wBACE,qBAAM,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,QAAA,EAAE,UAAU,YAAA,EAAE,CAAC,EAAA;;wBAA9D,MAAM,GAAG,SAAqD;wBAClE,sBAAO,kBAAY,CAAC,OAAO,CAAC;gCAC1B,IAAI,EAAE,MAAM;6BACb,CAAC,EAAA;;;;KACH;IAED;;OAEG;IAGG,6CAAkB,GAAxB,UACE,OAAsC,EACtC,EAAE,EACF,EAA2B;YAA1B,QAAQ,QAAA;;;;;;wBAEL,KAAmF,OAAO,CAAC,IAAI,EAA7F,QAAQ,cAAA,EAAE,IAAI,UAAA,EAAE,IAAI,UAAA,EAAE,UAAU,gBAAA,EAAE,aAAa,mBAAA,EAAE,EAAE,QAAA,EAAE,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,UAAU,gBAAA,CAAiB;wBAEtF,qBAAM,QAAQ,CAAC,kBAAkB,CAAC,EAAE,EAAE;gCACjD,UAAU,YAAA;gCACV,QAAQ,UAAA;gCACR,IAAI,MAAA;gCACJ,IAAI,MAAA;gCACJ,UAAU,YAAA;gCACV,aAAa,eAAA;gCACb,IAAI,MAAA;gCACJ,KAAK,OAAA;6BACN,CAAC,EAAA;;wBATE,MAAM,GAAG,SASX;w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A;4BACR,SAAS,EAAE,gBAAQ,EAAE;yBACtB,CAAA;wBAGc,qBAAM,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAA;;wBAAxC,MAAM,GAAG,SAA+B;wBAE9C,sBAAO,kBAAY,CAAC,OAAO,CAAC;gCAC1B,EAAE,EAAE,MAAM;gCACV,IAAI,MAAA;gCACJ,IAAI,MAAA;gCACJ,KAAK,OAAA;6BACN,CAAC,EAAA;;;;KACH;IArID;QAFC,oBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,iBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;0DAczB;IAOD;QAFC,oBAAW,CAAC,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,CAAC,CAAC;QAC7G,iBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;8DAuBzB;IAOD;QAFC,oBAAW,CAAC,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;QACjC,iBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;6DAYzB;IAQD;QAHC,oBAAW,CAAC,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QAC5C,iBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;QACzB,mBAAQ,CAAC,CAAC,qCAAiB,CAAC,CAAC;;;;4DAkE7B;IACH,uBAAC;CAAA,AA5ID,IA4IC;kBA5IoB,gBAAgB"}
\ No newline at end of file
v2.0/dist/controller/base.controller.js
View file @
8024dc1b
...
...
@@ -97,14 +97,14 @@ var BaseController = /** @class */ (function () {
});
};
__decorate
([
common_1
.
paramsCheck
([
'activityId'
]),
common_1
.
checkParams
([
'activityId'
]),
common_1
.
services
([
service_1
.
BaseService
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
],
BaseController
.
prototype
,
"getActivityBaseInfoById"
,
null
);
__decorate
([
common_1
.
paramsCheck
([
'itemIds'
]),
common_1
.
checkParams
([
'itemIds'
]),
common_1
.
registeInfos
([
'session'
]),
common_1
.
services
([
service_1
.
BaseService
]),
__metadata
(
"design:type"
,
Function
),
...
...
v2.0/dist/controller/share.controller.js
View file @
8024dc1b
...
...
@@ -47,15 +47,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
};
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
constants_1
=
require
(
"./../constants"
);
var
c
heck_1
=
require
(
"../decorator/common/check
"
);
var
services_1
=
require
(
"../decorator/common/services
"
);
var
c
ommon_1
=
require
(
"../decorator/common/
"
);
var
common_2
=
require
(
"../decorator/common/
"
);
var
sdk_1
=
require
(
"../sdk"
);
var
utils_1
=
require
(
"../utils"
);
var
service_1
=
require
(
"../service"
);
var
registeInfos_1
=
require
(
"../decorator/common/registeInfos"
);
var
constants_2
=
require
(
"../constants"
);
var
checkActivityTime_1
=
require
(
"../utils/check/checkActivityTime"
);
var
preCheck_1
=
require
(
"../decorator/common/preCheck"
);
var
Share
=
/** @class */
(
function
()
{
function
Share
()
{
}
...
...
@@ -152,19 +150,17 @@ var Share = /** @class */ (function () {
});
};
__decorate
([
check_1
.
paramsCheck
([
'activityId'
]),
check_1
.
userCheck
({
intercept
:
true
}),
registeInfos_1
.
registeInfos
([
'userInfo'
,
'activityInfo'
]),
services_1
.
services
([
service_1
.
UserService
]),
common_1
.
checkParams
([
'activityId'
]),
common_2
.
services
([
service_1
.
UserService
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
]),
__metadata
(
"design:returntype"
,
Promise
)
],
Share
.
prototype
,
"getShareInfo"
,
null
);
__decorate
([
c
heck_1
.
paramsCheck
([
'activityId'
,
'inviteId'
]),
registeInfos_1
.
registeInfos
([
'userInfo'
,
'vipInfo'
,
'activity
Info'
]),
preCheck_1
.
preCheck
([
checkActivityTime_1
.
checkActivityTime
]),
services_1
.
services
([
service_1
.
UserService
,
service_1
.
TaskService
,
service_1
.
StatService
,
service_1
.
AccessService
]),
c
ommon_1
.
checkParams
([
'activityId'
,
'inviteId'
]),
common_2
.
registeInfos
([
'vip
Info'
]),
common_2
.
preCheck
([
checkActivityTime_1
.
checkActivityTime
]),
common_2
.
services
([
service_1
.
UserService
,
service_1
.
TaskService
,
service_1
.
StatService
,
service_1
.
AccessService
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
...
...
v2.0/dist/controller/share.controller.js.map
View file @
8024dc1b
{"version":3,"file":"share.controller.js","sourceRoot":"","sources":["../../src/controller/share.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4CAA2C;AAC3C,mDAAqF;AACrF,yDAAuD;AAEvD,8BAAqC;AACrC,kCAAmE;AACnE,sCAAiF;AACjF,iEAA+D;AAC/D,0CAAwC;AACxC,sEAAoE;AACpE,yDAAuD;AAEvD;IAAA;IAoGA,CAAC;IAnGC;;OAEG;IAKG,4BAAY,GAAlB,UACE,OAEE,EACF,EAA8B;YAA5B,QAAQ,cAAA;;;;gBAOO,OAAO,GACpB,QAAQ,oBADY,CACZ;gBAEZ,sBAAO,kBAAY,CAAC,OAAO,CAAC;wBAC1B,OAAO,EAAE,OAAO;qBACjB,CAAC,EAAA;;;KACH;IACD;;OAEG;IAKG,sBAAM,GAAZ,UACE,OAGE,EACF,EAAqD,EACrD,EAA+F;YAD7F,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,QAAA,EAAE,WAAW,QAAA,EAAE,WAAW,QAAA;;;;;;;wBAEhC,KAA2B,OAAO,CAAC,IAAI,EAArC,QAAQ,cAAA,EAAE,UAAU,gBAAA,CAAiB;wBACrC,MAAM,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Aa,EAAE,QAAQ,CAAC,EAAA;;wBAA5D,SAA4D,CAAA;wBAE5D,sBAAO,kBAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAA;;;;KAClC;IA3FD;QAFC,oBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,iBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;6CAkBvB;IAQD;QAJC,oBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACvC,qBAAY,CAAC,CAAC,SAAS,CAAC,CAAC;QACzB,iBAAQ,CAAC,CAAC,qCAAiB,CAAC,CAAC;QAC7B,iBAAQ,CAAC,CAAC,qBAAW,EAAE,qBAAW,EAAE,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;uCAmEhE;IACH,YAAC;CAAA,AAlGD,IAkGC;kBAlGoB,KAAK"}
\ No newline at end of file
v2.0/dist/controller/stat.controller.d.ts
View file @
8024dc1b
...
...
@@ -18,5 +18,5 @@ export default class StatController {
/**
* 统计数据
*/
getStats
(
context
:
IContext
<
IGetStatsParams
>
):
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
object
[]
|
number
[]
|
string
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
any
,
tru
e
>>
;
getStats
(
context
:
IContext
<
IGetStatsParams
>
):
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
any
,
true
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
string
[]
|
object
[]
|
number
[],
fals
e
>>
;
}
v2.0/dist/controller/stat.controller.js
View file @
8024dc1b
...
...
@@ -50,9 +50,8 @@ var db_1 = require("../db");
var
sdk_1
=
require
(
"../sdk"
);
var
constants_1
=
require
(
"../constants"
);
var
xlsx
=
require
(
"node-xlsx"
);
var
services_1
=
require
(
"../decorator/common/services"
);
var
service_1
=
require
(
"../service"
);
var
common_1
=
require
(
"../decorator/common"
);
var
service_1
=
require
(
"../service"
);
/** @format */
var
StatController
=
/** @class */
(
function
()
{
function
StatController
()
{
...
...
@@ -247,8 +246,7 @@ var StatController = /** @class */ (function () {
});
};
__decorate
([
common_1
.
registeInfos
([
'userInfo'
]),
services_1
.
services
([
service_1
.
StatService
]),
common_1
.
services
([
service_1
.
StatService
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
...
...
v2.0/dist/controller/stat.controller.js.map
View file @
8024dc1b
{"version":3,"file":"stat.controller.js","sourceRoot":"","sources":["../../src/controller/stat.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4BAAoE;AACpE,8BAAmF;AACnF,0CAAyC;AACzC,gCAAiC;AACjC,yDAAuD;AACvD,sCAAwC;AACxC,8CAAkD;AAalD,cAAc;AACd;IAAA;IA8JA,CAAC;IA7JC;;OAEG;IAGG,gCAAO,GAAb,UAAc,OAAkC,EAAE,EAA8B,EAAE,EAA4B;YAA1D,QAAQ,cAAA;YAAuB,WAAW,QAAA;;;;;;wBACpF,IAAI,GAAK,OAAO,CAAC,IAAI,KAAjB,CAAiB;wBAC7B,qBAAM,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAA;;wBAAzC,SAAyC,CAAA;wBACzC,sBAAO,kBAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAA;;;;KAClC;IACD;;OAEG;IACG,iCAAQ,GAAd,UAAe,OAAkC;;;;;;;;wBACzC,KAAmC,OAAO,CAAC,IAAI,EAA7C,UAAU,gBAAA,EAAE,QAAQ,cAAA,EAAE,MAAM,YAAA,CAAiB;wBAE/C,OAAO,GAAa,IAAI,aAAO,CAAC,OAAO,EAAE,iBAAY,CAAC,CAAA;wBACtD,SAAS,GAAa,IAAI,aAAO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EAAE;4BACd,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;yBAC1E;wBACD,sBAAO,kBAAY,CAAC,OAAO,CAAC,MAAM,CAAC,EAAA;;;wBAEnC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAC,CAAC,CAAA;wBACxB,OAAO;wBACP,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,sCAAQ,CAAC,EAAA;;;;;KAE/D;IAvJD;QADC,iBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;iDAKvB;IAoJH,qBAAC;CAAA,AA7JD,IA6JC;kBA7JoB,cAAc"}
\ No newline at end of file
v2.0/dist/controller/task.controller.js
View file @
8024dc1b
...
...
@@ -61,6 +61,7 @@ var constants_1 = require("./../constants");
var
common_1
=
require
(
"../decorator/common"
);
var
sdk_1
=
require
(
"../sdk"
);
var
service_1
=
require
(
"../service"
);
var
checkActivityTime_1
=
require
(
"../utils/check/checkActivityTime"
);
var
Task
=
/** @class */
(
function
()
{
function
Task
()
{
}
...
...
@@ -357,77 +358,66 @@ var Task = /** @class */ (function () {
});
};
__decorate
([
common_1
.
paramsCheck
([
'activityId'
]),
common_1
.
userCheck
({
intercept
:
true
}),
common_1
.
activityTimeCheck
,
common_1
.
registeInfos
([
'userInfo'
,
'vipInfo'
,
'activityInfo'
]),
common_1
.
checkParams
([
'activityId'
]),
common_1
.
registeInfos
([
'vipInfo'
]),
common_1
.
services
([
service_1
.
TaskService
]),
common_1
.
preCheck
([
checkActivityTime_1
.
checkActivityTime
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
],
Task
.
prototype
,
"getTaskList"
,
null
);
__decorate
([
common_1
.
paramsCheck
([
'activityId'
]),
common_1
.
activityTimeCheck
,
common_1
.
registeInfos
([
'userInfo'
,
'activityInfo'
]),
common_1
.
checkParams
([
'activityId'
]),
common_1
.
services
([
service_1
.
TaskService
]),
common_1
.
preCheck
([
checkActivityTime_1
.
checkActivityTime
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
],
Task
.
prototype
,
"doFollowTask"
,
null
);
__decorate
([
common_1
.
paramsCheck
([
'activityId'
,
'credits'
]),
common_1
.
userCheck
({
intercept
:
true
}),
common_1
.
activityTimeCheck
,
common_1
.
registeInfos
([
'userInfo'
,
'activityInfo'
,
'session'
]),
common_1
.
checkParams
([
'activityId'
,
'credits'
]),
common_1
.
registeInfos
([
'session'
]),
common_1
.
services
([
service_1
.
TaskService
]),
common_1
.
preCheck
([
checkActivityTime_1
.
checkActivityTime
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
],
Task
.
prototype
,
"doExchangeCreditsTask"
,
null
);
__decorate
([
common_1
.
paramsCheck
([
'activityId'
,
'itemId'
]),
common_1
.
userCheck
({
intercept
:
true
}),
common_1
.
activityTimeCheck
,
common_1
.
registeInfos
([
'userInfo'
,
'activityInfo'
]),
common_1
.
checkParams
([
'activityId'
,
'itemId'
]),
common_1
.
services
([
service_1
.
TaskService
]),
common_1
.
preCheck
([
checkActivityTime_1
.
checkActivityTime
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
],
Task
.
prototype
,
"doBrowseGoodsTask"
,
null
);
__decorate
([
common_1
.
paramsCheck
([
'activityId'
,
'itemId'
]),
common_1
.
userCheck
({
intercept
:
true
}),
common_1
.
activityTimeCheck
,
common_1
.
registeInfos
([
'userInfo'
,
'activityInfo'
]),
common_1
.
checkParams
([
'activityId'
,
'itemId'
]),
common_1
.
services
([
service_1
.
TaskService
]),
common_1
.
preCheck
([
checkActivityTime_1
.
checkActivityTime
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
],
Task
.
prototype
,
"doCollectGoodsTask"
,
null
);
__decorate
([
common_1
.
paramsCheck
([
'activityId'
]),
common_1
.
userCheck
({
intercept
:
true
}),
common_1
.
activityTimeCheck
,
common_1
.
registeInfos
([
'userInfo'
,
'activityInfo'
]),
common_1
.
checkParams
([
'activityId'
]),
common_1
.
services
([
service_1
.
TaskService
]),
common_1
.
preCheck
([
checkActivityTime_1
.
checkActivityTime
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
],
Task
.
prototype
,
"doJumpLinkTask"
,
null
);
__decorate
([
common_1
.
paramsCheck
([
'activityId'
,
'taskType'
]),
common_1
.
userCheck
({
intercept
:
true
}),
common_1
.
activityTimeCheck
,
common_1
.
registeInfos
([
'userInfo'
]),
common_1
.
checkParams
([
'activityId'
,
'taskType'
]),
common_1
.
services
([
service_1
.
TaskService
]),
common_1
.
preCheck
([
checkActivityTime_1
.
checkActivityTime
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
],
Task
.
prototype
,
"receiveTaskRewards"
,
null
);
__decorate
([
common_1
.
paramsCheck
([
'activityId'
,
'itemIds'
]),
common_1
.
registeInfos
([
'
userInfo'
,
'
session'
]),
common_1
.
checkParams
([
'activityId'
,
'itemIds'
]),
common_1
.
registeInfos
([
'session'
]),
common_1
.
services
([
service_1
.
BaseService
,
service_1
.
TaskService
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
...
...
v2.0/dist/controller/task.controller.js.map
View file @
8024dc1b
This diff is collapsed.
Click to expand it.
v2.0/dist/controller/user.controller.js
View file @
8024dc1b
...
...
@@ -50,6 +50,9 @@ var common_1 = require("../decorator/common");
var
sdk_1
=
require
(
"../sdk"
);
var
service_1
=
require
(
"../service"
);
var
vip_1
=
require
(
"../utils/package/vip"
);
var
preCheck_1
=
require
(
"../decorator/common/preCheck"
);
var
checkActivityTime_1
=
require
(
"../utils/check/checkActivityTime"
);
var
noCheckUser_1
=
require
(
"../decorator/common/noCheckUser"
);
var
User
=
/** @class */
(
function
()
{
function
User
()
{
}
...
...
@@ -138,15 +141,17 @@ var User = /** @class */ (function () {
});
};
__decorate
([
common_1
.
paramsCheck
([
'activityId'
,
'userNick'
,
'avatar'
,
'isFollow'
]),
common_1
.
registeInfos
([
'userInfo'
,
'vipInfo'
,
'activityInfo'
]),
common_1
.
checkParams
([
'activityId'
,
'userNick'
,
'avatar'
,
'isFollow'
]),
noCheckUser_1
.
noCheckUser
,
common_1
.
registeInfos
([
'vipInfo'
]),
common_1
.
services
([
service_1
.
UserService
,
service_1
.
AccessService
]),
preCheck_1
.
preCheck
([
checkActivityTime_1
.
checkActivityTime
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
__metadata
(
"design:returntype"
,
Promise
)
],
User
.
prototype
,
"login"
,
null
);
__decorate
([
common_1
.
paramsCheck
([
'activityId'
]),
common_1
.
checkParams
([
'activityId'
]),
common_1
.
registeInfos
([
'session'
]),
common_1
.
services
([]),
__metadata
(
"design:type"
,
Function
),
...
...
@@ -154,8 +159,7 @@ var User = /** @class */ (function () {
__metadata
(
"design:returntype"
,
Promise
)
],
User
.
prototype
,
"getVipInfo"
,
null
);
__decorate
([
common_1
.
paramsCheck
([
'activityId'
]),
common_1
.
userCheck
({
intercept
:
true
}),
common_1
.
checkParams
([
'activityId'
]),
common_1
.
services
([
service_1
.
UserService
]),
__metadata
(
"design:type"
,
Function
),
__metadata
(
"design:paramtypes"
,
[
Object
,
Object
,
Array
]),
...
...
v2.0/dist/controller/user.controller.js.map
View file @
8024dc1b
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/controller/user.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,8CAAuG;AACvG,8BAAqC;AACrC,sCAAuD;AACvD,4CAAiE;AAgBjE;IAAA;IA0EA,CAAC;IAzEC;;OAEG;IAIG,oBAAK,GAAX,UACE,OAA+B,EAC/B,EAAqD,EACrD,EAA0D;YADxD,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,QAAA,EAAE,aAAa,QAAA;;;;;;wBAEnB,MAAM,GAAK,OAAO,OAAZ,CAAY;6BAEtB,CAAC,QAAQ,EAAT,wBAAS;wBACA,qBAAM,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,EAAA;;wBAAhE,QAAQ,GAAG,SAAqD,CAAA;;4BAErD,qBAAM,WAAW,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAA;;wBAA5E,QAAQ,GAAG,SAAiE,CAAA;;;oBAG9E,UAAU;oBACV,qBAAM,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAA;;wBADvC,UAAU;wBACV,SAAuC,CAAA;wBAEvC,sBAAO,kBAAY,CAAC,OAAO,CAAC;gCAC1B,MAAM,QAAA;6BACP,CAAC,EAAA;;;;KACH;IACD;;OAEG;IAIG,yBAAU,GAAhB,UACE,OAA6B,EAC7B,EAA+C;YAA7C,OAAO,aAAA,EAAE,gBAAgB,sBAAA;;;;;;wBAEnB,WAAW,GAAK,OAAO,CAAC,IAAI,YAAjB,CAAiB;wBAErB,qBAAM,gBAAU,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,IAAI,oBAAc,CAAC,OAAO,CAAC,EAAE,gBAA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AE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,iBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;2CAwBvB;IACH,WAAC;CAAA,AA1ED,IA0EC;kBA1EoB,IAAI"}
\ No newline at end of file
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/controller/user.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,8CAAyE;AACzE,8BAAqC;AACrC,sCAAuD;AACvD,4CAAiE;AACjE,yDAAuD;AACvD,sEAAoE;AACpE,+DAA6D;AAc7D;IAAA;IA2EA,CAAC;IA1EC;;OAEG;IAMG,oBAAK,GAAX,UACE,OAA+B,EAC/B,EAAqD,EACrD,EAA0D;YADxD,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,QAAA,EAAE,aAAa,QAAA;;;;;;wBAEnB,MAAM,GAAK,OAAO,OAAZ,CAAY;6BAEtB,CAAC,QAAQ,EAAT,wBAAS;wBACA,qBAAM,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,EAAA;;wBAAhE,QAAQ,GAAG,SAAqD,CAAA;;4BAErD,qBAAM,WAAW,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAA;;wBAA5E,QAAQ,GAAG,SAAiE,CAAA;;;oBAG9E,UAAU;oBACV,qBAAM,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAA;;wBADvC,UAAU;wBACV,SAAuC,CAAA;wBAEvC,sBAAO,kBAAY,CAAC,OAAO,CAAC;gCAC1B,MAAM,QAAA;6BACP,CAAC,EAAA;;;;KACH;IACD;;OAEG;IAIG,yBAAU,GAAhB,UACE,OAA6B,EAC7B,EAA+C;YAA7C,OAAO,aAAA,EAAE,gBAAgB,sBAAA;;;;;;wBAEnB,WAAW,GAAK,OAAO,CAAC,IAAI,YAAj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C,CAAC,SAAS,CAAC,CAAC;QACzB,iBAAQ,CAAC,EAAE,CAAC;;;;0CAUZ;IAOD;QAFC,oBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,iBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;2CAwBvB;IACH,WAAC;CAAA,AA3ED,IA2EC;kBA3EoB,IAAI"}
\ No newline at end of file
v2.0/dist/index.d.ts
View file @
8024dc1b
...
...
@@ -17,12 +17,12 @@ declare const _default: {
list
:
IAwards
[];
}
>>
;
receiveObjectPrize
:
(
context
:
IContext
<
import
(
"./controller/awards.controller"
).
IReceiveOjectParams
>
,
{}:
{},
[
awardSer
]:
[
import
(
"./service"
).
AwardsService
])
=>
Promise
<
IResult
<
boolean
>>
;
receiveEnamePrize
:
(
context
:
IContext
<
import
(
"./controller/awards.controller"
).
IReceiveEnameParams
>
,
{}:
{},
[
awardSer
]:
[
import
(
"./service"
).
AwardsService
])
=>
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
object
[]
|
number
[]
|
string
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
import
(
"taobao-mini-sdk/lib/utils/codetypes"
).
CodeType
|
IAwards
,
true
>>
;
receiveEnamePrize
:
(
context
:
IContext
<
import
(
"./controller/awards.controller"
).
IReceiveEnameParams
>
,
{}:
{},
[
awardSer
]:
[
import
(
"./service"
).
AwardsService
])
=>
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
string
[]
|
object
[]
|
number
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
IAwards
|
import
(
"taobao-mini-sdk/lib/utils/codetypes"
).
CodeType
,
true
>>
;
doHelp
:
(
context
:
IContext
<
{
activityId
:
string
;
inviteId
:
string
;
}
>
,
{
userInfo
,
vipInfo
,
activityInfo
}:
IControllerInfos
,
[
userService
,
taskService
,
statService
]:
[
import
(
"./service/user.service"
).
default
,
import
(
"./service"
).
TaskService
,
import
(
"./service"
).
StatService
,
import
(
"./service"
).
AccessService
])
=>
Promise
<
IResult
<
boolean
>>
;
getStats
:
(
context
:
IContext
<
import
(
"./controller/stat.controller"
).
IGetStatsParams
>
)
=>
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
object
[]
|
number
[]
|
string
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
any
,
true
>>
;
getStats
:
(
context
:
IContext
<
import
(
"./controller/stat.controller"
).
IGetStatsParams
>
)
=>
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
string
[]
|
object
[]
|
number
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
any
,
true
>>
;
addStat
:
(
context
:
IContext
<
import
(
"./controller/stat.controller"
).
IAddStatsParams
>
,
{
userInfo
}:
IControllerInfos
,
[
statService
]:
[
import
(
"./service"
).
StatService
])
=>
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
boolean
,
true
>>
;
getRankList
:
(
context
:
IContext
<
{
activityId
:
string
;
...
...
v2.0/src/controller/awards.controller.ts
View file @
8024dc1b
/** @format */
import
{
services
,
paramsCheck
,
userCheck
,
activityTimeCheck
}
from
'../decorator/common'
import
{
services
,
checkParams
}
from
'../decorator/common'
import
{
resultsModel
}
from
'../sdk'
import
{
AwardsService
}
from
'../service'
import
{
PRIZE_TYPE
,
DRAW_STATUS
,
CODE_TYPES
}
from
'../constants'
import
{
getToday
,
logger
}
from
'../utils'
import
{
CodeType
}
from
'taobao-mini-sdk/lib/utils/codetypes'
import
{
preCheck
}
from
'../decorator/common/preCheck'
import
{
checkActivityTime
}
from
'../utils/check/checkActivityTime'
export
interface
IPrizeListParams
{
activityId
:
string
...
...
@@ -32,8 +34,7 @@ export default class AwardsController {
/**
* 我的奖品列表
*/
@
paramsCheck
([
'activityId'
])
@
userCheck
({
intercept
:
true
})
@
checkParams
([
'activityId'
])
@
services
([
AwardsService
])
async
getMyPrizeList
(
context
:
IContext
<
IPrizeListParams
>
,
...
...
@@ -53,8 +54,7 @@ export default class AwardsController {
/**
* 领取实物
*/
@
paramsCheck
([
'activityId'
,
'id'
,
'name'
,
'phone'
,
'province'
,
'city'
,
'area'
,
'addressDetail'
,
'streetName'
])
@
userCheck
({
intercept
:
true
})
@
checkParams
([
'activityId'
,
'id'
,
'name'
,
'phone'
,
'province'
,
'city'
,
'area'
,
'addressDetail'
,
'streetName'
])
@
services
([
AwardsService
])
async
receiveObjectPrize
(
context
:
IContext
<
IReceiveOjectParams
>
,
...
...
@@ -83,8 +83,7 @@ export default class AwardsController {
/**
* 权益重新领取
*/
@
paramsCheck
([
'activityId'
,
'id'
])
@
userCheck
({
intercept
:
true
})
@
checkParams
([
'activityId'
,
'id'
])
@
services
([
AwardsService
])
async
receiveEnamePrize
(
context
:
IContext
<
IReceiveEnameParams
>
,
{},
[
awardSer
]:
[
AwardsService
])
{
let
{
id
,
activityId
}
=
context
.
data
...
...
@@ -102,9 +101,9 @@ export default class AwardsController {
/**
* 概率抽奖
*/
@
paramsCheck
([
'activityId'
,
'prizeDataType'
])
@
activityTimeCheck
@
checkParams
([
'activityId'
,
'prizeDataType'
])
@
services
([
AwardsService
])
@
preCheck
([
checkActivityTime
])
async
drawLotteryPrize
(
context
:
IContext
<
IParams
>
,
{
userInfo
}:
IControllerInfos
,
[
awardSer
]:
[
AwardsService
])
{
const
{
openId
}
=
context
const
{
activityId
,
prizeDataType
}
=
context
.
data
...
...
v2.0/src/controller/base.controller.ts
View file @
8024dc1b
/** @format */
import
{
CODE_TYPES
}
from
'./../constants'
import
{
services
,
paramsCheck
,
registeInfos
}
from
'../decorator/common'
import
{
services
,
checkParams
,
registeInfos
}
from
'../decorator/common'
import
{
resultsModel
}
from
'../sdk'
import
{
logger
}
from
'../utils'
...
...
@@ -10,7 +10,7 @@ export default class BaseController {
/**
* 活动基本信息
*/
@
paramsCheck
([
'activityId'
])
@
checkParams
([
'activityId'
])
@
services
([
BaseService
])
async
getActivityBaseInfoById
(
context
:
IContext
<
{
...
...
@@ -32,7 +32,7 @@ export default class BaseController {
/**
* 获取商品列表
*/
@
paramsCheck
([
'itemIds'
])
@
checkParams
([
'itemIds'
])
@
registeInfos
([
'session'
])
@
services
([
BaseService
])
async
getItemListByItemIds
(
...
...
v2.0/src/controller/share.controller.ts
View file @
8024dc1b
/** @format */
import
{
CODE_TYPES
}
from
'./../constants'
import
{
paramsCheck
,
userCheck
,
activityTimeCheck
}
from
'../decorator/common/check'
import
{
services
}
from
'../decorator/common/services'
import
{
checkParams
}
from
'../decorator/common/'
import
{
services
,
preCheck
,
registeInfos
}
from
'../decorator/common/'
import
{
resultsModel
}
from
'../sdk'
import
{
getToday
,
setNewVipUserData
,
checkNewVip
}
from
'../utils'
import
{
UserService
,
AccessService
,
TaskService
,
StatService
}
from
'../service'
import
{
registeInfos
}
from
'../decorator/common/registeInfos'
import
{
STAT_TYPE
}
from
'../constants'
import
{
checkActivityTime
}
from
'../utils/check/checkActivityTime'
import
{
preCheck
}
from
'../decorator/common/preCheck'
export
default
class
Share
{
/**
* 获取邀请信息
*/
@
paramsCheck
([
'activityId'
])
@
userCheck
({
intercept
:
true
})
@
registeInfos
([
'userInfo'
,
'activityInfo'
])
@
checkParams
([
'activityId'
])
@
services
([
UserService
])
async
getShareInfo
(
context
:
IContext
<
{
...
...
@@ -41,8 +37,8 @@ export default class Share {
/**
* 完成分享
*/
@
paramsCheck
([
'activityId'
,
'inviteId'
])
@
registeInfos
([
'
userInfo'
,
'vipInfo'
,
'activity
Info'
])
@
checkParams
([
'activityId'
,
'inviteId'
])
@
registeInfos
([
'
vip
Info'
])
@
preCheck
([
checkActivityTime
])
@
services
([
UserService
,
TaskService
,
StatService
,
AccessService
])
async
doHelp
(
...
...
v2.0/src/controller/stat.controller.ts
View file @
8024dc1b
...
...
@@ -4,7 +4,7 @@ import { USER_DB_NAME, ACCESS_DB_NAME, AWARDS_DB_NAME } from '../db'
import
{
resultsModel
,
dateFormatter
,
transformBeijingDate
,
BaseDao
}
from
'../sdk'
import
{
CODE_TYPES
}
from
'../constants'
import
*
as
xlsx
from
'node-xlsx'
import
{
services
}
from
'../decorator/common
/services
'
import
{
services
}
from
'../decorator/common'
import
{
StatService
}
from
'../service'
import
{
registeInfos
}
from
'../decorator/common'
...
...
@@ -24,7 +24,6 @@ export default class StatController {
/**
* 增加埋点记录
*/
@
registeInfos
([
'userInfo'
])
@
services
([
StatService
])
async
addStat
(
context
:
IContext
<
IAddStatsParams
>
,
{
userInfo
}:
IControllerInfos
,
[
statService
]:
[
StatService
])
{
const
{
type
}
=
context
.
data
...
...
v2.0/src/controller/task.controller.ts
View file @
8024dc1b
/** @format */
import
{
CODE_TYPES
,
TASK_RATE_TYPE
}
from
'./../constants'
import
{
paramsCheck
,
userCheck
,
activityTimeCheck
,
noCatch
,
services
,
registeInfos
}
from
'../decorator/common'
import
{
checkParams
,
services
,
registeInfos
,
preCheck
}
from
'../decorator/common'
import
{
resultsModel
,
TBAPIS
}
from
'../sdk'
import
{
TaskService
,
BaseService
}
from
'../service'
import
{
logger
}
from
'../utils'
import
{
ITaskInfo
}
from
'../service/task.service'
import
{
checkActivityTime
}
from
'../utils/check/checkActivityTime'
export
default
class
Task
{
/**
* 任务列表
*/
@
paramsCheck
([
'activityId'
])
@
userCheck
({
intercept
:
true
})
@
activityTimeCheck
@
registeInfos
([
'userInfo'
,
'vipInfo'
,
'activityInfo'
])
@
checkParams
([
'activityId'
])
@
registeInfos
([
'vipInfo'
])
@
services
([
TaskService
])
@
preCheck
([
checkActivityTime
])
async
getTaskList
(
context
:
IContext
<
{
activityId
:
string
}
>
,
{
userInfo
,
vipInfo
,
activityInfo
}:
IControllerInfos
,
...
...
@@ -56,10 +56,9 @@ export default class Task {
/**
* 完成关注店铺任务
*/
@
paramsCheck
([
'activityId'
])
@
activityTimeCheck
@
registeInfos
([
'userInfo'
,
'activityInfo'
])
@
checkParams
([
'activityId'
])
@
services
([
TaskService
])
@
preCheck
([
checkActivityTime
])
async
doFollowTask
(
context
:
IContext
<
{
activityId
:
string
}
>
,
{
userInfo
,
activityInfo
}:
IControllerInfos
,
...
...
@@ -81,11 +80,10 @@ export default class Task {
/**
* 积分兑换次数
*/
@
paramsCheck
([
'activityId'
,
'credits'
])
@
userCheck
({
intercept
:
true
})
@
activityTimeCheck
@
registeInfos
([
'userInfo'
,
'activityInfo'
,
'session'
])
@
checkParams
([
'activityId'
,
'credits'
])
@
registeInfos
([
'session'
])
@
services
([
TaskService
])
@
preCheck
([
checkActivityTime
])
async
doExchangeCreditsTask
(
context
:
IContext
<
IParams
>
,
{
userInfo
,
activityInfo
,
session
}:
IControllerInfos
,
...
...
@@ -132,11 +130,9 @@ export default class Task {
/**
* 浏览商品
*/
@
paramsCheck
([
'activityId'
,
'itemId'
])
@
userCheck
({
intercept
:
true
})
@
activityTimeCheck
@
registeInfos
([
'userInfo'
,
'activityInfo'
])
@
checkParams
([
'activityId'
,
'itemId'
])
@
services
([
TaskService
])
@
preCheck
([
checkActivityTime
])
async
doBrowseGoodsTask
(
context
:
IContext
<
IParams
>
,
{
userInfo
,
activityInfo
}:
IControllerInfos
,
...
...
@@ -179,11 +175,9 @@ export default class Task {
/**
* 收藏商品
*/
@
paramsCheck
([
'activityId'
,
'itemId'
])
@
userCheck
({
intercept
:
true
})
@
activityTimeCheck
@
registeInfos
([
'userInfo'
,
'activityInfo'
])
@
checkParams
([
'activityId'
,
'itemId'
])
@
services
([
TaskService
])
@
preCheck
([
checkActivityTime
])
async
doCollectGoodsTask
(
context
:
IContext
<
IParams
>
,
{
userInfo
,
activityInfo
}:
IControllerInfos
,
...
...
@@ -227,11 +221,9 @@ export default class Task {
/**
* 浏览链接
*/
@
paramsCheck
([
'activityId'
])
@
userCheck
({
intercept
:
true
})
@
activityTimeCheck
@
registeInfos
([
'userInfo'
,
'activityInfo'
])
@
checkParams
([
'activityId'
])
@
services
([
TaskService
])
@
preCheck
([
checkActivityTime
])
async
doJumpLinkTask
(
context
:
IContext
<
IParams
>
,
{
userInfo
,
activityInfo
}:
IControllerInfos
,
...
...
@@ -267,11 +259,9 @@ export default class Task {
/**
* 领取任务奖励
*/
@
paramsCheck
([
'activityId'
,
'taskType'
])
@
userCheck
({
intercept
:
true
})
@
activityTimeCheck
@
registeInfos
([
'userInfo'
])
@
checkParams
([
'activityId'
,
'taskType'
])
@
services
([
TaskService
])
@
preCheck
([
checkActivityTime
])
async
receiveTaskRewards
(
context
:
IContext
<
IParams
>
,
{
userInfo
}:
IControllerInfos
,
...
...
@@ -306,8 +296,8 @@ export default class Task {
/**
* 获取收藏商品列表
*/
@
paramsCheck
([
'activityId'
,
'itemIds'
])
@
registeInfos
([
'
userInfo'
,
'
session'
])
@
checkParams
([
'activityId'
,
'itemIds'
])
@
registeInfos
([
'session'
])
@
services
([
BaseService
,
TaskService
])
async
getCollectGoodsList
(
context
:
IContext
<
IParams
>
,
...
...
v2.0/src/controller/user.controller.ts
View file @
8024dc1b
/** @format */
import
{
services
,
paramsCheck
,
activityTimeCheck
,
registeInfos
,
userCheck
}
from
'../decorator/common'
import
{
services
,
checkParams
,
registeInfos
}
from
'../decorator/common'
import
{
resultsModel
}
from
'../sdk'
import
{
UserService
,
AccessService
}
from
'../service'
import
{
formatVipCbUrl
,
getShopVip
}
from
'../utils/package/vip'
import
{
preCheck
}
from
'../decorator/common/preCheck'
import
{
checkActivityTime
}
from
'../utils/check/checkActivityTime'
import
{
noCheckUser
}
from
'../decorator/common/noCheckUser'
export
interface
IVipParams
{
activityId
:
string
...
...
@@ -23,9 +24,11 @@ export default class User {
/**
* 登录接口, 初始化/更新用户信息
*/
@
paramsCheck
([
'activityId'
,
'userNick'
,
'avatar'
,
'isFollow'
])
@
registeInfos
([
'userInfo'
,
'vipInfo'
,
'activityInfo'
])
@
checkParams
([
'activityId'
,
'userNick'
,
'avatar'
,
'isFollow'
])
@
noCheckUser
@
registeInfos
([
'vipInfo'
])
@
services
([
UserService
,
AccessService
])
@
preCheck
([
checkActivityTime
])
async
login
(
context
:
IContext
<
ILoginParams
>
,
{
userInfo
,
vipInfo
,
activityInfo
}:
IControllerInfos
,
...
...
@@ -49,7 +52,7 @@ export default class User {
/**
* 获取会员信息
*/
@
paramsCheck
([
'activityId'
])
@
checkParams
([
'activityId'
])
@
registeInfos
([
'session'
])
@
services
([])
async
getVipInfo
(
...
...
@@ -66,8 +69,7 @@ export default class User {
/**
* 获取排行榜
*/
@
paramsCheck
([
'activityId'
])
@
userCheck
({
intercept
:
true
})
@
checkParams
([
'activityId'
])
@
services
([
UserService
])
async
getRankList
(
context
:
IContext
<
{
...
...
v2.0/src/decorator/common/check.ts
deleted
100644 → 0
View file @
b417c6c6
/** @format */
import
{
resultsModel
}
from
'../../sdk'
import
{
CODE_TYPES
}
from
'../../constants'
import
{
UserService
,
BaseService
}
from
'../../service'
import
{
getSellerSession
,
logFn
}
from
'../../utils'
import
{
getConfig
}
from
'../../config'
import
{
formatVipCbUrl
,
getShopVip
}
from
'../../utils/package/vip'
// 检验参数是否存在
export
const
paramsCheck
=
(
params
:
string
[])
=>
{
return
function
(
target
:
Object
,
name
:
string
,
descriptor
:
PropertyDescriptor
)
{
const
method
=
descriptor
.
value
descriptor
.
value
=
function
(...
args
:
any
[])
{
const
[
context
,
otherArgs
=
{}]
=
args
const
dataKeys
=
Object
.
keys
(
context
.
data
)
for
(
let
i
=
0
;
i
<
params
.
length
;
i
++
)
{
const
param
=
params
[
i
]
if
(
!
dataKeys
.
includes
(
param
)
||
context
.
data
?.[
param
]
===
''
)
{
logFn
(
context
)
return
resultsModel
.
error
(
CODE_TYPES
.
PARAMS_ERROR
,
`缺少
${
param
}
参数`
)
}
}
return
method
.
apply
(
target
,
[
context
,
{
...
otherArgs
}])
}
}
}
// 检验用户是否存在
export
const
userCheck
=
({
intercept
=
true
})
=>
{
return
function
(
target
:
any
,
name
:
string
,
descriptor
:
PropertyDescriptor
)
{
const
method
=
descriptor
.
value
descriptor
.
value
=
async
function
(...
args
:
any
[])
{
const
[
context
,
otherArgs
=
{}]
=
args
const
userService
=
new
UserService
(
context
)
const
userInfo
=
await
userService
.
getUserInfo
()
if
(
!
userInfo
&&
intercept
)
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_NO_USER
)
return
method
.
apply
(
target
,
[
context
,
{
...
otherArgs
,
userInfo
}])
}
}
}
// 是否是会员
export
const
vipCheck
=
({
intercept
=
true
})
=>
{
return
function
(
target
:
any
,
name
:
string
,
descriptor
:
PropertyDescriptor
)
{
const
method
=
descriptor
.
value
descriptor
.
value
=
async
function
(...
args
:
any
[])
{
const
[
context
,
otherArgs
=
{}]
=
args
const
userService
=
new
UserService
(
context
)
const
{
session
,
userNick
}
=
await
getSellerSession
(
context
)
const
vipInfo
=
await
getShopVip
(
context
,
session
,
formatVipCbUrl
(
context
),
userNick
)
if
(
!
vipInfo
.
isVip
&&
intercept
)
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_NO_VIP
,
'非店铺会员'
,
vipInfo
)
return
method
.
apply
(
target
,
[
context
,
{
...
otherArgs
,
vipInfo
,
session
}])
}
}
}
// 活动时间校验
export
const
activityTimeCheck
=
(
target
:
any
,
name
:
string
,
descriptor
:
PropertyDescriptor
)
=>
{
const
method
=
descriptor
.
value
descriptor
.
value
=
async
function
(...
args
:
any
[])
{
const
[
context
,
otherArgs
=
{}]
=
args
const
{
activityId
}
=
context
.
data
if
(
!
activityId
)
return
resultsModel
.
error
(
CODE_TYPES
.
PARAMS_ERROR
,
`缺少活动id`
)
const
baseService
=
new
BaseService
(
context
)
// 活动基本情况
const
activityInfo
=
await
baseService
.
getBaseInfo
(
activityId
)
// 活动不存在
if
(
!
activityInfo
)
{
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_NO_ACTIVITY
)
}
const
{
startTime
,
endTime
}
=
activityInfo
const
currentTime
=
Date
.
now
()
if
(
currentTime
<
startTime
)
{
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_ACTIVITY_NOSTART
,
`活动未开始`
)
}
if
(
currentTime
>
endTime
)
{
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_ACTIVITY_OVER
,
`活动已结束`
)
}
return
method
.
apply
(
target
,
[
context
,
{
...
otherArgs
,
activityInfo
}])
}
}
v2.0/src/decorator/common/checkParams.ts
0 → 100644
View file @
8024dc1b
/** @format */
import
{
resultsModel
}
from
'../../sdk'
import
{
CODE_TYPES
}
from
'../../constants'
import
{
UserService
,
BaseService
}
from
'../../service'
import
{
getSellerSession
,
logFn
}
from
'../../utils'
import
{
getConfig
}
from
'../../config'
import
{
formatVipCbUrl
,
getShopVip
}
from
'../../utils/package/vip'
// 检验参数是否存在
export
const
checkParams
=
(
params
:
string
[])
=>
{
return
function
(
target
:
Object
,
name
:
string
,
descriptor
:
PropertyDescriptor
)
{
const
method
=
descriptor
.
value
descriptor
.
value
=
function
(...
args
:
any
[])
{
const
[
context
,
otherArgs
=
{}]
=
args
const
dataKeys
=
Object
.
keys
(
context
.
data
)
for
(
let
i
=
0
;
i
<
params
.
length
;
i
++
)
{
const
param
=
params
[
i
]
if
(
!
dataKeys
.
includes
(
param
)
||
context
.
data
?.[
param
]
===
''
)
{
logFn
(
context
)
return
resultsModel
.
error
(
CODE_TYPES
.
PARAMS_ERROR
,
`缺少
${
param
}
参数`
)
}
}
return
method
.
apply
(
target
,
[
context
,
{
...
otherArgs
}])
}
}
}
v2.0/src/decorator/common/index.ts
View file @
8024dc1b
/** @format */
export
*
from
'./check'
export
*
from
'./check
Params
'
export
*
from
'./services'
export
*
from
'./noCatch'
export
*
from
'./registeInfos'
export
*
from
'./preCheck'
v2.0/src/decorator/common/noCheckUser.ts
0 → 100644
View file @
8024dc1b
/** @format */
export
const
noCheckUser
=
(
target
:
any
,
name
:
string
,
descriptor
:
PropertyDescriptor
)
=>
{
const
method
=
descriptor
.
value
descriptor
.
value
=
async
function
(...
args
:
any
[])
{
const
[
context
,
otherArgs
=
{}]
=
args
return
method
.
apply
(
this
,
[
context
,
{
...
otherArgs
,
noCheckUser
:
true
}])
}
}
v2.0/src/decorator/common/preCheck.ts
View file @
8024dc1b
/** @format */
import
{
resultsModel
}
from
'../../sdk'
// 检验参数是否存在
export
const
preCheck
=
(
checks
:
IFunction
[])
=>
{
return
function
(
target
:
Object
,
name
:
string
,
descriptor
:
PropertyDescriptor
)
{
...
...
@@ -12,11 +10,13 @@ export const preCheck = (checks: IFunction[]) => {
for
(
let
i
=
0
;
i
<
checks
.
length
;
i
++
)
{
const
checkFn
=
checks
[
i
]
cons
t
result
=
await
checkFn
.
apply
(
target
,
[
context
,
{
...
otherArgs
},
services
])
le
t
result
=
await
checkFn
.
apply
(
target
,
[
context
,
{
...
otherArgs
},
services
])
// 校验报错
if
((
result
as
IErrorResult
).
success
===
false
&&
(
result
as
IErrorResult
).
code
)
{
return
result
sModel
.
error
(
result
)
return
result
}
result
=
result
||
{}
otherArgs
=
{
...
otherArgs
,
...
result
}
}
return
method
.
apply
(
target
,
[
context
,
{
...
otherArgs
},
services
])
...
...
v2.0/src/decorator/common/registeInfos.ts
View file @
8024dc1b
...
...
@@ -2,15 +2,27 @@
import
{
UserService
,
BaseService
}
from
'../../service'
import
{
getSellerSession
}
from
'../../utils'
import
{
formatVipCbUrl
,
getShopVip
}
from
'../../utils/package/vip'
import
{
CODE_TYPES
}
from
'../../errorCode'
import
{
resultsModel
}
from
'../../sdk'
export
type
IInfo
=
'
userInfo'
|
'session'
|
'activityInfo
'
|
'vipInfo'
export
type
IInfo
=
'
session
'
|
'vipInfo'
async
function
initBaseInfo
(
context
:
IContext
<
IParams
>
,
baseInfos
:
IControllerInfos
,
needInfos
:
IInfo
[])
{
async
function
initBaseInfo
(
context
:
IContext
<
IParams
>
,
baseInfos
:
IC
heckC
ontrollerInfos
,
needInfos
:
IInfo
[])
{
const
handler
=
context
?.
cloud
?.
dataspace
?.
context
?.
handler
const
userService
=
new
UserService
(
context
)
if
(
needInfos
.
includes
(
'userInfo'
)
&&
!
baseInfos
.
userInfo
)
{
if
(
!
baseInfos
.
activityInfo
)
{
const
baseService
=
new
BaseService
(
context
)
// 活动基本情况
const
activityInfo
=
await
baseService
.
getBaseInfo
(
context
.
data
.
activityId
)
if
(
!
activityInfo
)
return
CODE_TYPES
.
ERROR_NO_ACTIVITY
baseInfos
.
activityInfo
=
activityInfo
}
// 默认注入活动和用户信息并校验
if
(
!
baseInfos
.
userInfo
)
{
const
userInfo
=
await
userService
.
getUserInfo
()
if
(
!
userInfo
&&
!
baseInfos
.
noCheckUser
)
return
CODE_TYPES
.
ERROR_NO_USER
baseInfos
.
userInfo
=
userInfo
}
...
...
@@ -20,14 +32,6 @@ async function initBaseInfo(context: IContext<IParams>, baseInfos: IControllerIn
baseInfos
.
activityUserNick
=
userNick
}
if
(
needInfos
.
includes
(
'activityInfo'
)
&&
!
baseInfos
.
activityInfo
)
{
const
baseService
=
new
BaseService
(
context
)
// 活动基本情况
const
activityInfo
=
await
baseService
.
getBaseInfo
(
context
.
data
.
activityId
)
baseInfos
.
activityInfo
=
activityInfo
}
if
(
needInfos
.
includes
(
'vipInfo'
)
&&
!
baseInfos
.
vipInfo
&&
handler
!==
'getVipInfo'
)
{
if
(
!
baseInfos
.
session
)
{
const
{
session
,
userNick
}
=
await
getSellerSession
(
context
)
...
...
@@ -48,7 +52,9 @@ export const registeInfos = (needInfos: IInfo[]) => {
const
baseInfo
=
await
initBaseInfo
(
context
,
otherArgs
,
needInfos
)
return
method
.
apply
(
target
,
[
context
,
{
...
baseInfo
}])
if
((
baseInfo
as
ICodeType
).
code
)
return
resultsModel
.
error
(
baseInfo
as
ICodeType
)
return
method
.
apply
(
target
,
[
context
,
{
...
baseInfo
,
registed
:
true
}])
}
}
}
v2.0/src/decorator/common/services.ts
View file @
8024dc1b
...
...
@@ -4,9 +4,32 @@ import { logFn, recordErrorLog } from '../../utils'
import
{
resultsModel
}
from
'../../sdk'
import
{
CODE_TYPES
}
from
'../../constants'
import
{
doHandler
}
from
'../../utils/common/doHandler'
import
{
UserService
,
BaseService
}
from
'../../service'
type
Constructor
=
new
(...
args
:
any
[])
=>
{}
async
function
formatBaseInfos
(
context
:
IContext
<
IParams
>
,
baseInfos
:
ICheckControllerInfos
)
{
// 如果未调用registeInfos 则 重新注入userInfo和 activityInfo
if
(
!
baseInfos
.
registed
)
{
if
(
!
baseInfos
.
activityInfo
&&
!
baseInfos
.
noCheckActivity
)
{
const
baseService
=
new
BaseService
(
context
)
// 活动基本情况
const
activityInfo
=
await
baseService
.
getBaseInfo
(
context
.
data
.
activityId
)
if
(
!
activityInfo
)
return
CODE_TYPES
.
ERROR_NO_ACTIVITY
baseInfos
.
activityInfo
=
activityInfo
}
// 默认注入活动和用户信息并校验
if
(
!
baseInfos
.
userInfo
)
{
const
userService
=
new
UserService
(
context
)
const
userInfo
=
await
userService
.
getUserInfo
()
if
(
!
userInfo
&&
!
baseInfos
.
noCheckUser
)
return
CODE_TYPES
.
ERROR_NO_USER
baseInfos
.
userInfo
=
userInfo
}
}
return
baseInfos
}
// 注入服务
export
const
services
=
(
services
:
Constructor
[])
=>
{
return
(
target
:
Object
,
name
:
string
,
descriptor
:
PropertyDescriptor
)
=>
{
...
...
@@ -18,21 +41,18 @@ export const services = (services: Constructor[]) => {
logFn
(
context
)
const
baseInfos
=
otherArgs
const
baseInfos
=
await
formatBaseInfos
(
context
,
otherArgs
)
if
((
baseInfos
as
ICodeType
).
code
)
return
resultsModel
.
error
(
baseInfos
as
ICodeType
)
// 默认全局try catch 如果有noCatch参数则直接执行
// @ts-ignore
if
(
baseInfos
.
noCatch
)
{
// @ts-ignore
delete
baseInfos
.
noCatch
return
method
.
apply
(
target
,
[
context
,
baseInfos
,
servicesInstance
])
}
// let ret: IResult<any>
// try {
// ret = await method.apply(target, [context, baseInfos, servicesInstance])
// } catch (error) {
// console.log('error', error)
// await recordErrorLog(context, baseInfos, error.toString(), error.stack)
// ret = resultsModel.error(CODE_TYPES.SYSTEM_ERROR)
// }
return
await
doHandler
(
target
,
method
,
[
context
,
baseInfos
,
servicesInstance
])
}
}
...
...
v2.0/src/typings/index.d.ts
View file @
8024dc1b
...
...
@@ -28,8 +28,13 @@ interface IControllerInfos {
activityInfo
?:
IActivityInfo
session
:
string
activityUserNick
:
string
// 活动创建账号昵称
}
interface
ICheckControllerInfos
extends
IControllerInfos
{
noCheckUser
?:
boolean
noCheckActivity
?:
boolean
noCatch
?:
boolean
noVip
?:
boolean
registed
?:
boolean
}
interface
IVipInfo
{
...
...
v2.0/src/utils/check/checkActivityTime.ts
View file @
8024dc1b
/** @format */
export
const
checkActivityTime
=
async
()
=>
{
import
{
resultsModel
}
from
'../../sdk'
import
{
CODE_TYPES
}
from
'../../errorCode'
export
const
checkActivityTime
=
async
(
context
:
IContext
<
IParams
>
,
{
activityInfo
}:
IControllerInfos
)
=>
{
if
(
!
activityInfo
)
{
console
.
error
(
`使用checkActivityTime registeInfos必须注册activityInfo`
)
}
// 活动不存在
if
(
!
activityInfo
)
{
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_NO_ACTIVITY
)
}
const
{
startTime
,
endTime
}
=
activityInfo
const
currentTime
=
Date
.
now
()
if
(
currentTime
<
startTime
)
{
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_ACTIVITY_NOSTART
,
`活动未开始`
)
}
if
(
currentTime
>
endTime
)
{
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_ACTIVITY_OVER
,
`活动已结束`
)
}
return
{}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment