mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-18 00:45:54 +08:00
feat: ✨ pc端新增专题功能
This commit is contained in:
37
buyer/src/pages/Topic.vue
Normal file
37
buyer/src/pages/Topic.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div v-if="pageData">
|
||||
<Index :page-data="pageData" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Index from './Index.vue'
|
||||
import { getTopicData } from '@/api/index'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageData: ""
|
||||
}
|
||||
},
|
||||
components: { Index },
|
||||
mounted() {
|
||||
// 接收id进行查询
|
||||
const id = this.$route.query.id
|
||||
this.init(id)
|
||||
},
|
||||
methods: {
|
||||
async init(id) {
|
||||
const res = await getTopicData(id)
|
||||
if (res.success) {
|
||||
console.log(res.result)
|
||||
// 直接复用首页就行
|
||||
if (res.result.pageData) {
|
||||
this.pageData = JSON.parse(res.result.pageData)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Reference in New Issue
Block a user