Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
cfld-liyeyun-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
cfld-backend
cfld-liyeyun-admin
Commits
05f3a363
Commit
05f3a363
authored
Dec 11, 2023
by
yaobaizheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传VR
parent
a5f11ba0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
37 deletions
+56
-37
add.html
...tem/src/main/resources/templates/carousel/VRinfo/add.html
+26
-21
edit.html
...em/src/main/resources/templates/carousel/VRinfo/edit.html
+30
-16
No files found.
ruoyi-system/src/main/resources/templates/carousel/VRinfo/add.html
View file @
05f3a363
...
...
@@ -70,12 +70,15 @@
<!-- <input name="associationName" class="form-control" type="text">-->
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">转跳链接:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="linkUrl" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
视频VR封面:
</label>
<div
class=
"col-sm-8"
>
<input
type=
"hidden"
name=
"videoCover"
>
<div
class=
"file-loading"
>
<input
class=
"form-control img-upload"
id=
"videoCover"
name=
"file"
type=
"file"
>
</div>
</div>
</div>
</form>
</div>
<th:block
th:include=
"include :: footer"
/>
...
...
@@ -121,21 +124,22 @@
$
.
modal
.
close
(
index
);
}
//
// $(".img-upload").fileinput({
// uploadUrl: ctx + 'sysFile/uploadImgHuawei',
// initialPreviewAsData: true,
// initialPreview: [val],
// maxFileCount: 1,
// autoReplace: true
// }).on('filebatchuploadsuccess', function (event, data, previewId, index) {
// // var rsp = data.response;
// $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
// }).on('fileremoved', function (event, id, index) {
// $("input[name='" + event.currentTarget.id + "']").val('')
// })
$
(
".img-upload"
).
each
(
function
(
i
)
{
var
val
=
$
(
"input[name='"
+
this
.
id
+
"']"
).
val
()
$
(
this
).
fileinput
({
// 'uploadUrl': ctx + 'common/upload',
'uploadUrl'
:
ctx
+
'sysFile/uploadImgHuawei'
,
initialPreviewAsData
:
true
,
initialPreview
:
[
val
],
maxFileCount
:
1
,
autoReplace
:
true
}).
on
(
'fileuploaded'
,
function
(
event
,
data
,
previewId
,
index
)
{
$
(
"input[name='"
+
event
.
currentTarget
.
id
+
"']"
).
val
(
data
.
response
.
url
)
}).
on
(
'fileremoved'
,
function
(
event
,
id
,
index
)
{
$
(
"input[name='"
+
event
.
currentTarget
.
id
+
"']"
).
val
(
''
)
})
$
(
this
).
fileinput
(
'_initFileActions'
);
});
</script>
</body>
</html>
\ No newline at end of file
ruoyi-system/src/main/resources/templates/carousel/VRinfo/edit.html
View file @
05f3a363
...
...
@@ -71,6 +71,18 @@
<!-- <input name="associationName" th:field="*{associationName}" class="form-control" type="text">-->
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
视频VR封面:
</label>
<!-- <div class="col-sm-8">-->
<!-- <input name="videoCover" th:field="*{videoCover}" class="form-control" type="text">-->
<!-- </div>-->
<div
class=
"col-sm-8"
>
<input
type=
"hidden"
name=
"videoCover"
th:field=
"*{videoCover}"
>
<div
class=
"file-loading"
>
<input
class=
"form-control img-upload"
id=
"videoCover"
name=
"file"
type=
"file"
>
</div>
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">转跳链接:</label>-->
<!-- <div class="col-sm-8">-->
...
...
@@ -120,22 +132,23 @@
$
.
modal
.
close
(
index
);
}
// $(".img-upload").each(function (i) {
// var val = $("input[name='" + this.id + "']").val()
// $(this).fileinput({
// // 'uploadUrl': ctx + 'common/upload',
// 'uploadUrl': ctx + 'sysFile/uploadImgHuawei',
// initialPreviewAsData: true,
// initialPreview: [val],
// maxFileCount: 1,
// autoReplace: true
// }).on('fileuploaded', function (event, data, previewId, index) {
// $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
// }).on('fileremoved', function (event, id, index) {
// $("input[name='" + event.currentTarget.id + "']").val('')
// })
// $(this).fileinput('_initFileActions');
// });
$
(
".img-upload"
).
each
(
function
(
i
)
{
var
val
=
$
(
"input[name='"
+
this
.
id
+
"']"
).
val
()
$
(
this
).
fileinput
({
// 'uploadUrl': ctx + 'common/upload',
'uploadUrl'
:
ctx
+
'sysFile/uploadImgHuawei'
,
initialPreviewAsData
:
true
,
initialPreview
:
[
val
],
maxFileCount
:
1
,
autoReplace
:
true
}).
on
(
'fileuploaded'
,
function
(
event
,
data
,
previewId
,
index
)
{
$
(
"input[name='"
+
event
.
currentTarget
.
id
+
"']"
).
val
(
data
.
response
.
url
)
}).
on
(
'fileremoved'
,
function
(
event
,
id
,
index
)
{
$
(
"input[name='"
+
event
.
currentTarget
.
id
+
"']"
).
val
(
''
)
})
$
(
this
).
fileinput
(
'_initFileActions'
);
});
</script>
</body>
</html>
\ No newline at end of file
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