Commit 8fa9993f by chengzhichun

getUrlofLink方法修改

parent 7397fdfe
...@@ -21,7 +21,13 @@ export let themeColor = { ...@@ -21,7 +21,13 @@ export let themeColor = {
// 获取link 中页面地址(link兼容 有object或者string) // 获取link 中页面地址(link兼容 有object或者string)
export function getUrlofLink(data) { export function getUrlofLink(data) {
return data.link.split('?')[0]
if(typeof data == 'object' && data.link){
return data.link.split('?')[0]
}
if(typeof data == 'string'){
return data.split('?')[0]
}
} }
export function getUrlofQuery(data) { export function getUrlofQuery(data) {
return data.link.split('?')[1] || '' return data.link.split('?')[1] || ''
......
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