记得上下班打卡 | git大法好,push需谨慎

Commit 99edbfe7 authored by sangchunxi's avatar sangchunxi

优化 select 后 晴空input

parent d4830a4d
...@@ -382,6 +382,9 @@ ...@@ -382,6 +382,9 @@
setTimeout(() => { setTimeout(() => {
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 () {
$('#listRemoteSearch' + (i + 1) + ' input').attr('value', '')
})
} }
}, 500) }, 500)
...@@ -456,7 +459,7 @@ ...@@ -456,7 +459,7 @@
// 只有一组,可添加 // 只有一组,可添加
if (dynamicDomLength) { if (dynamicDomLength >=0 ) {
console.log('dynamicDomLength', dynamicDomLength) console.log('dynamicDomLength', dynamicDomLength)
$('.sortable-list').append(dynamicAddDom) $('.sortable-list').append(dynamicAddDom)
...@@ -467,7 +470,14 @@ ...@@ -467,7 +470,14 @@
searchAjax(val, dynamicDomLength + 1) searchAjax(val, dynamicDomLength + 1)
}) })
}, 600) }, 500)
setTimeout(() => {
$(`#listActiveType${dynamicDomLength+1}`).change(function () {
$('#listRemoteSearch' + (dynamicDomLength+1) + ' input').attr('value', '')
})
}, 800)
} else { } else {
layer.msg('不能添加') layer.msg('不能添加')
......
...@@ -364,7 +364,6 @@ ...@@ -364,7 +364,6 @@
if (itemId) { if (itemId) {
// 请求数据 // 请求数据
promiseMethods('/kylin-recommend-active/getActiveById', 'post', { mid: itemId }).then(res => { promiseMethods('/kylin-recommend-active/getActiveById', 'post', { mid: itemId }).then(res => {
console.log('res', res)
if (res) { if (res) {
list = res.list list = res.list
...@@ -391,6 +390,9 @@ ...@@ -391,6 +390,9 @@
setTimeout(() => { setTimeout(() => {
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 () {
$('#listRemoteSearch' + (i + 1) + ' input').attr('value', '')
})
} }
}, 500) }, 500)
...@@ -406,8 +408,6 @@ ...@@ -406,8 +408,6 @@
} }
}, 800) }, 800)
} else { } else {
layer.msg(res.message) layer.msg(res.message)
} }
...@@ -478,7 +478,7 @@ ...@@ -478,7 +478,7 @@
// 只有一组,可添加 // 只有一组,可添加
if (dynamicDomLength) { if (dynamicDomLength >= 0) {
$('.sortable-list').append(dynamicAddDom) $('.sortable-list').append(dynamicAddDom)
setTimeout(() => { setTimeout(() => {
...@@ -488,6 +488,13 @@ ...@@ -488,6 +488,13 @@
}, 500) }, 500)
setTimeout(() => {
$(`#listActiveType${dynamicDomLength+1}`).change(function () {
$('#listRemoteSearch' + (dynamicDomLength+1) + ' input').attr('value', '')
})
}, 800)
} else { } else {
layer.msg('不能添加') layer.msg('不能添加')
} }
...@@ -554,7 +561,6 @@ ...@@ -554,7 +561,6 @@
function searchAjax (val, index) { function searchAjax (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) {
...@@ -639,8 +645,6 @@ ...@@ -639,8 +645,6 @@
status: Number($("#status").find("option:selected").val()) status: Number($("#status").find("option:selected").val())
} }
console.log('_params', _params)
// 修改活动 // 修改活动
promiseMethods('/kylin-recommend-active/updateKylinRecommendActive','post', JSON.stringify(_params), 'application/json').then(res => { promiseMethods('/kylin-recommend-active/updateKylinRecommendActive','post', JSON.stringify(_params), 'application/json').then(res => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment