Commit 180165a4 authored by lixy's avatar lixy

首页综合搜索

parent 072595d6
......@@ -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">
......@@ -164,6 +164,7 @@ export default {
};
},
created() {
this.listQuery.keyword = this.$route.query.keywords;
let router = this.$route.path;
this.router = router;
this.getType();
......@@ -196,6 +197,7 @@ 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);
......
......@@ -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(
......
......@@ -67,7 +67,6 @@ export default {
findMenu
},
created() {
this.getAll();
},
......
......@@ -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}
},
......
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