Skip to content

Commit edf4a5c

Browse files
修复去重的问题
1 parent f2cfbe3 commit edf4a5c

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

Rewrite-Parser.beta.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,8 @@ if (binaryInfo != null && binaryInfo.length > 0) {
839839
updatetime,
840840
wakesys: '1',
841841
timeout: '120',
842+
jsarg: '',
843+
rebody: '',
842844
ori: x,
843845
num: y,
844846
})
@@ -905,6 +907,8 @@ if (binaryInfo != null && binaryInfo.length > 0) {
905907
jsurl,
906908
wakesys: '1',
907909
timeout: '120',
910+
jsarg: '',
911+
rebody: '',
908912
ori: x,
909913
num: y,
910914
})
@@ -962,9 +966,10 @@ if (binaryInfo != null && binaryInfo.length > 0) {
962966
jsptn: '',
963967
cronexp,
964968
jsurl,
965-
jsarg,
969+
jsarg: '',
966970
wakesys: '1',
967971
timeout: '120',
972+
rebody: '',
968973
ori: x,
969974
num: y
970975
})
@@ -976,7 +981,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
976981
getMockInfo(x, mark, y)
977982
}
978983
} //for await循环结束
979-
984+
//console.log($.toStr(jsBox))
980985
//去重
981986
let obj = {}
982987

@@ -1023,9 +1028,9 @@ if (binaryInfo != null && binaryInfo.length > 0) {
10231028

10241029
jsBox = jsBox.reduce((curr, next) => {
10251030
/*判断对象中是否已经有该属性 没有的话 push 到 curr数组*/
1026-
obj[next.jstype + next.jsptn + next.jsurl + next.jsarg]
1031+
obj[next.jstype + next.jsptn + next.jsurl + next.jsarg + next.rebody]
10271032
? ''
1028-
: (obj[next.jstype + next.jsptn + next.jsurl + next.jsarg] = curr.push(next))
1033+
: (obj[next.jstype + next.jsptn + next.jsurl + next.jsarg + next.rebody] = curr.push(next))
10291034
return curr
10301035
}, [])
10311036

@@ -1959,6 +1964,7 @@ function getModInfo(x) {
19591964
let key = x.match(regex)[1] == 'keyword' ? 'category' : x.match(regex)[1]
19601965
let value = x.match(regex)[2]
19611966
modInfoObj[key] = value
1967+
//console.log(key)
19621968
}
19631969

19641970
//获取可莉图标集

Rewrite-Parser.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,8 @@ if (binaryInfo != null && binaryInfo.length > 0) {
839839
updatetime,
840840
wakesys: '1',
841841
timeout: '120',
842+
jsarg: '',
843+
rebody: '',
842844
ori: x,
843845
num: y,
844846
})
@@ -905,6 +907,8 @@ if (binaryInfo != null && binaryInfo.length > 0) {
905907
jsurl,
906908
wakesys: '1',
907909
timeout: '120',
910+
jsarg: '',
911+
rebody: '',
908912
ori: x,
909913
num: y,
910914
})
@@ -962,9 +966,10 @@ if (binaryInfo != null && binaryInfo.length > 0) {
962966
jsptn: '',
963967
cronexp,
964968
jsurl,
965-
jsarg,
969+
jsarg: '',
966970
wakesys: '1',
967971
timeout: '120',
972+
rebody: '',
968973
ori: x,
969974
num: y
970975
})
@@ -976,7 +981,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
976981
getMockInfo(x, mark, y)
977982
}
978983
} //for await循环结束
979-
984+
//console.log($.toStr(jsBox))
980985
//去重
981986
let obj = {}
982987

@@ -1023,9 +1028,9 @@ if (binaryInfo != null && binaryInfo.length > 0) {
10231028

10241029
jsBox = jsBox.reduce((curr, next) => {
10251030
/*判断对象中是否已经有该属性 没有的话 push 到 curr数组*/
1026-
obj[next.jstype + next.jsptn + next.jsurl + next.jsarg]
1031+
obj[next.jstype + next.jsptn + next.jsurl + next.jsarg + next.rebody]
10271032
? ''
1028-
: (obj[next.jstype + next.jsptn + next.jsurl + next.jsarg] = curr.push(next))
1033+
: (obj[next.jstype + next.jsptn + next.jsurl + next.jsarg + next.rebody] = curr.push(next))
10291034
return curr
10301035
}, [])
10311036

@@ -1959,6 +1964,7 @@ function getModInfo(x) {
19591964
let key = x.match(regex)[1] == 'keyword' ? 'category' : x.match(regex)[1]
19601965
let value = x.match(regex)[2]
19611966
modInfoObj[key] = value
1967+
//console.log(key)
19621968
}
19631969

19641970
//获取可莉图标集

0 commit comments

Comments
 (0)