| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <template>
- <view>
- <video v-if="detail.type == 'VIDEO_TEXT'" class="works-video" @error="videoError" :src="detail.videoUrl"></video>
- <!-- <image v-else class="works-video" @click="$util.preview(detail.imageUrl)" :src="detail.imageUrl" mode="widthFix"></image> -->
-
- <view style="padding: 30rpx;">
- <u-parse :html="content" ></u-parse>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- content: '',
- detail: ''
- }
- },
- onLoad(options) {
- this.fetchDetail(options.id)
- },
- methods: {
- fetchDetail(id) {
- this.$api.activity.getStudyDetail({id: id}).then(res => {
- this.content = decodeURIComponent(res.data.data.content)
- this.detail = res.data.data
- uni.setNavigationBarTitle({
- title: this.detail.title
- })
- })
- }
- }
- }
- </script>
- <style>
- page {
- background-color: #FFFFFF;
- }
- .works-video {
- width: 100vw;
- height: 422rpx;
- }
- </style>
|