Commit f2ba2c0d authored by 沈良进's avatar 沈良进

问题修复

parent d0c270fb
......@@ -188,7 +188,7 @@
@click="CommonJump('/index', {})"
/></div>
<!-- <div style="transform:scale(0.6,0.6)"> -->
<searchSf2 v-if="!(isHome ||isSearch)" :plugData="plugData"></searchSf2>
<searchSf2 v-if="!isHome" :plugData="plugData"></searchSf2>
<!-- </div> -->
<!-- pc -->
<div v-if="$q.platform.is.desktop">
......@@ -380,7 +380,7 @@ export default {
selectedArea: [],
selectedAreaId: "",
isHome: false,
isSearch: false,
isSearch: true,
};
},
watch: {
......@@ -398,7 +398,7 @@ export default {
handler: function (val, oldVal) {
console.log('val', val, oldVal)
this.isHome = val.path === "/" || val.path === "/index";
this.isSearch = val.path === "/search";
// this.isSearch = val.path === "/search";
},
// 深度观察监听
deep: true,
......@@ -416,7 +416,7 @@ export default {
this.isHome =
this.$router.history.current.path === "/" ||
this.$router.history.current.path === "/index";
this.isSearch = this.$router.history.current.path === "/search";
// this.isSearch = this.$router.history.current.path === "/search";
console.log(
'JSON.parse(window.localStorage.getItem("b2bUser"))',
JSON.parse(window.localStorage.getItem("b2bUser"))
......
......@@ -86,7 +86,8 @@
<div class="q-mb-sm text-weight-bold">歷史搜索</div>
<div class="row">
<div class="col overflow-hidden" style="height:36px">
<q-chip style="background:#f6f7f9;" @click="goSearchHandler(x)" clickable text-color="dark" class="cursor-pointer" :label="x" v-for="(x,i) in historys" :key="i" />
<template v-for="(x,i) in historys">
<q-chip v-if="x" style="background:#f6f7f9;" @click="goSearchHandler(x)" clickable text-color="dark" class="cursor-pointer" :label="x" :key="i" /></template>
</div>
<q-btn text-color="grey-6" icon="delete" class="q-py-none" dense size="sm" flat @click="clearHistorys">
<q-tooltip class="bg-dark" co>清空歷史</q-tooltip>
......@@ -328,6 +329,7 @@ export default {
created() {
},
mounted() {
this.isSearch = this.$router.history.current.path === "/search";
this.initAreaList()
var jObj = JSON.parse(window.localStorage.getItem('baseifo'));
const hotList = this.getHotList(jObj.AreaList)
......@@ -430,6 +432,9 @@ export default {
qsearchEndDate: this.searchEndDate,
areaId: item.Id
});
if(this.isSearch) {
window.location.reload()
}
},
//获取地区数据
getAera() {
......@@ -506,6 +511,9 @@ export default {
qsearchEndDate: this.searchEndDate,
});
this.showSplitPannel = false
if(this.isSearch) {
window.location.reload()
}
},
clearHistorys(){
this.historys =[]
......@@ -561,7 +569,7 @@ export default {
.banner-style9 .showbox {
position: absolute;
box-sizing: border-box;
width: 650px;
width: 650px !important;
height: 345px;
background: #fff;
left: 0;
......
......@@ -170,7 +170,8 @@
<div class="q-mb-sm text-weight-bold">歷史搜索</div>
<div class="row">
<div class="col overflow-hidden" style="height:36px">
<q-chip style="background:#f6f7f9;" @click="goSearchHandler(x)" clickable text-color="dark" class="cursor-pointer" :label="x" v-for="(x,i) in historys" :key="i" />
<template v-for="(x,i) in historys">
<q-chip v-if="x" style="background:#f6f7f9;" @click="goSearchHandler(x)" clickable text-color="dark" class="cursor-pointer" :label="x" :key="i" /></template>
</div>
<q-btn text-color="grey-6" icon="delete" class="q-py-none" dense size="sm" flat @click="clearHistorys">
<q-tooltip class="bg-dark" co>清空歷史</q-tooltip>
......
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