Retired/pages/home/detail.vue

71 lines
1.3 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<!-- 首页/详情页 -->
<!-- h5 滚动穿透不需要处理wxapp 需要 使用 page-meta 组件配合阻止滚动穿透 -->
<page-meta :page-style="'overflow:'+(showShare?'hidden':'visible')"></page-meta>
<view class="detail">
<!-- 详细信息 -->
<info-list :item="info" isDetail @mark="handleMark" @comment="handleComment" @share="handleShare"
@follow="handleFollow">
<view v-if="info.content" class="text-30 my-20 text-gray-600">
<u-parse :content="info.content"></u-parse>
</view>
</info-list>
</view>
</template>
<script>
import InfoList from "@/pages/home/cpns/info-list.vue"
import {
assetInfo
} from '@/api/train.js'
export default {
components: {
InfoList,
},
data() {
return {
info: {},
assets_id: ''
}
},
onLoad(e) {
this.assets_id = e.assets_id
this.getAssetInfo()
},
methods: {
getAssetInfo() {
uni.showLoading({
title: '加载中...'
})
assetInfo({
id: this.assets_id
}).then(res => {
uni.hideLoading()
this.info = res.data
})
}
},
}
</script>
<style lang="scss" scoped>
.detail {
.comment {
display: flex;
margin: 20rpx;
.comment-text {
max-width: calc(100vw - 160rpx);
}
.comment-replay {
height: 40rpx;
}
}
.bottom-input {
height: 100rpx;
}
}
</style>