|
|
- <template>
- <!-- 公告 -->
- <view class="page">
- <navbar :title="title" leftClick @leftClick="$utils.navigateBack" />
- <view style="padding: 20rpx;">
-
- <view class="videos">
- <view class="video"
- v-for="(item, index) in videos"
- :key="index">
- <video :src="item"></video>
- </view>
- </view>
-
- <uv-parse :content="notice"></uv-parse>
- </view>
- </view>
- </template>
-
- <script>
- export default {
- data() {
- return {
- notice : '',
- videos : [],
- id : 0,
- title : '公告',
- titles : ['公司介绍', '产品介绍', '关于我们', '其他'],
- }
- },
- onLoad({id, type}) {
- if(type){
- this.title = this.titles[type]
- }
- if(id){
- this.id = id
- this.getInfoIntroduce()
- }else{
- this.getRiceNoticeList()
- }
- },
- methods: {
- // 获取公告
- getRiceNoticeList(){
- this.$api('getRiceNoticeList', res => {
- if(res.code == 200){
- this.notice = res.result.content
- }
- })
- },
- // 获取相关介绍
- getInfoIntroduce(){
- this.$api('getInfoIntroduceDetail', {
- id : this.id
- }, res => {
- if(res.code == 200){
- this.notice = res.result.details
- this.videos = res.result.voSub ? res.result.voSub.split(',') : []
- }
- })
- },
- }
- }
- </script>
-
- <style scoped lang="scss">
- .page {
- .videos{
- .video{
- width: 100%;
- video{
- width: 100%;
- }
- }
- }
- }
- </style>
|