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
8bc7a542
Commit
8bc7a542
authored
Feb 20, 2021
by
maggie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编译constants appId
parent
0b49b8c2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
137 additions
and
2 deletions
+137
-2
config.json
v2.0/compileServer/config.json
+2
-1
generate.js
v2.0/compileServer/generate.js
+13
-0
constants.njk
v2.0/compileServer/templates/constants.njk
+121
-0
constants.ts
v2.0/src/constants.ts
+1
-1
No files found.
v2.0/compileServer/config.json
View file @
8bc7a542
...
...
@@ -853,5 +853,6 @@
}
}
}
}
},
"appId"
:
"1234"
}
\ No newline at end of file
v2.0/compileServer/generate.js
View file @
8bc7a542
...
...
@@ -198,6 +198,19 @@ const run = async (gulp, nunjucksRender, rename, nunjucksRenderConfig) => {
)
.
pipe
(
rename
(
`index.ts`
))
.
pipe
(
gulp
.
dest
(
nunjucksRenderConfig
.
ServerFullPath
))
//编译constants.njk
await
gulp
.
src
(
`
${
serverTemplatePath
}
/constants.njk`
)
.
pipe
(
nunjucksRender
({
...
nunjucksRenderConfig
,
data
:
{
appId
:
config
.
appId
}
})
)
.
pipe
(
rename
(
`constants.ts`
))
.
pipe
(
gulp
.
dest
(
nunjucksRenderConfig
.
ServerFullPath
))
}
module
.
exports
=
{
...
...
v2.0/compileServer/templates/constants.njk
0 → 100644
View file @
8bc7a542
/** @format */
export * from './errorCode'
// tb 接口返回部分错误
export const TBERROR = {
USER_PERMISSION_EXCEED_MAX_RIGHT_COUNT_IN_DAY: '今日领取达到上限,明日再来领取哦',
COUPON_INVALID_OR_DELETED: '权益无效或者被删除,请联系商家',
APPLY_OWNSELF_COUPON: '不能领取自己家店铺权益',
APPLY_SINGLE_COUPON_COUNT_EXCEED_LIMIT: '请至卡券包删除无用权益再领取',
NO_RIGHT_QUANTITY: '权益库存不足,请联系商家',
ERRORA_3_567: '领取失败,为风险用户',
'Invalid session': '订购应用已过期,请联系商家处理'
}
// 领取奖品状态
export const DRAW_STATUS = {
// 待领取
WAITAWARD: 1,
// 处理中
PROCESSING: 2,
// 领取成功
SUCCESS: 3,
// 领取失败
FAIL: 4,
// 已过期
EXPIRED: 5,
// 重新领取
RETRY: 6
}
// 订单状态
export const TAOBAO_SUCCESS_ORDER_STATUS: string[] = [
'WAIT_SELLER_SEND_GOODS',
'SELLER_CONSIGNED_PART',
'WAIT_BUYER_CONFIRM_GOODS',
'TRADE_BUYER_SIGNED',
'TRADE_FINISHED',
'PAID_FORBID_CONSIGN'
]
export const ACTIVITY_OPEN_PRIZE_STATUS = {
//开奖状态
AWAIT: 1,
OPENING: 2,
SUCCESS: 3,
FAIL: 4
}
// 活动状态
export const enum ACTIVITY_STATUS {
NORMAL = 1,
DELETE = 2
}
// 奖品状态
export const enum DELETE_STATUS {
NORMAL = 1,
DELETE = 2
}
//任务频率类型常量
export const TASK_RATE_TYPE = {
FOREVER: 1,
EVERYDAY: 2,
NOLIMIT: 3
}
//任务状态
export const TASK_STATUS = {
WAIT_DO: 1, // 未完成
WAIT_RECEIVE: 2, // 待领取
DONE: 3 // 已完成
}
// 奖品类型
export const PRIZE_TYPE = {
ENAME: 1,
CREDITS: 2,
OBJECT: 3,
THANKS: 5,
CARD: 6
}
// 奖品分类
export const PRIZE_DATA_TYPE = {
RANKING: 1, // 排行榜
PROBABILITY: 2, // 概率
CARD: 6, // 卡牌
CARD_TYPE_AWARD: 7,
JOIN_TIMES: 8
}
// 奖品是否限制库存
export enum SWICH_TOCK {
LIMIT = 1,
NO_LIMIT = 2
}
//物流状态
export const SHIP_STATUS = {
NO_ADDRESS: 1,
NO_SHIP: 2,
HAS_SHIP: 3
}
// 记录数据
export enum STAT_TYPE {
INITE_SUCCESS
}
// 每次参与消耗次数
export const JOIN_NEED_TIMES = 1
export const appId = '{{appId}}'
// 商铺id 拼接vip链接用
export const sellerId = '${商铺id}'
// C端的APP NAME
export const C_APP_NAME: string = `promotioncenter-${appId}`
v2.0/src/constants.ts
View file @
8bc7a542
...
...
@@ -112,7 +112,7 @@ export enum STAT_TYPE {
// 每次参与消耗次数
export
const
JOIN_NEED_TIMES
=
1
export
const
appId
=
'
${需要补充}
'
export
const
appId
=
'
1234
'
// 商铺id 拼接vip链接用
export
const
sellerId
=
'${商铺id}'
...
...
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