updated 修复名称查询错误异常显示为“自己”的bug
This commit is contained in:
1 parent
53aa8886ab
commit
959e465828
2 files changed
+9
-3
No files matched your search
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
!function(s,f){"object"==typeof module&&module.exports?module.exports=f():s.relationship=f()}("undefined"!=typeof window?window:this,function(){var e=[{exp:/^(.+)&o([^#]+)&l/g,str:"$1$2"},{exp:/^(.+)&l([^#]+)&o/g,str:"$1$2"},{exp:/^(.+)?,o([sb])([^#]+)&l/g,str:"$1,x$2$3"},{exp:/^(.+)?,l([sb])([^#]+)&o/g,str:"$1,x$2$3"},{exp:/(,[ds],(.+),[ds])&[ol]/g,str:"$1"},{exp:/(,o[sb])+(,o[sb])/,str:"$2"},{exp:/(,l[sb])+(,l[sb])/,str:"$2"},{exp:/^(.*)(,[fh1])(,[olx][sb])+,[olx]b(.*)$/,str:"$1$2,xb$4#$1$2$4"},{exp:/^(.*)(,[mw0])(,[olx][sb])+,[olx]s(.*)$/,str:"$1$2,xs$4#$1$2$4"},{exp:/(,[fh1])(,[olx][sb])+,[olx]s/g,str:"$1,xs"},{exp:/(,[mw0])(,[olx][sb])+,[olx]b/g,str:"$1,xb"},{exp:/^,[olx][sb],[olx]b(.+)?$/,str:"$1#,xb$1"},{exp:/^,[olx][sb],[olx]s(.+)?$/,str:"$1#,xs$1"},{exp:/^,x([sb])$/,str:",o$1#,l$1"},{exp:/m,h/g,str:"f"},{exp:/f,w/g,str:"m"},{exp:/,[xol][sb](,[mf])/g,str:"$1"},{exp:/,[mf],d&([ol])/,str:",$1s"},{exp:/,[mf],s&([ol])/,str:",$1b"},{exp:/^(.*)(,[fh1]|[xol]b),[mf],s(.*)$/,str:"$1$2,xb$3#$1$2$3"},{exp:/^(.*)(,[mw0]|[xol]s),[mf],d(.*)$/,str:"$1$2,xs$3#$1$2$3"},{exp:/(,[mw0]|[xol]s),[mf],s/,str:"$1,xb"},{exp:/(,[fh1]|[xol]b),[mf],d/,str:"$1,xs"},{exp:/^,[mf],s(.+)?$/,str:",1$1#,xb$1"},{exp:/^,[mf],d(.+)?$/,str:",0$1#,xs$1"},{exp:/,[ds]&o,ob/g,str:",s&o"},{exp:/,[ds]&o,os/g,str:",d&o"},{exp:/,[ds]&l,lb/g,str:",s&l"},{exp:/,[ds]&l,ls/g,str:",d&l"},{exp:/,[ds](&[ol])?,[olx]s/g,str:",d"},{exp:/,[ds](&[ol])?,[olx]b/g,str:",s"},{exp:/(,[mwd0](&[ol])?|[olx]s),[ds](&[ol])?,m/g,str:"$1"},{exp:/(,[mwd0](&[ol])?|[olx]s),[ds](&[ol])?,f/g,str:"$1,h"},{exp:/(,[fhs1](&[ol])?|[olx]b),[ds](&[ol])?,f/g,str:"$1"},{exp:/(,[fhs1](&[ol])?|[olx]b),[ds](&[ol])?,m/g,str:"$1,w"},{exp:/^,[ds],m(.+)?$/,str:"$1#,w$1"},{exp:/^,[ds],f(.+)?$/,str:"$1#,h$1"},{exp:/,[wh](,[ds])/g,str:"$1"},{exp:/,w,h|,h,w/g,str:""},{exp:/(.+)?\[([^\|]+?)\|([^\[\]]*\|[^\[\]]*)\](.+)?/g,str:"$1$2$4#$1[$3]$4"},{exp:/(.+)?\[([^\[\]\|]+?)\|([^\[\]\|]+?)?\](.+)?/g,str:"$1$2$4#$1$3$4"}],h={"":["自己","我","本人","在下"],"[f,f|f,m|m,f|m,m]":["祖辈","祖父母"],"[f|m]":["父母","爹娘","爹妈","爸妈","双亲","二亲","两亲","二老","高堂"],"[h,f|h,m]":["公婆","翁姑"],"[w,f|w,m]":["岳父母"],"[xb|xs]":["兄弟姐妹","同胞","手足"],"[f,xb,s&o|f,xb,s&l]":["堂兄弟","叔伯兄弟"],"[f,xb,d&o|f,xb,d&l]":["堂姐妹","叔伯姐妹"],"[m,xs,s&o|m,xs,s&l]":["姨兄弟"],"[m,xs,d&o|m,xs,d&l]":["姨姐妹"],"[f,xs,s&o|f,xs,s&l|m,xb,s&o|m,xb,s&l]":["表兄弟"],"[f,xs,d&o|f,xs,d&l|m,xb,d&o|m,xb,d&l]":["表姐妹"],"[s|d]":["子女","儿女","小孩","孩子","孩儿","宝宝","宝贝","娃"],"[s,s|s,d|d,s|d,d]":["孙辈"],f:["爸爸","父亲","老爸","阿爸","阿爹","老窦","爸","父","爹","爹爹","爹地","爹啲","老爹","大大","老爷子"],"f,f":["爷爷","祖父","奶爷","阿爷","阿公","吖爷","老爷"],"f,f,f":["曾祖父","曾祖","太公","太爷","太爷爷","祖公","祖奶爷","太老爷"],"f,f,f,f":["高祖父","老太奶爷","老太爷","祖太爷","祖太爷爷","祖太公","高王父"],"f,f,f,f,f":["天祖父","高祖"],"f,f,f,f,f,f":["烈祖父","烈祖"],"f,f,f,f,f,f,f":["太祖父","太祖"],"f,f,f,f,f,f,f,f":["远祖父","远祖"],"f,f,f,f,f,f,f,f,f":["鼻祖父","鼻祖","始祖"],"f,f,f,f,f,f,f,f,f,ob":["伯鼻祖父"],"f,f,f,f,f,f,f,f,f,ob,w":["伯鼻祖母"],"f,f,f,f,f,f,f,f,f,lb":["叔鼻祖父"],"f,f,f,f,f,f,f,f,f,lb,w":["叔鼻祖母"],"f,f,f,f,f,f,f,f,f,xs":["姑鼻祖母"],"f,f,f,f,f,f,f,f,f,xs,h":["姑鼻祖父"],"f,f,f,f,f,f,f,f,m":["鼻祖母"],"f,f,f,f,f,f,f,f,m,xb":["舅鼻祖父"],"f,f,f,f,f,f,f,f,m,xb,w":["舅鼻祖母"],"f,f,f,f,f,f,f,f,m,xs":["姨鼻祖母"],"f,f,f,f,f,f,f,f,m,xs,h":["姨鼻祖父"],"f,f,f,f,f,f,f,f,ob":["伯远祖父"],"f,f,f,f,f,f,f,f,ob,w":["伯远祖母"],"f,f,f,f,f,f,f,f,lb":["叔远祖父"],"f,f,f,f,f,f,f,f,lb,w":["叔远祖母"],"f,f,f,f,f,f,f,f,xs":["姑远祖母"],"f,f,f,f,f,f,f,f,xs,h":["姑远祖父"],"f,f,f,f,f,f,f,m":["远祖母"],"f,f,f,f,f,f,f,m,xb":["舅远祖父"],"f,f,f,f,f,f,f,m,xb,w":["舅远祖母"],"f,f,f,f,f,f,f,m,xs":["姨远祖母"],"f,f,f,f,f,f,f,m,xs,h":["姨远祖父"],"f,f,f,f,f,f,f,ob":["伯太祖父"],"f,f,f,f,f,f,f,ob,w":["伯太祖母"],"f,f,f,f,f,f,f,lb":["叔太祖父"],"f,f,f,f,f,f,f,lb,w":["叔太祖母"],"f,f,f,f,f,f,f,xs":["姑太祖母"],"f,f,f,f,f,f,f,xs,h":["姑太祖父"],"f,f,f,f,f,f,m":["太祖母"],"f,f,f,f,f,f,m,xb":["舅太祖父"],"f,f,f,f,f,f,m,xb,w":["舅太祖母"],"f,f,f,f,f,f,m,xs":["姨太祖母"],"f,f,f,f,f,f,m,xs,h":["姨太祖父"],"f,f,f,f,f,f,ob":["伯烈祖父"],"f,f,f,f,f,f,ob,w":["伯烈祖母"],"f,f,f,f,f,f,lb":["叔烈祖父"],"f,f,f,f,f,f,lb,w":["叔烈祖母"],"f,f,f,f,f,f,xs":["姑烈祖母"],"f,f,f,f,f,f,xs,h":["姑烈祖父"],"f,f,f,f,f,m":["烈祖母"],"f,f,f,f,f,m,xb":["舅烈祖父"],"f,f,f,f,f,m,xb,w":["舅烈祖母"],"f,f,f,f,f,m,xs":["姨烈祖母"],"f,f,f,f,f,m,xs,h":["姨烈祖父"],"f,f,f,f,f,ob":["伯天祖父"],"f,f,f,f,f,ob,w":["伯天祖母"],"f,f,f,f,f,lb":["叔天祖父"],"f,f,f,f,f,lb,w":["Line truncated
|
!function(s,f){"object"==typeof module&&module.exports?module.exports=f():s.relationship=f()}("undefined"!=typeof window?window:this,function(){var e=[{exp:/^(.+)&o([^#]+)&l/g,str:"$1$2"},{exp:/^(.+)&l([^#]+)&o/g,str:"$1$2"},{exp:/^(.+)?,o([sb])([^#]+)&l/g,str:"$1,x$2$3"},{exp:/^(.+)?,l([sb])([^#]+)&o/g,str:"$1,x$2$3"},{exp:/(,[ds],(.+),[ds])&[ol]/g,str:"$1"},{exp:/(,o[sb])+(,o[sb])/,str:"$2"},{exp:/(,l[sb])+(,l[sb])/,str:"$2"},{exp:/^(.*)(,[fh1])(,[olx][sb])+,[olx]b(.*)$/,str:"$1$2,xb$4#$1$2$4"},{exp:/^(.*)(,[mw0])(,[olx][sb])+,[olx]s(.*)$/,str:"$1$2,xs$4#$1$2$4"},{exp:/(,[fh1])(,[olx][sb])+,[olx]s/g,str:"$1,xs"},{exp:/(,[mw0])(,[olx][sb])+,[olx]b/g,str:"$1,xb"},{exp:/^,[olx][sb],[olx]b(.+)?$/,str:"$1#,xb$1"},{exp:/^,[olx][sb],[olx]s(.+)?$/,str:"$1#,xs$1"},{exp:/^,x([sb])$/,str:",o$1#,l$1"},{exp:/m,h/g,str:"f"},{exp:/f,w/g,str:"m"},{exp:/,[xol][sb](,[mf])/g,str:"$1"},{exp:/,[mf],d&([ol])/,str:",$1s"},{exp:/,[mf],s&([ol])/,str:",$1b"},{exp:/^(.*)(,[fh1]|[xol]b),[mf],s(.*)$/,str:"$1$2,xb$3#$1$2$3"},{exp:/^(.*)(,[mw0]|[xol]s),[mf],d(.*)$/,str:"$1$2,xs$3#$1$2$3"},{exp:/(,[mw0]|[xol]s),[mf],s/,str:"$1,xb"},{exp:/(,[fh1]|[xol]b),[mf],d/,str:"$1,xs"},{exp:/^,[mf],s(.+)?$/,str:",1$1#,xb$1"},{exp:/^,[mf],d(.+)?$/,str:",0$1#,xs$1"},{exp:/,[ds]&o,ob/g,str:",s&o"},{exp:/,[ds]&o,os/g,str:",d&o"},{exp:/,[ds]&l,lb/g,str:",s&l"},{exp:/,[ds]&l,ls/g,str:",d&l"},{exp:/,[ds](&[ol])?,[olx]s/g,str:",d"},{exp:/,[ds](&[ol])?,[olx]b/g,str:",s"},{exp:/(,[mwd0](&[ol])?|[olx]s),[ds](&[ol])?,m/g,str:"$1"},{exp:/(,[mwd0](&[ol])?|[olx]s),[ds](&[ol])?,f/g,str:"$1,h"},{exp:/(,[fhs1](&[ol])?|[olx]b),[ds](&[ol])?,f/g,str:"$1"},{exp:/(,[fhs1](&[ol])?|[olx]b),[ds](&[ol])?,m/g,str:"$1,w"},{exp:/^,[ds],m(.+)?$/,str:"$1#,w$1"},{exp:/^,[ds],f(.+)?$/,str:"$1#,h$1"},{exp:/,[wh](,[ds])/g,str:"$1"},{exp:/,w,h|,h,w/g,str:""},{exp:/(.+)?\[([^\|]+?)\|([^\[\]]*\|[^\[\]]*)\](.+)?/g,str:"$1$2$4#$1[$3]$4"},{exp:/(.+)?\[([^\[\]\|]+?)\|([^\[\]\|]+?)?\](.+)?/g,str:"$1$2$4#$1$3$4"}],h={"":["自己","我","本人","在下"],"[f,f|f,m|m,f|m,m]":["祖辈","祖父母"],"[f|m]":["父母","爹娘","爹妈","爸妈","双亲","二亲","两亲","二老","高堂"],"[h,f|h,m]":["公婆","翁姑"],"[w,f|w,m]":["岳父母"],"[xb|xs]":["兄弟姐妹","同胞","手足"],"[f,xb,s&o|f,xb,s&l]":["堂兄弟","叔伯兄弟"],"[f,xb,d&o|f,xb,d&l]":["堂姐妹","叔伯姐妹"],"[m,xs,s&o|m,xs,s&l]":["姨兄弟"],"[m,xs,d&o|m,xs,d&l]":["姨姐妹"],"[f,xs,s&o|f,xs,s&l|m,xb,s&o|m,xb,s&l]":["表兄弟"],"[f,xs,d&o|f,xs,d&l|m,xb,d&o|m,xb,d&l]":["表姐妹"],"[s|d]":["子女","儿女","小孩","孩子","孩儿","宝宝","宝贝","娃"],"[s,s|s,d|d,s|d,d]":["孙辈"],f:["爸爸","父亲","老爸","阿爸","阿爹","老窦","爸","父","爹","爹爹","爹地","爹啲","老爹","大大","老爷子"],"f,f":["爷爷","祖父","奶爷","阿爷","阿公","吖爷","老爷"],"f,f,f":["曾祖父","曾祖","太公","太爷","太爷爷","祖公","祖奶爷","太老爷"],"f,f,f,f":["高祖父","老太奶爷","老太爷","祖太爷","祖太爷爷","祖太公","高王父"],"f,f,f,f,f":["天祖父","高祖"],"f,f,f,f,f,f":["烈祖父","烈祖"],"f,f,f,f,f,f,f":["太祖父","太祖"],"f,f,f,f,f,f,f,f":["远祖父","远祖"],"f,f,f,f,f,f,f,f,f":["鼻祖父","鼻祖","始祖"],"f,f,f,f,f,f,f,f,f,ob":["伯鼻祖父"],"f,f,f,f,f,f,f,f,f,ob,w":["伯鼻祖母"],"f,f,f,f,f,f,f,f,f,lb":["叔鼻祖父"],"f,f,f,f,f,f,f,f,f,lb,w":["叔鼻祖母"],"f,f,f,f,f,f,f,f,f,xs":["姑鼻祖母"],"f,f,f,f,f,f,f,f,f,xs,h":["姑鼻祖父"],"f,f,f,f,f,f,f,f,m":["鼻祖母"],"f,f,f,f,f,f,f,f,m,xb":["舅鼻祖父"],"f,f,f,f,f,f,f,f,m,xb,w":["舅鼻祖母"],"f,f,f,f,f,f,f,f,m,xs":["姨鼻祖母"],"f,f,f,f,f,f,f,f,m,xs,h":["姨鼻祖父"],"f,f,f,f,f,f,f,f,ob":["伯远祖父"],"f,f,f,f,f,f,f,f,ob,w":["伯远祖母"],"f,f,f,f,f,f,f,f,lb":["叔远祖父"],"f,f,f,f,f,f,f,f,lb,w":["叔远祖母"],"f,f,f,f,f,f,f,f,xs":["姑远祖母"],"f,f,f,f,f,f,f,f,xs,h":["姑远祖父"],"f,f,f,f,f,f,f,m":["远祖母"],"f,f,f,f,f,f,f,m,xb":["舅远祖父"],"f,f,f,f,f,f,f,m,xb,w":["舅远祖母"],"f,f,f,f,f,f,f,m,xs":["姨远祖母"],"f,f,f,f,f,f,f,m,xs,h":["姨远祖父"],"f,f,f,f,f,f,f,ob":["伯太祖父"],"f,f,f,f,f,f,f,ob,w":["伯太祖母"],"f,f,f,f,f,f,f,lb":["叔太祖父"],"f,f,f,f,f,f,f,lb,w":["叔太祖母"],"f,f,f,f,f,f,f,xs":["姑太祖母"],"f,f,f,f,f,f,f,xs,h":["姑太祖父"],"f,f,f,f,f,f,m":["太祖母"],"f,f,f,f,f,f,m,xb":["舅太祖父"],"f,f,f,f,f,f,m,xb,w":["舅太祖母"],"f,f,f,f,f,f,m,xs":["姨太祖母"],"f,f,f,f,f,f,m,xs,h":["姨太祖父"],"f,f,f,f,f,f,ob":["伯烈祖父"],"f,f,f,f,f,f,ob,w":["伯烈祖母"],"f,f,f,f,f,f,lb":["叔烈祖父"],"f,f,f,f,f,f,lb,w":["叔烈祖母"],"f,f,f,f,f,f,xs":["姑烈祖母"],"f,f,f,f,f,f,xs,h":["姑烈祖父"],"f,f,f,f,f,m":["烈祖母"],"f,f,f,f,f,m,xb":["舅烈祖父"],"f,f,f,f,f,m,xb,w":["舅烈祖母"],"f,f,f,f,f,m,xs":["姨烈祖母"],"f,f,f,f,f,m,xs,h":["姨烈祖父"],"f,f,f,f,f,ob":["伯天祖父"],"f,f,f,f,f,ob,w":["伯天祖母"],"f,f,f,f,f,lb":["叔天祖父"],"f,f,f,f,f,lb,w":["Line truncated
|
||||||
@@ -2359,7 +2359,7 @@
|
|||||||
function getSelectors(str){
|
function getSelectors(str){
|
||||||
str = str.replace(/[二|三|四|五|六|七|八|九|十]{1,2}/g,'x');
|
str = str.replace(/[二|三|四|五|六|七|八|九|十]{1,2}/g,'x');
|
||||||
var lists = str.replace(/我的?(.+)/,'$1').replace(/家的?/,'的').split('的');
|
var lists = str.replace(/我的?(.+)/,'$1').replace(/家的?/,'的').split('的');
|
||||||
var result = [''];
|
var result = [];
|
||||||
var isMatch = true;
|
var isMatch = true;
|
||||||
var replaceMap = {
|
var replaceMap = {
|
||||||
'哥':'兄',
|
'哥':'兄',
|
||||||
@@ -2408,6 +2408,9 @@
|
|||||||
isMatch = false;
|
isMatch = false;
|
||||||
}
|
}
|
||||||
var res = [];
|
var res = [];
|
||||||
|
if(!result.length){
|
||||||
|
result = [''];
|
||||||
|
}
|
||||||
result.forEach(function(a){
|
result.forEach(function(a){
|
||||||
items.forEach(function(b){
|
items.forEach(function(b){
|
||||||
res.push(a+(b?','+b:''));
|
res.push(a+(b?','+b:''));
|
||||||
@@ -2415,7 +2418,7 @@
|
|||||||
});
|
});
|
||||||
result = res;
|
result = res;
|
||||||
}
|
}
|
||||||
return isMatch?result:[''];
|
return isMatch?result:[];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选择器转ID
|
// 选择器转ID
|
||||||
@@ -2655,6 +2658,9 @@
|
|||||||
}
|
}
|
||||||
var from_selectors = getSelectors(options.text);
|
var from_selectors = getSelectors(options.text);
|
||||||
var to_selectors = getSelectors(options.target);
|
var to_selectors = getSelectors(options.target);
|
||||||
|
if(!to_selectors.length){
|
||||||
|
to_selectors = [''];
|
||||||
|
}
|
||||||
// console.log('[selectors]',from_selectors,to_selectors);
|
// console.log('[selectors]',from_selectors,to_selectors);
|
||||||
var result = []; //匹配结果
|
var result = []; //匹配结果
|
||||||
from_selectors.forEach(function(from){
|
from_selectors.forEach(function(from){
|
||||||
|
|||||||
Reference in new issue
Block a user