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 5fe049ef
authored
7 years ago
by
lixiaofeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传中中显示图片
1 parent
7ba48321
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
dataPage.html
uploadImage.html
dataPage.html
View file @
5fe049e
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
function
editPic
(){
function
editPic
(){
alert
(
123
);
alert
(
123
);
}
}
console
.
log
(
'enter'
)
//
console.log('enter')
saas
.
saasHttpRequest
(
'/v1/point/getPointById'
,{
saas
.
saasHttpRequest
(
'/v1/point/getPointById'
,{
pointId
:
localStorage
.
getItem
(
'pointId'
),
pointId
:
localStorage
.
getItem
(
'pointId'
),
needExtCols
:
true
needExtCols
:
true
...
@@ -151,6 +151,7 @@
...
@@ -151,6 +151,7 @@
// console.log(msg)
// console.log(msg)
var
str
=
''
var
str
=
''
var
strImg
=
''
var
strImg
=
''
var
Imgarr
=
[]
var
photo
=
data
.
result
.
photos
var
photo
=
data
.
result
.
photos
console
.
log
(
photo
)
console
.
log
(
photo
)
for
(
var
i
=
0
;
i
<
msg
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
msg
.
length
;
i
++
){
...
@@ -164,8 +165,10 @@
...
@@ -164,8 +165,10 @@
for
(
var
i
=
0
;
i
<
photo
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
photo
.
length
;
i
++
){
photo
[
i
].
photoPath
=
"http://114.55.43.0:16907/v1/point/getFile?ak=30bdc45ee00940cda7917d134fdb1523&filePath="
+
photo
[
i
].
photoPath
photo
[
i
].
photoPath
=
"http://114.55.43.0:16907/v1/point/getFile?ak=30bdc45ee00940cda7917d134fdb1523&filePath="
+
photo
[
i
].
photoPath
strImg
+=
"<img src="
+
photo
[
i
].
photoPath
+
" class=\"item\"/>"
strImg
+=
"<img src="
+
photo
[
i
].
photoPath
+
" class=\"item\"/>"
Imgarr
.
push
(
photo
[
i
].
photoPath
)
}
}
// localStorage.setItem('strImg',strImg)
console
.
log
(
Imgarr
)
localStorage
.
setItem
(
'Imgarr'
,
Imgarr
.
join
(
'@'
))
$
(
'.picNum'
).
html
(
photo
.
length
)
$
(
'.picNum'
).
html
(
photo
.
length
)
$
(
'#form'
).
append
(
str
)
$
(
'#form'
).
append
(
str
)
$
(
'#picdiv'
).
append
(
strImg
)
$
(
'#picdiv'
).
append
(
strImg
)
...
...
This diff is collapsed.
Click to expand it.
uploadImage.html
View file @
5fe049e
...
@@ -23,9 +23,6 @@
...
@@ -23,9 +23,6 @@
</div>
</div>
<div
class=
"z_photo upimg-div clear"
>
<div
class=
"z_photo upimg-div clear"
>
<span
class=
"imgs"
>
</span>
<section
class=
"z_file fl"
>
<section
class=
"z_file fl"
>
<img
src=
"src/image/a11.png"
class=
"add-img"
>
<img
src=
"src/image/a11.png"
class=
"add-img"
>
<input
type=
"file"
name=
"file"
id=
"file"
class=
"file"
value=
""
accept=
"image/jpg,image/jpeg,image/png,image/bmp"
multiple
/>
<input
type=
"file"
name=
"file"
id=
"file"
class=
"file"
value=
""
accept=
"image/jpg,image/jpeg,image/png,image/bmp"
multiple
/>
...
@@ -41,8 +38,13 @@
...
@@ -41,8 +38,13 @@
<script
src=
"dist/jquery/jquery-3.2.1.min.js"
></script>
<script
src=
"dist/jquery/jquery-3.2.1.min.js"
></script>
<script
src=
"src/js/imgUp.js"
></script>
<script
src=
"src/js/imgUp.js"
></script>
<script>
<script>
var
strImg
=
localStorage
.
getItem
(
'strImg'
)
var
strImg
=
localStorage
.
getItem
(
'Imgarr'
).
split
(
'@'
)
console
.
log
(
strImg
)
// console.log(strImg.split('@'))
var
tagImg
=
''
for
(
var
i
=
0
;
i
<
strImg
.
length
;
i
++
){
tagImg
+=
"<section class=\"up-section fl\"><span class=\"up-span\"></span><img class=\"close-upimg\" src=\"src/image/sc.png\"><img class=\"up-img\" src="
+
strImg
[
i
]
+
"><p class=\"img-name-p\">201995-120HG1030762.jpg</p><input id=\"taglocation\" name=\"taglocation\" value=\"\" type=\"hidden\"><input id=\"tags\" name=\"tags\" value=\"\" type=\"hidden\"></section>"
}
$
(
'.upimg-div'
).
prepend
(
tagImg
)
// $('body').append(strImg).find('img').addClass('up-img')
// $('body').append(strImg).find('img').addClass('up-img')
</script>
</script>
</body>
</body>
...
...
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