一、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字符串之后的所有内容;