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

Commit 99edbfe7 authored by sangchunxi's avatar sangchunxi

优化 select 后 晴空input

parent d4830a4d
......@@ -382,6 +382,9 @@
setTimeout(() => {
for (let i = 0; i < list.length; i++) {
createListenerSearch(i + 1)
$(`#listActiveType${i+1}`).change(function () {
$('#listRemoteSearch' + (i + 1) + ' input').attr('value', '')
})
}
}, 500)
......@@ -456,7 +459,7 @@
// 只有一组,可添加
if (dynamicDomLength) {
if (dynamicDomLength >=0 ) {
console.log('dynamicDomLength', dynamicDomLength)
$('.sortable-list').append(dynamicAddDom)
......@@ -467,7 +470,14 @@
searchAjax(val, dynamicDomLength + 1)
})
}, 600)
}, 500)
setTimeout(() => {
$(`#listActiveType${dynamicDomLength+1}`).change(function () {
$('#listRemoteSearch' + (dynamicDomLength+1) + ' input').attr('value', '')
})
}, 800)
} else {
layer.msg('不能添加')
......
......@@ -364,7 +364,6 @@
if (itemId) {
// 请求数据
promiseMethods('/kylin-recommend-active/getActiveById', 'post', { mid: itemId }).then(res => {
console.log('res', res)
if (res) {
list = res.list
......@@ -391,6 +390,9 @@
setTimeout(() => {
for (let i = 0; i < list.length; i++) {
createListenerSearch(i + 1)
$(`#listActiveType${i+1}`).change(function () {
$('#listRemoteSearch' + (i + 1) + ' input').attr('value', '')
})
}
}, 500)
......@@ -406,8 +408,6 @@
}
}, 800)
} else {
layer.msg(res.message)
}
......@@ -478,7 +478,7 @@
// 只有一组,可添加
if (dynamicDomLength) {
if (dynamicDomLength >= 0) {
$('.sortable-list').append(dynamicAddDom)
setTimeout(() => {
......@@ -488,6 +488,13 @@
}, 500)
setTimeout(() => {
$(`#listActiveType${dynamicDomLength+1}`).change(function () {
$('#listRemoteSearch' + (dynamicDomLength+1) + ' input').attr('value', '')
})
}, 800)
} else {
layer.msg('不能添加')
}
......@@ -554,7 +561,6 @@
function searchAjax (val, index) {
let _selectVal = $("#listActiveType" + index).find("option:selected").val() // 当前子select val
if (_selectVal) {
let _params = {}
if (_selectVal == 1) {
......@@ -639,8 +645,6 @@
status: Number($("#status").find("option:selected").val())
}
console.log('_params', _params)
// 修改活动
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