记得上下班打卡 | 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
25c36134
Commit
25c36134
authored
Jun 09, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
banner update
parent
b84bb1bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
100 additions
and
88 deletions
+100
-88
KylinBannersAdminController.java
...ontroller/zhengzai/kylin/KylinBannersAdminController.java
+24
-1
create.html
...in/resources/templates/zhengzai/kylin/banners/create.html
+16
-33
update.html
...in/resources/templates/zhengzai/kylin/banners/update.html
+60
-54
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/kylin/KylinBannersAdminController.java
View file @
25c36134
...
...
@@ -16,7 +16,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
...
...
@@ -118,7 +117,31 @@ public class KylinBannersAdminController extends BaseController {
public
String
update
(
@PathVariable
(
"bannersId"
)
String
bannersId
,
ModelMap
mmap
)
{
KylinBannersVo
result
=
null
;
result
=
kylinBannersServiceImpl
.
detail
(
bannersId
);
List
<
Object
>
bannersTargetType
=
BannersTargetType
.
getResultType
();
List
<
Object
>
bannersDisplayLocation
=
BannersDisplayLocation
.
getResultType
();
mmap
.
put
(
"KylinBannersVo"
,
result
);
mmap
.
put
(
"BannersTargetType"
,
bannersTargetType
);
mmap
.
put
(
"BannersDisplayLocation"
,
bannersDisplayLocation
);
mmap
.
put
(
"provinces"
,
provinces
);
mmap
.
put
(
"url1"
,
url1
);
mmap
.
put
(
"url2"
,
url2
);
mmap
.
put
(
"url5"
,
url5
);
mmap
.
put
(
"url6"
,
url6
);
mmap
.
put
(
"url7"
,
url7
);
mmap
.
put
(
"url8"
,
url8
);
mmap
.
put
(
"url13"
,
url13
);
mmap
.
put
(
"url14"
,
url14
);
mmap
.
put
(
"url20"
,
url20
);
mmap
.
put
(
"url21"
,
url21
);
mmap
.
put
(
"url22"
,
url22
);
mmap
.
put
(
"url23"
,
url23
);
mmap
.
put
(
"url24"
,
url24
);
mmap
.
put
(
"url26"
,
url26
);
return
prefix
+
"/update"
;
}
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/banners/create.html
View file @
25c36134
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<th:block
th:include=
"include :: header('
提交订单退款
')"
/>
<th:block
th:include=
"include :: header('
添加banner
')"
/>
<th:block
th:include=
"include :: select2-css"
/>
<th:block
th:include=
"include :: datetimepicker-css"
/>
</head>
...
...
@@ -94,44 +94,27 @@
</div>
</div>
</form>
<div
hidden=
"hidden"
>
<input
type=
"text"
th:value=
"${provinces}"
id=
"provinces"
>
<input
type=
"text"
th:value=
"${url1}"
id=
"url1"
>
<input
type=
"text"
th:value=
"${url2}"
id=
"url2"
>
<input
type=
"text"
th:value=
"${url5}"
id=
"url5"
>
<input
type=
"text"
th:value=
"${url6}"
id=
"url6"
>
<input
type=
"text"
th:value=
"${url7}"
id=
"url7"
>
<input
type=
"text"
th:value=
"${url8}"
id=
"url8"
>
<input
type=
"text"
th:value=
"${url13}"
id=
"url13"
>
<input
type=
"text"
th:value=
"${url14}"
id=
"url14"
>
<input
type=
"text"
th:value=
"${url20}"
id=
"url20"
>
<input
type=
"text"
th:value=
"${url21}"
id=
"url21"
>
<input
type=
"text"
th:value=
"${url22}"
id=
"url22"
>
<input
type=
"text"
th:value=
"${url23}"
id=
"url23"
>
<input
type=
"text"
th:value=
"${url24}"
id=
"url24"
>
<input
type=
"text"
th:value=
"${url26}"
id=
"url26"
>
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: select2-js"
/>
<th:block
th:include=
"include :: datetimepicker-js"
/>
<script
type=
"text/javascript"
>
var
prefix
=
ctx
+
"kylin/banners"
;
var
provinces
=
$
(
"#provinces"
).
val
()
;
var
url1
=
$
(
"#url1"
).
val
()
;
var
url2
=
$
(
"#url2"
).
val
()
;
var
url5
=
$
(
"#url5"
).
val
()
;
var
url6
=
$
(
"#url6"
).
val
()
;
var
url7
=
$
(
"#url7"
).
val
()
;
var
url8
=
$
(
"#url8"
).
val
()
;
var
url13
=
$
(
"#url13"
).
val
()
;
var
url14
=
$
(
"#url14"
).
val
()
;
var
url20
=
$
(
"#url20"
).
val
()
;
var
url21
=
$
(
"#url21"
).
val
()
;
var
url22
=
$
(
"#url22"
).
val
()
;
var
url23
=
$
(
"#url23"
).
val
()
;
var
url24
=
$
(
"#url24"
).
val
()
;
var
url26
=
$
(
"#url26"
).
val
()
;
var
provinces
=
"[[${provinces}]]"
;
var
url1
=
"[[${url1}]]"
;
var
url2
=
"[[${url2}]]"
;
var
url5
=
"[[${url5}]]"
;
var
url6
=
"[[${url6}]]"
;
var
url7
=
"[[${url7}]]"
;
var
url8
=
"[[${url8}]]"
;
var
url13
=
"[[${url13}]]"
;
var
url14
=
"[[${url14}]]"
;
var
url20
=
"[[${url20}]]"
;
var
url21
=
"[[${url21}]]"
;
var
url22
=
"[[${url22}]]"
;
var
url23
=
"[[${url23}]]"
;
var
url24
=
"[[${url24}]]"
;
var
url26
=
"[[${url26}]]"
;
function
submitHandler
()
{
var
bannersName
=
$
(
'#bannersName'
).
val
();
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/banners/update.html
View file @
25c36134
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<th:block
th:include=
"include :: header('
提交订单退款
')"
/>
<th:block
th:include=
"include :: header('
修改banner
')"
/>
<th:block
th:include=
"include :: select2-css"
/>
<th:block
th:include=
"include :: datetimepicker-css"
/>
</head>
...
...
@@ -11,14 +11,17 @@
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label is-required"
>
标题:
</label>
<div
class=
"col-sm-10"
>
<input
class=
"form-control"
type=
"text"
name=
"bannersName"
id=
"bannersName"
required
>
<input
th:value=
"${KylinBannersVo.bannersName}"
class=
"form-control"
type=
"text"
name=
"bannersName"
id=
"bannersName"
required
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label is-required"
>
展示位置
</label>
<div
class=
"col-sm-10"
>
<label
th:each=
"type : ${BannersDisplayLocation}"
class=
"checkbox-inline"
>
<input
name=
"positionList"
th:text=
"${type.name}"
th:value=
"${type.id}"
type=
"checkbox"
>
<!-- <input th:checked="${#arrays.contains(#strings.arraySplit(KylinBannersVo.positionList,','),#strings.toString(type.id))}" name="positionList" th:text="${type.name}" th:value="${type.id}" type="checkbox">-->
<input
th:checked=
"${#arrays.contains(KylinBannersVo.positionList,#strings.toString(type.id))}"
name=
"positionList"
th:text=
"${type.name}"
th:value=
"${type.id}"
type=
"checkbox"
>
</label>
</div>
</div>
...
...
@@ -27,11 +30,13 @@
<div
class=
"col-sm-5"
>
<select
class=
"form-control"
name=
"targetType"
id=
"targetType"
>
<option
value=
""
>
--请选择跳转类型--
</option>
<option
th:each=
"type : ${BannersTargetType}"
th:text=
"${type.name}"
th:value=
"${type.id}"
></option>
<option
th:each=
"type : ${BannersTargetType}"
th:text=
"${type.name}"
th:value=
"${type.id}"
th:field=
"*{KylinBannersVo.targetType}"
></option>
</select>
</div>
<div
class=
"col-sm-5"
>
<input
class=
"form-control"
type=
"text"
placeholder=
"请填写url"
id=
"targetObjInput"
>
<input
th:value=
"${KylinBannersVo.targetObj}"
class=
"form-control"
type=
"text"
placeholder=
"请填写url"
id=
"targetObjInput"
>
<div
hidden=
"hidden"
id=
"targetObjSelectShow"
>
<select
class=
"form-control"
id=
"targetObjSelect"
>
<option
value=
""
>
--请选择--
</option>
...
...
@@ -44,12 +49,14 @@
<div
class=
"col-sm-10"
>
<div
class=
"radio check-box"
>
<label>
<input
lay-filter=
"promotionType"
type=
"radio"
value=
"1"
name=
"promotionType"
checked=
""
>
全国
<input
th:checked=
"${KylinBannersVo.promotionType==1 ? true : false}"
type=
"radio"
value=
"1"
name=
"promotionType"
checked=
""
>
全国
</label>
</div>
<div
class=
"radio check-box"
>
<label>
<input
lay-filter=
"promotionType"
type=
"radio"
value=
"2"
name=
"promotionType"
>
省份
<input
th:checked=
"${KylinBannersVo.promotionType==2 ? true : false}"
type=
"radio"
value=
"2"
name=
"promotionType"
>
省份
</label>
</div>
</div>
...
...
@@ -57,9 +64,7 @@
<div
class=
"form-group"
id=
"provincesListSelect"
>
<label
class=
"col-sm-2 control-label"
>
请选择省份
</label>
<div
class=
"col-sm-5"
>
<select
id=
"provincesList"
class=
"form-control"
name=
"provincesList"
>
</select>
<select
th:each=
"provinces : ${KylinBannersVo.provincesList}"
class=
"form-control provincesList"
name=
"provincesList"
></select>
</div>
<div
class=
"col-sm-5"
>
<button
type=
"button"
class=
"btn btn-danger btn-sm"
>
删除
</button>
...
...
@@ -71,12 +76,14 @@
<div
class=
"col-sm-10"
>
<div
class=
"radio check-box"
>
<label>
<input
type=
"radio"
value=
"1"
name=
"isOnline"
checked=
""
>
<i></i>
上线
<input
type=
"radio"
value=
"1"
name=
"isOnline"
th:checked=
"${KylinBannersVo.isOnline==1 ? true : false}"
>
<i></i>
上线
</label>
</div>
<div
class=
"radio check-box"
>
<label>
<input
type=
"radio"
value=
"0"
name=
"isOnline"
>
<i></i>
下线
<input
type=
"radio"
value=
"0"
name=
"isOnline"
th:checked=
"${KylinBannersVo.isOnline==0 ? true : false}"
>
<i></i>
下线
</label>
</div>
</div>
...
...
@@ -85,53 +92,41 @@
<label
class=
"col-sm-2 control-label"
>
上线开始/结束时间
</label>
<div
class=
"col-sm-10"
>
<div
class=
"input-daterange input-group"
>
<input
name=
"onlineStartTime"
type=
"text"
class=
"input-sm form-control"
id=
"laydate-startTime"
<input
th:value=
"${KylinBannersVo.onlineStartTime}"
name=
"onlineStartTime"
type=
"text"
class=
"input-sm form-control"
id=
"laydate-startTime"
placeholder=
"yyyy-MM-dd HH:mm:ss"
/>
<span
class=
"input-group-addon"
>
到
</span>
<input
name=
"onlineEndTime"
type=
"text"
class=
"input-sm form-control"
id=
"laydate-endTime"
<input
th:value=
"${KylinBannersVo.onlineEndTime}"
name=
"onlineEndTime"
type=
"text"
class=
"input-sm form-control"
id=
"laydate-endTime"
placeholder=
"yyyy-MM-dd HH:mm:ss"
/>
</div>
</div>
</div>
</form>
<div
hidden=
"hidden"
>
<input
type=
"text"
th:value=
"${provinces}"
id=
"provinces"
>
<input
type=
"text"
th:value=
"${url1}"
id=
"url1"
>
<input
type=
"text"
th:value=
"${url2}"
id=
"url2"
>
<input
type=
"text"
th:value=
"${url5}"
id=
"url5"
>
<input
type=
"text"
th:value=
"${url6}"
id=
"url6"
>
<input
type=
"text"
th:value=
"${url7}"
id=
"url7"
>
<input
type=
"text"
th:value=
"${url8}"
id=
"url8"
>
<input
type=
"text"
th:value=
"${url13}"
id=
"url13"
>
<input
type=
"text"
th:value=
"${url14}"
id=
"url14"
>
<input
type=
"text"
th:value=
"${url20}"
id=
"url20"
>
<input
type=
"text"
th:value=
"${url21}"
id=
"url21"
>
<input
type=
"text"
th:value=
"${url22}"
id=
"url22"
>
<input
type=
"text"
th:value=
"${url23}"
id=
"url23"
>
<input
type=
"text"
th:value=
"${url24}"
id=
"url24"
>
<input
type=
"text"
th:value=
"${url26}"
id=
"url26"
>
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: select2-js"
/>
<th:block
th:include=
"include :: datetimepicker-js"
/>
<script
type=
"text/javascript"
>
var
prefix
=
ctx
+
"kylin/banners"
;
var
provinces
=
$
(
"#provinces"
).
val
();
var
url1
=
$
(
"#url1"
).
val
();
var
url2
=
$
(
"#url2"
).
val
();
var
url5
=
$
(
"#url5"
).
val
();
var
url6
=
$
(
"#url6"
).
val
();
var
url7
=
$
(
"#url7"
).
val
();
var
url8
=
$
(
"#url8"
).
val
();
var
url13
=
$
(
"#url13"
).
val
();
var
url14
=
$
(
"#url14"
).
val
();
var
url20
=
$
(
"#url20"
).
val
();
var
url21
=
$
(
"#url21"
).
val
();
var
url22
=
$
(
"#url22"
).
val
();
var
url23
=
$
(
"#url23"
).
val
();
var
url24
=
$
(
"#url24"
).
val
();
var
url26
=
$
(
"#url26"
).
val
();
var
provinces
=
"[[${provinces}]]"
;
var
url1
=
"[[${url1}]]"
;
var
url2
=
"[[${url2}]]"
;
var
url5
=
"[[${url5}]]"
;
var
url6
=
"[[${url6}]]"
;
var
url7
=
"[[${url7}]]"
;
var
url8
=
"[[${url8}]]"
;
var
url13
=
"[[${url13}]]"
;
var
url14
=
"[[${url14}]]"
;
var
url20
=
"[[${url20}]]"
;
var
url21
=
"[[${url21}]]"
;
var
url22
=
"[[${url22}]]"
;
var
url23
=
"[[${url23}]]"
;
var
url24
=
"[[${url24}]]"
;
var
url26
=
"[[${url26}]]"
;
var
targetObj
=
"[[${KylinBannersVo.targetObj}]]"
;
var
targetObjType
=
"[[${KylinBannersVo.targetType}]]"
;
var
provincesListOld
=
"[[${KylinBannersVo.provincesList}]]"
;
function
submitHandler
()
{
var
bannersName
=
$
(
'#bannersName'
).
val
();
...
...
@@ -249,8 +244,11 @@
for
(
var
i
=
0
,
l
=
result
.
length
;
i
<
l
;
i
++
)
{
html
+=
'<option value="'
+
result
[
i
].
adcode
+
'">'
+
result
[
i
].
name
+
'</option>'
;
}
;
$
(
"#provincesList"
).
html
(
html
);
$
(
".provincesList"
).
html
(
html
);
provincesListOld
=
eval
(
provincesListOld
);
for
(
var
i
=
0
,
l
=
provincesListOld
.
length
;
i
<
l
;
i
++
)
{
$
(
".provincesList"
).
eq
(
i
).
val
(
provincesListOld
[
i
])
}
}
};
$
.
ajax
(
configProvinces
)
...
...
@@ -263,9 +261,7 @@
// 跳转类型选择事件
$
(
'#targetType'
).
on
(
'select2:select'
,
function
(
e
)
{
// var cardTypeW = $("#cardType option:checked").text(); // 获取选中的名
// var targetType = $("#targetType option:checked").val();
function
targetType
()
{
var
targetType
=
$
(
'#targetType'
).
select2
(
'val'
);
if
(
12
==
targetType
||
100
==
targetType
)
{
// 请填写url
$
(
"#targetObjSelectShow"
).
hide
();
...
...
@@ -276,7 +272,6 @@
}
else
{
var
urlVarName
=
'url'
+
targetType
;
var
url
=
eval
(
urlVarName
);
console
.
log
(
url
)
// 获取相关数据
var
configUrl
=
{
url
:
url
,
...
...
@@ -293,15 +288,26 @@
html
+=
'<option value="'
+
data
[
i
].
id
+
'">'
+
data
[
i
].
title
+
'</option>'
;
}
;
$
(
"#targetObjSelect"
).
html
(
html
);
$
(
"#targetObjSelectShow"
).
show
();
$
(
"#targetObjInput"
).
hide
();
$
(
"#targetObjSelect"
).
html
(
html
);
if
(
targetType
==
targetObjType
)
{
//如果是之前选中的类型 设置值
$
(
"#targetObjSelect"
).
val
(
targetObj
)
}
}
};
$
.
ajax
(
configUrl
)
}
}
targetType
();
// $("#targetType").val(20).trigger("change");
$
(
'#targetType'
).
on
(
'select2:select'
,
function
(
e
)
{
// var cardTypeW = $("#cardType option:checked").text(); // 获取选中的名
// var targetType = $("#targetType option:checked").val();
targetType
();
});
})
</script>
</body>
</html>
</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