记得上下班打卡 | 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
3bf50867
Commit
3bf50867
authored
Oct 12, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/hjc_yb_banner' into hjc_yb_banner
parents
886c78ce
5afacc09
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
90 deletions
+80
-90
bannerList.html
.../src/main/resources/templates/zhengzai/yb/bannerList.html
+67
-74
creatAndEdit.html
...rc/main/resources/templates/zhengzai/yb/creatAndEdit.html
+13
-16
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/yb/bannerList.html
View file @
3bf50867
...
...
@@ -121,54 +121,59 @@
sortOrder
:
"desc"
,
modalName
:
"活动"
,
columns
:
[
// {
// radio: true
// },
{
field
:
'name'
,
field
:
'cover'
,
title
:
'活动图片'
,
formatter
:
(
value
)
=>
{
let
dom
=
`<img id="viewImg" style="max-height: 60px;" class="imgBox" src="
${
value
}
" alt="">`
return
dom
;
}
},
{
field
:
'title'
,
title
:
'活动名称'
},
{
field
:
'startTime'
,
title
:
'开始时间'
},
{
field
:
'endTime'
,
title
:
'结束时间'
},
{
field
:
'status'
,
title
:
'状态'
,
formatter
:
function
(
value
,
row
,
index
)
{
// $('.pull-right').hide()
if
(
value
==
-
1
)
{
return
'全部'
}
else
if
(
value
==
0
)
{
return
'等待开始'
}
else
if
(
value
==
1
)
{
return
'进行中'
}
else
if
(
value
==
2
)
{
return
'活动结束'
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
)
{
if
(
value
==
7
)
{
return
'禁用'
}
else
{
return
'
停
用'
return
'
启
用'
}
}
},
{
field
:
'bindType'
,
title
:
'有效期'
,
formatter
:
function
(
value
,
row
,
index
)
{
return
row
.
startTime
+
' - '
+
row
.
endTime
title
:
'修改启用/禁用'
,
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
)
{
if
(
row
.
status
==
7
)
{
return
`<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="paly('
${
row
.
activityId
}
', 6)">启用</a>`
}
else
{
return
`<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="paly('
${
row
.
activityId
}
', 7)">禁用</a>`
}
}
},
{
field
:
'createdAt'
,
title
:
'创建时间'
},
{
field
:
'storeCount'
,
title
:
'店铺数量'
},
{
title
:
'操作'
,
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
)
{
return
`<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="$.operate.detailTab('
${
row
.
selfMarketId
}
')">编辑活动</a>
<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="goToStore_list('
${
row
.
name
}
','
${
row
.
selfMarketId
}
','
${
row
.
startTime
}
-
${
row
.
endTime
}
')">查看详情</a>`
return
`<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="creatAndEdit('','
${
row
.
activityId
}
')">编辑</a>`
}
}]
},
]
};
$
.
table
.
init
(
options
);
});
...
...
@@ -179,58 +184,41 @@
function
creatAndEdit
(
num
,
id
)
{
let
name
=
'创建banner'
if
(
!
num
)
{
console
.
log
(
'编辑'
)
name
=
'编辑banner'
}
$
.
modal
.
open
(
`
${
name
}
`
,
prefix2
+
"/creatAndEdit?id="
+
id
,
900
,
560
,
callback
)
// $.modal.open('新品推荐', prefix2 + "/newRecommended?id=" + num,900,560, callback)
}
function
callback
(
index
,
layero
)
{
let
bodyDom
=
$
(
layero
).
find
(
"iframe"
)[
0
].
contentWindow
;
let
data
=
{
title
:
bodyDom
.
document
.
getElementById
(
"ybTitle"
).
value
,
startTime
:
bodyDom
.
document
.
getElementById
(
"startTime"
).
value
,
endTime
:
bodyDom
.
document
.
getElementById
(
"endTime"
).
value
,
cover
:
bodyDom
.
document
.
getElementById
(
"viewImg"
).
getAttribute
(
'src'
)
title
:
getDom
(
layero
,
"ybTitle"
).
value
,
startTime
:
getDom
(
layero
,
"startTime"
).
value
,
endTime
:
getDom
(
layero
,
"endTime"
).
value
,
cover
:
getDom
(
layero
,
"viewImg"
).
getAttribute
(
'src'
)
}
for
(
var
i
in
data
)
{
if
(
!
data
[
i
])
return
layer
.
msg
(
'请将必填项填写完整~!'
)
}
data
.
activityId
=
''
;
promiseMethods
(
'/sweet/activity/insert'
,
'post'
,
JSON
.
stringify
(
data
)).
then
(
res
=>
{
if
(
getDom
(
layero
,
"activityId"
).
value
)
{
data
.
activityId
=
getDom
(
layero
,
"activityId"
).
value
;
promiseMethods
(
'/sweet/activity/update'
,
'post'
,
JSON
.
stringify
(
data
),
'application/json'
).
then
(
res
=>
{
$
.
operate
.
successCallback
(
res
);
})
}
function
functionBtn
(
type
)
{
let
status
=
''
;
if
(
type
==
1
)
{
status
=
0
;
}
else
if
(
type
==
2
)
{
status
=
7
;
}
else
{
status
=
-
1
;
}
let
data
=
{
marketId
:
rowData
.
selfMarketId
}
data
.
status
=
status
;
promiseMethods
(
'/goblin/marketing/zhengzai/status'
,
'post'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
type
==
3
)
{
layer
.
msg
(
'删除成功!'
)
}
else
{
layer
.
msg
(
'修改状态成功!'
)
}
setTimeout
(()
=>
{
$
(
"#searchBtns"
).
click
();
},
500
);
}
data
.
activityId
=
''
;
promiseMethods
(
'/sweet/activity/insert'
,
'post'
,
JSON
.
stringify
(
data
),
'application/json'
).
then
(
res
=>
{
// $.operate.successCallback(res);
})
}
}
$
(
"#button-open-11"
).
click
(
function
(){
$
(
"button[name=refresh]"
).
click
()
})
function
goToStore_list
(
name
,
id
,
time
)
{
$
.
modal
.
openTab
(
name
,
prefix2
+
"/activityStoreList?id="
+
id
+
'&time='
+
time
+
'&name='
+
name
)
function
getDom
(
layero
,
name
)
{
console
.
log
(
name
,
'????'
)
let
bodyDom
=
$
(
layero
).
find
(
"iframe"
)[
0
].
contentWindow
;
return
bodyDom
.
document
.
getElementById
(
name
);
}
function
onCheck
(
row
,
$element
)
{
rowData
=
row
;
...
...
@@ -241,20 +229,25 @@
function
yes
(
index
,
layero
)
{
}
function
del
(
id
,
status
,
notice
)
{
function
paly
(
id
,
status
)
{
console
.
log
(
id
,
status
,
'dsadasda'
)
let
notice
=
''
;
if
(
status
==
6
)
{
notice
=
'确定要启用该活动?'
;
}
else
{
notice
=
'确定要禁用该活动?'
;
}
$
.
modal
.
confirm
(
notice
,
function
()
{
$
.
ajax
({
type
:
'p
u
t'
,
url
:
'/s
tone/item/change
/status'
,
type
:
'p
os
t'
,
url
:
'/s
weet/activity
/status'
,
data
:
{
item
Id
:
id
,
activity
Id
:
id
,
status
},
success
:
function
(
e
)
{
layer
.
msg
(
"操作成功!"
)
setTimeout
(()
=>
{
$
(
"#searchBtns"
).
click
();
},
1500
);
}
})
});
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/yb/creatAndEdit.html
View file @
3bf50867
...
...
@@ -80,6 +80,7 @@
</span>
<div
class=
"input-group"
style=
"width: 300px;"
>
<input
type=
"text"
class=
"form-control"
id=
"ybTitle"
placeholder=
"请输入活动名称"
>
<input
type=
"hidden"
class=
"form-control"
id=
"activityId"
placeholder=
""
>
</div>
</div>
<div
class=
"basis_data ibox-content"
style=
"border: none;display: flex;"
>
...
...
@@ -116,7 +117,7 @@
<script
th:inline=
"javascript"
>
let
count
=
1
;
var
prefix2
=
ctx
+
"local"
;
let
market
Id
=
''
;
let
activity
Id
=
''
;
let
editDatas
=
0
;
var
platformUrl
=
[[
$
{
platformUrl
}]];
$
(
function
()
{
...
...
@@ -136,27 +137,23 @@
});
});
if
(
unescape
(
r
[
2
])
&&
unescape
(
r
[
2
])
!=
'undefined'
)
{
marketId
=
unescape
(
r
[
2
]);
// $(".editDisabled").attr('disabled', true);
// $(".editshow").hide()
activityId
=
unescape
(
r
[
2
]);
let
data
=
{
marketId
}
let
searchActivity
=
promiseMethods
(
'/goblin/marketing/zhengzai/details'
,
'post'
,
data
);
let
searchActivityStore
=
promiseMethods
(
'/goblin/marketing/zhengzai/store/list'
,
'post'
,
data
);
Promise
.
all
([
searchActivity
,
searchActivityStore
]).
then
(
res
=>
{
let
basisData
=
res
[
0
];
let
{
data
}
=
res
[
1
];
editDatas
=
data
.
length
;
$
(
"#viewImg"
).
attr
(
'src'
,
basisData
.
data
.
performanceImg
);
$
(
"#startTime"
).
val
(
basisData
.
data
.
startTime
);
$
(
"#endTime"
).
val
(
basisData
.
data
.
endTime
);
$
(
".content_item"
).
show
();
activityId
}
let
searchActivity
=
promiseMethods
(
'/sweet/activity/details'
,
'get'
,
data
);
Promise
.
all
([
searchActivity
]).
then
(
res
=>
{
let
data
=
res
[
0
];
console
.
log
(
data
,
'rees'
)
$
(
"#viewImg"
).
attr
(
'src'
,
data
.
cover
);
$
(
"#startTime"
).
val
(
data
.
startTime
);
$
(
"#endTime"
).
val
(
data
.
endTime
);
$
(
"#ybTitle"
).
val
(
data
.
title
);
$
(
"#activityId"
).
val
(
data
.
activityId
);
})
}
$
(
"#fileinput"
).
fileinput
({
'theme'
:
'explorer-fas'
,
// 'uploadUrl': "https://devplatform.zhengzai.tv/platform/basicServices/alOss/upload",
'uploadUrl'
:
platformUrl
+
"/platform/basicServices/alOss/upload"
,
"uploadExtraData"
:
{
"pathName"
:
"banner"
,
...
...
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