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

Commit 183839ff authored by sangchunxi's avatar sangchunxi

推荐活动edit 2

parent 8cebb2bd
......@@ -382,42 +382,44 @@
function searchAjax (val, index) {
let _selectVal = $("#listActiveType" + index).find("option:selected").val() // 当前子select
console.log('ajax', _selectVal)
let _params = {}
if (_selectVal === 1) {
_params['type'] = 1
_params['title'] = val
} else if (_selectVal === 2) { // 组合购
_params['title'] = val
} else if (_selectVal === 3) { // 演出
_params['status'] = '(3,6,7,9,10)'
_params['title'] = val
} else { // 商品
_params['name'] = 1
_params['title'] = val
}
$.ajax({
type: 'get',
url: ctx + affiliatedUrl[_selectVal - 1],
contentType: "application/json;charset=UTF-8",
data: _params,
success: function(res) {
let forData = _selectVal === 3 ? res.value : res.data
let _data = forData.map(item => {
if (_selectVal === 1) { // NFT
return { id: item.spuId, value: item.spuName }
} else if (_selectVal === 2) {
return { id: item.mixId, value: item.name }
} else if (_selectVal === 3) {
return { id: item.performancesId, value: item.title }
} else { // 商品
return { id: item.spuId, value: item.name }
}
})
search.update(_data)
if (_selectVal) {
let _params = {}
if (_selectVal === 1) {
_params['type'] = 1
_params['title'] = val
} else if (_selectVal === 2) { // 组合购
_params['title'] = val
} else if (_selectVal === 3) { // 演出
_params['status'] = '(3,6,7,9,10)'
_params['title'] = val
} else { // 商品
_params['name'] = 1
_params['title'] = val
}
})
$.ajax({
type: 'get',
url: ctx + affiliatedUrl[_selectVal],
contentType: "application/json;charset=UTF-8",
data: _params,
success: function(res) {
let forData = _selectVal === 3 ? res.value : res.data
let _data = forData.map(item => {
if (_selectVal === 1) { // NFT
return { id: item.spuId, value: item.spuName }
} else if (_selectVal === 2) {
return { id: item.mixId, value: item.name }
} else if (_selectVal === 3) {
return { id: item.performancesId, value: item.title }
} else { // 商品
return { id: item.spuId, value: item.name }
}
})
search.update(_data)
}
})
}
}
// 保存/更新
......
......@@ -420,6 +420,8 @@
// 监听 模糊搜索 list
let listRemoteSearch1 = new searchSelect('#listRemoteSearch1', [], function(val) {
console.log('activeTypeChangeValChild', activeTypeChangeValChild)
let _params = {}
if (activeTypeChangeValChild === 1) {
_params['type'] = 1
......@@ -540,6 +542,9 @@
// 设置 代入的 点击
$('#listActiveType1').find(`option[value=${index}]`).attr('selected', true)
activeTypeChangeValChild = index
currentChildUrl = affiliatedUrl[activeTypeChangeValChild]
}
......
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