太湖之光
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
content: '',
|
||||
title: ''
|
||||
},
|
||||
source:'',
|
||||
urlVisible:false,
|
||||
surl:'',
|
||||
type:null,
|
||||
@@ -49,6 +50,7 @@
|
||||
this.newsId = e.newsId
|
||||
this.type = e.type
|
||||
this.surl = e.url
|
||||
this.source = e.source
|
||||
console.log(e, '------')
|
||||
},
|
||||
computed: {
|
||||
@@ -76,10 +78,31 @@
|
||||
// musicPlay
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
methods: {
|
||||
getData() {
|
||||
var _url = "common/message/getMessageById"
|
||||
if(this.source = 'taihuzhiguang'){ // 太湖之光
|
||||
_url = "common/taihuWelfare/getTaihuWelfareArticleDetail"
|
||||
$http.request({
|
||||
url: `${_url}`,
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
id: this.newsId
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.news.content = res.result.content
|
||||
this.news.title = res.result.title
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e, '获取新闻详情报错')
|
||||
});
|
||||
}else{
|
||||
this.$http
|
||||
.post('common/message/getMessageById?id=' + this.newsId)
|
||||
.post(`${_url}?id=${this.newsId}`)
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
this.news.content = res.result.content
|
||||
@@ -88,6 +111,7 @@
|
||||
}).catch(e => {
|
||||
console.log(e, '获取新闻详情报错')
|
||||
});
|
||||
}
|
||||
},
|
||||
formatRichText(html) { //控制图片大小
|
||||
let newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
|
||||
|
||||
Reference in New Issue
Block a user