Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vue-ssr
Project
Project
Details
Activity
Releases
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
lixy
vue-ssr
Commits
072595d6
Commit
072595d6
authored
Sep 20, 2019
by
linjw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改旅游搜索
parent
fd0af2a7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
22 deletions
+28
-22
menu.vue
components/menu.vue
+18
-21
findTour.vue
pages/findList/findTour.vue
+10
-1
No files found.
components/menu.vue
View file @
072595d6
...
...
@@ -79,11 +79,12 @@
</nuxt-link>
<el-input
placeholder=
"车型/旅游路线/营地/活动/新闻/子公司"
v-model=
"listQuery.keyword"
class=
"input-with-select menu-select"
>
<el-select
v-model=
"select"
slot=
"prepend"
placeholder=
"综合"
style=
"width:90px"
>
<el-option
v-for=
"menu in findList"
:key=
"menu.id"
:label=
"menu.name"
:value=
"menu.
value
"
style=
"width:90px"
>
<nuxt-link
:to=
"menu.link"
style=
"color:#666"
>
{{
menu
.
name
}}
</nuxt-link>
<el-option
v-for=
"menu in findList"
:key=
"menu.id"
:label=
"menu.name"
:value=
"menu.
link
"
style=
"width:90px"
>
{{
menu
.
name
}}
</el-option>
</el-select>
<el-button
slot=
"append"
style=
"width:88px;height:44px"
@
click=
"findTo()"
>
搜索
</el-button>
<el-button
slot=
"append"
style=
"width:88px;height:44px"
@
click=
"findTo()"
><nuxt-link
:to=
'this.select'
>
搜索
</nuxt-link></el-button>
<!--
<el-button
slot=
"append"
style=
"width:88px;height:44px"
@
click=
"findTo()"
>
搜索
</el-button>
-->
</el-input>
<!--
<ul
class=
"users"
>
<li
v-for=
"menu in menuList"
:key=
"menu.id"
>
...
...
@@ -143,15 +144,15 @@ export default {
vehicleType
:
[],
childType
:[],
visibleMap
:
false
,
select
:
"
综合
"
,
select
:
"
/findList/all
"
,
findList
:[
{
id
:
1
,
value
:
"
1
"
,
name
:
"综合"
,
link
:
"/findList/all"
},
{
id
:
2
,
value
:
"
2
"
,
name
:
"车型"
,
link
:
"/findList/findVehicle"
},
{
id
:
3
,
value
:
"
3
"
,
name
:
"旅游"
,
link
:
"/findList/findTour"
},
{
id
:
4
,
value
:
"
4
"
,
name
:
"营地"
,
link
:
"/findList/findCampsite"
},
{
id
:
5
,
value
:
"
5
"
,
name
:
"活动"
,
link
:
"/findList/findActivity"
},
{
id
:
6
,
value
:
"
6
"
,
name
:
"新闻"
,
link
:
"/findList/findNew"
},
{
id
:
7
,
value
:
"
7
"
,
name
:
"子公司"
,
link
:
"/findList/findCompany"
}
{
id
:
1
,
value
:
""
,
name
:
"综合"
,
link
:
"/findList/all"
},
{
id
:
2
,
value
:
"
vehicle
"
,
name
:
"车型"
,
link
:
"/findList/findVehicle"
},
{
id
:
3
,
value
:
"
tour
"
,
name
:
"旅游"
,
link
:
"/findList/findTour"
},
{
id
:
4
,
value
:
"
campsite
"
,
name
:
"营地"
,
link
:
"/findList/findCampsite"
},
{
id
:
5
,
value
:
"
activity
"
,
name
:
"活动"
,
link
:
"/findList/findActivity"
},
{
id
:
6
,
value
:
"
news
"
,
name
:
"新闻"
,
link
:
"/findList/findNew"
},
{
id
:
7
,
value
:
"
company
"
,
name
:
"子公司"
,
link
:
"/findList/findCompany"
}
],
listQuery
:
{
type
:
""
,
...
...
@@ -194,16 +195,12 @@ export default {
leave
()
{
this
.
visibleMap
=
false
;
},
async
findTo
()
{
let
{
data
:
{
data
}
}
=
await
axios
.
get
(
`/api/uccn/app/unauth/search?type=
${
this
.
listQuery
.
type
}
&keyword=
${
this
.
listQuery
.
keyword
}
&page=
${
this
.
listQuery
.
page
}
&limit=
${
this
.
listQuery
.
limit
}
`
);
console
.
log
(
data
);
if
(
data
.
news
.
totalCount
!=
0
){
this
.
$router
.
push
(
'/findList/findNew'
)
}
findTo
(){
console
.
log
(
this
.
select
);
console
.
log
(
this
.
listQuery
.
keyword
);
this
.
$emit
(
'childByValue'
,
this
.
listQuery
.
keyword
);
}
}
};
...
...
pages/findList/findTour.vue
View file @
072595d6
...
...
@@ -4,7 +4,7 @@
<div
class=
"main-container"
>
<div
class=
"wrap"
style=
"background:#fff"
>
<find-menu></find-menu>
<find-menu
@
childByValue=
"childByValue"
></find-menu>
<div>
<div
class=
"margin-Top clearfix title-find"
>
...
...
@@ -67,7 +67,9 @@ export default {
findMenu
},
created
()
{
this
.
getAll
();
},
methods
:
{
async
getAll
()
{
...
...
@@ -93,6 +95,13 @@ export default {
this
.
listQuery
.
page
=
1
;
this
.
getAll
();
},
childByValue
(
childValue
)
{
// childValue就是子组件传过来的值
console
.
log
(
childValue
);
this
.
listQuery
.
keyword
=
childValue
;
this
.
getAll
();
}
}
};
</
script
>
...
...
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