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
71bb98fe
Commit
71bb98fe
authored
Sep 14, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:
💡
埋点数据
parent
90ecde54
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
28 deletions
+30
-28
awards.controller.d.ts
v2.0/dist/controller/awards.controller.d.ts
+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
+14
-12
stat.controller.js.map
v2.0/dist/controller/stat.controller.js.map
+1
-1
index.d.ts
v2.0/dist/index.d.ts
+2
-2
awards.service.d.ts
v2.0/dist/service/awards.service.d.ts
+2
-2
stat.controller.ts
v2.0/src/controller/stat.controller.ts
+9
-9
No files found.
v2.0/dist/controller/awards.controller.d.ts
View file @
71bb98fe
...
@@ -32,7 +32,7 @@ export default class AwardsController {
...
@@ -32,7 +32,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
<
IAwards
|
CodeType
,
true
>>
;
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
>>
;
/**
/**
* 概率抽奖
* 概率抽奖
*/
*/
...
...
v2.0/dist/controller/stat.controller.d.ts
View file @
71bb98fe
...
@@ -18,5 +18,5 @@ export default class StatController {
...
@@ -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
[]
,
true
>>
;
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
,
true
>>
;
}
}
v2.0/dist/controller/stat.controller.js
View file @
71bb98fe
...
@@ -81,7 +81,7 @@ var StatController = /** @class */ (function () {
...
@@ -81,7 +81,7 @@ var StatController = /** @class */ (function () {
*/
*/
StatController
.
prototype
.
getStats
=
function
(
context
)
{
StatController
.
prototype
.
getStats
=
function
(
context
)
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
_a
,
activityId
,
startDay
,
endDay
,
userDao
,
accessDao
,
oneDay
,
xlsxData
,
day
,
PV
,
UV
,
newUV
,
vipPV
,
noVipPV
,
vipUV
,
noVipUV
,
newVipUV
,
newFollowUV
,
keyValueMapper
,
tommorrow
,
buffer
,
e_1
;
var
_a
,
activityId
,
startDay
,
endDay
,
userDao
,
accessDao
,
oneDay
,
xlsxData
,
day
,
PV
,
UV
,
newUV
,
vipPV
,
noVipPV
,
vipUV
,
noVipUV
,
newVipUV
,
newFollowUV
,
keyValueMapper
,
tommorrow
,
buffer
,
result
,
e_1
;
return
__generator
(
this
,
function
(
_b
)
{
return
__generator
(
this
,
function
(
_b
)
{
switch
(
_b
.
label
)
{
switch
(
_b
.
label
)
{
case
0
:
case
0
:
...
@@ -92,7 +92,7 @@ var StatController = /** @class */ (function () {
...
@@ -92,7 +92,7 @@ var StatController = /** @class */ (function () {
xlsxData
=
[];
xlsxData
=
[];
_b
.
label
=
1
;
_b
.
label
=
1
;
case
1
:
case
1
:
_b
.
trys
.
push
([
1
,
1
3
,
,
14
]);
_b
.
trys
.
push
([
1
,
1
4
,
,
15
]);
day
=
startDay
;
day
=
startDay
;
_b
.
label
=
2
;
_b
.
label
=
2
;
case
2
:
case
2
:
...
@@ -198,21 +198,23 @@ var StatController = /** @class */ (function () {
...
@@ -198,21 +198,23 @@ var StatController = /** @class */ (function () {
]);
]);
// let result = {}
// let result = {}
console
.
log
(
xlsxData
,
'xlsxData'
);
console
.
log
(
xlsxData
,
'xlsxData'
);
// let result = await context.cloud.file.uploadFile({
return
[
4
/*yield*/
,
context
.
cloud
.
file
.
uploadFile
({
// fileContent: buffer,
fileContent
:
buffer
,
// fileName: `数据统计${startDay.replace(/\//g, '-')}-${endDay.replace(/\//g, '-')}.xlsx`
fileName
:
"
\
u6570
\
u636E
\
u7EDF
\
u8BA1"
+
startDay
.
replace
(
/
\/
/g
,
'-'
)
+
"-"
+
endDay
.
replace
(
/
\/
/g
,
'-'
)
+
".xlsx"
// })
})];
// console.log(xlsxData, 'xlsxData')
// if (result.url) {
// result.url = result.url.replace('http', 'https').replace('-internal', '')
// }
return
[
2
/*return*/
,
sdk_1
.
resultsModel
.
success
(
xlsxData
)];
case
13
:
case
13
:
result
=
_b
.
sent
();
console
.
log
(
xlsxData
,
'xlsxData'
);
if
(
result
.
url
)
{
result
.
url
=
result
.
url
.
replace
(
'http'
,
'https'
).
replace
(
'-internal'
,
''
);
}
return
[
2
/*return*/
,
sdk_1
.
resultsModel
.
success
(
result
)];
case
14
:
e_1
=
_b
.
sent
();
e_1
=
_b
.
sent
();
console
.
log
(
'上传文件出错'
,
e_1
);
console
.
log
(
'上传文件出错'
,
e_1
);
// 打印日志
// 打印日志
return
[
2
/*return*/
,
sdk_1
.
resultsModel
.
error
(
constants_1
.
CODE_TYPES
.
SYSTEM_ERROR
,
"
\
u4E0A
\
u4F20
\
u6587
\
u4EF6
\
u9519
\
u8BEF"
)];
return
[
2
/*return*/
,
sdk_1
.
resultsModel
.
error
(
constants_1
.
CODE_TYPES
.
SYSTEM_ERROR
,
"
\
u4E0A
\
u4F20
\
u6587
\
u4EF6
\
u9519
\
u8BEF"
)];
case
1
4
:
return
[
2
/*return*/
];
case
1
5
:
return
[
2
/*return*/
];
}
}
});
});
});
});
...
...
v2.0/dist/controller/stat.controller.js.map
View file @
71bb98fe
{"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,kDAAgD;AAChD,sCAAwC;AAaxC,cAAc;AACd;IAAA;IA0IA,CAAC;IAzIC;;OAEG;IAEG,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,sBAA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wBAHE,MAAM,GAAG,SAGX;wBACF,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAA;wBACjC,IAAI,MAAM,CAAC,GAAG,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;IApID;QADC,mBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;iDAKvB;IAiIH,qBAAC;CAAA,AA1ID,IA0IC;kBA1IoB,cAAc"}
\ No newline at end of file
\ No newline at end of file
v2.0/dist/index.d.ts
View file @
71bb98fe
...
@@ -15,8 +15,8 @@ declare const _default: {
...
@@ -15,8 +15,8 @@ declare const _default: {
list
:
IAwards
[];
list
:
IAwards
[];
}
>>
;
}
>>
;
receiveObjectPrize
:
(
context
:
IContext
<
import
(
"./controller/awards.controller"
).
IReceiveOjectParams
>
,
{}:
{},
[
awardSer
]:
[
import
(
"./service"
).
AwardsService
])
=>
Promise
<
IResult
<
boolean
>>
;
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
<
IAwards
|
import
(
"taobao-mini-sdk/lib/utils/codetypes"
).
CodeType
,
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
|
object
[]
|
number
[]
|
string
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
import
(
"taobao-mini-sdk/lib/utils/codetypes"
).
CodeType
|
IAwards
,
true
>>
;
doHelp
:
(
context
:
IContext
<
IParams
>
,
{
userInfo
,
vipInfo
,
activityInfo
}:
IControllerInfos
,
[
userService
,
taskService
,
accessService
]:
[
import
(
"./service/user.service"
).
default
,
import
(
"./service"
).
TaskService
,
import
(
"./service"
).
AccessService
])
=>
Promise
<
IResult
<
boolean
>>
;
doHelp
:
(
context
:
IContext
<
IParams
>
,
{
userInfo
,
vipInfo
,
activityInfo
}:
IControllerInfos
,
[
userService
,
taskService
,
accessService
]:
[
import
(
"./service/user.service"
).
default
,
import
(
"./service"
).
TaskService
,
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
|
object
[]
|
number
[]
|
string
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
any
,
true
>>
;
};
};
export
default
_default
;
export
default
_default
;
v2.0/dist/service/awards.service.d.ts
View file @
71bb98fe
...
@@ -19,7 +19,7 @@ export default class AwardsService extends UserService {
...
@@ -19,7 +19,7 @@ export default class AwardsService extends UserService {
* 发放奖品
* 发放奖品
* @param {*} document
* @param {*} document
*/
*/
sendAward
(
document
:
IAwards
):
Promise
<
IAwards
|
CodeType
>
;
sendAward
(
document
:
IAwards
):
Promise
<
CodeType
|
IAwards
>
;
/**
/**
* 我的奖品
* 我的奖品
* @param {*} param0
* @param {*} param0
...
@@ -37,7 +37,7 @@ export default class AwardsService extends UserService {
...
@@ -37,7 +37,7 @@ export default class AwardsService extends UserService {
name
:
string
;
name
:
string
;
phone
:
string
|
number
;
phone
:
string
|
number
;
}):
Promise
<
true
|
CodeType
>
;
}):
Promise
<
true
|
CodeType
>
;
recieveEnamePrize
(
_id
:
string
,
activityId
:
string
):
Promise
<
IAwards
|
CodeType
>
;
recieveEnamePrize
(
_id
:
string
,
activityId
:
string
):
Promise
<
CodeType
|
IAwards
>
;
getPrizeConfig
(
query
:
{
getPrizeConfig
(
query
:
{
activityId
:
string
;
activityId
:
string
;
[
queryParam
:
string
]:
any
;
[
queryParam
:
string
]:
any
;
...
...
v2.0/src/controller/stat.controller.ts
View file @
71bb98fe
...
@@ -142,15 +142,15 @@ export default class StatController {
...
@@ -142,15 +142,15 @@ export default class StatController {
// let result = {}
// let result = {}
console
.
log
(
xlsxData
,
'xlsxData'
)
console
.
log
(
xlsxData
,
'xlsxData'
)
//
let result = await context.cloud.file.uploadFile({
let
result
=
await
context
.
cloud
.
file
.
uploadFile
({
//
fileContent: buffer,
fileContent
:
buffer
,
//
fileName: `数据统计${startDay.replace(/\//g, '-')}-${endDay.replace(/\//g, '-')}.xlsx`
fileName
:
`数据统计
${
startDay
.
replace
(
/
\/
/g
,
'-'
)}
-
${
endDay
.
replace
(
/
\/
/g
,
'-'
)}
.xlsx`
//
})
})
//
console.log(xlsxData, 'xlsxData')
console
.
log
(
xlsxData
,
'xlsxData'
)
//
if (result.url) {
if
(
result
.
url
)
{
//
result.url = result.url.replace('http', 'https').replace('-internal', '')
result
.
url
=
result
.
url
.
replace
(
'http'
,
'https'
).
replace
(
'-internal'
,
''
)
//
}
}
return
resultsModel
.
success
(
xlsxData
)
return
resultsModel
.
success
(
result
)
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
'上传文件出错'
,
e
)
console
.
log
(
'上传文件出错'
,
e
)
// 打印日志
// 打印日志
...
...
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