|
@@ -0,0 +1,89 @@
|
|
|
+<template>
|
|
|
+ <div class="profile-detail">
|
|
|
+ <div class="header">
|
|
|
+ <div class="back" @click="goBack">
|
|
|
+ <img src="@/assets/back.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="title">央企文化</div>
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <div class="title">{{newsDetail.title}}</div>
|
|
|
+ <div class="content" v-html="newsDetail.content"></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getNewsDetail } from '@/api/home';
|
|
|
+export default {
|
|
|
+ name: 'ProfileDetail',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ newsDetail: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ goBack() {
|
|
|
+ this.$router.go(-1)
|
|
|
+ },
|
|
|
+ async getNewsDetail() {
|
|
|
+ const formData = new FormData();
|
|
|
+ formData.append('id', 8)
|
|
|
+ const res = await getNewsDetail(formData)
|
|
|
+ this.newsDetail = res.data
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getNewsDetail()
|
|
|
+ console.log(this.newsDetail);
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.profile-detail {
|
|
|
+ min-height: 100vh;
|
|
|
+ background-color: #f5f5f5;
|
|
|
+
|
|
|
+ .header {
|
|
|
+ position: relative;
|
|
|
+ height: 44px;
|
|
|
+ background-color: #fff;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ border-bottom: 1px solid #eee;
|
|
|
+
|
|
|
+ .back {
|
|
|
+ position: absolute;
|
|
|
+ left: 15px;
|
|
|
+ font-size: 20px;
|
|
|
+ img{
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .content{
|
|
|
+ padding: 10px;
|
|
|
+ .title{
|
|
|
+ margin-bottom: 10px;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+ .content{
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|