Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gaohuaxue-mobile-app
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
前端-苏志权
gaohuaxue-mobile-app
Commits
c6658d56
Commit
c6658d56
authored
Nov 23, 2022
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 搬运global文件
parent
9e0c4919
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
index.ts
src/constants/global/index.ts
+46
-0
No files found.
src/constants/global/index.ts
0 → 100755
View file @
c6658d56
/**
* **********
* 脚本注入全局配置
* **********
*/
import
SELF_CONFIG
from
'../../../base.config.json'
import
{
RootObject
}
from
'./global'
interface
newRootObject
extends
RootObject
{
appMallInfo
:
any
,
pointMallId
:
number
|
undefined
,
channelPointMallId
:
number
|
undefined
,
pointMallInfo
:
any
,
channelPointMallInfo
:
any
,
}
export
const
checkUrl
=
(
url
:
any
,
defaultUrl
:
any
)
=>
{
if
(
url
&&
typeof
url
===
'string'
)
{
if
(
url
.
indexOf
(
'/'
)
>
-
1
)
{
return
url
.
trim
()
}
return
`/
${
url
}
`
.
trim
()
}
return
defaultUrl
}
const
appMallInfo
=
SELF_CONFIG
.
web
.
shopInfo
.
filter
(
item
=>
item
.
environment
===
4
&&
item
.
type
===
1
)[
0
]
// app企业商城
const
pointMallInfo
=
SELF_CONFIG
.
web
.
shopInfo
.
filter
(
item
=>
item
.
environment
===
4
&&
item
.
type
===
2
)[
0
]
// app积分商城
const
channelPointMallInfo
=
SELF_CONFIG
.
web
.
shopInfo
.
filter
(
item
=>
item
.
environment
===
4
&&
item
.
type
===
5
)[
0
]
// app渠道积分商城
//@ts-ignore
SELF_CONFIG
.
appMallInfo
=
appMallInfo
// app企业商城信息
//@ts-ignore
SELF_CONFIG
.
pointMallId
=
pointMallInfo
?
pointMallInfo
.
id
:
undefined
//@ts-ignore
SELF_CONFIG
.
channelPointMallId
=
channelPointMallInfo
?
channelPointMallInfo
.
id
:
undefined
//@ts-ignore
SELF_CONFIG
.
pointMallInfo
=
pointMallInfo
//@ts-ignore
SELF_CONFIG
.
channelPointMallInfo
=
channelPointMallInfo
//@ts-ignore
export
const
GlobalConfig
:
newRootObject
=
SELF_CONFIG
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