|
@@ -11,7 +11,15 @@
|
|
|
{{ data.createTime }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="markdown-body" v-html="data.content"></div>
|
|
|
+ <div v-if="data.type==2" class="markdown-body">
|
|
|
+ <div class="userInfo">
|
|
|
+ <el-avatar fit="fill" :size="65" :src="avatarUrl"></el-avatar>
|
|
|
+ <div style="text-align: center;font-size: 16px;font-weight: 600;">{{ dataInfo.userName }}</div>
|
|
|
+ </div>
|
|
|
+ <img src="./../../assets/image/birthday.png">
|
|
|
+ </div>
|
|
|
+ <div v-else class="markdown-body" v-html="data.content"></div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
<SiderInfo></SiderInfo>
|
|
@@ -19,7 +27,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { msgInfo } from "@/api/allApi";
|
|
|
+import { msgInfo,useInfo } from "@/api/allApi";
|
|
|
import SiderInfo from '@/components/SiderInfo.vue'
|
|
|
export default{
|
|
|
components: {
|
|
@@ -28,12 +36,21 @@ export default{
|
|
|
data() {
|
|
|
return {
|
|
|
data:{},
|
|
|
+ dataInfo:{},
|
|
|
+ avatarUrl: "",
|
|
|
};
|
|
|
},
|
|
|
created(){
|
|
|
+ this.getUserInfo();
|
|
|
this.getDataInfo(this.$route.query.id);
|
|
|
},
|
|
|
methods:{
|
|
|
+ getUserInfo(){
|
|
|
+ useInfo().then(response=>{
|
|
|
+ this.dataInfo = response.data.data;
|
|
|
+ this.avatarUrl = this.dataInfo.httpFile + this.dataInfo.headImage;
|
|
|
+ })
|
|
|
+ },
|
|
|
getDataInfo(id){
|
|
|
msgInfo({msgId:id}).then(response => {
|
|
|
this.data = response.data.data;
|
|
@@ -43,6 +60,16 @@ export default{
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
+.userInfo{
|
|
|
+ width: 65px;
|
|
|
+ position: absolute;
|
|
|
+ top: 37%;
|
|
|
+ left: 46%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-content: center;
|
|
|
+}
|
|
|
.timeline-container{
|
|
|
margin: 0 auto;
|
|
|
}
|