Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
trimble-admin-pro
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
7e7a7241
authored
2020-04-30 10:27:18 +0800
by
qingxiao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
cddc0651
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
src/components/UploadItem.vue
src/views/oneStepImage/index.vue
src/components/UploadItem.vue
View file @
7e7a724
...
...
@@ -27,7 +27,7 @@ export default {
return
{
imageUrl
:
this
.
value
,
uploadUrl
:
"https://api.k.wxpai.cn/bizproxy/kdapi/file/upload"
,
tips
:
"只能上传jpg/png文件,且不超过
500kb
"
,
tips
:
"只能上传jpg/png文件,且不超过
2MB
"
,
tipsError
:
false
,
uploadInterval
:
0
};
...
...
@@ -38,7 +38,7 @@ export default {
},
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
"image/jpeg"
||
file
.
type
===
"image/png"
;
const
isLt2M
=
file
.
size
/
1024
<
5
00
;
const
isLt2M
=
file
.
size
/
1024
<
20
00
;
if
(
!
isJPG
)
{
this
.
tipsError
=
true
;
...
...
@@ -47,7 +47,7 @@ export default {
}
if
(
!
isLt2M
)
{
this
.
tipsError
=
true
;
this
.
tips
=
"上传图片大小不能超过
500kb
!"
;
this
.
tips
=
"上传图片大小不能超过
2MB
!"
;
}
return
isJPG
&&
isLt2M
;
...
...
@@ -89,7 +89,7 @@ export default {
},
uploadEnd
()
{
clearInterval
(
this
.
uploadInterval
);
this
.
tips
=
"只能上传jpg/png文件,且不超过
500kb
"
;
this
.
tips
=
"只能上传jpg/png文件,且不超过
2MB
"
;
}
},
computed
:
{
...
...
src/views/oneStepImage/index.vue
View file @
7e7a724
...
...
@@ -27,7 +27,7 @@
</el-table-column>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-link
type=
"primary"
@
click=
"deleteOneStepImage(scope.row.oneStepCode)"
>
删除
</el-link>
<el-link
type=
"primary"
@
click=
"deleteOneStepImage(scope.row.oneStep
Image
Code)"
>
删除
</el-link>
<el-link
type=
"primary"
@
click=
"editOneStepImage(scope.row)"
>
编辑
</el-link>
<el-link
type=
"primary"
v-show=
"scope.$index!==0"
@
click=
"changeImage(scope.row,oneStepImageList[scope.$index-1])"
><i
...
...
@@ -86,7 +86,8 @@
oneStepListUrl
:
'/tianbao_edu_api/admin/oneStep/list'
,
oneStepImageListUrl
:
'/tianbao_edu_api/admin/oneStepImage/list'
,
changeUrl
:
'/tianbao_edu_api/admin/oneStepImage/change'
,
oneStepImageSaveUrl
:
'/tianbao_edu_api/admin/oneStepImage/save'
oneStepImageSaveUrl
:
'/tianbao_edu_api/admin/oneStepImage/save'
,
oneStepImageDelUrl
:
'/tianbao_edu_api/admin/oneStepImage/delete'
}
export
default
{
components
:
{
UploadItem
},
...
...
@@ -161,7 +162,7 @@
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
request
.
post
(
urls
.
oneStep
DelUrl
,
{
oneStep
Code
:
code
}).
then
(
response
=>
{
request
.
post
(
urls
.
oneStep
ImageDelUrl
,
{
oneStepImage
Code
:
code
}).
then
(
response
=>
{
this
.
initOneStepImage
()
this
.
$message
.
success
(
"删除成功"
)
}).
catch
(()
=>
{
...
...
Please
register
or
sign in
to post a comment