1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <template>
- <view class="detail_con">
- <view class="title">{{info.title}}</view>
- <view class="infobox">
- <view class="staff" v-if="info.staff">
- <image :src="info.staff.img" class="staffimg" mode=""></image>
- <view class="staffname">{{info.staff.name}}</view>
- </view>
- <view class="time">{{info.createtime}}</view>
- </view>
- <view class="content" v-html="info.content"></view>
- </view>
- </template>
- <script>
- import { netArticleDetail, netArticleNumber } from '@/api/api.js'
-
- export default{
- data() {
- return{
- id:'',
- info:{},
- comList:[],
- content:''
- }
- },
- onLoad(options) {
- this.id = options.id
- this.getDetail()
- //文章点击次数
- this.getAddNumber()
- },
- methods:{
- getAddNumber() {
- netArticleNumber({id:this.id}).then(res=>{})
- },
- getDetail() {
- netArticleDetail({id:this.id}).then(res=>{
- this.info = res.data
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .detail_con{
- padding:24rpx;
- .title{
- font-size:34rpx;
- color:#333333;
- margin-bottom:35rpx;
- }
- .infobox{
- display: flex;
- justify-content: flex-start;
- align-items: center;
- margin-bottom:24rpx;
- .staff{
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .staffimg{
- width:50rpx;
- height:50rpx;
- border-radius: 50%;
- margin-right:24rpx;
- }
- .staffname{
- font-size:26rpx;
- color:#999999;
- }
- }
- .time{
- font-size:26rpx;
- color:#999999;
- }
- }
- .content{
- font-size:30rpx;
- }
- }
- </style>
|