| | |
| | | |
| | | |
| | | <view class="article-content"> |
| | | <!-- <rich-text type="text" :nodes="demoHtml"></rich-text> --> |
| | | <video id="myVideo" v-if="video" :src="article.videoUrl"></video> |
| | | <view class="content-placeholder"> </view> |
| | | <video id="myVideo" class="video" v-if="video" :src="article.videoUrl" muted="false" @error="videoErrorCallback"></video> |
| | | <u-parse :content="content" @navigate="navigate"></u-parse> |
| | | </view> |
| | | |
| | |
| | | |
| | | <script> |
| | | import uParse from "@/components/feng-parse/parse.vue" |
| | | // import uParse from '@/components/gaoyia-parse/parse.vue' |
| | | // var graceRichText = require("../../components/richText/richText.js"); |
| | | |
| | | export default { |
| | | components:{ |
| | |
| | | if(that.article.videoUrl){ |
| | | that.video = true; |
| | | } |
| | | console.log(that.article,121); |
| | | console.log(that.article.videoUrl,123); |
| | | //详情标题 |
| | | uni.setNavigationBarTitle({ |
| | | title: that.article.title |
| | |
| | | }); |
| | | |
| | | }, |
| | | onReady: function (res) { |
| | | this.videoContext = uni.createVideoContext('myVideo') |
| | | onReady: function () { |
| | | this.videoContext = uni.createVideoContext("myVideo"); |
| | | }, |
| | | methods: { |
| | | videoErrorCallback: function(e) { |
| | | console.log(e) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | width: 94%; |
| | | border-bottom: 1px solid rgba(128,128,128,0.1); |
| | | |
| | | .content-placeholder{ |
| | | position: relative; |
| | | left: 30%; |
| | | background-color: #0078A8; |
| | | width: 30%; |
| | | height: 20%; |
| | | |
| | | .video{ |
| | | width: 100%; |
| | | } |
| | | } |
| | | </style> |