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
71b9ea9f
Commit
71b9ea9f
authored
Aug 26, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:
💡
ts提示加强
parent
ec23ee7f
Changes
26
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
96 additions
and
32 deletions
+96
-32
share.controller.js.map
v2.0/dist/controller/share.controller.js.map
+1
-1
task.controller.js.map
v2.0/dist/controller/task.controller.js.map
+1
-1
user.controller.js.map
v2.0/dist/controller/user.controller.js.map
+1
-1
awards.service.d.ts
v2.0/dist/service/awards.service.d.ts
+1
-1
awards.service.js
v2.0/dist/service/awards.service.js
+4
-1
awards.service.js.map
v2.0/dist/service/awards.service.js.map
+1
-1
exportHandlers.js
v2.0/dist/utils/package/exportHandlers.js
+1
-0
exportHandlers.js.map
v2.0/dist/utils/package/exportHandlers.js.map
+1
-1
logger.js
v2.0/dist/utils/package/logger.js
+0
-1
logger.js.map
v2.0/dist/utils/package/logger.js.map
+1
-1
rand.d.ts
v2.0/dist/utils/package/rand.d.ts
+2
-2
rand.js
v2.0/dist/utils/package/rand.js
+1
-0
rand.js.map
v2.0/dist/utils/package/rand.js.map
+1
-1
sendTBAward.d.ts
v2.0/dist/utils/package/sendTBAward.d.ts
+4
-3
sendTBAward.js
v2.0/dist/utils/package/sendTBAward.js
+1
-1
sendTBAward.js.map
v2.0/dist/utils/package/sendTBAward.js.map
+1
-1
share.controller.ts
v2.0/src/controller/share.controller.ts
+2
-2
task.controller.ts
v2.0/src/controller/task.controller.ts
+2
-3
user.controller.ts
v2.0/src/controller/user.controller.ts
+1
-1
awards.service.ts
v2.0/src/service/awards.service.ts
+2
-1
activity.d.ts
v2.0/src/typings/activity.d.ts
+24
-0
awards.d.ts
v2.0/src/typings/awards.d.ts
+29
-0
exportHandlers.ts
v2.0/src/utils/package/exportHandlers.ts
+1
-0
logger.ts
v2.0/src/utils/package/logger.ts
+0
-1
rand.ts
v2.0/src/utils/package/rand.ts
+3
-2
sendTBAward.ts
v2.0/src/utils/package/sendTBAward.ts
+10
-5
No files found.
v2.0/dist/controller/share.controller.js.map
View file @
71b9ea9f
{"version":3,"file":"share.controller.js","sourceRoot":"","sources":["../../src/controller/share.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4CAA2C;AAC3C,4CAA8E;AAC9E,kDAAgD;AAEhD,8BAAqC;AACrC,kCAAqD;AACrD,sCAAiF;AAEjF,IAAI;AACJ,+BAA+B;AAC/B,cAAc;AACd,+CAA+C;AAC/C,MAAM;AACN,IAAI;AACJ;IAAA;IA2DA,CAAC;IA1DC;;OAEG;IAIG,iCAAiB,GAAvB,UACE,OAAgB,EAChB,EAAqD,EACrD,EAAoF;YADlF,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,QAAA,EAAE,WAAW,QAAA,EAAE,aAAa,QAAA;;;;;;;wBAElC,KAA2B,OAAO,CAAC,IAAI,EAArC,UAAU,gBAAA,EAAE,QAAQ,cAAA,CAAiB;wBACrC,MAAM,GAAK,OAAO,OAAZ,CAAY;wBAEQ,qBAAM,WAAW,CAAC,mBAAmB,CAAC,QAAQ,CAAC;4BACjF,iCAAiC;0BADgD;;wBAA3E,cAAc,GAAc,SAA+C;wBACjF,iCAAiC;wBACjC,IAAI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B;QACjB,mBAAQ,CAAC,CAAC,qBAAW,EAAE,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;kDAoDnD;IACH,YAAC;CAAA,AA3DD,IA2DC;kBA3DoB,KAAK"}
\ No newline at end of file
{"version":3,"file":"share.controller.js","sourceRoot":"","sources":["../../src/controller/share.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4CAA2C;AAC3C,4CAA8E;AAC9E,kDAAgD;AAEhD,8BAAqC;AACrC,kCAAmC;AACnC,sCAAoE;AAEpE,IAAI;AACJ,+BAA+B;AAC/B,cAAc;AACd,+CAA+C;AAC/C,MAAM;AACN,IAAI;AACJ;IAAA;IA2DA,CAAC;IA1DC;;OAEG;IAIG,iCAAiB,GAAvB,UACE,OAAgB,EAChB,EAAqD,EACrD,EAAoF;YADlF,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,QAAA,EAAE,WAAW,QAAA,EAAE,aAAa,QAAA;;;;;;;wBAElC,KAA2B,OAAO,CAAC,IAAI,EAArC,UAAU,gBAAA,EAAE,QAAQ,cAAA,CAAiB;wBACrC,MAAM,GAAK,OAAO,OAAZ,CAAY;wBAEQ,qBAAM,WAAW,CAAC,mBAAmB,CAAC,QAAQ,CAAC;4BACjF,iCAAiC;0BADgD;;wBAA3E,cAAc,GAAc,SAA+C;wBACjF,iCAAiC;wBACjC,IAAI,CAAC,cAAc;4BAAE,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,uBAAuB,CAAC,EAAA;wBAE5E,kBAAkB,GAAG,WAAW,CAAC,6BAA6B,CAAC,SAAS,EAAE,cAAc,CAAC,CAAA;wBAE/F,eAAe;wBACf,IAAI,kBAAkB,CAAC,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,MAAM,KAAK,MAAM,EAAnB,CAAmB,CAAC,EAAE;4BACrD,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,2BAA2B,CAAC,EAAA;yBAClE;wBAKK,QAAQ,GAAG,WAAW,CAAC,iBAAiB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;wBAG3D,YAAY,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,CAAC,EAAH,CAAG,CAAC,CAAA;wBAGvC,KAAK,GAAK,YAAY,MAAjB,CAAiB;wBAGX,KAAK,GACZ,CAAA,KAAK,IAAI,EAAE,CAAA,oBADC,CACD;wBAIjB,KAAK,GAAG,gBAAQ,EAAE,CAAA;6BACpB,YAAY,EAAZ,wBAAY;wBACD,YAAY,GAAK,cAAc,IAAnB,CAAmB;wBAC5C,mBAAmB;wBACnB,qBAAM,WAAW,CAAC,UAAU,CAAC,YAAY,EAAE;gCACzC,IAAI,EAAE;oCACJ,qBAAqB,EAAE,KAAK;iCAC7B;gCACD,KAAK;oCACH,GAAC,cAAY,KAAK,aAAU,IAAG,EAAE,MAAM,QAAA,EAAE,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE;uCAClE;6BACF,CAAC,EAAA;;wBARF,mBAAmB;wBACnB,SAOE,CAAA;;4BAGJ,sBAAO,kBAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAA;;;;KAClC;IAnDD;QAHC,mBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACvC,yBAAiB;QACjB,mBAAQ,CAAC,CAAC,qBAAW,EAAE,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;kDAoDnD;IACH,YAAC;CAAA,AA3DD,IA2DC;kBA3DoB,KAAK"}
\ No newline at end of file
v2.0/dist/controller/task.controller.js.map
View file @
71b9ea9f
This diff is collapsed.
Click to expand it.
v2.0/dist/controller/user.controller.js.map
View file @
71b9ea9f
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/controller/user.controller.ts"],"names":[],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G,MAAM,GAAG,SAAwF;wBAEvG,sBAAO,kBAAY,CAAC,OAAO,CAAC,MAAM,CAAC,EAAA;;;;KACpC;IArCD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC7D,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;qCAsBtC;IAMD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;0CAWvB;IACH,WAAC;CAAA,AA7CD,IA6CC;kBA7CoB,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,0CAAuE;AAEvE,8BAAqC;AACrC,sCAAuD;AACvD,oCAAqC;AAiBrC;IAAA;IA6CA,CAAC;IA5CC;;OAEG;IAIG,oBAAK,GAAX,UACE,OAAsB,EACtB,EAAqD,EACrD,EAA0D;YADxD,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,QAAA,EAAE,aAAa,QAAA;;;;;;wBAEnB,MAAM,GAAK,OAAO,OAAZ,CAAY;wBAElB,QAAQ,GAAK,OAAO,CAAC,IAAI,SAAjB,CAAiB;6BAE7B,CAAC,QAAQ,EAAT,wBAAS;wBACX,qBAAM,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,EAAA;;wBAArD,SAAqD,CAAA;;4BAErD,qBAAM,WAAW,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAA;;wBAAjE,SAAiE,CAAA;;;oBAGnE,UAAU;oBACV,qBAAM,aAAa,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,EAAA;;wBADtD,UAAU;wBACV,SAAsD,CAAA;wBAEtD,sBAAO,kBAAY,CAAC,OAAO,CAAC;gCAC1B,MAAM,QAAA;6BACP,CAAC,EAAA;;;;KACH;IACD;;OAEG;IAGG,yBAAU,GAAhB,UACE,OAAoB,EACpB,EAA+C,EAC/C,EAA4B;YAD1B,OAAO,aAAA,EAAE,gBAAgB,sBAAA;YAC1B,WAAW,QAAA;;;;;;wBAEJ,WAAW,GAAK,OAAO,CAAC,IAAI,YAAjB,CAAiB;wBAC5B,gBAAgB,GAAK,kBAAS,CAAC,OAAO,CAAC,iBAAvB,CAAuB;wBAChC,qBAAM,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,WAAW,IAAI,gBAAgB,CAAC,EAAA;;wBAAjG,MAAM,GAAG,SAAwF;wBAEvG,sBAAO,kBAAY,CAAC,OAAO,CAAC,MAAM,CAAC,EAAA;;;;KACpC;IArCD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC7D,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;qCAsBtC;IAMD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;0CAWvB;IACH,WAAC;CAAA,AA7CD,IA6CC;kBA7CoB,IAAI"}
\ No newline at end of file
v2.0/dist/service/awards.service.d.ts
View file @
71b9ea9f
...
...
@@ -18,7 +18,7 @@ export default class AwardsService extends UserService {
* 发放奖品
* @param {*} document
*/
sendAward
(
document
:
any
):
Promise
<
any
>
;
sendAward
(
document
:
IAwards
):
Promise
<
import
(
"taobao-mini-sdk/lib/utils/codetypes"
).
CodeType
|
IAwards
>
;
/**
* 我的奖品
* @param {*} param0
...
...
v2.0/dist/service/awards.service.js
View file @
71b9ea9f
...
...
@@ -158,9 +158,12 @@ var AwardsService = /** @class */ (function (_super) {
];
case
1
:
session
=
(
_a
.
sent
()).
session
;
return
[
4
/*yield*/
,
utils_1
.
sendTBAward
(
this
.
context
,
session
,
document
)];
return
[
4
/*yield*/
,
utils_1
.
sendTBAward
(
this
.
context
,
session
,
document
)
//@ts-ignore
];
case
2
:
result
=
_a
.
sent
();
//@ts-ignore
if
(
result
.
code
)
{
return
[
2
/*return*/
,
result
];
}
...
...
v2.0/dist/service/awards.service.js.map
View file @
71b9ea9f
This diff is collapsed.
Click to expand it.
v2.0/dist/utils/package/exportHandlers.js
View file @
71b9ea9f
...
...
@@ -13,6 +13,7 @@ var __assign = (this && this.__assign) || function () {
};
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
exportHandlers
=
void
0
;
// 遍历Controller中的方法, 暴露出来
exports
.
exportHandlers
=
function
(
controllers
)
{
var
handlersMapper
=
controllers
.
map
(
function
(
controller
)
{
...
...
v2.0/dist/utils/package/exportHandlers.js.map
View file @
71b9ea9f
{"version":3,"file":"exportHandlers.js","sourceRoot":"","sources":["../../../src/utils/package/exportHandlers.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;AAED,QAAA,cAAc,GAAG,UAAC,WAAkB;IAC/C,IAAM,cAAc,GAAG,WAAW;SAC/B,GAAG,CAAC,UAAA,UAAU;QACb,IAAM,kBAAkB,GAAG,IAAI,UAAU,EAAE,CAAA;QAC3C,IAAM,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAC/F,UAAA,CAAC,IAAI,OAAA,CAAC,KAAK,aAAa,EAAnB,CAAmB,CACzB,CAAA;QACD,OAAO,YAAY,CAAC,MAAM,CAAC,UAAC,IAAI,EAAE,OAAO;;YACvC,6BACK,IAAI,gBACN,OAAO,IAAG,kBAAkB,CAAC,OAAO,CAAC,OACvC;QACH,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,CAAC,CAAC;SACD,MAAM,CAAC,UAAC,IAAI,EAAE,OAAO;QACpB,6BACK,OAAO,GACP,IAAI,EACR;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,OAAO,cAAc,CAAA;AACvB,CAAC,CAAA"}
\ No newline at end of file
{"version":3,"file":"exportHandlers.js","sourceRoot":"","sources":["../../../src/utils/package/exportHandlers.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;AAEd,yBAAyB;AACZ,QAAA,cAAc,GAAG,UAAC,WAAkB;IAC/C,IAAM,cAAc,GAAG,WAAW;SAC/B,GAAG,CAAC,UAAA,UAAU;QACb,IAAM,kBAAkB,GAAG,IAAI,UAAU,EAAE,CAAA;QAC3C,IAAM,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAC/F,UAAA,CAAC,IAAI,OAAA,CAAC,KAAK,aAAa,EAAnB,CAAmB,CACzB,CAAA;QACD,OAAO,YAAY,CAAC,MAAM,CAAC,UAAC,IAAI,EAAE,OAAO;;YACvC,6BACK,IAAI,gBACN,OAAO,IAAG,kBAAkB,CAAC,OAAO,CAAC,OACvC;QACH,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,CAAC,CAAC;SACD,MAAM,CAAC,UAAC,IAAI,EAAE,OAAO;QACpB,6BACK,OAAO,GACP,IAAI,EACR;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,OAAO,cAAc,CAAA;AACvB,CAAC,CAAA"}
\ No newline at end of file
v2.0/dist/utils/package/logger.js
View file @
71b9ea9f
...
...
@@ -82,7 +82,6 @@ exports.recordErrorLog = function (context, baseInfos, errorMsg, stack) { return
exports
.
logger
=
function
(
message
)
{
console
.
log
(
'
\
x1b[36m%s
\
x1b[0m'
,
"-------------------
\
u65E5
\
u5FD7----------------------------"
);
console
.
log
(
'
\
x1b[36m%s
\
x1b[0m'
,
JSON
.
stringify
(
message
,
null
,
2
));
// @ts-nocheck no-octal-escape
console
.
log
(
'
\
x1b[36m%s
\
x1b[0m'
,
"-------------------
\
u65E5
\
u5FD7----------------------------"
);
// console.log(`\033[42;30m 日志 \033[40;32m ${message} \033[0m`)
};
...
...
v2.0/dist/utils/package/logger.js.map
View file @
71b9ea9f
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/utils/package/logger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,iCAAmC;AACnC,+BAA4C;AAC5C,qCAAsC;AAEzB,QAAA,KAAK,GAAG,UAAC,OAAgB;;IACpC,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACpB,OAAO,CAAC,GAAG,CACT,6BAAgB,OAAO,CAAC,MAAM,IAAI,EAAE,WAClC,mBAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,SAAS,0CAAE,OAAO,0CAAE,OAAO,KAAI,OAAO,CAAC,OAAO,kBAClD,CACf,CAAA;IACD,OAAO,CAAC,GAAG,CAAC,wCAAkB,IAAI,iBAAc,CAAC,CAAA;AACnD,CAAC,CAAA;AAED,SAAS;AACI,QAAA,cAAc,GAAG,UAC5B,OAAgB,EAChB,SAA2B,EAC3B,QAAgB,EAChB,KAAa;;;;;;gBAEL,MAAM,GAAK,OAAO,OAAZ,CAAY;gBAClB,UAAU,GAAK,CAAA,OAAO,CAAC,IAAI,IAAI,EAAE,CAAA,WAAvB,CAAuB;gBACjC,QAAQ,GAAK,SAAS,SAAd,CAAc;gBACtB,QAAQ,GAAK,CAAA,QAAQ,IAAI,EAAE,CAAA,SAAnB,CAAmB;gBAC7B,MAAM,GAAa,IAAI,aAAO,CAAC,OAAO,EAAE,sBAAiB,CAAC,CAAA;gBAC1D,YAAY,GAAW,CAAG,OAAO,CAAC,MAAM,IAAI,EAAE,WAClD,mBAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,SAAS,0CAAE,OAAO,0CAAE,OAAO,KAAI,OAAO,CAAC,OAAO,CAC9D,CAAA;gBACK,qBAAM,MAAM,CAAC,SAAS,CAAC;wBAC5B,MAAM,QAAA;wBACN,UAAU,YAAA;wBACV,QAAQ,UAAA;wBACR,UAAU,EAAE,KAAK;wBACjB,YAAY,cAAA;wBACZ,QAAQ,UAAA;wBACR,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,MAAM,EAAE,OAAO,CAAC,IAAI;wBACpB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;wBACtB,SAAS,EAAE,gBAAQ,EAAE;wBACrB,SAAS,EAAE,CAAC;qBACb,CAAC,EAAA;oBAZF,sBAAO,SAYL,EAAA;;;KACH,CAAA;AAED,iBAAiB;AACJ,QAAA,MAAM,GAAG,UAAC,OAAY;IACjC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,6DAAmD,CAAC,CAAA;IACrF,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;IAClE,8BAA8B;IAC9B,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,6DAAmD,CAAC,CAAA;IAErF,+DAA+D;AACjE,CAAC,CAAA"}
\ No newline at end of file
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/utils/package/logger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,iCAAmC;AACnC,+BAA4C;AAC5C,qCAAsC;AAEzB,QAAA,KAAK,GAAG,UAAC,OAAgB;;IACpC,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC,OAAO,CAAC,GAAG,CAAC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;oBAZF,sBAAO,SAYL,EAAA;;;KACH,CAAA;AAED,iBAAiB;AACJ,QAAA,MAAM,GAAG,UAAC,OAAY;IACjC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,6DAAmD,CAAC,CAAA;IACrF,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;IAClE,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,6DAAmD,CAAC,CAAA;IAErF,+DAA+D;AACjE,CAAC,CAAA"}
\ No newline at end of file
v2.0/dist/utils/package/rand.d.ts
View file @
71b9ea9f
/** @format */
export
declare
const
rand
:
(
number
:
any
)
=>
number
;
export
declare
const
signFigures
:
(
num
:
any
,
rank
?:
number
)
=>
number
;
export
declare
const
rand
:
(
number
:
number
)
=>
number
;
export
declare
const
signFigures
:
(
num
:
number
,
rank
?:
number
)
=>
number
;
v2.0/dist/utils/package/rand.js
View file @
71b9ea9f
...
...
@@ -2,6 +2,7 @@
/** @format */
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
signFigures
=
exports
.
rand
=
void
0
;
// 获取随机数
exports
.
rand
=
(
function
()
{
var
seed
=
new
Date
().
getTime
();
function
r
()
{
...
...
v2.0/dist/utils/package/rand.js.map
View file @
71b9ea9f
{"version":3,"file":"rand.js","sourceRoot":"","sources":["../../../src/utils/package/rand.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAED,QAAA,IAAI,GAAG,CAAC;IACnB,IAAI,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;IAC/B,SAAS,CAAC;QACR,IAAI,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAA;QACrC,OAAO,IAAI,GAAG,QAAQ,CAAA;IACxB,CAAC;IACD,OAAO,UAAU,MAAM;QACrB,OAAO,IAAI,CAAC,IAAI,CAA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B,CAAC;IACD,OAAO,UAAU,MAAc;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAA;IAChC,CAAC,CAAA;AACH,CAAC,CAAC,EAAE,CAAA;AAES,QAAA,WAAW,GAAG,UAAU,GAAW,EAAE,IAAQ;IAAR,qBAAA,EAAA,QAAQ;IACxD,IAAI,CAAC,GAAG;QAAE,OAAO,CAAC,CAAA;IAClB,IAAM,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAChC,IAAM,MAAM,GAAG,GAAG,GAAG,IAAI,CAAA;IACzB,IAAM,IAAI,GAAG,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;IACtD,IAAI,GAAG,CAAA;IACP,IAAI,IAAI,GAAG,CAAC,EAAE;QACZ,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;KACvC;SAAM,IAAI,IAAI,GAAG,CAAC,EAAE;QACnB,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,IAAI,CAAA;KACrD;SAAM;QACL,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;KACzB;IACD,OAAO,GAAG,GAAG,IAAI,CAAA;AACnB,CAAC,CAAA"}
\ No newline at end of file
v2.0/dist/utils/package/sendTBAward.d.ts
View file @
71b9ea9f
/** @format */
import
{
CodeType
}
from
'taobao-mini-sdk/lib/utils/codetypes'
;
/**
* 发奖,包含权益,实物,积分
* @param {*} document 必须要有{ type, ename, _id }
* @param {*} session
* @param {*} context
*/
export
declare
const
sendTBAward
:
(
context
:
any
,
session
:
any
,
document
:
any
)
=>
Promise
<
any
>
;
export
declare
const
sendTBAward
:
(
context
:
Context
,
session
:
string
,
document
:
IAwards
)
=>
Promise
<
IAwards
|
CodeType
>
;
/**
* 发放积分
* @param {发放的积分数} credits
...
...
@@ -13,7 +14,7 @@ export declare const sendTBAward: (context: any, session: any, document: any) =>
* @param {*} context
* @returns {drawStatus, remark}
*/
export
declare
const
sendCredits
:
(
credits
:
any
,
session
:
any
,
context
:
any
)
=>
Promise
<
{
export
declare
const
sendCredits
:
(
credits
:
number
,
session
:
string
,
context
:
Context
)
=>
Promise
<
{
drawStatus
:
number
;
remark
:
string
;
}
>
;
...
...
@@ -25,7 +26,7 @@ export declare const sendCredits: (credits: any, session: any, context: any) =>
* @param {*} context
* @returns { drawStatus, remark }
*/
export
declare
const
sendEname
:
(
ename
:
any
,
uniqueId
:
any
,
session
:
any
,
context
:
any
)
=>
Promise
<
{
export
declare
const
sendEname
:
(
ename
:
string
,
uniqueId
:
string
,
session
:
string
,
context
:
Context
)
=>
Promise
<
{
remark
:
string
;
drawStatus
:
number
;
}
>
;
v2.0/dist/utils/package/sendTBAward.js
View file @
71b9ea9f
...
...
@@ -83,7 +83,7 @@ exports.sendTBAward = function (context, session, document) { return __awaiter(v
case
6
:
e_1
=
_c
.
sent
();
console
.
log
(
"
\
u53D1
\
u5956
\
u9519
\
u8BEF"
,
e_1
);
return
[
2
/*return*/
,
constants_1
.
CODE_TYPES
.
SYSTEM
_ERROR
];
return
[
2
/*return*/
,
constants_1
.
CODE_TYPES
.
PARAMS
_ERROR
];
case
7
:
return
[
2
/*return*/
];
}
});
...
...
v2.0/dist/utils/package/sendTBAward.js.map
View file @
71b9ea9f
{"version":3,"file":"sendTBAward.js","sourceRoot":"","sources":["../../../src/utils/package/sendTBAward.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,6CAA0F;AAC1F,iCAAkC;AAElC;;;;;GAKG;AACU,QAAA,WAAW,GAAG,UAAO,OAAO,EAAE,OAAO,EAAE,QAAQ;;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gBACd,MAAM,GAAG,EAAE,CAAA;gBACf,IAAI,MAAM,CAAC,cAAc,EAAE;oBACzB,UAAU,GAAG,uBAAW,CAAC,OAAO,CAAA;iBACjC;qBAAM;oBACD,WAAW,GAAG,MAAM,CAAC,WAAW,CAAA;oBACpC,IACE;wBACE,wCAAwC;wBACxC,qCAAqC;wBACrC,+CAA+C;qBAChD,CAAC,QAAQ,CAAC,WAAW,CAAC,EACvB;wBACA,UAAU,GAAG,uBAAW,CAAC,KAAK,CAAA;qBAC/B;yBAAM;wBACL,UAAU,GAAG,uBAAW,CAAC,IAAI,CAAA;qBAC9B;oBACD,MAAM,GAAG,mBAAO,CAAC,WAAW,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,OAAO,IAAI,0BAAM,CAAA;iBAC7F;gBACD,sBAAO,EAAE,MAAM,QAAA,EAAE,UAAU,YAAA,EAAE,EAAA;;;KAC9B,CAAA"}
\ No newline at end of file
{"version":3,"file":"sendTBAward.js","sourceRoot":"","sources":["../../../src/utils/package/sendTBAward.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,6CAA0F;AAC1F,iCAAgD;AAGhD;;;;;GAKG;AACU,QAAA,WAAW,GAAG,UACzB,OAAgB,EAChB,OAAe,EACf,QAAiB;;;;;gBAEX,IAAI,GAA0B,QAAQ,KAAlC,EAAE,KAAK,GAAmB,QAAQ,MAA3B,EAAE,GAAG,GAAc,QAAQ,IAAtB,EAAE,OAAO,GAAK,QAAQ,QAAb,CAAa;gBAC5C,IAAI,CAAC,IAAI,EAAE;oBACT,sBAAO,sBAAU,CAAC,YAAY,EAAA;iBAC/B;gBACD,IAAI,IAAI,KAAK,sBAAU,CAAC,MAAM,EAAE;oBAC9B,sBAAO,QAAQ,EAAA;iBAChB;;;;gBAGC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;q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A;qBAC9B;oBACD,MAAM,GAAG,mBAAO,CAAC,WAAW,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,OAAO,IAAI,0BAAM,CAAA;iBAC7F;gBACD,sBAAO,EAAE,MAAM,QAAA,EAAE,UAAU,YAAA,EAAE,EAAA;;;KAC9B,CAAA"}
\ No newline at end of file
v2.0/src/controller/share.controller.ts
View file @
71b9ea9f
...
...
@@ -5,8 +5,8 @@ import { paramsCheck, userCheck, activityTimeCheck } from '../decorator/check'
import
{
services
}
from
'../decorator/services'
import
{
resultsModel
}
from
'../sdk'
import
{
getToday
,
getUserOrderlist
}
from
'../utils'
import
{
UserService
,
BaseService
,
AccessService
,
TaskService
}
from
'../service'
import
{
getToday
}
from
'../utils'
import
{
UserService
,
AccessService
,
TaskService
}
from
'../service'
// {
// "handler": "doFollowTask",
...
...
v2.0/src/controller/task.controller.ts
View file @
71b9ea9f
...
...
@@ -2,10 +2,9 @@
import
{
CODE_TYPES
,
TASK_RATE_TYPE
}
from
'./../constants'
import
{
paramsCheck
,
userCheck
,
activityTimeCheck
,
noCatch
,
services
}
from
'../decorator'
import
{
getConfig
}
from
'../config'
import
{
resultsModel
,
TBAPIS
}
from
'../sdk'
import
{
getToday
,
getUserOrderlist
,
logger
}
from
'../utils'
import
{
UserService
,
BaseService
,
TaskService
}
from
'../service'
import
{
TaskService
}
from
'../service'
// {
// "handler": "getTaskList",
...
...
v2.0/src/controller/user.controller.ts
View file @
71b9ea9f
/** @format */
import
{
services
,
paramsCheck
,
userCheck
,
activityTimeCheck
}
from
'../decorator'
import
{
services
,
paramsCheck
,
activityTimeCheck
}
from
'../decorator'
import
{
resultsModel
}
from
'../sdk'
import
{
UserService
,
AccessService
}
from
'../service'
...
...
v2.0/src/service/awards.service.ts
View file @
71b9ea9f
...
...
@@ -72,10 +72,11 @@ export default class AwardsService extends UserService {
* 发放奖品
* @param {*} document
*/
async
sendAward
(
document
:
any
)
{
async
sendAward
(
document
:
IAwards
)
{
let
{
session
}
=
await
getSellerSession
(
this
.
context
)
// 发放淘宝权益
let
result
=
await
sendTBAward
(
this
.
context
,
session
,
document
)
//@ts-ignore
if
(
result
.
code
)
{
return
result
}
...
...
v2.0/src/typings/activity.d.ts
View file @
71b9ea9f
...
...
@@ -27,6 +27,30 @@ interface ITasks {
inviteFriends
?:
ITaskConfig
}
interface
IActivityPrize
{
_id
?:
string
activityId
?:
string
ename
?:
string
prizeType
:
1
|
2
type
:
1
|
2
|
3
|
4
|
5
image
:
string
name
:
string
probability
?:
string
|
number
properiodto
:
number
properiodfrom
:
number
lockStatus
?:
1
|
2
switchStock
?:
1
|
2
rank
?:
string
|
number
credits
?:
string
|
number
useUrl
?:
string
stock
:
number
useStock
:
number
openId
?:
string
deleteStatus
:
number
createTime
:
number
updateTime
:
number
}
interface
ITaskConfig
{
title
?:
string
// 任务标题
value
:
number
// 任奖奖励
...
...
v2.0/src/typings/awards.d.ts
0 → 100644
View file @
71b9ea9f
/** @format */
interface
IAwards
{
_id
?:
string
openId
:
string
activityId
:
string
prizeId
:
string
ename
?:
string
credits
?:
number
type
:
number
image
:
string
name
:
string
drawStatus
:
number
receiveName
?:
string
userNick
?:
string
phone
?:
string
address
?:
string
provice
?:
string
city
?:
string
area
?:
string
receiveTime
?:
number
shipStatus
?:
number
shipCompany
?:
string
shipNum
?:
string
|
number
remark
:
string
createTime
:
number
updateTime
:
number
awardsType
?:
string
}
v2.0/src/utils/package/exportHandlers.ts
View file @
71b9ea9f
/** @format */
// 遍历Controller中的方法, 暴露出来
export
const
exportHandlers
=
(
controllers
:
any
[])
=>
{
const
handlersMapper
=
controllers
.
map
(
controller
=>
{
...
...
v2.0/src/utils/package/logger.ts
View file @
71b9ea9f
...
...
@@ -48,7 +48,6 @@ export const recordErrorLog = async (
export const logger = (message: any) => {
console.log('\x1b[36m%s\x1b[0m', `
-------------------
日志
----------------------------
`)
console.log('\x1b[36m%s\x1b[0m', JSON.stringify(message, null, 2))
// @ts-nocheck no-octal-escape
console.log('\x1b[36m%s\x1b[0m', `
-------------------
日志
----------------------------
`)
// console.log(`
\
033
[
42
;
30
m
日志
\
033
[
40
;
32
m
$
{
message
}
\
033
[
0
m
`)
...
...
v2.0/src/utils/package/rand.ts
View file @
71b9ea9f
/** @format */
// 获取随机数
export
const
rand
=
(
function
()
{
let
seed
=
new
Date
().
getTime
()
function
r
()
{
seed
=
(
seed
*
9301
+
49297
)
%
233280
return
seed
/
233280.0
}
return
function
(
number
)
{
return
function
(
number
:
number
)
{
return
Math
.
ceil
(
r
()
*
number
)
}
})()
export
const
signFigures
=
function
(
num
,
rank
=
6
)
{
export
const
signFigures
=
function
(
num
:
number
,
rank
=
6
)
{
if
(
!
num
)
return
0
const
sign
=
num
/
Math
.
abs
(
num
)
const
number
=
num
*
sign
...
...
v2.0/src/utils/package/sendTBAward.ts
View file @
71b9ea9f
/** @format */
import
{
PRIZE_TYPE
,
DRAW_STATUS
,
C_APP_NAME
,
TBERROR
,
CODE_TYPES
}
from
'../../constants'
import
{
TBAPIS
}
from
'../../sdk'
import
{
TBAPIS
,
resultsModel
}
from
'../../sdk'
import
{
CodeType
}
from
'taobao-mini-sdk/lib/utils/codetypes'
/**
* 发奖,包含权益,实物,积分
...
...
@@ -9,7 +10,11 @@ import { TBAPIS } from '../../sdk'
* @param {*} session
* @param {*} context
*/
export
const
sendTBAward
=
async
(
context
,
session
,
document
)
=>
{
export
const
sendTBAward
=
async
(
context
:
Context
,
session
:
string
,
document
:
IAwards
):
Promise
<
IAwards
|
CodeType
>
=>
{
let
{
type
,
ename
,
_id
,
credits
}
=
document
if
(
!
type
)
{
return
CODE_TYPES
.
PARAMS_ERROR
...
...
@@ -35,7 +40,7 @@ export const sendTBAward = async (context, session, document) => {
return
document
}
catch
(
e
)
{
console
.
log
(
`发奖错误`
,
e
)
return
CODE_TYPES
.
SYSTEM
_ERROR
return
CODE_TYPES
.
PARAMS
_ERROR
}
}
...
...
@@ -46,7 +51,7 @@ export const sendTBAward = async (context, session, document) => {
* @param {*} context
* @returns {drawStatus, remark}
*/
export
const
sendCredits
=
async
(
credits
,
session
,
c
ontext
)
=>
{
export
const
sendCredits
=
async
(
credits
:
number
,
session
:
string
,
context
:
C
ontext
)
=>
{
let
drawStatus
=
0
let
remark
=
''
let
result
=
await
TBAPIS
.
changeCredits
(
context
,
session
,
{
...
...
@@ -72,7 +77,7 @@ export const sendCredits = async (credits, session, context) => {
* @returns { drawStatus, remark }
*/
export
const
sendEname
=
async
(
ename
,
uniqueId
,
session
,
c
ontext
)
=>
{
export
const
sendEname
=
async
(
ename
:
string
,
uniqueId
:
string
,
session
:
string
,
context
:
C
ontext
)
=>
{
let
result
=
{
result_success
:
''
,
result_code
:
''
,
...
...
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