hookehuyr

fix 跳转路径新增时间戳避免报错

<!--
* @Date: 2024-09-26 13:42:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-26 14:40:43
* @LastEditTime: 2024-10-29 14:57:15
* @FilePath: /hager/src/components/common/hagerFooter.vue
* @Description: 文件描述
-->
......@@ -192,7 +192,8 @@ export default {
this.$router.push({
path: '/product/index',
query: {
id: item.id
id: item.id,
timestamp: Date.now()
}
});
},
......@@ -200,13 +201,15 @@ export default {
this.$router.push({
path: '/solution/detail',
query: {
id: item.id
id: item.id,
timestamp: Date.now()
}
});
},
goToCorp (item) {
this.$router.push({
path: item.link,
timestamp: Date.now()
})
}
}
......
<!--
* @Date: 2024-09-26 13:42:11
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-28 18:11:48
* @LastEditTime: 2024-10-29 14:56:57
* @FilePath: /hager/src/components/common/hagerHeader.vue
* @Description: 文件描述
-->
......@@ -323,6 +323,7 @@ export default {
path: '/product/index',
query: {
id: item.id,
timestamp: Date.now()
}
});
......@@ -332,7 +333,8 @@ export default {
this.$router.push({
path: '/product/detail',
query: {
id: item.id
id: item.id,
timestamp: Date.now()
}
});
this.closeMenu();
......
......@@ -320,7 +320,8 @@ export default {
this.$router.push({
path: '/solution/detail',
query: {
id: v.id
id: v.id,
timestamp: Date.now()
}
});
},
......@@ -328,7 +329,8 @@ export default {
this.$router.push({
path: '/product/index',
query: {
id: v.first_child_id
id: v.first_child_id,
timestamp: Date.now()
}
});
},
......
<!--
* @Date: 2024-09-27 16:53:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-29 14:48:43
* @LastEditTime: 2024-10-29 14:58:08
* @FilePath: /hager/src/views/product/index.vue
* @Description: 文件描述
-->
......@@ -82,11 +82,16 @@ export default {
},
watch: {
// 监听路由参数变化时,更新输入框的值
async '$route.query.id' (val, old) {
'$route.query.id' (val, old) {
if (old !== val) {
this.is_search = false;
this.getMain();
}
},
'$route.query.timestamp' (val, old) {
this.is_search = false;
this.getMain();
},
},
methods: {
handleChange(val) {
......