Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
hager
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-12-12 12:50:11 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
24929d0de697af06952ca277fb9691e40e5f72d4
24929d0d
1 parent
a1bf0b61
修改新闻中心路由参数跳转操作
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
19 deletions
src/route.js
src/views/index.vue
src/views/news/detail.vue
src/views/news/index.vue
src/views/search.vue
src/route.js
View file @
24929d0
/*
* @Date: 2024-08-26 10:42:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-12-1
0 16:01:0
0
* @LastEditTime: 2024-12-1
2 12:47:3
0
* @FilePath: /hager/src/route.js
* @Description: 文件描述
*/
...
...
@@ -141,7 +141,7 @@ export default [{
},
children
:
[]
},
{
path
:
'/news/detail'
,
path
:
'/news/detail
/:id
'
,
name
:
'新闻详情'
,
component
:
()
=>
import
(
'@/views/news/detail'
),
meta
:
{
...
...
src/views/index.vue
View file @
24929d0
<!--
* @Date: 2024-08-27 10:06:30
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-12-1
1 15:16:27
* @LastEditTime: 2024-12-1
2 12:48:04
* @FilePath: /hager/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -308,10 +308,7 @@ export default {
},
goToNew (v) {
this.$router.push({
path: '/news/detail',
query: {
id: v.id
}
path: `/news/detail/${v.id}`,
});
},
goToNews () {
...
...
src/views/news/detail.vue
View file @
24929d0
<!--
* @Date: 2024-10-18 12:06:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-12-
04 18:16:02
* @LastEditTime: 2024-12-
12 12:49:20
* @FilePath: /hager/src/views/news/detail.vue
* @Description: 文件描述
-->
...
...
@@ -52,7 +52,7 @@ export default {
}
},
async mounted () {
const { code, data } = await getNewsDetailAPI({ id: this.$route.
query
.id });
const { code, data } = await getNewsDetailAPI({ id: this.$route.
params
.id });
if (code) {
this.title = data.post_title;
this.content = data.product_advantages;
...
...
src/views/news/index.vue
View file @
24929d0
<!--
* @Date: 2024-10-18 12:05:44
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-12-
03 16:26:23
* @LastEditTime: 2024-12-
12 12:48:45
* @FilePath: /hager/src/views/news/index.vue
* @Description: 文件描述
-->
...
...
@@ -87,10 +87,7 @@ export default {
methods: {
goToNew (v) {
this.$router.push({
path: '/news/detail',
query: {
id: v.id
}
path: `/news/detail/${v.id}`,
});
},
async getMore () {
...
...
src/views/search.vue
View file @
24929d0
<!--
* @Date: 2024-10-20 16:57:48
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-12-
04 16:00:08
* @LastEditTime: 2024-12-
12 12:48:21
* @FilePath: /hager/src/views/search.vue
* @Description: 文件描述
-->
...
...
@@ -238,10 +238,7 @@ export default {
},
goToNews (id) {
this.$router.push({
path: '/news/detail',
query: {
id: id
}
path: `/news/detail/${id}`,
});
},
goToDetail (v) { // 跳转产品详情
...
...
Please
register
or
login
to post a comment