licp
2024-07-10 5efbd492f065226a931ba74cb9bcf99e12dabe22
优化计算机
已修改1个文件
21 ■■■■ 文件已修改
static/js/worker.js 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/js/worker.js
@@ -83,7 +83,7 @@
                if (m.includes('=')) {
                  let str = handleFraction(m.split('=')[1])
                  if(typeof res == 'string'&&typeof str == 'string'){
                    if(item.v.f&&typeof(item.v.f)=='string'&&item.v.f.includes('&"/"&')){
                    if(res.includes('/')){
                      return handleMoreParam(res,m.split('=')[1],'=')
                    }else{
                      return  res.trim() == str.trim()
@@ -92,63 +92,64 @@
                    return  eval(res) == eval(str)
                  }
                } else if (m.includes('≥')) {
                  if(item.v.f&&typeof(item.v.f)=='string'&&item.v.f.includes('&"/"&')){
                  if(typeof res =='string'&&res.includes('/')){
                    return handleMoreParam(res,m.split('≥')[1],'≥')
                  }else{
                    let str = handleFraction(m.split('≥')[1])
                    return eval(res) >= eval(str)
                  }
                }else if (m.includes('≤')) {
                  if(item.v.f&&typeof(item.v.f)=='string'&&item.v.f.includes('&"/"&')){
                  if(typeof res =='string'&&res.includes('/')){
                    return handleMoreParam(res,m.split('≤')[1],'≤')
                  }else{
                    let str = handleFraction(m.split('≤')[1])
                    return eval(res) <= eval(str)
                  }
                }else if (m.includes('<')) {
                  if(item.v.f&&typeof(item.v.f)=='string'&&item.v.f.includes('&"/"&')){
                  if(typeof res =='string'&&res.includes('/')){
                    return handleMoreParam(res,m.split('<')[1],'<')
                  }else{
                    let str = handleFraction(m.split('<')[1])
                    return  eval(res) < eval(str)
                  }
                }else if (m.includes('>')) {
                  if(item.v.f&&typeof(item.v.f)=='string'&&item.v.f.includes('&"/"&')){
                  if(typeof res =='string'&&res.includes('/')){
                    return handleMoreParam(res,m.split('>')[1],'>')
                  }else{
                    let str = handleFraction(m.split('>')[1])
                    return  eval(res) > eval(str)
                  }
                }else if (m.includes('~')) {
                  if(item.v.f&&typeof(item.v.f)=='string'&&item.v.f.includes('&"/"&')){
                  if(typeof res =='string'&&res.includes('/')){
                    return handleMoreParam(res,m,'~')
                  }else{
                    let k = m.split('~')
                    return  eval(res) >= eval(handleFraction((k[0]))) && eval(res) <= eval(handleFraction(k[1]))
                  }
                }else if(m.includes('-')){
                  if(res.includes('/')){
                  if(typeof res =='string'&&res.includes('/')){
                    return handleMoreParam(res,m,'-')
                  }else{
                    let k = m.split('-')
                    console.log(k,eval(res),eval(res) >= eval(handleFraction(k[0])) && eval(res) <= eval(handleFraction(k[1])))
                    return  eval(res) >= eval(handleFraction(k[0])) && eval(res) <= eval(handleFraction(k[1]))
                  }
                }else if(m.includes('±')){
                  if(item.v.f&&typeof(item.v.f)=='string'&&item.v.f.includes('&"/"&')){
                  if(typeof res =='string'&&res.includes('/')){
                    return handleMoreParam(res,m,'±')
                  }else{
                    let k = m.split('±')
                    return  eval(res) >= eval((handleFraction(k[0]) - handleFraction(k[1]))) && eval(res) <= eval((handleFraction(k[0]) + handleFraction(k[1])))
                  }
                }else if(m.includes('>')){
                  if(item.v.f&&typeof(item.v.f)=='string'&&item.v.f.includes('&"/"&')){
                  if(typeof res =='string'&&res.includes('/')){
                    return handleMoreParam(res,m.split('>')[1],'>')
                  }else{
                    let str = handleFraction(m.split('>')[1])
                    return  eval(res) > eval(str)
                  }
                }else if(m.includes('<')){
                  if(item.v.f&&typeof(item.v.f)=='string'&&item.v.f.includes('&"/"&')){
                  if(typeof res =='string'&&res.includes('/')){
                    return handleMoreParam(res,m.split('<')[1],'<')
                  }else{
                    let str = handleFraction(m.split('<')[1])