Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
liyeyun
Project
Project
Details
Activity
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
cfld-frontend
liyeyun
Commits
a8f5d558
Commit
a8f5d558
authored
Dec 15, 2023
by
王玉鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 首页产业分类搜索逻辑修改
parent
df1ffc78
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
HomeView.vue
src/views/home/HomeView.vue
+12
-3
IndustryCategory.vue
src/views/industry/IndustryCategory.vue
+10
-2
No files found.
src/views/home/HomeView.vue
View file @
a8f5d558
...
...
@@ -271,11 +271,20 @@ const toList = () => {
[
'provinceName'
,
selectedCity
.
value
],
].
filter
(([,
v
])
=>
!!
v
),
);
const
query
:
any
=
{};
// 产业分类
if
(
name
===
RouteName
.
industryCategory
)
{
if
(
searchParams
.
name
)
{
query
.
category
=
searchParams
.
name
;
}
Reflect
.
deleteProperty
(
searchParams
,
'name'
);
}
query
.
searchParams
=
!
isEmpty
(
searchParams
)
?
JSON
.
stringify
(
searchParams
)
:
undefined
;
open
({
name
,
query
:
{
searchParams
:
!
isEmpty
(
searchParams
)
?
JSON
.
stringify
(
searchParams
)
:
undefined
,
},
query
,
});
};
...
...
src/views/industry/IndustryCategory.vue
View file @
a8f5d558
...
...
@@ -114,6 +114,7 @@ import CarrierListItemView from '@/components/list/list-carrier-item.vue';
import
LandListItemView
from
'@/components/list/list-land-item.vue'
;
import
ParkItem
from
'@/components/list/ParkItem.vue'
;
import
FilterView
from
'@/components/filter/filter-view.vue'
;
import
{
useRoute
}
from
'vue-router'
;
type
tabItem
=
{
name
:
string
;
...
...
@@ -122,8 +123,15 @@ type tabItem = {
apiURL
:
RequestUrl
;
};
const
searchKey
=
ref
<
string
>
(
''
);
const
keyWords
=
ref
<
string
>
(
''
);
const
route
=
useRoute
();
/** 初始的分类值 */
const
getInitCategory
=
()
=>
{
return
(
route
.
query
.
category
as
string
)
||
''
;
};
const
searchKey
=
ref
<
string
>
(
getInitCategory
());
const
keyWords
=
ref
<
string
>
(
searchKey
.
value
);
/** 更改target 不会触发响应式更新 */
const
currentUrl
=
shallowRef
({
target
:
RequestUrl
.
developZoneList
});
const
directionList
=
ref
<
any
[]
>
([]);
...
...
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