mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 17:35:53 +08:00
新增文库详情页面,转门为审核使用
This commit is contained in:
88
buyer/src/pages/article/detail.vue
Normal file
88
buyer/src/pages/article/detail.vue
Normal file
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="wrapper">
|
||||
<div class="nav" @click="back">
|
||||
<img src="@/assets/images/logo2.png" alt="" class="logo" />
|
||||
<div class="title">{{ detail.title }}</div>
|
||||
</div>
|
||||
<div v-html="detail.content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { articleDetail } from "@/api/common.js";
|
||||
const config = require("@/config/index");
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
detail: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
this.$router.push("/");
|
||||
},
|
||||
// 初始化文章
|
||||
init() {
|
||||
const id = this.$route.query.id;
|
||||
|
||||
articleDetail(id).then((res) => {
|
||||
if (res.success) {
|
||||
this.detail = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.logo {
|
||||
max-width: 200px;
|
||||
}
|
||||
.box {
|
||||
min-height: 100vh;
|
||||
width: 1200px;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
padding: 32px;
|
||||
}
|
||||
.wrapper {
|
||||
width: 1200px;
|
||||
min-height: 600px;
|
||||
padding: 32px;
|
||||
background: #fff;
|
||||
}
|
||||
.nav {
|
||||
text-align: center;
|
||||
font-size: 21px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.title {
|
||||
text-align: center;
|
||||
|
||||
font-size: 21px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
// iphone
|
||||
@media screen and (max-width: 767px) {
|
||||
.box {
|
||||
min-height: 100vh;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
min-height: 600px;
|
||||
padding: 0 16px;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user