feat: 系统消息如果是一个链接则直接跳转
This commit is contained in:
@@ -32,6 +32,7 @@ import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { useStore } from "vuex";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { isValidUrl } from '@/tool/util';
|
||||
export default defineComponent({
|
||||
components:{
|
||||
},
|
||||
@@ -70,7 +71,13 @@ export default defineComponent({
|
||||
accountMessage.isNoData = true
|
||||
})
|
||||
}
|
||||
let setRead = (item:any)=>{
|
||||
let setRead = (item: any) => {
|
||||
const content = item.content.content
|
||||
console.log('111', isValidUrl(content));
|
||||
if (isValidUrl(content)) {
|
||||
window.open(content, '_blank');
|
||||
}
|
||||
|
||||
prop.setReadStatus(item).then((rv:any)=>{
|
||||
item.isRead = 1
|
||||
}).catch((err:any)=>{
|
||||
|
||||
Reference in New Issue
Block a user