一、includes的作用:

includes:判断isNotShowProIdArray数组里是否包含this.item.productid元素 ,若包含true
!!: !!(a)的作用是将a强制转换为布尔型(boolean)  !!(undefined)为false
let isNotShowProIdArray = ["3000601", "3001301"];
if (!!isNotShowProIdArray.includes(this.item.productid)) {
this.isNotShowProid = false;
} else {
this.isNotShowProid = true;
}
二、split('/loan')[0];作用:
location.href.split('/loan')[0];  获取url后取/loan字符串之前的所有内容;
location.href.split('/loan')[1];  获取url后取/loan字符串之后的所有内容;
 

相关文章:

  • 2022-01-10
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2021-07-03
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
相关资源
相似解决方案