vue獲取路由傳過來的地址
GetRequest()?{??
????????????let?url?=?location.hash;?//獲取url中"?"符后的字串??
????????????if(url.indexOf('id')?!=?-1){? ?// id為你要獲取的字段
????????????let?u?=?url.slice(url.indexOf('id'),);
????????????????return?u
????????????}
????????},
vue獲取路由傳過來的地址
GetRequest()?{??
????????????let?url?=?location.hash;?//獲取url中"?"符后的字串??
????????????if(url.indexOf('id')?!=?-1){? ?// id為你要獲取的字段
????????????let?u?=?url.slice(url.indexOf('id'),);
????????????????return?u
????????????}
????????},