MrShi
11 小时以前 e7e2a77a824a0e6a80a3bc7f221c83db8223bf0c
mini-program/pages/article-details/article-details.vue
@@ -1,13 +1,13 @@
<template>
   <view class="box">
      <view class="box-title">仿生学设计方法在挖掘机斗齿设计中的应用</view>
      <view class="box-time">发布时间:2025-10-10 21:00:12</view>
   <view class="box" v-if="info">
      <view class="box-title">{{info.name}}</view>
      <view class="box-time">发布时间:{{info.createDate}}</view>
      <view class="box-content">
         <u-parse :content="content"></u-parse>
         <u-parse :content="info.content"></u-parse>
      </view>
      <view class="xian"></view>
      <view class="pl">
         <view class="pl-title">评论 2</view>
         <view class="pl-title">评论 {{info.commentCount || 0}}</view>
         <view class="pl-wu">
            <image src="/static/images/default_nocomment@2x.png" mode="widthFix"></image>
         </view>
@@ -129,13 +129,28 @@
   export default {
      data() {
         return {
            id: null,
            show: false,
            show1: false,
            info: null,
            content: ''
         }
      },
      onLoad(option) {
         this.id = option.id
         this.getDetails()
      },
      methods: {
         getDetails() {
            this.$u.api.getArticleDetail({
               id: this.id
            }).then(res => {
               if (res.code === 200) {
                  console.log(res)
                  this.info = res.data
               }
            })
         }
      }
   }
</script>