记得上下班打卡 | 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
5d037bcc
Commit
5d037bcc
authored
Aug 18, 2022
by
sangchunxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能阻塞3
parent
bafbe583
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
38 deletions
+65
-38
add.html
...rces/templates/zhengzai/sweet/affiliatedActivity/add.html
+27
-12
edit.html
...ces/templates/zhengzai/sweet/affiliatedActivity/edit.html
+38
-26
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/sweet/affiliatedActivity/add.html
View file @
5d037bcc
...
@@ -283,6 +283,8 @@
...
@@ -283,6 +283,8 @@
let
currentUrl
=
'goblin/common/sku'
let
currentUrl
=
'goblin/common/sku'
let
activeTypeChangeVal
=
1
let
activeTypeChangeVal
=
1
let
varObj
=
{}
let
varObj
=
{}
let
currentNum
=
null
;
let
currentSelect
=
null
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
'.sortable-list'
).
sortable
({
connectWith
:
'.connectList'
}).
disableSelection
()
$
(
'.sortable-list'
).
sortable
({
connectWith
:
'.connectList'
}).
disableSelection
()
...
@@ -393,8 +395,8 @@
...
@@ -393,8 +395,8 @@
createListenerSearch
(
i
+
1
)
createListenerSearch
(
i
+
1
)
$
(
`#listActiveType
${
i
+
1
}
`
).
change
(
function
()
{
$
(
`#listActiveType
${
i
+
1
}
`
).
change
(
function
()
{
varObj
[
Object
.
keys
(
varObj
)[
i
]].
empty
()
varObj
[
Object
.
keys
(
varObj
)[
i
]].
empty
()
$
(
'#listRemoteSearch'
+
(
i
+
1
)
+
' input'
).
attr
(
'value'
,
''
)
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
attr
(
'value'
,
''
)
$
(
'#listRemoteSearch'
+
(
i
+
1
)
+
' input'
).
attr
(
'data-id'
,
''
)
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
attr
(
'data-id'
,
''
)
})
})
$
(
'#listRemoteSearch'
+
(
i
+
1
)
+
' input'
).
focus
(
function
()
{
$
(
'#listRemoteSearch'
+
(
i
+
1
)
+
' input'
).
focus
(
function
()
{
...
@@ -423,7 +425,7 @@
...
@@ -423,7 +425,7 @@
<div class="addAvatarItem" style="padding: 20px;">
<div class="addAvatarItem" style="padding: 20px;">
<div class="selectClassifyOne">
<div class="selectClassifyOne">
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐类型:</span>
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐类型:</span>
<select id="listActiveType
${
index
+
1
}
" value="
${
item
.
type
}
" class="form-control m-b">
<select id="listActiveType
${
index
+
1
}
" value="
${
item
.
type
}
" class="form-control m-b"
onclick="handleSelect('
${
index
+
1
}
')"
>
<option value="1">NFT</option>
<option value="1">NFT</option>
<option value="2">组合购</option>
<option value="2">组合购</option>
<option value="3">演出</option>
<option value="3">演出</option>
...
@@ -434,7 +436,7 @@
...
@@ -434,7 +436,7 @@
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐商品:</span>
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐商品:</span>
<div class="search-wrapper">
<div class="search-wrapper">
<div class="search-wrapper">
<div class="search-wrapper">
<div id="listRemoteSearch
${
index
+
1
}
" placeholder="请搜索" name="searchSelect
${
index
+
1
}
"></div>
<div id="listRemoteSearch
${
index
+
1
}
" placeholder="请搜索" name="searchSelect
${
index
+
1
}
"
onclick="handleInput('
${
index
+
1
}
')"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -454,7 +456,7 @@
...
@@ -454,7 +456,7 @@
<div class="addAvatarItem" style="padding: 20px;">
<div class="addAvatarItem" style="padding: 20px;">
<div class="selectClassifyOne">
<div class="selectClassifyOne">
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐类型:</span>
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐类型:</span>
<select id="listActiveType
${
count
}
" class="form-control m-b">
<select id="listActiveType
${
count
}
" class="form-control m-b"
onclick="handleSelect('
${
count
}
')"
>
<option value="1">NFT</option>
<option value="1">NFT</option>
<option value="2">组合购</option>
<option value="2">组合购</option>
<option value="3">演出</option>
<option value="3">演出</option>
...
@@ -465,7 +467,7 @@
...
@@ -465,7 +467,7 @@
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐商品:</span>
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐商品:</span>
<div class="search-wrapper">
<div class="search-wrapper">
<div class="search-wrapper">
<div class="search-wrapper">
<div id="listRemoteSearch
${
count
}
" placeholder="请搜索" name="searchSelect
${
count
}
"></div>
<div id="listRemoteSearch
${
count
}
" placeholder="请搜索" name="searchSelect
${
count
}
"
onclick="handleInput('
${
count
}
')"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -473,7 +475,6 @@
...
@@ -473,7 +475,6 @@
<div style="position: relative;"><i class="fa fa-remove" onclick="removeListItem('
${
count
}
')" style="margin-top: 8px; position: absolute; left: 10px;"></i></div>
<div style="position: relative;"><i class="fa fa-remove" onclick="removeListItem('
${
count
}
')" style="margin-top: 8px; position: absolute; left: 10px;"></i></div>
</li>`
</li>`
// 只有一组,可添加
// 只有一组,可添加
if
(
count
>=
0
&&
count
<=
19
)
{
if
(
count
>=
0
&&
count
<=
19
)
{
...
@@ -482,23 +483,23 @@
...
@@ -482,23 +483,23 @@
// 设置 实例化 一个 input search监听
// 设置 实例化 一个 input search监听
setTimeout
(()
=>
{
setTimeout
(()
=>
{
varObj
[
'listRemoteSearch'
+
count
]
=
new
searchSelect
(
`#listRemoteSearch
${
count
}
`
,
[],
function
(
val
)
{
varObj
[
'listRemoteSearch'
+
count
]
=
new
searchSelect
(
`#listRemoteSearch
${
count
}
`
,
[],
function
(
val
)
{
searchAjax
(
val
,
c
ount
)
searchAjax
(
val
,
c
urrentNum
)
})
})
},
500
)
},
500
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
$
(
`#listActiveType
${
count
}
`
).
change
(
function
()
{
$
(
`#listActiveType
${
count
}
`
).
change
(
function
()
{
varObj
[
Object
.
keys
(
varObj
)[
count
-
1
]].
empty
()
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
val
(
''
)
$
(
'#listRemoteSearch'
+
(
count
)
+
' input'
).
attr
(
'value'
,
''
)
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
attr
(
'data-id'
,
''
)
$
(
'#listRemoteSearch'
+
(
count
)
+
' input'
).
attr
(
'data-id'
,
''
)
})
})
$
(
'#listRemoteSearch'
+
(
count
)
+
' input'
).
focus
(
function
()
{
$
(
'#listRemoteSearch'
+
(
count
)
+
' input'
).
focus
(
function
()
{
$
(
this
).
val
(
''
)
$
(
this
).
val
(
''
)
$
(
this
).
attr
(
'data-id'
,
''
)
$
(
this
).
attr
(
'data-id'
,
''
)
})
})
},
6
00
)
},
4
00
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
$
(
'#listRemoteSearch'
+
(
count
)
+
' input'
).
focus
(
function
()
{
$
(
'#listRemoteSearch'
+
(
count
)
+
' input'
).
focus
(
function
()
{
...
@@ -516,6 +517,16 @@
...
@@ -516,6 +517,16 @@
}
}
// 点击select记录位置
function
handleSelect
(
num
)
{
currentSelect
=
num
}
// 点击input记录位置
function
handleInput
(
num
)
{
currentNum
=
num
;
}
// 删除list item
// 删除list item
function
removeListItem
(
index
)
{
function
removeListItem
(
index
)
{
let
evryGroup
=
$
(
'#addClassify2'
).
find
(
$
(
'.addAvatarItem'
))
let
evryGroup
=
$
(
'#addClassify2'
).
find
(
$
(
'.addAvatarItem'
))
...
@@ -560,14 +571,18 @@
...
@@ -560,14 +571,18 @@
function
createListenerSearch
(
index
)
{
function
createListenerSearch
(
index
)
{
varObj
[
'listRemoteSearch'
+
index
]
=
new
searchSelect
(
`#listRemoteSearch
${
index
}
`
,
[],
function
(
val
)
{
varObj
[
'listRemoteSearch'
+
index
]
=
new
searchSelect
(
`#listRemoteSearch
${
index
}
`
,
[],
function
(
val
)
{
searchAjax
(
val
,
index
)
searchAjax
(
val
,
index
)
})
})
}
}
function
searchAjax
(
val
,
index
)
{
function
searchAjax
(
val
,
index
)
{
console
.
log
(
'当前的list下啦'
,
val
,
index
)
let
_selectVal
=
$
(
"#listActiveType"
+
index
).
find
(
"option:selected"
).
val
()
// 当前子select val
let
_selectVal
=
$
(
"#listActiveType"
+
index
).
find
(
"option:selected"
).
val
()
// 当前子select val
if
(
_selectVal
)
{
if
(
_selectVal
)
{
let
_params
=
{}
let
_params
=
{}
if
(
_selectVal
==
1
)
{
if
(
_selectVal
==
1
)
{
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/sweet/affiliatedActivity/edit.html
View file @
5d037bcc
...
@@ -286,6 +286,8 @@
...
@@ -286,6 +286,8 @@
let
_recommendId
=
''
let
_recommendId
=
''
let
_recommendActiveId
=
''
let
_recommendActiveId
=
''
let
varObj
=
{}
let
varObj
=
{}
let
currentNum
=
null
;
let
currentSelect
=
null
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
'.sortable-list'
).
sortable
({
connectWith
:
'.connectList'
}).
disableSelection
()
$
(
'.sortable-list'
).
sortable
({
connectWith
:
'.connectList'
}).
disableSelection
()
...
@@ -419,10 +421,11 @@
...
@@ -419,10 +421,11 @@
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
createListenerSearch
(
i
+
1
)
createListenerSearch
(
i
+
1
)
$
(
`#listActiveType
${
i
+
1
}
`
).
change
(
function
()
{
$
(
`#listActiveType
${
i
+
1
}
`
).
change
(
function
()
{
varObj
[
Object
.
keys
(
varObj
)[
i
]].
empty
()
$
(
'#listRemoteSearch'
+
(
i
+
1
)
+
' input'
).
attr
(
'value'
,
''
)
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
attr
(
'value'
,
''
)
// 重置功能
$
(
'#listRemoteSearch'
+
(
i
+
1
)
+
' input'
).
attr
(
'data-id'
,
''
)
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
attr
(
'data-id'
,
''
)
})
})
$
(
'#listRemoteSearch'
+
(
i
+
1
)
+
' input'
).
focus
(
function
()
{
$
(
'#listRemoteSearch'
+
(
i
+
1
)
+
' input'
).
focus
(
function
()
{
$
(
this
).
val
(
''
)
$
(
this
).
val
(
''
)
$
(
this
).
attr
(
'data-id'
,
''
)
$
(
this
).
attr
(
'data-id'
,
''
)
...
@@ -453,13 +456,13 @@
...
@@ -453,13 +456,13 @@
// 组装 html
// 组装 html
function
assembleDom
(
list
)
{
function
assembleDom
(
list
)
{
list
.
forEach
((
item
,
index
)
=>
{
list
.
forEach
((
item
,
index
)
=>
{
// index 0 1
count
++
count
=
index
+
1
;
let
dynamicAddDom
=
`<li class="info-element" id="liItem
${
count
}
">
let
dynamicAddDom
=
`<li class="info-element" id="liItem
${
count
}
">
<div class="addAvatarItem" style="padding: 20px;">
<div class="addAvatarItem" style="padding: 20px;">
<div class="selectClassifyOne">
<div class="selectClassifyOne">
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐类型:</span>
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐类型:</span>
<select id="listActiveType
${
count
}
" value="
${
item
.
type
}
" class="form-control m-b list-active-type
">
<select id="listActiveType
${
index
+
1
}
" value="
${
item
.
type
}
" class="form-control m-b list-active-type" onclick="handleSelect('
${
index
+
1
}
')
">
<option value="1">NFT</option>
<option value="1">NFT</option>
<option value="2">组合购</option>
<option value="2">组合购</option>
<option value="3">演出</option>
<option value="3">演出</option>
...
@@ -470,7 +473,7 @@
...
@@ -470,7 +473,7 @@
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐商品:</span>
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐商品:</span>
<div class="search-wrapper">
<div class="search-wrapper">
<div class="search-wrapper">
<div class="search-wrapper">
<div id="listRemoteSearch
${
count
}
" placeholder="请搜索" name="searchSelect
${
count
}
"></div>
<div id="listRemoteSearch
${
index
+
1
}
" placeholder="请搜索" name="searchSelect
${
index
+
1
}
" onclick="handleInput('
${
index
+
1
}
')
"></div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -491,7 +494,7 @@
...
@@ -491,7 +494,7 @@
<div class="addAvatarItem" style="padding: 20px;">
<div class="addAvatarItem" style="padding: 20px;">
<div class="selectClassifyOne">
<div class="selectClassifyOne">
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐类型:</span>
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐类型:</span>
<select id="listActiveType
${
count
}
" class="form-control m-b">
<select id="listActiveType
${
count
}
" class="form-control m-b"
onclick="handleSelect('
${
count
}
')"
>
<option value="1">NFT</option>
<option value="1">NFT</option>
<option value="2">组合购</option>
<option value="2">组合购</option>
<option value="3">演出</option>
<option value="3">演出</option>
...
@@ -502,7 +505,7 @@
...
@@ -502,7 +505,7 @@
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐商品:</span>
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐商品:</span>
<div class="search-wrapper">
<div class="search-wrapper">
<div class="search-wrapper">
<div class="search-wrapper">
<div id="listRemoteSearch
${
count
}
" placeholder="请搜索" name="searchSelect
${
count
}
"></div>
<div id="listRemoteSearch
${
count
}
" placeholder="请搜索" name="searchSelect
${
count
}
"
onclick="handleInput('
${
count
}
')"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -513,35 +516,33 @@
...
@@ -513,35 +516,33 @@
// 只有一组,可添加
// 只有一组,可添加
if
(
count
>=
0
&&
count
<=
19
)
{
if
(
count
>=
0
&&
count
<=
19
)
{
$
(
'.sortable-list'
).
append
(
dynamicAddDom
)
$
(
'.sortable-list'
).
append
(
dynamicAddDom
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
varObj
[
'listRemoteSearch'
+
count
]
=
new
searchSelect
(
`#listRemoteSearch
${
count
}
`
,
[],
function
(
val
)
{
varObj
[
'listRemoteSearch'
+
count
]
=
new
searchSelect
(
`#listRemoteSearch
${
count
}
`
,
[],
function
(
val
)
{
searchAjax
(
val
,
c
ount
)
searchAjax
(
val
,
c
urrentNum
)
})
})
},
5
00
)
},
3
00
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
$
(
`#listActiveType
${
count
}
`
).
change
(
function
()
{
$
(
`#listActiveType
${
count
}
`
).
change
(
function
()
{
// 1
varObj
[
Object
.
keys
(
varObj
)[
count
-
1
]].
empty
()
$
(
'#listRemoteSearch'
+
count
+
' input'
).
attr
(
'value'
,
''
)
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
val
(
''
);
// 重置功能
$
(
'#listRemoteSearch'
+
count
+
' input'
).
attr
(
'data-id'
,
''
)
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
attr
(
'data-id'
,
''
)
})
})
},
6
00
)
},
4
00
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
$
(
'#listRemoteSearch'
+
count
+
' input'
).
focus
(
function
()
{
$
(
'#listRemoteSearch'
+
(
count
)
+
' input'
).
focus
(
function
()
{
$
(
this
).
val
(
''
)
$
(
this
).
val
(
''
)
$
(
this
).
attr
(
'data-id'
,
''
)
$
(
this
).
attr
(
'data-id'
,
''
)
})
})
// $('#listRemoteSearch' + count + ' input').blur(function () {
},
600
)
//
// })
},
800
)
}
else
{
}
else
{
layer
.
msg
(
'不能添加'
)
layer
.
msg
(
'不能添加'
)
...
@@ -551,6 +552,16 @@
...
@@ -551,6 +552,16 @@
}
}
// 点击select记录位置
function
handleSelect
(
num
)
{
currentSelect
=
num
}
// 点击input记录位置
function
handleInput
(
num
)
{
currentNum
=
num
;
}
// 删除list item
// 删除list item
function
removeListItem
(
index
)
{
function
removeListItem
(
index
)
{
let
evryGroup
=
$
(
'#addClassify2'
).
find
(
$
(
'.addAvatarItem'
))
let
evryGroup
=
$
(
'#addClassify2'
).
find
(
$
(
'.addAvatarItem'
))
...
@@ -599,7 +610,7 @@
...
@@ -599,7 +610,7 @@
}
}
// 添加dom同时,添加表单监听
// 添加dom同时,添加表单监听
function
createListenerSearch
(
index
)
{
function
createListenerSearch
(
index
)
{
// index 1 2 3
varObj
[
'listRemoteSearch'
+
index
]
=
new
searchSelect
(
`#listRemoteSearch
${
index
}
`
,
[],
function
(
val
)
{
varObj
[
'listRemoteSearch'
+
index
]
=
new
searchSelect
(
`#listRemoteSearch
${
index
}
`
,
[],
function
(
val
)
{
searchAjax
(
val
,
index
)
searchAjax
(
val
,
index
)
...
@@ -607,9 +618,12 @@
...
@@ -607,9 +618,12 @@
}
}
function
searchAjax
(
val
,
index
)
{
function
searchAjax
(
val
,
index
)
{
// 1 2
let
_selectVal
=
$
(
"#listActiveType"
+
index
).
find
(
"option:selected"
).
val
()
// 当前子select val
let
_selectVal
=
$
(
"#listActiveType"
+
index
).
find
(
"option:selected"
).
val
()
// 当前子select val
console
.
log
(
'当前的list下啦'
,
$
(
"#listActiveType"
+
index
),
index
)
if
(
_selectVal
)
{
if
(
_selectVal
)
{
let
_params
=
{}
let
_params
=
{}
if
(
_selectVal
==
1
)
{
if
(
_selectVal
==
1
)
{
...
@@ -636,8 +650,6 @@
...
@@ -636,8 +650,6 @@
let
yan
=
res
.
value
||
[]
let
yan
=
res
.
value
||
[]
let
sp
=
res
.
data
||
[]
let
sp
=
res
.
data
||
[]
console
.
log
(
'_selectVal'
,
_selectVal
)
if
(
_selectVal
==
1
)
{
if
(
_selectVal
==
1
)
{
_data
=
nft
.
map
(
item
=>
{
// 组装返回nft数据
_data
=
nft
.
map
(
item
=>
{
// 组装返回nft数据
return
{
id
:
item
.
spuId
,
value
:
item
.
spuName
}
return
{
id
:
item
.
spuId
,
value
:
item
.
spuName
}
...
...
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