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 + "收货人电话格式错误!";
      }
posted @ 2020-05-28 10:34  小小小菜鸟1  阅读(485)  评论(0编辑  收藏  举报