Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
cd-bid
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b8ba49a5
authored
Mar 29, 2021
by
严立
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
图片上传增加路径校验
parent
b14fe58b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
src/common/js/host.js
src/view/register-supplier.vue
src/common/js/host.js
View file @
b8ba49a5
let
output
=
{
// 测试环境
base
:
'/Api/'
,
// 部署路径
//
base: '/Api/', // 部署路径
// base: 'http://bid-server.meiqicloud.com/', // 开发路径
resources
:
'http://bid-web.meiqicloud.com'
,
agentSignIn
:
'http://bid-vue.meiqicloud.com/'
//
resources: 'http://bid-web.meiqicloud.com',
//
agentSignIn: 'http://bid-vue.meiqicloud.com/'
// 正式环境
//
base: 'https://www.fjbidding.com/Api/',
//
resources: 'https://www.fjbidding.com',
//
agentSignIn: 'https://www.fjbidding.com/admin/'
base
:
'https://www.fjbidding.com/Api/'
,
resources
:
'https://www.fjbidding.com'
,
agentSignIn
:
'https://www.fjbidding.com/admin/'
}
output
.
uploadFile
=
output
.
base
+
'bid/common/webupload/upload'
...
...
src/view/register-supplier.vue
View file @
b8ba49a5
...
...
@@ -866,6 +866,7 @@
// 证照上传
this
.
$refs
.
formLicense
.
validate
(
funcValid
=>
{
console
.
log
(
this
.
uploadOption
.
license
)
if
(
funcValid
)
{
if
(
this
.
uploadOption
.
license
.
image
.
length
>
0
)
{
for
(
let
i
=
0
,
len
=
this
.
uploadOption
.
license
.
image
.
length
;
i
<
len
;
i
++
)
{
...
...
@@ -903,6 +904,25 @@
}
}
}
// 校验图片上传后的路径是否正确
if
(
this
.
uploadOption
.
license
.
image
.
length
>
0
)
{
for
(
let
i
=
0
,
len
=
this
.
uploadOption
.
license
.
image
.
length
;
i
<
len
;
i
++
)
{
if
(
this
.
uploadOption
.
license
.
image
[
i
].
url
.
indexOf
(
'blob:'
)
>=
0
)
{
this
.
$message
.
error
(
'图片上传失败,请删除重试。'
)
return
}
}
}
if
(
this
.
uploadOption
.
quote
.
image
.
length
>
0
)
{
for
(
let
i
=
0
,
len
=
this
.
uploadOption
.
quote
.
image
.
length
;
i
<
len
;
i
++
)
{
if
(
this
.
uploadOption
.
quote
.
image
[
i
].
url
.
indexOf
(
'blob:'
)
>=
0
)
{
this
.
$message
.
error
(
'图片上传失败,请删除重试。'
)
return
}
}
}
this
.
state
=
5
}
})
...
...
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