zhangyuhan преди 2 години
родител
ревизия
d8725c2399
променени са 3 файла, в които са добавени 6 реда и са изтрити 5 реда
  1. 1 1
      package.json
  2. 4 3
      src/easy-use-track.js
  3. 1 1
      src/module/types.js

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "rollup-js",
-  "version": "1.1.6",
+  "version": "1.1.7",
   "main": "index.js",
   "license": "MIT",
   "scripts": {

+ 4 - 3
src/easy-use-track.js

@@ -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

+ 1 - 1
src/module/types.js

@@ -3,6 +3,6 @@ export const Subscribe = {
 }
 
 export const SDK_INFO = {
-  VERSION: '1.1.6',
+  VERSION: '1.1.7',
   PREFIX: 'JyTrack'
 }