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
180165a4
Commit
180165a4
authored
Sep 20, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页综合搜索
parent
072595d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
17 deletions
+21
-17
menu.vue
components/menu.vue
+7
-5
all.vue
pages/findList/all.vue
+3
-0
findTour.vue
pages/findList/findTour.vue
+9
-10
_id.vue
pages/tourDetails/_id.vue
+2
-2
No files found.
components/menu.vue
View file @
180165a4
...
...
@@ -44,7 +44,7 @@
:key=
"item.id"
style=
"width:70px;margin-right:10px"
>
{{
item
.
name
}}
</li>
</ul>
</div>
<div
class=
"margin-Top"
>
...
...
@@ -83,7 +83,7 @@
{{
menu
.
name
}}
</el-option>
</el-select>
<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-button
slot=
"append"
style=
"width:88px;height:44px"
@
click=
"findTo()"
>
搜索
</el-button>
-->
</el-input>
<!--
<ul
class=
"users"
>
...
...
@@ -160,10 +160,11 @@ export default {
page
:
""
,
limit
:
""
,
},
};
},
created
()
{
this
.
listQuery
.
keyword
=
this
.
$route
.
query
.
keywords
;
let
router
=
this
.
$route
.
path
;
this
.
router
=
router
;
this
.
getType
();
...
...
@@ -181,7 +182,7 @@ export default {
);
this
.
vehicleType
=
child
.
data
.
data
;
console
.
log
(
this
.
childType
);
},
enter
()
{
var
test
=
window
.
location
.
pathname
;
...
...
@@ -196,9 +197,10 @@ export default {
this
.
visibleMap
=
false
;
},
findTo
(){
this
.
$router
.
push
({
path
:
this
.
select
,
query
:
{
keywords
:
this
.
listQuery
.
keyword
}
});
console
.
log
(
this
.
select
);
console
.
log
(
this
.
listQuery
.
keyword
);
this
.
$emit
(
'childByValue'
,
this
.
listQuery
.
keyword
);
}
...
...
pages/findList/all.vue
View file @
180165a4
...
...
@@ -239,10 +239,13 @@ export default {
footerModal
},
created
()
{
console
.
log
(
this
);
this
.
listQuery
.
keyword
=
this
.
$route
.
query
.
keywords
;
this
.
getAll
();
},
methods
:
{
async
getAll
()
{
// this.listQuery.keyword = this.$route.query.keywords;
let
{
data
:
{
data
}
}
=
await
axios
.
get
(
...
...
pages/findList/findTour.vue
View file @
180165a4
...
...
@@ -3,9 +3,9 @@
<menu-modal></menu-modal>
<div
class=
"main-container"
>
<div
class=
"wrap"
style=
"background:#fff"
>
<find-menu
@
childByValue=
"childByValue"
></find-menu>
<div>
<div
class=
"margin-Top clearfix title-find"
>
<div
style=
"font-size:18px;font-weight:Bold"
>
房车旅游
</div>
...
...
@@ -29,9 +29,9 @@
:page-sizes=
"[10,20,30, 50]"
:page-size=
"listQuery.limit"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"totalCount"
></el-pagination>
</div>
</div>
</div>
<footer-modal></footer-modal>
...
...
@@ -48,10 +48,10 @@ export default {
data
()
{
return
{
router
:
"/"
,
totalCount
:
0
,
tourDetail
:
[],
listQuery
:
{
type
:
"tour"
,
keyword
:
""
,
...
...
@@ -67,9 +67,8 @@ export default {
findMenu
},
created
()
{
this
.
getAll
();
},
methods
:
{
async
getAll
()
{
...
...
@@ -98,7 +97,7 @@ export default {
childByValue
(
childValue
)
{
// childValue就是子组件传过来的值
console
.
log
(
childValue
);
this
.
listQuery
.
keyword
=
childValue
;
this
.
getAll
();
}
...
...
pages/tourDetails/_id.vue
View file @
180165a4
...
...
@@ -209,7 +209,7 @@ export default {
if
(
!
user
)
{
return
error
({
message
:
'User not found'
,
statusCode
:
404
})
}
let
tempBannerData
=
await
axios
.
get
(
env
.
host
+
'/api/uccn/random/list/app/unauth/get?type=2'
);
let
tempBannerData
=
await
axios
.
get
(
'/api/uccn/random/list/app/unauth/get?type=2'
);
let
hot
=
tempBannerData
.
data
.
data
;
hot
.
map
(
function
(
item
){
item
.
link
=
encodeURI
(
'/tourDetails/'
+
item
.
id
+
'?name='
+
item
.
name
);
...
...
@@ -217,7 +217,7 @@ export default {
});
console
.
log
(
hot
);
let
noticeData
=
await
axios
.
get
(
env
.
host
+
'/api/app/cofig/app/unauth/types?types=14'
);
let
noticeData
=
await
axios
.
get
(
'/api/app/cofig/app/unauth/types?types=14'
);
let
notice
=
noticeData
.
data
.
data
;
return
{
detail
:
user
,
hotList
:
hot
,
notice
:
notice
}
},
...
...
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