Jelajahi Sumber

feat: 修复邮箱正则和其他职业回显问题

zhangyuhan 4 tahun lalu
induk
melakukan
c2c29fe19a
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      src/web/staticres/js/pc-collect-user-info.js

+ 3 - 3
src/web/staticres/js/pc-collect-user-info.js

@@ -219,7 +219,7 @@ var vm = new Vue({
       }
     }
     var validEmail = function(rule,value,callback) {
-      var status = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(value)
+      var status = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(value)
       if (value === '') {
         return callback(new Error('邮箱为必填项'));
       } else {
@@ -446,7 +446,7 @@ var vm = new Vue({
         // hireType: this.form.mold, // 受雇类型值
         company: this.form.companyName, // 公司名称
         companyType: this.form.companyType.join(','), 
-        position: this.form.job == '其他' ? this.form.otherJob : this.form.job, 
+        position: this.form.job == '其他' ? ('其他/' + this.form.otherJob) : this.form.job,
         // company_size: this.form.scale,
         workScope: this.form.business,
         partnerNeeds: this.form.need, 
@@ -511,7 +511,7 @@ var vm = new Vue({
             if (res.data.position) {
               if (jobJson.indexOf(res.data.position) == -1) {
                 _this.form.job = '其他'
-                _this.form.otherJob = res.data.position
+                _this.form.otherJob = res.data.position.replace('其他/', '')
               } else {
                 _this.form.job = res.data.position
               }