|
@@ -857,6 +857,8 @@ export default function () {
|
|
|
* @param item
|
|
|
*/
|
|
|
function onSelectedFilter (item) {
|
|
|
+ // 动态插入的存储的筛选条件
|
|
|
+ const _expand = getExpandSearchParams()
|
|
|
const { isPay } = item
|
|
|
// 恢复选中状态
|
|
|
if (isFree?.value && isPay) {
|
|
@@ -891,13 +893,13 @@ export default function () {
|
|
|
notkey: '',
|
|
|
buyer: '',
|
|
|
winner: '',
|
|
|
- agency: ''
|
|
|
+ agency: '',
|
|
|
})
|
|
|
- restoreFilter(params, 'saveBack')
|
|
|
+ restoreFilter(params, 'saveBack', {_expand})
|
|
|
historyFilterDialogVisible.value = false
|
|
|
})
|
|
|
} else {
|
|
|
- restoreFilter(item, 'saveBack')
|
|
|
+ restoreFilter(item, 'saveBack', {_expand})
|
|
|
}
|
|
|
}
|
|
|
function restoreFilter (viewFilter, type, expandFilter) {
|
|
@@ -912,8 +914,8 @@ export default function () {
|
|
|
Object.assign(resultFilter, expandFilter)
|
|
|
}
|
|
|
doChangeTab({ key: resultFilter.searchGroup })
|
|
|
+ let _expand = resultFilter._expand || {}
|
|
|
|
|
|
- const _expand = resultFilter._expand || {}
|
|
|
filterState.value = {
|
|
|
bidField: isBidField ? 'medical' : '',
|
|
|
publishTime: resultFilter.publishTime,
|
|
@@ -1322,7 +1324,9 @@ export default function () {
|
|
|
if(urlKeywords) {
|
|
|
expandFilter.input = urlKeywords
|
|
|
}
|
|
|
- restoreFilter(JSON.parse(params), 'localBack', expandFilter)
|
|
|
+ // 身份切换时候,本地缓存的上次筛选条件有融创等动态拓展筛选条件,但是切换到的身份没有时候,需要移除这些动态筛选条件
|
|
|
+ const jParams = JSON.parse(params)
|
|
|
+ restoreFilter(jParams, 'localBack', expandFilter)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1361,7 +1365,10 @@ export default function () {
|
|
|
if(isVip.value && !jParams) {
|
|
|
// 付费用户,优先恢复本地缓存,本地无缓存,则恢复已存筛选第一条数据
|
|
|
if(Array.isArray(arr) && arr.length > 0) {
|
|
|
- const expandFilter = {}
|
|
|
+ const _expand = getExpandSearchParams()
|
|
|
+ const expandFilter = {
|
|
|
+ _expand: _expand,
|
|
|
+ }
|
|
|
if(urlSelectType) {
|
|
|
expandFilter.selectType = urlSelectType.split(',')
|
|
|
}
|
|
@@ -1381,6 +1388,16 @@ export default function () {
|
|
|
firstSearch()
|
|
|
}
|
|
|
}
|
|
|
+ // 获取本地缓存的动态插入的筛选条件
|
|
|
+ function getExpandSearchParams () {
|
|
|
+ // 动态获取存储的筛选条件
|
|
|
+ const expandSearchParams = localStorage.getItem('search_bidding_expandSearchParams')
|
|
|
+ let _expand = {}
|
|
|
+ if(expandSearchParams) {
|
|
|
+ _expand = JSON.parse(expandSearchParams)
|
|
|
+ }
|
|
|
+ return _expand
|
|
|
+ }
|
|
|
|
|
|
function firstSearch () {
|
|
|
return doQuery({}, 'firstSearch')
|
|
@@ -1540,6 +1557,7 @@ export default function () {
|
|
|
toggleBlurModeTip,
|
|
|
doToggleSearchBlurMode,
|
|
|
recommendCardCircleModel,
|
|
|
- getWhiteList
|
|
|
+ getWhiteList,
|
|
|
+ storageConfig
|
|
|
}
|
|
|
}
|