Commit fdde44a9 authored by xhx's avatar xhx

链接替换

parent f0e78e65
......@@ -62,6 +62,7 @@ export default Vue.extend({
const language = window.sessionStorage.getItem('language') || 'zh-CN'
this.isLoading = true
getNewsDetails(this.id, language).then(res => {
res.content = res.content.replace(/public.33.cn/g, 'public.yuan.org')
this.details = res
const { published_time } = res
const _t = published_time.split(' ')[0]
......
......@@ -46,6 +46,9 @@ export default Vue.extend({
this.isLoading = true
getNews(language).then(res => {
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.getLists()
this.isLoading = false
......
......@@ -71,6 +71,7 @@ export default Vue.extend({
const language = window.sessionStorage.getItem('language') || 'zh-CN'
this.isLoading = true
getNewsDetails(this.id, language).then(res => {
res.content = res.content.replace(/public.33.cn/g, 'public.yuan.org')
this.details = res
const { published_time } = res
const _t = published_time.split(' ')[0]
......
......@@ -57,6 +57,10 @@ export default Vue.extend({
this.isLoading = true
getNews(language).then(res => {
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.getLists()
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