记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
eb1bb51e
Commit
eb1bb51e
authored
Aug 11, 2022
by
dongchun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增上传图片
parent
2c99465f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
8 deletions
+59
-8
LocalAdminController.java
...t/admin/web/controller/zhengzai/LocalAdminController.java
+2
-2
addNewActivity.html
...templates/zhengzai/store/placingOrder/addNewActivity.html
+57
-6
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/LocalAdminController.java
View file @
eb1bb51e
...
...
@@ -122,8 +122,8 @@ public class LocalAdminController extends BaseController
return
storePrefix
+
"/placingOrder/activityList"
;
}
@GetMapping
(
"/addNewActivity"
)
public
String
addNewActivity
(
)
{
public
String
addNewActivity
(
ModelMap
mmap
)
{
mmap
.
put
(
"platformUrl"
,
platformUrl
);
return
storePrefix
+
"/placingOrder/addNewActivity"
;
}
@GetMapping
(
"/activityStoreList"
)
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/store/placingOrder/addNewActivity.html
View file @
eb1bb51e
...
...
@@ -3,6 +3,7 @@
<head>
<th:block
th:include=
"include :: header('新增活动')"
/>
<th:block
th:include=
"include :: select2-css"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
<link
rel=
"stylesheet"
href=
""
>
<style>
input
{
...
...
@@ -64,6 +65,13 @@
height
:
34
PX
;
line-height
:
34
PX
;
}
.kv-upload-progress
{
display
:
none
!important
;
}
.ibox-content
.imgBox
{
max-width
:
350px
;
max-height
:
180px
;
}
</style>
</head>
<body>
...
...
@@ -89,6 +97,22 @@
<!-- /btn-group 11 -->
</div>
</div>
<div
class=
"basis_data ibox-content"
style=
"border: none;display: flex;"
>
<span>
<em
class=
"required"
>
*
</em>
演出图片:
</span>
<div>
<img
id=
"viewImg"
class=
"imgBox"
src=
""
alt=
""
>
<div
class=
"form-group"
>
<div
class=
"file-loading"
>
<input
id=
"fileinput"
type=
"file"
name=
"file"
data-browse-on-zone-click=
"true"
data-theme=
"fas"
>
</div>
<span
style=
"color: #ccc; font-size: 12px;"
>
适配图片尺寸:660*344
</span>
</div>
</div>
</div>
<div
class=
"basis_data"
>
<span>
<em
class=
"required"
>
*
</em>
...
...
@@ -134,6 +158,7 @@
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<th:block
th:include=
"include :: bootstrap-suggest-js"
/>
</body>
<script
th:inline=
"javascript"
>
...
...
@@ -141,7 +166,7 @@
var
prefix2
=
ctx
+
"local"
;
let
marketId
=
''
;
let
editDatas
=
0
;
let
performanceImg
=
''
;
var
platformUrl
=
[[
$
{
platformUrl
}]]
;
$
(
function
()
{
let
name
=
'id'
;
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
...
...
@@ -174,6 +199,7 @@
editDatas
=
data
.
length
;
$
(
"#selectShow"
).
val
(
basisData
.
data
.
name
);
$
(
"#selectShow"
).
attr
(
'data-id'
,
basisData
.
data
.
performanceId
);
$
(
"#viewImg"
).
attr
(
'src'
,
basisData
.
data
.
performanceImg
);
$
(
"#startTime"
).
val
(
basisData
.
data
.
startTime
);
$
(
"#endTime"
).
val
(
basisData
.
data
.
endTime
);
$
(
".content_item"
).
show
();
...
...
@@ -184,7 +210,31 @@
})
})
}
$
(
"#fileinput"
).
fileinput
({
'theme'
:
'explorer-fas'
,
// 'uploadUrl': "https://devplatform.zhengzai.tv/platform/basicServices/alOss/upload",
'uploadUrl'
:
platformUrl
+
"/platform/basicServices/alOss/upload"
,
"uploadExtraData"
:
{
"pathName"
:
"banner"
,
"buckType"
:
1
},
autoReplace
:
true
,
showCaption
:
false
,
showPreview
:
false
,
showRemove
:
false
,
showUpload
:
false
,
showCancel
:
false
,
showClose
:
false
,
autoReplace
:
true
,
dropZoneTitle
:
"请上传文件"
,
maxFileCount
:
1
}).
on
(
"filebatchselected"
,
function
(
event
,
files
)
{
//默认上传
$
(
this
).
fileinput
(
"upload"
);
})
.
on
(
"fileuploaded"
,
function
(
event
,
data
)
{
//上传回调事件
let
showPicture
=
'https://img.zhengzai.tv/'
+
data
.
response
.
data
.
ossPath
;
$
(
"#viewImg"
).
attr
(
'src'
,
showPicture
)
})
})
function
common
()
{
...
...
@@ -204,8 +254,6 @@
return
json
;
}
}).
on
(
'onSetSelectValue'
,
function
(
e
,
result
,
selectedRawData
)
{
console
.
log
(
e
,
result
,
selectedRawData
)
performanceImg
=
selectedRawData
.
imgPoster
;
});
$
(
".storeList"
).
bsSuggest
({
idField
:
'storeId'
,
...
...
@@ -301,15 +349,18 @@
if
(
!
$
(
"#selectShow"
).
attr
(
'data-id'
))
{
return
layer
.
msg
(
'请选择演出进行创建!'
)
}
if
(
!
$
(
"#viewImg"
).
attr
(
'src'
))
{
return
layer
.
msg
(
'请上传演出图片!'
)
}
if
(
!
$
(
"#endTime"
).
val
()
||
!
$
(
"#startTime"
).
val
())
{
return
layer
.
msg
(
'请
输入必填项
!'
)
return
layer
.
msg
(
'请
将有效期输入完整
!'
)
}
let
data
=
{
endTime
:
$
(
"#endTime"
).
val
(),
startTime
:
$
(
"#startTime"
).
val
(),
name
:
$
(
"#selectShow"
).
val
(),
performanceId
:
$
(
"#selectShow"
).
attr
(
'data-id'
),
performanceImg
performanceImg
:
$
(
"#viewImg"
).
attr
(
'src'
)
}
// endTime
if
(
marketId
)
{
data
.
marketId
=
marketId
;
...
...
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