Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
784d57b4
Commit
784d57b4
authored
Oct 25, 2022
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改文件名后缀问题
parent
959a83ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
19 deletions
+16
-19
env.config.js
config/env.config.js
+9
-14
upload.jsx
src/pages/PaymentMange/ToExamine/upload.jsx
+7
-5
No files found.
config/env.config.js
View file @
784d57b4
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
environment
=
'
sc
'
;
const
envAPi
=
{
const
envAPi
=
{
api
:
'
https://security-ds.liangkebang.net
'
,
//'https://security-ds.liangkebang.net',
api
:
`https://security-
${
environment
}
.liangkebang.net`
,
kdspOpApi
:
'
https://sc-merchant-api-ds.liangkebang.net
'
,
kdspOpApi
:
`https://sc-merchant-api-
${
environment
}
.liangkebang.net`
,
kdspApi
:
'
https://sc-merchant-api-ds.liangkebang.net
'
,
kdspApi
:
`https://sc-merchant-api-
${
environment
}
.liangkebang.net`
,
goodsApi
:
'
https://sc-merchant-api-ds.liangkebang.net
'
,
goodsApi
:
`https://sc-merchant-api-
${
environment
}
.liangkebang.net`
,
// kdspOpApi: 'https://kdsp-operation-ds.liangkebang.net',
querysApi
:
`https://sc-merchant-api-
${
environment
}
.liangkebang.net/admin/merchant/sc-settlement`
,
// kdspApi: 'https://sc-op-api-ds.liangkebang.net',
prologueDomain
:
`https://mall-
${
environment
}
.liangkebang.net`
,
// goodsApi: 'https://sc-op-api-ds.liangkebang.net',
qiniuHost
:
`https://kdspstatic.q-gp.com/`
,
querysApi
:
'
https://sc-merchant-api-ds.liangkebang.net
'
,
opapiHost
:
`https://opapi-
${
environment
}
.liangkebang.net`
,
// goodsApi: '//192.168.188.111:7000',
prologueDomain
:
'
https://mall-ds.liangkebang.net
'
,
// qiniuHost: 'https://appsync.lkbang.net',
qiniuHost
:
'
https://kdspstatic.q-gp.com/
'
,
opapiHost
:
'
https://opapi-ds.liangkebang.net
'
,
};
};
const
prodApi
=
{
const
prodApi
=
{
...
...
src/pages/PaymentMange/ToExamine/upload.jsx
View file @
784d57b4
...
@@ -46,19 +46,21 @@ class PicturesWall extends React.Component {
...
@@ -46,19 +46,21 @@ class PicturesWall extends React.Component {
};
};
customRequest
=
({
file
,
onError
,
onSuccess
})
=>
{
customRequest
=
({
file
,
onError
,
onSuccess
})
=>
{
let
filename
=
''
;
let
suffix
=
''
;
if
(
file
.
name
)
{
if
(
file
.
name
)
{
const
lastFile
=
file
.
name
.
split
(
'
.
'
);
const
index
=
file
.
name
.
lastIndexOf
(
'
.
'
);
const
index
=
lastFile
.
length
-
1
;
filename
=
file
.
name
.
substr
(
0
,
index
);
suffix
=
file
.
name
.
substr
(
index
+
1
,
file
.
name
.
length
-
1
);
const
types
=
[
'
pdf
'
,
'
doc
'
,
'
docx
'
,
'
zip
'
,
'
rar
'
,
'
png
'
,
'
jpeg
'
];
const
types
=
[
'
pdf
'
,
'
doc
'
,
'
docx
'
,
'
zip
'
,
'
rar
'
,
'
png
'
,
'
jpeg
'
];
if
(
!
types
.
includes
(
lastFile
[
index
]
))
{
if
(
!
types
.
includes
(
suffix
))
{
message
.
error
(
'
文件格式错误!
'
);
message
.
error
(
'
文件格式错误!
'
);
return
;
return
;
}
}
}
}
const
vm
=
this
;
const
vm
=
this
;
const
name
=
file
.
name
+
file
.
uid
;
// eslint-disable-next-line new-cap
// eslint-disable-next-line new-cap
const
data
=
file
.
name
+
new
Date
().
getTime
()
;
const
data
=
`
${
filename
}
-
${
new
Date
().
getTime
()}
.
${
suffix
}
`
;
const
observable
=
qiniu
.
upload
(
file
,
data
,
token
);
const
observable
=
qiniu
.
upload
(
file
,
data
,
token
);
const
observer
=
{
const
observer
=
{
next
()
{
next
()
{
...
...
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