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
ab63138c
Commit
ab63138c
authored
Sep 03, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:
💡
config 优化
parent
6b5e9f9c
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
28 additions
and
28 deletions
+28
-28
index.d.ts
v2.0/dist/config/index.d.ts
+2
-2
index.js
v2.0/dist/config/index.js
+3
-3
index.js.map
v2.0/dist/config/index.js.map
+1
-1
online.d.ts
v2.0/dist/config/online.d.ts
+2
-4
online.js
v2.0/dist/config/online.js
+2
-1
online.js.map
v2.0/dist/config/online.js.map
+1
-1
test.d.ts
v2.0/dist/config/test.d.ts
+2
-4
test.js
v2.0/dist/config/test.js
+2
-2
test.js.map
v2.0/dist/config/test.js.map
+1
-1
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
index.d.ts
v2.0/dist/index.d.ts
+1
-1
index.ts
v2.0/src/config/index.ts
+4
-4
online.ts
v2.0/src/config/online.ts
+2
-1
test.ts
v2.0/src/config/test.ts
+3
-1
No files found.
v2.0/dist/config/index.d.ts
View file @
ab63138c
/** @format */
export
interface
I
c
onfig
{
export
interface
I
C
onfig
{
generateVipCallBackUrl
(
activityId
?:
string
):
string
;
}
export
declare
const
getConfig
:
(
context
:
IContext
<
{}
>
)
=>
I
c
onfig
;
export
declare
const
getConfig
:
(
context
:
IContext
<
{}
>
)
=>
I
C
onfig
;
v2.0/dist/config/index.js
View file @
ab63138c
...
...
@@ -5,9 +5,9 @@ exports.getConfig = void 0;
var
online_1
=
require
(
"./online"
);
var
test_1
=
require
(
"./test"
);
var
configs
=
{
online
:
online_1
.
default
,
test
:
test_1
.
default
,
mock
:
test_1
.
default
online
:
online_1
.
cfg
,
test
:
test_1
.
cfg
,
mock
:
test_1
.
cfg
};
// 根据服务环境获取配置
exports
.
getConfig
=
function
(
context
)
{
...
...
v2.0/dist/config/index.js.map
View file @
ab63138c
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,mCAA6B;AAC7B,+BAAyB;AAMzB,IAAM,OAAO,GAAG;IACd,MAAM,kBAAA;IACN,IAAI,gBAAA;IACJ,IAAI,EAAE,cAAI;CACX,CAAA;AAED,aAAa;AACA,QAAA,SAAS,GAAG,UAAC,OAAqB;IAC7C,IAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;IACvB,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAA;AACvC,CAAC,CAAA"}
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,mCAAwC;AACxC,+BAAoC;AAMpC,IAAM,OAAO,GAAG;IACd,MAAM,cAAA;IACN,IAAI,YAAA;IACJ,IAAI,EAAE,UAAI;CACX,CAAA;AAED,aAAa;AACA,QAAA,SAAS,GAAG,UAAC,OAAqB;IAC7C,IAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;IACvB,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAA;AACvC,CAAC,CAAA"}
\ No newline at end of file
v2.0/dist/config/online.d.ts
View file @
ab63138c
/** @format */
declare
const
_default
:
{
generateVipCallBackUrl
(
activityId
:
string
):
string
;
};
export
default
_default
;
import
{
IConfig
}
from
'./index'
;
export
declare
const
cfg
:
IConfig
;
v2.0/dist/config/online.js
View file @
ab63138c
"use strict"
;
/** @format */
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
cfg
=
void
0
;
var
constants_1
=
require
(
"../constants"
);
exports
.
default
=
{
exports
.
cfg
=
{
generateVipCallBackUrl
:
function
(
activityId
)
{
return
"https://m.duanqu.com/?_ariver_appid="
+
constants_1
.
appId
+
"&query=activityId%3D"
+
activityId
;
}
...
...
v2.0/dist/config/online.js.map
View file @
ab63138c
{"version":3,"file":"online.js","sourceRoot":"","sources":["../../src/config/online.ts"],"names":[],"mappings":";AAAA,cAAc;;AAEd,0CAAoC;AAEpC,kBAAe;IACb,sBAAsB,EAAtB,UAAuB,UAAkB;QACvC,OAAO,yCAAuC,iBAAK,4BAAuB,UAAY,CAAA;IACxF,CAAC;CACF,CAAA"}
\ No newline at end of file
{"version":3,"file":"online.js","sourceRoot":"","sources":["../../src/config/online.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,0CAAoC;AAGvB,QAAA,GAAG,GAAY;IAC1B,sBAAsB,EAAtB,UAAuB,UAAkB;QACvC,OAAO,yCAAuC,iBAAK,4BAAuB,UAAY,CAAA;IACxF,CAAC;CACF,CAAA"}
\ No newline at end of file
v2.0/dist/config/test.d.ts
View file @
ab63138c
declare
const
_default
:
{
generateVipCallBackUrl
():
string
;
};
/** @format */
export
default
_default
;
import
{
IConfig
}
from
'./index'
;
export
declare
const
cfg
:
IConfig
;
v2.0/dist/config/test.js
View file @
ab63138c
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
/** @format */
exports
.
default
=
{
exports
.
cfg
=
void
0
;
exports
.
cfg
=
{
generateVipCallBackUrl
:
function
()
{
return
"
\
u5BA2
\
u6237
\
u7AEF
\
u751F
\
u6210
\
u7684
\
u9884
\
u89C8
\
u5730
\
u5740"
;
}
...
...
v2.0/dist/config/test.js.map
View file @
ab63138c
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/config/test.ts"],"names":[],"mappings":";;AAAA,cAAc;AACd,kBAAe;IACb,sBAAsB;QACpB,OAAO,8DAAY,CAAA;IACrB,CAAC;CACF,CAAA"}
\ No newline at end of file
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/config/test.ts"],"names":[],"mappings":";;;AAGa,QAAA,GAAG,GAAY;IAC1B,sBAAsB;QACpB,OAAO,8DAAY,CAAA;IACrB,CAAC;CACF,CAAA"}
\ No newline at end of file
v2.0/dist/controller/awards.controller.d.ts
View file @
ab63138c
...
...
@@ -30,7 +30,7 @@ export default class AwardsController {
/**
* 权益重新领取
*/
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
>>
;
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
<
CodeType
|
IAwards
,
true
>>
;
/**
* 概率抽奖
*/
...
...
v2.0/dist/controller/stat.controller.d.ts
View file @
ab63138c
...
...
@@ -9,5 +9,5 @@ export default class StatController {
/**
* 统计数据
*/
getStats
(
context
:
IContext
<
IStatsParams
>
):
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
<
IStatsParams
>
):
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
>>
;
}
v2.0/dist/index.d.ts
View file @
ab63138c
...
...
@@ -13,7 +13,7 @@ declare const _default: {
}
>
,
{}:
{},
[
baseService
]:
[
import
(
"./service"
).
BaseService
])
=>
Promise
<
IResult
<
IActivityInfo
>>
;
getMyPrizeList
:
(
context
:
IContext
<
import
(
"./controller/awards.controller"
).
IPrizeListParams
>
,
{}:
{},
[
awardSer
]:
[
import
(
"./service"
).
AwardsService
])
=>
Promise
<
IResult
<
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
|
string
[]
|
object
[]
|
number
[],
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
|
string
[]
|
object
[]
|
number
[],
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
>>
;
getStats
:
(
context
:
IContext
<
import
(
"./controller/stat.controller"
).
IStatsParams
>
)
=>
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
>>
;
};
...
...
v2.0/src/config/index.ts
View file @
ab63138c
/** @format */
import
online
from
'./online'
import
test
from
'./test'
import
{
cfg
as
online
}
from
'./online'
import
{
cfg
as
test
}
from
'./test'
export
interface
I
c
onfig
{
export
interface
I
C
onfig
{
generateVipCallBackUrl
(
activityId
?:
string
):
string
}
...
...
@@ -14,7 +14,7 @@ const configs = {
}
// 根据服务环境获取配置
export
const
getConfig
=
(
context
:
IContext
<
{}
>
):
I
c
onfig
=>
{
export
const
getConfig
=
(
context
:
IContext
<
{}
>
):
I
C
onfig
=>
{
const
env
=
context
.
env
return
configs
[
env
]
||
configs
.
online
}
v2.0/src/config/online.ts
View file @
ab63138c
/** @format */
import
{
appId
}
from
'../constants'
import
{
IConfig
}
from
'./index'
export
default
{
export
const
cfg
:
IConfig
=
{
generateVipCallBackUrl
(
activityId
:
string
)
{
return
`https://m.duanqu.com/?_ariver_appid=
${
appId
}
&query=activityId%3D
${
activityId
}
`
}
...
...
v2.0/src/config/test.ts
View file @
ab63138c
/** @format */
export
default
{
import
{
IConfig
}
from
'./index'
export
const
cfg
:
IConfig
=
{
generateVipCallBackUrl
()
{
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