VUE 前端分组 后端手机号校验
let groupList = this.dataListSelections.reduce( (all, next) => (all.some(item => item.agentName == next.agentName) ? all : [...all, next]), [] ); if(groupList.length>1) { this.$message.error("不同代理商,不能提现申请"); return false; }
手机号校验
let consigneeMobile = t.consigneeMobile;
let regular = /^((0\d{2,3}-\d{7,8})|(1[3569784]\d{9}))$/;
if (!regular.test(consigneeMobile)) {
this.info.result = false;
this.info.msg = consigneeMobile + "收货人电话格式错误!";
}