Ver código fonte

修改登录 888888888

tangning 3 anos atrás
pai
commit
8fa6fd783e
2 arquivos alterados com 9 adições e 4 exclusões
  1. 7 2
      src/view/system/login.vue
  2. 2 2
      src/view/user/index.vue

+ 7 - 2
src/view/system/login.vue

@@ -69,7 +69,9 @@ export default {
       console.log('form',form)
       if (!form.phone) {
         verification.phone = '请输入手机号'
-      } else if(form.phone !== '88888888888'){
+      } else if(form.phone == '88888888888'){
+        verification.phone = ''
+      }else{
         verification.phone = PHONE.REG.test(form.phone) ? '': PHONE.tip
       }
       if (!form.psw) {
@@ -93,7 +95,10 @@ export default {
   methods: {
     async submitClick(ev) {
       ev.stopPropagation()
-      if (this.verification.phone && this.verification.phone !== '88888888888') return openErrorMsg(this.verification.phone, '提示')
+      if (this.verification.phone && this.verification.phone !== '88888888888') {
+        console.log('return openErrorMsg(this.verification.phone, ',this.verification.phone)
+        return openErrorMsg(this.verification.phone, '提示')
+      }
       if (this.verification.psw) return openErrorMsg(this.verification.psw, '提示')
       if (this.verification.code) return openErrorMsg(this.verification.code, '提示')
 

+ 2 - 2
src/view/user/index.vue

@@ -277,7 +277,7 @@ export default {
       }else if(!EPSW.REG.test(this.newData.psw)){
         return this.$message.error(EPSW.tip, "提示");
       }
-      await axios.post(userAdd, {
+      let apiinfo = await axios.post(userAdd, {
         nickName:this.newData.nickName,
         password:this.newData.psw,
         userName:this.newData.userName,
@@ -285,7 +285,7 @@ export default {
         deptId:this.newData.deptId
             // ...this.newData
       });
-      this.$message({message: '新增成功', type: 'success'});
+      this.$message({message: apiinfo.msg || '成功', type: 'success'});
       // await this.$confirm('每个组织只能创建一个总管理员~', '新增用户')
       this.newData = {}
       this.newShow = false