xiaoming_global 5 yıl önce
ebeveyn
işleme
e309354729

+ 1 - 0
src/api/login/login.js Dosyayı Görüntüle

@@ -149,6 +149,7 @@ export function getAllOrgType(params) {
149 149
 }
150 150
 
151 151
 export function SaveOrgInformation(data) {
152
+  console.log('data是什么', data)
152 153
   return request({
153 154
     url: '/api/login/saveorginformation',
154 155
     method: 'Post',

+ 11 - 7
src/kpa_pages/agecyInformation/index.vue Dosyayı Görüntüle

@@ -2,7 +2,7 @@
2 2
   <div class="page_information">
3 3
     <div class="hint">请正确填写以下信息,后续可在“我的-机构信息”中修改</div>
4 4
     <div class="message">
5
-      <el-form ref="orgForm" :model="orgForm" :rules="rules">
5
+      <el-form ref="orgForm" :model="orgForm">
6 6
           <el-form-item required prop="org_name">
7 7
               <div class="row">
8 8
                 <p>机构名称</p>
@@ -40,19 +40,19 @@
40 40
                </van-popup>
41 41
               </div>
42 42
           </el-form-item>
43
-          <el-form-item>
43
+          <el-form-item required prop="address">
44 44
              <div class="row">
45 45
                <p>详细地址</p>
46 46
                <el-input v-model="orgForm.address" placeholder="请输入详细地址"></el-input>
47 47
                </div>
48 48
           </el-form-item>
49
-          <el-form-item>
49
+          <el-form-item required prop="contact_name">
50 50
                <div class="row">
51 51
                <p>机构联系人</p>
52 52
                <el-input v-model="orgForm.contact_name" placeholder="请输入"></el-input>
53 53
               </div>
54 54
           </el-form-item>
55
-          <el-form-item>
55
+          <el-form-item required prop="telephone">
56 56
                 <div class="row">
57 57
                  <p>机构电话</p>
58 58
                 <el-input v-model="orgForm.telephone" placeholder="请输入"></el-input>
@@ -157,9 +157,13 @@ export default {
157 157
         contact_name: '',
158 158
         telephone: ''
159 159
       },
160
-      rules: {
161
-        org_name: [{ validator: checkLenthRule }]
162
-      },
160
+      // rules: {
161
+      //   org_name: [{ validator: checkLenthRule }],
162
+      //   address: [{ validator: checkLenthRule }],
163
+      //   contact_name: [{ validator: checkLenthRule }],
164
+      //   telephone: [{ validator: checkLenthRule }]
165
+
166
+      // },
163 167
       // eslint-disable-next-line no-dupe-keys
164 168
       columns: [
165 169
         {

+ 99 - 100
src/kpa_pages/register/register.vue Dosyayı Görüntüle

@@ -54,117 +54,116 @@
54 54
 
55 55
 
56 56
 <script>
57
- import {checkMobile,checkPassWord} from "@/utils/tools"
58
- import {getModifyPwdCode,submitModifyPwdAction } from "@/api/login/login"
57
+ import { checkMobile, checkPassWord } from '@/utils/tools'
58
+ import { getModifyPwdCode, submitModifyPwdAction } from '@/api/login/login'
59 59
  import { hex_md5 } from '@/utils/md5'
60 60
 export default {
61
-  data() {
62
-    var checkMobileRule = (rule, value, callback) => {
63
-        if (!checkMobile(value)) {
64
-           callback(new Error('请填写正确的手机号'));
65
-           }else {
66
-           callback();
67
-         }
68
-       };
69
-     var checkPasswordRule = (rule,value,callback) =>{
70
-       if(!checkPassWord(value)){
71
-          callback(new Error('密码需在6-20位之间,且必须包含字母和数字'));
72
-       }else{
73
-         callback();
74
-       }
61
+   data() {
62
+     var checkMobileRule = (rule, value, callback) => {
63
+       if (!checkMobile(value)) {
64
+         callback(new Error('请填写正确的手机号'))
65
+          } else {
66
+         callback()
67
+        }
68
+     }
69
+    var checkPasswordRule = (rule, value, callback) => {
70
+       if (!checkPassWord(value)) {
71
+         callback(new Error('密码需在6-20位之间,且必须包含字母和数字'))
72
+      }else {
73
+         callback()
74
+      }
75
+     }
76
+     return {
77
+       phone: '',
78
+       code: '',
79
+       psd: '',
80
+       contact: false,
81
+       count_downing: false,
82
+       count_down: 0,
83
+       modify_pwd_loading: false,
84
+       registerForm: {
85
+         phone: '',
86
+         code: '',
87
+         password: ''
88
+       },
89
+       rules: {
90
+         phone: [{ required: true, message: '手机号码不能为空' }, { validator: checkMobileRule }],
91
+         code: [{ required: true, message: '验证码不能为空' }],
92
+         password: [{ required: true, message: '密码不能为空' }, { validator: checkPasswordRule }]
93
+       },
94
+       loginshow: true,
95
+       loginshowtwo: false
75 96
      }
76
-    return {
77
-      phone: "",
78
-      code: "",
79
-      psd: "",
80
-      contact: false,
81
-      count_downing: false,
82
-      count_down: 0,
83
-      modify_pwd_loading: false,
84
-      registerForm:{
85
-        phone:"",
86
-        code:"",
87
-        password:"",
88
-      },
89
-      rules:{
90
-        phone:[{required:true,message: "手机号码不能为空"},{validator:checkMobileRule}],
91
-        code:[{required:true,message:"验证码不能为空"}],
92
-        password:[{required:true,message:"密码不能为空"},{validator:checkPasswordRule}],
93
-      },
94
-      loginshow:true,
95
-      loginshowtwo:false,
96
-    };
97
-  },
98
-  methods:{
97
+ },
98
+   methods: {
99 99
      getCodeAction: function() {
100
-      this.count_downing = true
101
-      this.count_down = 61
102
-      this.countDown()
103
-      getModifyPwdCode(this.registerForm.phone).then(response=>{
104
-          if(response.data.state == 1){
105
-           var admin =  response.data.data.admin;
106
-           console.log("hhadmin是设么",admin)
107
-           this.$message.error("修改成功")
108
-           if(admin.mobile != ""){
109
-              this.$message.error("该手机号已注册")
100
+       this.count_downing = true
101
+       this.count_down = 61
102
+       this.countDown()
103
+       getModifyPwdCode(this.registerForm.phone).then(response => {
104
+         if (response.data.state == 1) {
105
+           var admin = response.data.data.admin
106
+          console.log('hhadmin是设么', admin)
107
+           this.$message.error('修改成功')
108
+           if (admin.mobile != '') {
109
+             this.$message.error('该手机号已注册')
110 110
            }
111
-          }
112
-      })
113
-    },
114
-    countDown: function() {
115
-      this.count_down = this.count_down - 1
116
-      if (this.count_down == 0) {
117
-        this.count_downing = false
118
-        return
119
-      }
120
-      var t = this
121
-      setTimeout(() => {
122
-        this.countDown()
123
-      }, 1000)
124
-    },
125
-    watchNum(){
126
-       if(this.registerForm.phone == "" || this.registerForm.code == ""){
127
-            this.loginshow = false;
128
-            this.loginshowtwo = true;
129
-       }else{
130
-         this.loginshow = true;
131
-         this.loginshowtwo = false;
111
+         }
112
+       })
113
+     },
114
+     countDown: function() {
115
+       this.count_down = this.count_down - 1
116
+       if (this.count_down == 0) {
117
+         this.count_downing = false
118
+         return
132 119
        }
133
-
134
-    },
135
-    submitModifyPwdAction(formName){
136
-       this.$refs[formName].validate((valid)=>{
137
-         if(valid){
138
-          submitModifyPwdAction(this.registerForm.phone,hex_md5(this.registerForm.password),this.registerForm.code).then(response=>{
139
-             if(response.data.state ==1){
140
-               var admin =  response.data.data.admin;
141
-               console.log("admin",admin)
142
-               this.$router.push("/orginfomation")
143
-             }else{
144
-               this.$message.error("手机号或验证码错误")
120
+       var t = this
121
+       setTimeout(() => {
122
+         this.countDown()
123
+       }, 1000)
124
+     },
125
+     watchNum() {
126
+       if (this.registerForm.phone == '' || this.registerForm.code == '') {
127
+         this.loginshow = false
128
+           this.loginshowtwo = true
129
+      }else {
130
+         this.loginshow = true
131
+        this.loginshowtwo = false
132
+      }
133
+     },
134
+     submitModifyPwdAction(formName) {
135
+       this.$refs[formName].validate((valid) => {
136
+         if (valid) {
137
+           submitModifyPwdAction(this.registerForm.phone, hex_md5(this.registerForm.password), this.registerForm.code).then(response => {
138
+             if (response.data.state == 1) {
139
+               var admin = response.data.data.admin
140
+              console.log('admin', admin)
141
+               this.$router.push('/orginfomation')
142
+             } else{
143
+               this.$message.error('手机号或验证码错误')
145 144
              }
146
-          })
145
+           })
147 146
          }
148 147
        })
149
-    },
148
+     },
150 149
 
151
-    callPhone(){
152
-      window.location.href = 'tel://075586526342' 
153
-    }
154
-  },
155
-  created(){
150
+     callPhone() {
151
+       window.location.href = 'tel://075586526342'
152
+     }
153
+   },
154
+   created() {
156 155
 
157
-  },
158
-  computed:{
159
-       code_btn_title: function() {
160
-      if (this.count_down == 0) {
161
-        return '获取验证码'
162
-      } else {
163
-        return '重新发送('+ this.count_down + ')'
164
-      }
165
-    },
166
-  }
167
-};
156
+   },
157
+   computed: {
158
+     code_btn_title: function() {
159
+       if (this.count_down == 0) {
160
+         return '获取验证码'
161
+       } else {
162
+         return '重新发送(' + this.count_down + ')'
163
+       }
164
+     }
165
+   }
166
+}
168 167
 </script>
169 168
 
170 169
 <style lang="scss">