|
@@ -185,13 +185,14 @@ class EasyUse {
|
|
|
let result = false
|
|
|
for (let i =0;i<this.json.length;i++) {
|
|
|
const item = this.json[i]
|
|
|
- const matchLink = decodeURIComponent(item['页面URL'])
|
|
|
- const hasLink = url.indexOf(matchLink) !== -1
|
|
|
+ const matchURL = decodeURIComponent(item['页面URL'])
|
|
|
+ const nowURL = decodeURIComponent(url)
|
|
|
+ const hasLink = nowURL.indexOf(matchURL) !== -1
|
|
|
if (hasLink) {
|
|
|
result = item
|
|
|
break
|
|
|
}
|
|
|
- const testRegex = new RegExp(matchLink).test(url)
|
|
|
+ const testRegex = new RegExp(matchURL).test(nowURL)
|
|
|
if (testRegex) {
|
|
|
result = item
|
|
|
break
|