Explorar el Código

处理文章回显表格问题采用iframe

临城职教中职
杨晓琪 hace 2 años
padre
commit
57abbc3fc7
Se han modificado 1 ficheros con 12 adiciones y 2 borrados
  1. +12
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home/notice.vue

+ 12
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home/notice.vue Ver fichero

@@ -1,7 +1,8 @@
<template>
<view id="notice" class="page">
<view class="padding text-lg">
<u-parse v-if="ready" :imageProp="{ domain: apiRoot }" :content="content"></u-parse>
<u-parse v-if="ready&&contentType == 1" :imageProp="{ domain: apiRoot }" :content="content"></u-parse>
<iframe v-if="ready&&contentType == 2" style="width: 100%;height: calc(100vh - 150px);" :src="CONFIG('webHost')+'/Utility/ListContentView?keyValue='+keyValue" frameborder="0"></iframe>
</view>
<view class="padding-sm text-grey notice-info">
<view class="text-right">本页内容发布于 {{ time }}</view>
@@ -19,7 +20,9 @@ export default {
ready: false,
content: '',
time: '',
date: ''
date: '',
contentType:'',
keyValue:'',
}
},

@@ -31,6 +34,13 @@ export default {
async init() {
this.LOADING('加载中…')
const noticeItem = this.GET_PARAM()
this.keyValue = noticeItem.f_id
if(noticeItem.f_category){
this.contentType = 2
}else{
this.contentType = 1
}
console.log(noticeItem)
this.content = this.CONVERT_HTML(noticeItem.f_content)
this.time = moment(noticeItem.f_time).format('HH : mm')
this.date = moment(noticeItem.f_time).format('YYYY年 M月 D日')


Cargando…
Cancelar
Guardar