Commit 99d564e1 authored by zhanglw's avatar zhanglw

调整

parent 2b1b761c
......@@ -21,7 +21,7 @@
<el-dropdown placement="bottom">
<div class="btn-b" :class="currentProductTypeObj===item?'active':''">{{ item.label }}</div>
<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;">
{{ t.label }}
</el-dropdown-item>
......
......@@ -178,10 +178,11 @@ export default {
},
mounted() {
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)
}
if (this.$route.query) {
if (this.$route.query && JSON.stringify(this.$route.query) !== '{}') {
this.query = Object.assign(this.query, this.$route.query)
}
})
......
......@@ -231,10 +231,10 @@ export default {
},
mounted() {
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)
}
if (this.$route.query) {
if (this.$route.query && Object.keys(this.$route.query).length) {
this.query = Object.assign(this.query, this.$route.query)
}
HttpReq.webClientApi.homePageGetSearch({
......
......@@ -180,7 +180,7 @@ export default {
},
mounted() {
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)
}
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