Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
linweijiong
jinfa-platform
Commits
9aa597e8
Commit
9aa597e8
authored
Nov 19, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
8dd552f1
c783f24c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
config.ts
config/config.ts
+16
-0
index.tsx
src/pages/preview/channelPreview/index.tsx
+1
-1
No files found.
config/config.ts
View file @
9aa597e8
...
...
@@ -2,11 +2,27 @@ import { defineConfig } from 'umi';
import
routes
from
'./router'
;
import
proxy
from
'./proxy'
;
import
theme
from
'./lingxi.theme.config'
;
import
envValue
from
'../env'
import
{
setEnv
,
getEnv
}
from
'../scripts/utils/envTool.js'
import
CaseSensitivePathsWebpackPlugins
from
'case-sensitive-paths-webpack-plugin'
const
OPEN_THEME_BUILD
=
process
.
env
.
NODE_ENV
===
'production'
?
true
:
false
;
// 是否开启动态主题
const
isProduction
=
process
.
env
.
NODE_ENV
===
'production'
?
true
:
false
;
// 构建时带上的环境变量
const
PRO_ENV
=
process
.
env
.
PRO_ENV
if
(
PRO_ENV
)
{
const
envs
=
envValue
[
PRO_ENV
]
if
(
envs
)
{
Object
.
keys
(
envs
).
forEach
(
key
=>
{
process
.
env
[
key
]
=
envs
[
key
]
})
}
}
else
{
console
.
warn
(
'未传入PRO_ENV, 如果是 yarn的时候出现 可以忽略'
)
}
const
config
:
any
=
{
// 如需写入环境变量 需在config中先写入
define
:
{
...
...
src/pages/preview/channelPreview/index.tsx
View file @
9aa597e8
...
...
@@ -80,7 +80,7 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
const
headers
:
any
=
{
shopId
}
getTemplateAdornWebChannelFindAllFirstCategory
(
params
).
then
(
res
=>
{
getTemplateAdornWebChannelFindAllFirstCategory
(
params
,
{
headers
}
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
...
...
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