Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
白杨
/
shrae-app
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 7978a5f0
authored
7 years ago
by
kuayue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片上传删除
1 parent
06a56ccc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
183 additions
and
2 deletions
dataPage.html
dist/bootstrap/css/index.css
dist/bootstrap/js/imgUp.js
uploadImage.html
dataPage.html
0 → 100644
View file @
7978a5f
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
网点数据
</title>
<script
src=
""
></script>
<link
rel=
"stylesheet"
href=
"dist/layui/css/layui.css"
>
<script
src=
"dist/layui/layui.js"
></script>
<style>
#title
{
text-align
:
center
;
line-height
:
60px
;
height
:
50px
;
font-size
:
large
;
font-family
:
"微软雅黑"
;
}
#backimage
{
display
:
inline
;
float
:
left
;
margin-top
:
20px
;
height
:
20px
;
margin-left
:
15px
;
}
.container
{
width
:
100%
;
overflow-x
:
hidden
;
overflow-y
:
hidden
;
white-space
:
nowrap
;
margin-top
:
5px
;
font-family
:
"微软雅黑"
;
}
.container
.item
{
display
:
inline-block
;
box-sizing
:
border-box
;
width
:
33%
;
}
#icon1
{
margin-left
:
15px
;
height
:
20px
;
}
.content
{
float
:
left
;
display
:
inline
;
font-family
:
"微软雅黑"
;
}
img
{
border-radius
:
5px
}
#icon2
{
margin-left
:
15px
;
height
:
20px
;
}
.key
{
border
:
none
;
float
:
left
;
margin-top
:
-5px
;
margin-left
:
20px
;
padding-top
:
20px
;
}
.value
{
border
:
none
;
float
:
right
;
margin-top
:
-5px
;
width
:
100px
;
font-family
:
"微软雅黑"
;
}
#submit
{
background
:
#27B1A4
;
color
:
#FFFFFF
;
width
:
200px
;
height
:
40px
;
}
</style>
</head>
<body>
<!--最上方-->
<div><div
id=
"title"
><img
src=
"src/img/btn_back.png"
id=
"backimage"
/>
网点数据
</div></div>
<!--灰色分割线-->
<hr
class=
"layui-bg-gray"
>
<!--图片展示区-->
<div
style=
"height: 20px;"
>
<div
style=
"float: left;"
>
<img
id=
"icon1"
class=
"content"
src=
"src/img/icon1.png"
/>
图片
</div>
<div
class=
"content"
style=
"float: right;margin-right: 10px;"
>
4张
<img
src=
"src/img/btn1.png"
onclick=
"editPic()"
></div>
</div>
<div
class=
"container"
>
<div
id=
"picdiv"
>
<img
src=
"src/img/macsierra-012.jpg"
class=
"item"
style=
"margin-left: 12px;"
/>
<img
src=
"src/img/jinmao.jpg"
class=
"item"
/>
<img
src=
"src/img/184.jpg"
class=
"item"
>
<img
src=
"src/img/41.jpg"
class=
"item"
/>
</div>
</div>
<!--灰色分割线-->
<hr
class=
"layui-progress"
>
<!--下方表格-->
<div><img
id=
"icon2"
src=
"src/img/icon2.png"
>
字段
</div>
<!--表格-->
<form
action=
""
method=
"post"
target=
"_blank"
>
<input
type=
"text"
name=
"key01"
class=
"key"
value=
"名称"
/><br>
<input
type=
"text"
name=
"value01"
class=
"value"
value=
"请输入..."
/><br>
<!--灰色分割线-->
<hr
class=
"layui-bg-gray"
>
<input
type=
"text"
name=
"key02"
class=
"key"
value=
"名称"
/><br>
<input
type=
"text"
name=
"value02"
class=
"value"
value=
"请输入..."
/><br>
<hr
class=
"layui-bg-gray"
>
<input
type=
"text"
name=
"key03"
class=
"key"
value=
"名称"
/><br>
<input
type=
"text"
name=
"value03"
class=
"value"
value=
"请输入..."
/><br>
<hr
class=
"layui-bg-gray"
>
<input
type=
"text"
name=
"key04"
class=
"key"
value=
"名称"
/><br>
<input
type=
"text"
name=
"value04"
class=
"value"
value=
"请输入..."
/><br>
<hr
class=
"layui-bg-gray"
><br>
<p
style=
" margin:5px; text-align:center;"
><input
type=
"submit"
value=
"保 存"
id=
"submit"
/></p>
</form>
</body>
<script>
function
editPic
(){
alert
(
123
);
}
</script>
</html>
This diff is collapsed.
Click to expand it.
dist/bootstrap/css/index.css
View file @
7978a5f
...
...
@@ -139,3 +139,32 @@ input:hover {
.check-p
.del-com
{
border-right
:
1px
solid
#D1D1D1
;
}
#title
{
text-align
:
center
;
line-height
:
60px
;
height
:
50px
;
font-size
:
x-large
;
margin-left
:
0px
;
}
#saveimage
{
display
:
inline
;
float
:
right
;
margin-top
:
20px
;
margin-right
:
0px
;
padding-left
:
15px
;
padding-right
:
15px
;
padding-top
:
5px
;
padding-bottom
:
6px
;
background
:
#27B1A4
;
color
:
#FFFFFF
;
}
#backimage
{
display
:
inline
;
float
:
left
;
margin-top
:
20px
;
height
:
20px
;
margin-left
:
15px
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dist/bootstrap/js/imgUp.js
View file @
7978a5f
...
...
@@ -16,7 +16,7 @@ $(function(){
var
numUp
=
imgContainer
.
find
(
".up-section"
).
length
;
var
totalNum
=
numUp
+
fileList
.
length
;
//总的数量
if
(
fileList
.
length
>
5
||
totalNum
>
5
){
alert
(
"上传图片数目不可以超迿5个,请重新选择"
);
//一次选择上传超过5
丿 或者是已经上传和这次上传的到的总数也不可以超过5丿
alert
(
"上传图片数目不可以超迿5个,请重新选择"
);
//一次选择上传超过5
张 或者是已经上传和这次上传的到的总数也不可以超过5张
}
else
if
(
numUp
<
5
){
fileList
=
validateUp
(
fileList
);
...
...
@@ -108,3 +108,17 @@ $(function(){
})
/**
* 返回上一页
*/
function
backReturn
(){
window
.
location
.
href
=
"uploadimg.html"
;
}
/**
* 保存图片
*/
function
saveReturn
(){
alert
(
"保存成功"
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
uploadImage.html
View file @
7978a5f
...
...
@@ -6,16 +6,24 @@
<link
href=
"dist/bootstrap/css/common.css"
type=
"text/css"
rel=
"stylesheet"
/>
<link
href=
"dist/bootstrap/css/index.css"
type=
"text/css"
rel=
"stylesheet"
/>
<script
type=
"text/javascript"
>
///*屏蔽鼠标右键的默认事件*/
function
stops
(){
return
false
;
}
document
.
oncontextmenu
=
stops
;
</script>
</head>
<body>
<div
class=
"img-box full"
>
<section
class=
" img-section"
>
<p
class=
"up-p"
>
图片
</p>
<div>
<div
id=
"title"
>
<img
src=
"src/image/btn_back.png"
id=
"backimage"
onclick=
"backReturn()"
/>
图片
<button
id=
"saveimage"
onclick=
"saveReturn()"
>
保存
</button>
</div>
</div>
<div
class=
"z_photo upimg-div clear"
>
<section
class=
"z_file fl"
>
<img
src=
"src/image/a11.png"
class=
"add-img"
>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment