updated 修复非同辈关系逆转bug问题

This commit is contained in:
mumuy 2021-11-18 13:11:31 +08:00
parent 815f0d7974
commit 07d39746af
4 changed files with 4965 additions and 4949 deletions

15
dist/relationship.js vendored
View File

@ -2337,6 +2337,7 @@
return items;
}
// 逆转ID
// 逆转ID
function reverseId(id,sex){
var hash = {
@ -2354,9 +2355,9 @@
xs:['xs','xb']
};
var age = '';
if(id.indexOf('&o')>-1){
if(id.match(/&o$/)){
age = '&l';
}else if(id.indexOf('&l')>-1){
}else if(id.match(/&l$/)){
age = '&o';
}
if(id){
@ -2370,7 +2371,15 @@
for(var i=0;i<id_arr.length;i++){
arr.push(hash[id_arr[i]][sid_arr[i]]);
}
return arr.join(',')+age;
var g = 0;
arr.forEach(function(r){
if(['f','m'].indexOf(r)>-1){
g++;
}else if(['s','d'].indexOf(r)>-1){
g--;
}
});
return arr.join(',')+(g?'':age);
}
return '';
}

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
<script type="text/javascript">
setTimeout(function(){
if(location.hostname.indexOf('passer-by.com')<0){
location.href = 'http://passer-by.com/';
//location.href = 'http://passer-by.com/';
}else if( window.top != window.self ) {
window.top.location = self.location.href;
}

View File

@ -2354,9 +2354,9 @@
xs:['xs','xb']
};
var age = '';
if(id.indexOf('&o')>-1){
if(id.match(/&o$/)){
age = '&l';
}else if(id.indexOf('&l')>-1){
}else if(id.match(/&l$/)){
age = '&o';
}
if(id){
@ -2370,7 +2370,15 @@
for(var i=0;i<id_arr.length;i++){
arr.push(hash[id_arr[i]][sid_arr[i]]);
}
return arr.join(',')+age;
var g = 0;
arr.forEach(function(r){
if(['f','m'].indexOf(r)>-1){
g++;
}else if(['s','d'].indexOf(r)>-1){
g--;
}
});
return arr.join(',')+(g?'':age);
}
return '';
}