Commit 99d564e1 authored by zhanglw's avatar zhanglw

调整

parent 2b1b761c
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<el-dropdown placement="bottom"> <el-dropdown placement="bottom">
<div class="btn-b" :class="currentProductTypeObj===item?'active':''">{{ item.label }}</div> <div class="btn-b" :class="currentProductTypeObj===item?'active':''">{{ item.label }}</div>
<el-dropdown-menu slot="dropdown" style="width: 170px;text-align: center;"> <el-dropdown-menu slot="dropdown" style="width: 170px;text-align: center;">
<router-link v-for="(t,i) in subTypeOpts" :key="'st_'+i" :to="{'name':'hardware',params:{'type':currentProductTypeObj.value,'subType':t.value}}"> <router-link v-for="(t,i) in subTypeOpts" :key="'st_'+i" :to="{'name':'hardware',params:{'productType':currentProductTypeObj.value,'subProductType':t.value}}">
<el-dropdown-item style="font-size: 16px;padding: 5px;font-weight: bold;"> <el-dropdown-item style="font-size: 16px;padding: 5px;font-weight: bold;">
{{ t.label }} {{ t.label }}
</el-dropdown-item> </el-dropdown-item>
......
...@@ -178,10 +178,11 @@ export default { ...@@ -178,10 +178,11 @@ export default {
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$route.params) { console.log(this.$route.params, this.$route.query)
if (this.$route.params && JSON.stringify(this.$route.params) !== '{}') {
this.query = Object.assign(this.query, this.$route.params) this.query = Object.assign(this.query, this.$route.params)
} }
if (this.$route.query) { if (this.$route.query && JSON.stringify(this.$route.query) !== '{}') {
this.query = Object.assign(this.query, this.$route.query) this.query = Object.assign(this.query, this.$route.query)
} }
}) })
......
...@@ -231,10 +231,10 @@ export default { ...@@ -231,10 +231,10 @@ export default {
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$route.params) { if (this.$route.params && Object.keys(this.$route.params).length) {
this.query = Object.assign(this.query, this.$route.params) this.query = Object.assign(this.query, this.$route.params)
} }
if (this.$route.query) { if (this.$route.query && Object.keys(this.$route.query).length) {
this.query = Object.assign(this.query, this.$route.query) this.query = Object.assign(this.query, this.$route.query)
} }
HttpReq.webClientApi.homePageGetSearch({ HttpReq.webClientApi.homePageGetSearch({
......
...@@ -180,7 +180,7 @@ export default { ...@@ -180,7 +180,7 @@ export default {
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$route.query) { if (this.$route.query && Object.keys(this.$route.query).length) {
this.query = Object.assign(this.query, this.$route.query) this.query = Object.assign(this.query, this.$route.query)
} }
HttpReq.webClientApi.homePageGetSearch({ HttpReq.webClientApi.homePageGetSearch({
......
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