Commit fdde44a9 authored by xhx's avatar xhx

链接替换

parent f0e78e65
...@@ -62,6 +62,7 @@ export default Vue.extend({ ...@@ -62,6 +62,7 @@ export default Vue.extend({
const language = window.sessionStorage.getItem('language') || 'zh-CN' const language = window.sessionStorage.getItem('language') || 'zh-CN'
this.isLoading = true this.isLoading = true
getNewsDetails(this.id, language).then(res => { getNewsDetails(this.id, language).then(res => {
res.content = res.content.replace(/public.33.cn/g, 'public.yuan.org')
this.details = res this.details = res
const { published_time } = res const { published_time } = res
const _t = published_time.split(' ')[0] const _t = published_time.split(' ')[0]
......
...@@ -46,6 +46,9 @@ export default Vue.extend({ ...@@ -46,6 +46,9 @@ export default Vue.extend({
this.isLoading = true this.isLoading = true
getNews(language).then(res => { getNews(language).then(res => {
this.allLists = res.rows this.allLists = res.rows
this.allLists.forEach((item: {cover: string}) => {
item.cover = item.cover.replace(/public.33.cn/g, 'public.yuan.org')
})
this.total = this.allLists.length this.total = this.allLists.length
this.getLists() this.getLists()
this.isLoading = false this.isLoading = false
......
...@@ -71,6 +71,7 @@ export default Vue.extend({ ...@@ -71,6 +71,7 @@ export default Vue.extend({
const language = window.sessionStorage.getItem('language') || 'zh-CN' const language = window.sessionStorage.getItem('language') || 'zh-CN'
this.isLoading = true this.isLoading = true
getNewsDetails(this.id, language).then(res => { getNewsDetails(this.id, language).then(res => {
res.content = res.content.replace(/public.33.cn/g, 'public.yuan.org')
this.details = res this.details = res
const { published_time } = res const { published_time } = res
const _t = published_time.split(' ')[0] const _t = published_time.split(' ')[0]
......
...@@ -57,6 +57,10 @@ export default Vue.extend({ ...@@ -57,6 +57,10 @@ export default Vue.extend({
this.isLoading = true this.isLoading = true
getNews(language).then(res => { getNews(language).then(res => {
this.allLists = res.rows this.allLists = res.rows
this.allLists.forEach((item: {cover: string}) => {
item.cover = item.cover.replace(/public.33.cn/g, 'public.yuan.org')
})
console.log(this.allLists)
this.total = this.allLists.length this.total = this.allLists.length
this.getLists() this.getLists()
this.isLoading = false this.isLoading = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment