记得上下班打卡 | 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
65a713fd
Commit
65a713fd
authored
Dec 03, 2021
by
qinshuangshuang@zhengzai.tv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建积分活动
parent
33341010
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
907 additions
and
522 deletions
+907
-522
remote-search-coupon-list.js
...src/main/resources/static/js/remote-search-coupon-list.js
+176
-0
include.html
...lient-admin-web/src/main/resources/templates/include.html
+2
-0
form.html
...urces/templates/zhengzai/sweet/integralActivity/form.html
+729
-522
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/static/js/remote-search-coupon-list.js
0 → 100644
View file @
65a713fd
;(
function
(
$
)
{
//这里放入插件代码
var
RemoteSearchPerformance
=
function
(
element
,
options
)
{
this
.
$element
=
$
(
element
);
this
.
options
=
$
.
extend
(
true
,
{},
$
.
fn
.
remoteSearchPerformance
.
defaults
,
options
);
this
.
id
=
$
(
element
).
attr
(
'id'
);
this
.
ulID
=
'#'
+
this
.
id
+
'_ul'
;
this
.
ulFoucus
=
false
;
// Method overrides
this
.
render
=
this
.
options
.
render
||
this
.
render
;
this
.
select
=
this
.
options
.
select
||
this
.
select
;
this
.
ajax
=
$
.
extend
({},
$
.
fn
.
remoteSearchPerformance
.
defaults
.
ajax
,
this
.
options
.
ajax
);
this
.
listen
();
}
RemoteSearchPerformance
.
prototype
=
{
listen
:
function
()
{
this
.
$element
.
on
(
'blur'
,
$
.
proxy
(
this
.
blur
,
this
))
.
on
(
'keyup'
,
$
.
proxy
(
this
.
keyup
,
this
));
this
.
$element
.
parent
(
'div.remote_wrapper'
).
on
(
'click'
,
this
.
ulID
,
$
.
proxy
(
this
.
click
,
this
));
},
blur
:
function
(
e
)
{
var
that
=
this
;
e
.
stopPropagation
();
e
.
preventDefault
();
setTimeout
(
function
()
{
if
(
!
that
.
ulFoucus
)
{
that
.
$element
.
val
(
that
.
$element
.
attr
(
'data-name'
));
that
.
hide
();
}
},
150
)
},
keyup
:
function
(
e
)
{
e
.
stopPropagation
();
e
.
preventDefault
();
switch
(
e
.
keyCode
)
{
case
40
:
// down arrow
case
38
:
// up arrow
break
;
case
9
:
// tab
case
13
:
// enter
this
.
ajaxer
();
case
27
:
// escape
break
;
default
:
this
.
ajaxer
();
}
},
hide
:
function
()
{
$
(
this
.
ulID
).
remove
();
return
this
;
},
ajaxer
:
function
()
{
var
that
=
this
,
keyword
=
that
.
$element
.
val
();
busiType
=
window
.
typeRadio
;
couType
=
window
.
typeCoupe
;
// Query changed
that
.
keyword
=
keyword
;
// Cancel last timer if set
if
(
that
.
ajax
.
timerId
)
{
clearTimeout
(
that
.
ajax
.
timerId
);
that
.
ajax
.
timerId
=
null
;
}
// Query is good to send, set a timer
that
.
ajax
.
timerId
=
setTimeout
(
function
()
{
var
params
=
{
keyword
:
keyword
,
busiType
:
busiType
,
couType
:
couType
,
bindType
:
'1,4'
};
var
jAjax
=
$
.
post
;
jAjax
(
that
.
ajax
.
url
,
params
,
function
(
data
){
return
that
.
render
(
data
.
rows
);
});
that
.
ajax
.
timerId
=
null
;
},
that
.
ajax
.
timeout
);
return
that
;
},
render
:
function
(
data
)
{
this
.
ulFoucus
=
false
;
var
liList
=
data
||
[];
var
num
=
this
.
_getNum
();
//添加 ul
if
(
$
(
this
.
ulID
).
length
==
0
)
{
this
.
$element
.
after
(
"<ul id='"
+
this
.
id
+
"_ul' class='remote_search remote_search_top'></ul>"
);
};
//添加li
var
str
=
""
;
if
(
num
)
{
if
(
liList
.
length
)
{
for
(
var
i
=
0
;
i
<
liList
.
length
;
i
++
)
{
str
+=
"<li data-id='"
+
liList
[
i
].
couponId
+
"' data-name='"
+
liList
[
i
].
title
+
"' title='"
+
liList
[
i
].
title
+
"' value='"
+
liList
[
i
].
couponId
+
"'>"
+
liList
[
i
].
title
+
"</li>"
;
}
}
else
{
str
=
"<li data-id='' data-name=''>搜索无数据</li>"
}
}
else
{
this
.
$element
.
attr
(
'data-name'
,
""
);
this
.
$element
.
attr
(
'data-id'
,
""
);
}
$
(
this
.
ulID
).
html
(
str
);
var
bodyHeight
=
$
(
document
.
body
).
height
();
var
offsetTop
=
this
.
$element
.
offset
().
top
;
var
height
=
$
(
this
.
ulID
).
outerHeight
(
true
);
if
(
offsetTop
+
height
>
bodyHeight
){
$
(
this
.
ulID
).
addClass
(
'remote_search_bottom'
).
removeClass
(
'remote_search_top'
);
}
else
{
$
(
this
.
ulID
).
addClass
(
'remote_search_top'
).
removeClass
(
'remote_search_bottom'
);
}
return
this
;
},
click
:
function
(
e
)
{
e
.
stopPropagation
();
e
.
preventDefault
();
var
dataName
=
$
(
e
.
target
).
attr
(
'data-name'
);
var
dataID
=
$
(
e
.
target
).
attr
(
'data-id'
);
this
.
$element
.
val
(
dataName
);
this
.
$element
.
attr
(
'data-name'
,
dataName
);
this
.
$element
.
attr
(
'data-id'
,
dataID
);
this
.
options
.
chose
(
dataName
,
dataID
);
this
.
ulFoucus
=
true
;
return
this
.
hide
();
},
_getNum
:
function
(){
return
this
.
$element
.
val
().
length
;
}
}
$
.
fn
.
remoteSearchPerformance
=
function
(
option
)
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
),
data
=
$this
.
data
(
'remoteSearchPerformance'
),
options
=
typeof
option
===
'object'
&&
option
;
if
(
!
data
)
{
$this
.
data
(
'remoteSearchPerformance'
,
(
data
=
new
RemoteSearchPerformance
(
this
,
options
)));
}
if
(
typeof
option
===
'string'
)
{
data
[
option
]();
}
});
}
$
.
fn
.
remoteSearchPerformance
.
defaults
=
{
hiddenVal
:
''
,
chose
:
function
()
{
},
ajax
:
{
url
:
null
,
timeout
:
300
,
method
:
'get'
,
timerId
:
null
},
success
:
function
(
res
){
}
}
$
.
fn
.
remoteSearchPerformance
.
Constructor
=
RemoteSearchPerformance
;
})(
jQuery
);
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/include.html
View file @
65a713fd
...
@@ -43,6 +43,8 @@
...
@@ -43,6 +43,8 @@
<script
th:src=
"@{/ruoyi/js/ry-ui.js?v=4.6.1}"
></script>
<script
th:src=
"@{/ruoyi/js/ry-ui.js?v=4.6.1}"
></script>
<!--远程搜索下拉框-->
<!--远程搜索下拉框-->
<script
th:src=
"@{/js/remote-search-performance.js}"
></script>
<script
th:src=
"@{/js/remote-search-performance.js}"
></script>
<!--远程搜索下拉框:积分抽奖配置使用-->
<script
th:src=
"@{/js/remote-search-coupon-list.js}"
></script>
</div>
</div>
<!-- ztree树插件 -->
<!-- ztree树插件 -->
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/sweet/integralActivity/form.html
View file @
65a713fd
This diff is collapsed.
Click to expand it.
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