Ver código fonte

Merge branch 'Dev' into 'Test'

Dev

See merge request crowd-2019/crowd-test-service-front!80
郭超 5 anos atrás
pai
commit
6ad5781f47
34 arquivos alterados com 1054 adições e 331 exclusões
  1. 11 3
      src/App.vue
  2. BIN
      src/assets/img/business-license.png
  3. BIN
      src/assets/img/idcard-back.png
  4. BIN
      src/assets/img/idcard-positive.png
  5. 130 42
      src/components/authen/AuthenticationManage.vue
  6. 1 1
      src/components/authen/IndividualAuthentication.vue
  7. 32 32
      src/components/commons/Header2.0.vue
  8. 15 4
      src/components/commons/ProvinceCity.vue
  9. 1 1
      src/components/task/Task.vue
  10. 5 5
      src/js/index.js
  11. 2 4
      src/pages/DetailPage/AgencyDetail.vue
  12. 1 3
      src/pages/DetailPage/ResourceDetail.vue
  13. 3 5
      src/pages/DetailPage/UserDetail.vue
  14. 7 1
      src/pages/Homepage/BrandCard.vue
  15. 12 3
      src/pages/Homepage/Homepage.vue
  16. 8 2
      src/pages/Homepage/HotAgency.vue
  17. 1 1
      src/pages/Homepage/HotCrowd.vue
  18. 8 2
      src/pages/Homepage/HotUser.vue
  19. 10 2
      src/pages/Homepage/LoginCard.vue
  20. 7 1
      src/pages/Homepage/ResourceAndTool.vue
  21. 61 7
      src/pages/UserCenter/Authentication.vue
  22. 7 3
      src/pages/UserCenter/BankCard.vue
  23. 1 1
      src/pages/UserCenter/BindingMobile.vue
  24. 289 52
      src/pages/UserCenter/EnterpriseAuth.vue
  25. 204 65
      src/pages/UserCenter/IndividualAuth.vue
  26. 8 8
      src/pages/UserCenter/MailBinding.vue
  27. 30 11
      src/pages/UserCenter/Mine.vue
  28. 43 15
      src/pages/UserCenter/ModifyPsw.vue
  29. 39 13
      src/pages/UserCenter/MyBankCard.vue
  30. 102 30
      src/pages/UserCenter/MyQualification.vue
  31. 4 4
      src/pages/UserCenter/QualificationCard.vue
  32. 7 7
      src/pages/UserCenter/UserCenter.vue
  33. 3 2
      src/router/index.js
  34. 2 1
      src/style/main.scss

+ 11 - 3
src/App.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="width:100%;min-width: 1300px">
+  <div class="body-content">
     <home-slice v-if="showSlice"/>
     <header-container/>
     <div class="container-wrapper">
@@ -78,10 +78,18 @@ export default {
 }
 </script>
 
-<style>
+<style lang="less">
+  .body-content{
+    width:100%;
+    min-width: 1300px;
+    height: 100%;
+  }
+  .container-wrapper {
+    min-height: calc(~"100% - 70px - 180px");
+  }
   .main-container {
     width: 100%;
-    min-height: calc(100% - 70px - 64px);
+    min-height: calc(~"100% - 70px - 180px");
     margin: 0 auto;
   }
   .home-slice {

BIN
src/assets/img/business-license.png


BIN
src/assets/img/idcard-back.png


BIN
src/assets/img/idcard-positive.png


+ 130 - 42
src/components/authen/AuthenticationManage.vue

@@ -57,7 +57,7 @@
         </el-table-column>
       </el-table>
       <el-dialog title="认证详情" :visible.sync="showDialog" center width="40%">
-        <el-form :model="authInfoDetail" label-width="120px" label-position="right">
+        <el-form :model="authInfoDetail" label-width="150px" label-position="right">
           <el-form-item label="类型:">
             <span>
               <el-tag v-if="authInfoDetail.type=='personal'" type="success">个人</el-tag>
@@ -68,34 +68,64 @@
           <el-form-item label="姓名:" v-if="authInfoDetail.type == 'personal'">
             <span>{{authInfoDetail.realName}}</span>
           </el-form-item>
+          <el-form-item label="性别:" v-if="authInfoDetail.type == 'personal'">
+            <span>{{authInfoDetail.gender}}</span>
+          </el-form-item>
           <el-form-item label="身份证号:" v-if="authInfoDetail.type == 'personal'">
-            <span>{{authInfoDetail.IDCard}}</span>
+            <span>{{authInfoDetail.idCard}}</span>
           </el-form-item>
-          <el-form-item label="身份证照:" v-if="authInfoDetail.type == 'personal'">
+          <el-form-item label="身份证正面照:" v-if="authInfoDetail.type == 'personal'">
             <span>
               <el-image
                 style="width: 100px;"
-                :src="authInfoDetail.IDCardPositivePhoto"
+                :src="authInfoDetail.idCardPositivePhoto"
                 fit="scale-down"></el-image>
             </span>
           </el-form-item>
-<!--          <el-form-item label="银行账号:">-->
-<!--            <span>{{authInfoDetail.bankAccount}}</span>-->
-<!--          </el-form-item>-->
+          <el-form-item label="身份证反面照:" v-if="authInfoDetail.type == 'personal'">
+            <span>
+              <el-image
+                style="width: 100px;"
+                :src="authInfoDetail.idCardBackPhoto"
+                fit="scale-down"></el-image>
+            </span>
+          </el-form-item>
+          <el-form-item label="身份证截止时间:" v-if="authInfoDetail.type == 'personal'">
+            <span>{{authInfoDetail.idCardDeadTime}}</span>
+          </el-form-item>
           <el-form-item label="地址:">
             <span>{{authInfoDetail.address}}</span>
           </el-form-item>
+          <el-form-item label="角色:" v-if="authInfoDetail.type == 'personal'">
+            <span>{{authInfoDetail.roleList}}</span>
+          </el-form-item>
           <el-form-item label="申请时间:">
             <span>{{reformTime(new Date(authInfoDetail.applyTime))}}</span>
           </el-form-item>
 
-          <el-form-item label="企业名称:" v-if="authInfoDetail.type == 'enterprise'">
-            <span>{{authInfoDetail.enterpriseName}}</span>
-          </el-form-item>
-          <el-form-item label="法人姓名:" v-if="authInfoDetail.type == 'enterprise'">
-            <span>{{authInfoDetail.legalPersonName}}</span>
+<!--          <el-form-item label="企业名称:" v-if="authInfoDetail.type == 'enterprise'">-->
+<!--            <span>{{authInfoDetail.enterpriseName}}</span>-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="法人姓名:" v-if="authInfoDetail.type == 'enterprise'">-->
+<!--            <span>{{authInfoDetail.legalPersonName}}</span>-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="营业执照:" v-if="authInfoDetail.type == 'enterprise'">-->
+<!--            <span>-->
+<!--              <el-image-->
+<!--                style="width: 100px;"-->
+<!--                :src="authInfoDetail.businessLicensePhoto"-->
+<!--                fit="scale-down"></el-image>-->
+<!--            </span>-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="统一信用代码:" v-if="authInfoDetail.type == 'enterprise'">-->
+<!--            <span>{{authInfoDetail.unifiedSocialCreditCode}}</span>-->
+<!--          </el-form-item>-->
+
+
+          <el-form-item label="企业名称:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.evaluationAgencyName}}</span>
           </el-form-item>
-          <el-form-item label="营业执照:" v-if="authInfoDetail.type == 'enterprise'">
+          <el-form-item label="营业执照:" v-if="authInfoDetail.type == 'agency'">
             <span>
               <el-image
                 style="width: 100px;"
@@ -103,29 +133,58 @@
                 fit="scale-down"></el-image>
             </span>
           </el-form-item>
-          <el-form-item label="统一信用代码:" v-if="authInfoDetail.type == 'enterprise'">
-            <span>{{authInfoDetail.unifiedSocialCreditCode}}</span>
+          <el-form-item label="企业地址:">
+            <span>{{authInfoDetail.address}}</span>
           </el-form-item>
 
-          <el-form-item label="机构名称:" v-if="authInfoDetail.type == 'agency'">
-            <span>{{authInfoDetail.evaluationAgencyName}}</span>
-          </el-form-item>
-          <el-form-item label="机构能力:" v-if="authInfoDetail.type == 'agency'">
-            <span v-for="item in authInfoDetail.evaluationAgencyAbilityList"> <el-tag>{{item}}</el-tag>
+          <el-form-item label="企业Logo:" v-if="authInfoDetail.type == 'agency'">
+            <span>
+              <el-image
+                style="width: 100px;"
+                :src="authInfoDetail.agencyPhoto"
+                fit="scale-down"></el-image>
             </span>
           </el-form-item>
-          <el-form-item label="机构资源:" v-if="authInfoDetail.type == 'agency'">
-            <span v-for="item in authInfoDetail.evaluationAgencyResourceList"> <el-tag>{{item.type}} ( {{item.name}} ) :&nbsp; [总数:{{item.totalNum}} ,可用数量:{{item.availableNum}}]</el-tag>
+          <el-form-item label="法人姓名:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.legalPersonName}}</span>
+          </el-form-item>
+          <el-form-item label="法人性别:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.gender}}</span>
+          </el-form-item>
+          <el-form-item label="法人身份证号:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.idCardNum}}</span>
+          </el-form-item>
+          <el-form-item label="法人身份证正面照:" v-if="authInfoDetail.type == 'agency'">
+            <span>
+              <el-image
+                style="width: 100px;"
+                :src="authInfoDetail.idCardPositivePhoto"
+                fit="scale-down"></el-image>
             </span>
           </el-form-item>
-          <el-form-item label="机构Logo:" v-if="authInfoDetail.type == 'agency'">
+          <el-form-item label="法人身份证反面照:" v-if="authInfoDetail.type == 'agency'">
             <span>
               <el-image
                 style="width: 100px;"
-                :src="authInfoDetail.agencyPhoto"
+                :src="authInfoDetail.idCardBackPhoto"
                 fit="scale-down"></el-image>
             </span>
           </el-form-item>
+          <el-form-item label="身份证截止时间:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.idCardDeadTime}}</span>
+          </el-form-item>
+          <el-form-item label="企业角色:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.roleList}}</span>
+          </el-form-item>
+
+<!--          <el-form-item label="机构能力:" v-if="authInfoDetail.type == 'agency'">-->
+<!--            <span v-for="item in authInfoDetail.evaluationAgencyAbilityList"> <el-tag>{{item}}</el-tag>-->
+<!--            </span>-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="机构资源:" v-if="authInfoDetail.type == 'agency'">-->
+<!--            <span v-for="item in authInfoDetail.evaluationAgencyResourceList"> <el-tag>{{item.type}} ( {{item.name}} ) :&nbsp; [总数:{{item.totalNum}} ,可用数量:{{item.availableNum}}]</el-tag>-->
+<!--            </span>-->
+<!--          </el-form-item>-->
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button type="info" size="mini" @click="hideAuthDialog()">返回</el-button>
@@ -179,25 +238,34 @@
                 handledAuthList: [],
                 authInfoDetail: {
                     userId: '',
+                    realName: "",
+                    applyTime: "",
+                    checkTime: "",
+                    explain: "",
+                    gender: "",
+                    idCard: "",
+                    idCardBackPhoto: "",
+                    idCardDeadTime: "",
+                    idCardPositivePhoto: "",
+                    isAuthentication: 0,
+                    isDeleted: 0,
+                    roleList: [],
+                    address: "",
+
                     type: '',
-                    realName: '',
-                    IDCard: '',
-                    IDCardPositivePhoto: '',
                     bankAccount: '',
-                    address: '',
-                    applyTime: '',
-
                     enterpriseName: '',
                     legalPersonName: '',
                     businessLicensePhoto: '',
                     unifiedSocialCreditCode: '',
 
-                    evaluationAgencyName: '',
+                    agencyPhoto: "",
+                    evaluationAgencyName: "",
+                    expireTime: '',
+                    idCardNum: "",
                     evaluationAgencyAbilityList: [],
                     evaluationAgencyResourceList: [],
-                    agencyPhoto: '',
                     updateTime: '',
-                    expireTime: ''
                 }
             }
         },
@@ -276,6 +344,7 @@
                 this.hideLoading()
                 this.getHandlingAuthList()
                 notify('success', '驳回成功')
+                this.hideAuthDialog()
                 console.log(res)
             },
             handleAuthenticationRejectFail (error) {
@@ -321,11 +390,18 @@
                 this.hideLoading()
                 console.log(res)
                 this.authInfoDetail.realName = res.realName
-                this.authInfoDetail.IDCard = res.idcard
-                this.authInfoDetail.IDCardPositivePhoto = res.idCardPositivePhotoi
-                this.authInfoDetail.bankAccount = res.bankAccount
-                this.authInfoDetail.address = res.address
                 this.authInfoDetail.applyTime = res.applyTime
+                this.authInfoDetail.checkTime = res.checkTime
+                this.authInfoDetail.explain = res.explain
+                this.authInfoDetail.gender = res.gender
+                this.authInfoDetail.idCard = res.idCard
+                this.authInfoDetail.idCardBackPhoto = res.idCardBackPhoto
+                this.authInfoDetail.idCardDeadTime = res.idCardDeadTime
+                this.authInfoDetail.idCardPositivePhoto = res.idCardPositivePhoto
+                this.authInfoDetail.isAuthentication = res.isAuthentication
+                this.authInfoDetail.isDeleted = res.isDeleted
+                this.authInfoDetail.roleList = res.roleList
+                this.authInfoDetail.address = res.address
                 this.showAuthDialog()
                 console.log(res)
 
@@ -352,13 +428,25 @@
             getCurrentAgencyAuthInfoSuccess (res) {
                 this.hideLoading()
               this.authInfoDetail.bankAccount = res.bankAccount
+              this.authInfoDetail.legalPersonName = res.legalPersonName
+              this.authInfoDetail.businessLicensePhoto = res.businessLicensePhoto
               this.authInfoDetail.address = res.address
               this.authInfoDetail.applyTime = res.applyTime
-                this.authInfoDetail.evaluationAgencyName = res.evaluationAgencyName
-                this.authInfoDetail.evaluationAgencyAbilityList = res.evaluationAgencyAbilityList
-                this.authInfoDetail.evaluationAgencyResourceList = res.evaluationAgencyResourceList
-                this.authInfoDetail.agencyPhoto = res.agencyPhoto
-                this.authInfoDetail.updateTime = res.updateTime
+              this.authInfoDetail.evaluationAgencyName = res.evaluationAgencyName
+              this.authInfoDetail.evaluationAgencyAbilityList = res.evaluationAgencyAbilityList
+              this.authInfoDetail.evaluationAgencyResourceList = res.evaluationAgencyResourceList
+              this.authInfoDetail.agencyPhoto = res.agencyPhoto
+              this.authInfoDetail.updateTime = res.updateTime
+              this.authInfoDetail.checkTime = res.checkTime
+              this.authInfoDetail.explain = res.explain
+              this.authInfoDetail.gender = res.gender
+              this.authInfoDetail.idCardNum = res.idCardNum
+              this.authInfoDetail.idCardBackPhoto = res.idCardBackPhoto
+              this.authInfoDetail.idCardDeadTime = res.idCardDeadTime
+              this.authInfoDetail.idCardPositivePhoto = res.idCardPositivePhoto
+              this.authInfoDetail.isAuthentication = res.isAuthentication
+              this.authInfoDetail.isDeleted = res.isDeleted
+              this.authInfoDetail.roleList = res.roleList
               this.showAuthDialog()
             },
             getCurrentAgencyAuthInfoFail (error) {

+ 1 - 1
src/components/authen/IndividualAuthentication.vue

@@ -256,7 +256,7 @@ export default {
         notify('error', '单个文件大小不能超过10M')
         return false;
       }
-      let fileName = file.name
+      let fileName = file.namep
       let index = fileName.lastIndexOf('.');
       // 文件不能没有后缀
       if (index <= 0){

+ 32 - 32
src/components/commons/Header2.0.vue

@@ -14,7 +14,7 @@
                 </span>
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item>
-                    <router-link :to="{ name: 'UserCenter',params:{userId:user.userVO.id}}">
+                    <router-link :to="{ path:'/personal/mine'}">
                       <el-link icon="el-icon-user" :underline="false">
                         个人中心
                       </el-link>
@@ -27,35 +27,35 @@
                       </el-link>
                     </router-link>
                   </el-dropdown-item>
-                  <el-dropdown-item v-if="user.authStatus.text == '审核通过' &&  !this.user.personalAuthVO && this.user.agencyVO">
-                    <router-link :to="{ name: 'Agency',params:{userId:user.userVO.id}}">
-                      <el-link icon="el-icon-edit" :underline="false">
-                        修改机构信息
-                      </el-link>
-                    </router-link>
-                  </el-dropdown-item>
-                  <el-dropdown-item v-if="user.authStatus.text == '未实名认证' && !rolesPermissions.isSystemAdministrator">
-                    <router-link :to="{ name: 'AuthenticationIndex'}">
-                      <el-link type="info" icon="el-icon-warning-outline" :underline="false">
-                        未实名认证
-                      </el-link>
-                    </router-link>
-                  </el-dropdown-item>
-                  <el-dropdown-item v-if="user.authStatus.text == '认证审核中'" @click.native="handleClickAuthChecking()">
-                    <el-link type="warning" icon="el-icon-loading" :underline="false">
-                      认证审核中
-                    </el-link>
-                  </el-dropdown-item>
-                  <el-dropdown-item @click.native="handleClickAuthPass()" v-if="user.authStatus.text == '审核通过'">
-                    <el-link type="primary" icon="el-icon-check" :underline="false">
-                      已认证
-                    </el-link>
-                  </el-dropdown-item>
-                  <el-dropdown-item @click.native="handleClickAuthReject()" v-if="user.authStatus.text == '审核未通过'">
-                    <el-link type="danger" icon="el-icon-close" :underline="false">
-                      认证失败
-                    </el-link>
-                  </el-dropdown-item>
+<!--                  <el-dropdown-item v-if="user.authStatus.text == '审核通过' &&  !this.user.personalAuthVO && this.user.agencyVO">-->
+<!--                    <router-link :to="{ name: 'Agency',params:{userId:user.userVO.id}}">-->
+<!--                      <el-link icon="el-icon-edit" :underline="false">-->
+<!--                        修改机构信息-->
+<!--                      </el-link>-->
+<!--                    </router-link>-->
+<!--                  </el-dropdown-item>-->
+<!--                  <el-dropdown-item v-if="user.authStatus.text == '未实名认证' && !rolesPermissions.isSystemAdministrator">-->
+<!--                    <router-link :to="{ name: 'AuthenticationIndex'}">-->
+<!--                      <el-link type="info" icon="el-icon-warning-outline" :underline="false">-->
+<!--                        未实名认证-->
+<!--                      </el-link>-->
+<!--                    </router-link>-->
+<!--                  </el-dropdown-item>-->
+<!--                  <el-dropdown-item v-if="user.authStatus.text == '认证审核中'" @click.native="handleClickAuthChecking()">-->
+<!--                    <el-link type="warning" icon="el-icon-loading" :underline="false">-->
+<!--                      认证审核中-->
+<!--                    </el-link>-->
+<!--                  </el-dropdown-item>-->
+<!--                  <el-dropdown-item @click.native="handleClickAuthPass()" v-if="user.authStatus.text == '审核通过'">-->
+<!--                    <el-link type="primary" icon="el-icon-check" :underline="false">-->
+<!--                      已认证-->
+<!--                    </el-link>-->
+<!--                  </el-dropdown-item>-->
+<!--                  <el-dropdown-item @click.native="handleClickAuthReject()" v-if="user.authStatus.text == '审核未通过'">-->
+<!--                    <el-link type="danger" icon="el-icon-close" :underline="false">-->
+<!--                      认证失败-->
+<!--                    </el-link>-->
+<!--                  </el-dropdown-item>-->
                   <el-dropdown-item divided @click.native="userLogout()">登出</el-dropdown-item>
                 </el-dropdown-menu>
               </el-dropdown>
@@ -65,7 +65,7 @@
             </li>
             &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
             <li v-if="!isLogin">
-              <a :href="loginUrl">免费注册</a>
+              <a :href="registerUrl">免费注册</a>
             </li>
               <span v-if="!isLogin">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
             <li v-if="isLogin">
@@ -200,7 +200,7 @@
         userLogout () {
             this.isLogin = false
             logout().then((res) => {
-                // location.reload();
+                location.reload();
                 this.$router.push('/home')
             })
 

+ 15 - 4
src/components/commons/ProvinceCity.vue

@@ -53,8 +53,8 @@ export default {
   data() {
     return {
       loadingCity: false,
-      province: "",
-      city: "",
+      province: this.provinceCode,
+      city: this.cityCode,
       provinces: [],
       cities: []
     };
@@ -98,8 +98,19 @@ export default {
     data(){
       this.province = this.provinceCode
       this.city = this.cityCode
-    }
-  }
+    },
+    // deep: true,
+    // cityCode(val){
+    //   console.log('cityCode')
+    //   console.log(val)
+    //   this.city = val;
+    // },
+    // provinceCode(val){
+    //   console.log('proCode')
+    //   this.provinceChanged(this.provinceCode);
+    //   this.province = val;
+    // },
+  },
 };
 </script>
 

+ 1 - 1
src/components/task/Task.vue

@@ -485,7 +485,7 @@
       //获取任务详情失败时回调函数
       getTaskDetailFail(error) {
         this.hideLoading()
-        notify('error', '获取任务详情失败:' + error.data)
+        // notify('error', '获取任务详情失败:' + error.data)
       },
 
       //处理显示报告

+ 5 - 5
src/js/index.js

@@ -629,7 +629,7 @@ export const defaultValue = {
 //     'cityCode': '南京市'
 //   }
 // }
-// //通过名称获取省、市代码
+//通过名称获取省、市代码
 // export const getProvinceCodeByProvinceName = (provinceName, cityName) => {
 //   for (var i = 0; i < ProvinceJson.provinces.length; i++) {
 //     if (ProvinceJson.provinces[i].name == provinceName) {
@@ -643,10 +643,10 @@ export const defaultValue = {
 //       }
 //     }
 //   }
-//   return {
-//     'provinceCode': '3200',
-//     'cityCode': '3201'
-//   }
+  // return {
+  //   'provinceCode': '3200',
+  //   'cityCode': '3201'
+  // }
 // }
 //
 // //获取批量上传项目模板文件

+ 2 - 4
src/pages/DetailPage/AgencyDetail.vue

@@ -25,7 +25,7 @@
           <el-link v-if="authentication.explain==null || authentication.explain==''" type="danger" disabled>管理员未填写
           </el-link>
         </el-form-item>
-        <el-form-item label="地址" prop="address">
+        <el-form-item label="地址" prop="address" v-if="this.authentication.address != null &&  this.authentication.address != ''">
           <span >{{authentication.address}}</span>
         </el-form-item>
         <el-form-item label="测评机构能力" prop="evaluationAgencyAbilityList">
@@ -98,9 +98,7 @@
                 this.getAuthInfo ()
             },
             back() {
-                this.$router.push({
-                    name: 'AgencyList'
-                })
+                this.$router.go(-1);
             },
             //加载数据
             getAuthInfo () {

+ 1 - 3
src/pages/DetailPage/ResourceDetail.vue

@@ -61,9 +61,7 @@
                 this.loadData()
             },
             back() {
-                this.$router.push({
-                    name: 'ResourceList'
-                })
+                this.$router.go(-1);
             },
             loadData() {
                 this.showLoading()

+ 3 - 5
src/pages/DetailPage/UserDetail.vue

@@ -9,10 +9,10 @@
           <!--          <span  class="badge">{{user.photo}}</span>-->
           <img :src="user.photo" style="width: 50px; height: 50px;"/>
         </el-form-item>
-        <el-form-item label="性别" prop="count">
+        <el-form-item label="性别" prop="count" v-if="this.gender != null &&  this.gender != ''">
           <span>{{user.gender}}</span>
         </el-form-item>
-        <el-form-item label="省市" prop="address">
+        <el-form-item label="省市" prop="address" v-if="this.address != null &&  this.address != ''">
           <span class="badge">{{user.address}}</span>
         </el-form-item>
         <el-form-item label="接包次数" prop="count">
@@ -60,9 +60,7 @@
                 this.loadData()
             },
             back() {
-                this.$router.push({
-                    name: 'UserList'
-                })
+                this.$router.go(-1);
             },
             loadData() {
                 this.showLoading()

+ 7 - 1
src/pages/Homepage/BrandCard.vue

@@ -7,7 +7,7 @@
     <div style="height: 96px">
       <el-row :gutter="15">
         <el-col v-for="item in residentAgencyList" :key="item.id" :span="6" style="height: 50px">
-          <img :src="item.agencyPhoto" :alt="item.evaluationAgencyName" style="width: 100%;height: 100%"/>
+          <img :src="item.agencyPhoto" :alt="item.evaluationAgencyName" style="width: 100%;height: 100%; cursor: pointer;" @click="goToDetail(item.userId)"/>
         </el-col>
       </el-row>
     </div>
@@ -24,6 +24,12 @@
                 name: 'AgencyResidentList',
             });
         },
+        goToDetail(userId) {
+            this.$router.push({
+                name: 'AgencyDetail',
+                params: {id: userId, type: 1}
+            })
+        },
     }
   }
 </script>

+ 12 - 3
src/pages/Homepage/Homepage.vue

@@ -37,14 +37,14 @@
       </div>
     </div>
 
-    <div class="home-page container">
+    <div class="home-page container" v-loading="loading">
       <el-row>
         <el-col :span="19" class="test-type-wrapper">
           <TestMenu :testTypeList="homeData.testTypeList"></TestMenu>
           <TestCard :applicationTypeList="homeData.applicationTypeList"></TestCard>
         </el-col>
         <el-col :span="5"  class="homepage-right-modules">
-          <LoginCard/>
+          <LoginCard v-if="!this.isLogin"/>
           <HotCrowd :applicationTypeRank="homeDataNoCache.applicationTypeRank"/>
           <HotAgency :agencyRank="homeDataNoCache.agencyRank"/>
           <HotUser :userRank="homeDataNoCache.userRank"/>
@@ -107,6 +107,7 @@
     data() {
       return {
         isLogin: false,
+        loading: false,
         searchType:'0',
         searchTypeArr:[
           {
@@ -151,13 +152,14 @@
     },
     methods:{
       loadData(){
+
+        this.showLoading();
         if (storageGet('user') != null) {
             this.isLogin = true;
         }
         this.setFields();
 
         Http.get('/api/common/index/info/cache').then((res)=>{
-          console.log(res.data);
           this.homeData = res.data;
           // this.homeData.applicationTypeList.map((item)=>{
           //   item.height = (item.testTypeList.length / 2) * 24 + 100;
@@ -168,6 +170,7 @@
         Http.get('/api/common/index/info/nocache').then((res)=>{
             this.homeDataNoCache = res.data;
         })
+        this.hideLoading();
       },
       setFields(){
           getAllFields().then((res) => {
@@ -214,6 +217,12 @@
         }else if(this.searchType == 3){
             this.$router.push({name: 'ExpertList', params: {searchVal: this.searchVal}});
         }
+      },
+      showLoading() {
+          this.loading = true
+      },
+      hideLoading() {
+          this.loading = false
       }
     },
 

+ 8 - 2
src/pages/Homepage/HotAgency.vue

@@ -8,8 +8,8 @@
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in agencyRank" :key="item.id">
         <el-col :span="19">
-          <img :src="item.agencyPhoto" alt="logo-project" class="pull-left project-logo-img">
-          <div style="margin-left: 55px">
+          <img :src="item.agencyPhoto" alt="logo-project" class="pull-left project-logo-img" style="cursor: pointer" @click="goToDetail(item.userId)">
+          <div style="margin-left: 55px; cursor: pointer;" @click="goToDetail(item.userId)"  >
             <div class="list-item-title">
               {{item.evaluationAgencyName}}
             </div>
@@ -39,6 +39,12 @@
                 name: 'AgencyList',
             });
         },
+        goToDetail(userId) {
+            this.$router.push({
+                name: 'AgencyDetail',
+                params: {id: userId, type: 0}
+            })
+        },
     }
   }
 </script>

+ 1 - 1
src/pages/Homepage/HotCrowd.vue

@@ -8,7 +8,7 @@
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in applicationTypeRank" :key="item.id">
         <el-col :span="19">
-          <img src="../../assets/img/logo-project.png" alt="logo-project" class="pull-left project-logo-img">
+          <img :src="item.image" alt="logo-project" class="pull-left project-logo-img">
           <div style="margin-left: 55px">
             <div class="list-item-title">
               {{item.name}}

+ 8 - 2
src/pages/Homepage/HotUser.vue

@@ -8,8 +8,8 @@
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in userRank" :key="item.id">
         <el-col :span="19">
-          <img src="../../assets/img/logo-project.png" alt="logo-project" class="pull-left project-logo-img">
-          <div style="margin-left: 55px">
+          <img :src="item.photoUrl" alt="logo-project" class="pull-left project-logo-img" style="cursor: pointer" @click="goToDetail(item.id)">
+          <div style="margin-left: 55px;cursor: pointer;" @click="goToDetail(item.id)">
             <div class="list-item-title">
               {{item.name}}
             </div>
@@ -38,6 +38,12 @@
                 name: 'UserList',
             });
         },
+        goToDetail(id) {
+            this.$router.push({
+                name: 'UserDetail',
+                params: {id: id}
+            })
+        },
     }
   }
 </script>

+ 10 - 2
src/pages/Homepage/LoginCard.vue

@@ -11,7 +11,7 @@
         </div>
       </div>
       <div class="welcome-btn">
-        <el-button type="primary" size="mini" class="pull-left login-btn">登录</el-button>
+        <a :href="loginUrl"><el-button type="primary" size="mini" class="pull-left login-btn" >登录</el-button></a>
         <el-button type="danger" size="mini" class="pull-right cancel-btn">取消</el-button>
       </div>
     </div>
@@ -19,8 +19,16 @@
 </template>
 
 <script>
+  import Http from '@/js/http.js'
+  import Apis from '@/js/api.js'
   export default {
-    name: "LoginCard"
+    name: "LoginCard",
+    data(){
+        return {
+            user: {},
+            loginUrl: process.env.LOGIN_URL,
+        }
+    },
   }
 </script>
 

+ 7 - 1
src/pages/Homepage/ResourceAndTool.vue

@@ -5,7 +5,7 @@
       <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
     </div>
     <div>
-      <div v-for="item in resourceList" :key="item.code">{{item.name}}</div>
+      <div v-for="item in resourceList" :key="item.code"><span style="cursor: pointer" @click="goToDetail(item.code)">{{item.name}}</span></div>
     </div>
   </el-card>
 </template>
@@ -20,6 +20,12 @@
                 name: 'ResourceList',
             });
         },
+        goToDetail(code) {
+            this.$router.push({
+                name: 'ResourceDetail',
+                params: {id: code}
+            })
+        },
     }
   }
 </script>

+ 61 - 7
src/pages/UserCenter/Authentication.vue

@@ -6,7 +6,7 @@
       </div>
       <el-row :gutter="20">
         <el-col :span="12">
-          <div class="authentication-card authentication-card-select">
+          <div class="authentication-card" :class="selectedCardImg"  @click="gotoPersonalAuth" v-if="authType<2">
             <div class="authentication-card-title">个人认证</div>
             <el-row :gutter="10">
               <el-col :span="5">
@@ -14,15 +14,24 @@
                   <img src="../../assets/img/idcard1.png" >
                 </div>
               </el-col>
-              <el-col :span="19">
+<!--              未认证-->
+              <el-col :span="19" v-if="authType===0">
                 <div class="authentication-card-title">手持证件照上传</div>
                 <div class="authentication-card-info">需要进行人工审核,审核周期1-3个工作日</div>
               </el-col>
+<!--              已认证,个人或者企业-->
+              <el-col :span="19" v-if="authType!==0">
+                <div class="authentication-card-title">
+                  <el-tag :type="authStatus.style">{{authStatus.text}}</el-tag></div>
+                <div class="authentication-card-info" v-if="authStatus.style=='warning'">需要进行人工审核,审核周期1-3个工作日</div>
+                <div class="authentication-card-info" v-if="authStatus.style=='success'">认证成功,点击查看认证信息</div>
+                <div class="authentication-card-info" v-if="authStatus.style=='info'">认证失败,查看失败原因</div>
+              </el-col>
             </el-row>
-          </div>
+          </div >
         </el-col>
         <el-col :span="12">
-          <div class="authentication-card">
+          <div class="authentication-card" :class="selectedCardImg"  @click="gotoEnterpriseAuth" v-if="authType===2 || authType ===0">
             <div class="authentication-card-title">企业认证</div>
             <el-row :gutter="10">
               <el-col :span="5">
@@ -30,10 +39,20 @@
                   <img src="../../assets/img/idcard2.png" >
                 </div>
               </el-col>
-              <el-col :span="19">
+              <!--              未认证-->
+              <el-col :span="19" v-if="authType===0">
                 <div class="authentication-card-title">手持证件照上传</div>
                 <div class="authentication-card-info">需要进行人工审核,审核周期1-3个工作日</div>
               </el-col>
+              <!--              已认证,企业-->
+              <el-col :span="19" v-if="authType!==0">
+                <div class="authentication-card-title">
+                  <el-tag :type="authStatus.style">{{authStatus.text}}</el-tag></div>
+                <div class="authentication-card-info" v-if="authStatus.style=='warning'">需要进行人工审核,审核周期1-3个工作日</div>
+                <div class="authentication-card-info" v-if="authStatus.style=='success'">认证成功,点击查看认证信息</div>
+                <div class="authentication-card-info" v-if="authStatus.style=='info'">认证失败,查看失败原因</div>
+              </el-col>
+
             </el-row>
           </div>
         </el-col>
@@ -43,15 +62,50 @@
 </template>
 
 <script>
-
+  import Http from '@/js/http.js'
+  import {storageGet} from '@/js/index'
+  import {notify} from '@/constants/index'
   export default {
     name: "Authentication",
     data() {
       return {
-
+        selectedCardImg:'',
+        authType:-1,
+        authDetail:{},
+        authInfo:{},
+        authStatus:''
       }
     },
     methods: {
+      gotoPersonalAuth(){
+        this.$router.push({path:'/personal/authentication/individual'})
+      },
+      gotoEnterpriseAuth(){
+        this.$router.push({path:'/personal/authentication/enterprise'})
+      },
+      //获取当前资质状态
+      getAuthStatus(){
+        let userId = storageGet('user')&&storageGet('user').userVO.id;
+        Http.get(`/api/user/${userId}`).then(res=>{
+          this.authInfo = res;
+          if(res.personalAuthVO){
+            this.authType = 1  //个人
+            this.authDetail = res.personalAuthVO
+            this.authStatus = res.personalAuthVO.authStatus
+            this.selectedCardImg = 'authentication-card-select'
+          }else if(res.agencyVO){
+            this.authType = 2  //企业
+            this.authDetail = res.agencyVO
+            this.authStatus = res.agencyVO.authStatus
+            this.selectedCardImg = 'authentication-card-select'
+          }else if((!res.enterpriseAuthVO) || (!res.agencyVO)){
+            this.authType = 0  //无
+          }
+        })
+      }
+    },
+    mounted() {
+      this.getAuthStatus();
 
     }
   }

+ 7 - 3
src/pages/UserCenter/BankCard.vue

@@ -5,7 +5,7 @@
         <div class="bank-card">
           <div class="bank-card-title" style="padding: 10px;height:43px">
             <img :src="item.logoUrl" class="bank-card-logo">
-            <span class="" style="font-size: 16px;font-weight: bold;line-height: 43px">{{item.name}}</span>
+            <span class="" style="font-size: 16px;font-weight: bold;line-height: 43px;">{{item.name}}</span>
             <el-button type="primary" plain class="pull-right" size="mini" @click="requestUntieBankCard(item)">解绑
             </el-button>
           </div>
@@ -23,7 +23,7 @@
       :visible.sync="untieBankCard"
       width="30%"
     >
-      <span>确定解绑{{nowCard.name}},卡号为:{{nowCard.number}}的银行卡吗?</span>
+      <span>确定解绑 <span style="font-weight: bold; font-size: 18px;">{{nowCard.name}}</span>,卡号为:<span style="font-weight: bold; font-size: 18px;">{{nowCard.number}}</span> 的银行卡吗?</span>
       <span slot="footer" class="dialog-footer">
     <el-button @click="untieBankCard = false">取 消</el-button>
     <el-button type="primary" @click="handleUntieBankCard">确 定</el-button>
@@ -38,6 +38,7 @@
   import {storageGet} from '@/js/index'
   import Http from '@/js/http.js'
   import BankCard from './BankCard'
+  import {notify} from '@/constants/index'
 
   export default {
     name: "BankCard",
@@ -46,7 +47,7 @@
       return {
         untieBankCard: false,
         nowCard: {},
-        user: {}
+        user: {},
       }
     },
     methods: {
@@ -62,6 +63,9 @@
           //调用父组件的loadData方法
           this.$emit('loadData');
           this.untieBankCard = false
+            notify('success', "解绑成功")
+        }).catch(error => {
+            notify('error', error.data)
         })
       },
     },

+ 1 - 1
src/pages/UserCenter/BindingMobile.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div style="margin-top: 20px">
     <el-form label-width="80px" style="width:400px">
       <el-form-item label="手机号码" >
         <el-input v-model="phoneBindingForm.phone"></el-input>

+ 289 - 52
src/pages/UserCenter/EnterpriseAuth.vue

@@ -2,69 +2,284 @@
   <div class="right-modifyPsw">
     <div class="right-modifyPsw-title">
       <span style="font-size: 18px;font-weight: bold">企业认证</span>
+      <el-tag :type="authStatus.style" v-if="authType===1">{{authStatus.text}}</el-tag>
+      <el-tag type="danger" v-if="authType===0">未认证</el-tag>
+      <el-button type="primary" class="pull-right" size="small" v-if="canEdit">编辑</el-button>
     </div>
     <el-steps :active="active" process-status="finish" style="margin-bottom: 20px">
       <el-step title="上传企业信息"></el-step>
       <el-step title="上传法人信息"></el-step>
-      <el-step title="确认信息"></el-step>
-      <el-step title="认证结果"></el-step>
+<!--      <el-step title="确认信息"></el-step>-->
+<!--      <el-step title="认证结果"></el-step>-->
     </el-steps>
-    <div class="upload-wrapper">
-      <div>
-        <el-upload
-          class="avatar-uploader"
-          action="https://jsonplaceholder.typicode.com/posts/"
-          :show-file-list="false"
-          :on-success="handleAvatarSuccess"
-          :before-upload="beforeAvatarUpload">
-          <img v-if="imageUrl" :src="imageUrl" class="avatar">
-          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-        </el-upload>
-        <div><span style="color: red">*</span>营业执照:(仅支持三证合一)</div>
-      </div>
-      <div class="authentication-detail">
-        <div class="authentication-detail-title">证件要求</div>
-        <ul class="authentication-detail-list">
-          <li>必须为清晰、完整的彩色原件扫描件或数码照</li>
-          <li>仅支持.jpg .bmp .png .gif的图片格式,图片大小不超过4M</li>
-          <li>必须在有效期内且年检章齐全(当年成立的公司可无年检章)</li>
-          <li>必须为中国大陆工商局颁发</li>
-        </ul>
+    <div class="upload-wrapper" v-if="active===0">
+      <el-row class="agency-form-item">
+        <el-col :span="3">企业logo:</el-col>
+        <el-col :span="12">
+          <el-upload
+            class="avatar-uploader idcard-uploader"
+            style="border: lightgrey 1px solid"
+            action="https://jsonplaceholder.typicode.com/posts/"
+            :before-upload="beforeFileUpload"
+            :http-request="uploadFile"
+            :data="{type:3}"
+            :disabled="!canEdit"
+          >
+            <img v-if="enterpriseForm.agencyPhoto" :src="enterpriseForm.agencyPhoto" class="avatar">
+          </el-upload>
+        </el-col>
+      </el-row>
+
+     <el-row class="agency-form-item">
+       <el-col :span="3">企业名称:</el-col>
+       <el-col :span="12">
+         <el-input :disabled="!canEdit" v-model="enterpriseForm.evaluationAgencyName" placeholder="企业名称"></el-input>
+       </el-col>
+      </el-row>
+
+      <el-row class="agency-form-item">
+        <div>营业执照:</div>
+        <el-col :span="8">
+          <div class="uploader-businessLicensePhoto">
+            <el-upload
+              class="avatar-uploader idcard-uploader"
+              style="border: lightgrey 1px solid"
+              action="https://jsonplaceholder.typicode.com/posts/"
+              :before-upload="beforeFileUpload"
+              :http-request="uploadFile"
+              :data="{type:2}"
+              :disabled="!canEdit"
+            >
+              <img v-if="enterpriseForm.businessLicensePhoto" :src="enterpriseForm.businessLicensePhoto" class="avatar">
+            </el-upload>
+            <div><span style="color: red">*</span>营业执照:(仅支持三证合一)</div>
+          </div>
+        </el-col>
+        <el-col :span="16">
+          <div class="authentication-detail">
+            <div class="authentication-detail-title">证件要求</div>
+            <ul class="authentication-detail-list">
+              <li>必须为清晰、完整的彩色原件扫描件或数码照</li>
+              <li>仅支持.jpg .bmp .png .gif的图片格式,图片大小不超过4M</li>
+              <li>必须在有效期内且年检章齐全(当年成立的公司可无年检章)</li>
+              <li>必须为中国大陆工商局颁发</li>
+            </ul>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+    <div class="legal-person-wrapper" v-if="active===1">
+      <el-form ref="enterpriseForm" :model="enterpriseForm" label-width="120px" style="width: 70%">
+        <el-form-item label="法人姓名">
+          <el-input :disabled="!canEdit" v-model="enterpriseForm.legalPersonName" placeholder="请输入您的姓名,需与身份证保持一致"></el-input>
+        </el-form-item>
+        <el-form-item label="身份证号码">
+          <el-input :disabled="!canEdit" v-model="enterpriseForm.idCardNum" placeholder="身份证前后不能有空格"></el-input>
+        </el-form-item>
+        <el-form-item label="性别">
+          <el-radio-group v-model="enterpriseForm.gender" :disabled="!canEdit">
+            <el-radio label="男"></el-radio>
+            <el-radio label="女"></el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="身份证到期时间">
+          <el-input :disabled="!canEdit" v-model="enterpriseForm.idCardDeadTime" placeholder="请按身份证背面“有效期限”如实填写"></el-input>
+        </el-form-item>
+        <el-form-item label="家庭或单位地址">
+          <el-input :disabled="!canEdit" v-model="enterpriseForm.address"></el-input>
+        </el-form-item>
+        <el-form-item label="认证权限">
+          <el-checkbox-group v-model="enterpriseForm.roleList" :disabled="!canEdit">
+            <el-checkbox :label="0">发任务</el-checkbox>
+            <el-checkbox :label="1">接任务</el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
+      </el-form>
+      <div class="upload-wrapper">
+        <el-row style="width: 100%">
+          <el-col :span="9" style="padding-left: 30px">
+            <div>
+              <el-upload
+                class="avatar-uploader"
+                style="border: lightgrey 1px solid"
+                action="https://jsonplaceholder.typicode.com/posts/"
+                :before-upload="beforeFileUpload"
+                :http-request="uploadFile"
+                :data="{type:0}"
+                :disabled="!canEdit"
+              >
+                <img v-if="enterpriseForm.idCardPositivePhoto" :src="enterpriseForm.idCardPositivePhoto" class="avatar">
+              </el-upload>
+              <div style="text-align: center">身份证正面照</div>
+            </div>
+            <div style="width: 280px">
+              <el-upload
+                class="avatar-uploader idcard-uploader"
+                style="border: lightgrey 1px solid"
+                action="https://jsonplaceholder.typicode.com/posts/"
+                :before-upload="beforeFileUpload"
+                :http-request="uploadFile"
+                :data="{type:1}"
+                :disabled="!canEdit"
+              >
+                <img v-if="enterpriseForm.idCardBackPhoto" :src="enterpriseForm.idCardBackPhoto" class="avatar">
+              </el-upload>
+
+              <div style="text-align: center">身份证反面照</div>
+            </div>
+          </el-col>
+          <el-col :span="15">
+            <div class="authentication-detail">
+              <div class="authentication-detail-title">示例</div>
+              <el-row style="width: 100%">
+                <div>
+                  <div class="idcard-example1"></div>
+                  <div class="idcard-example2"></div>
+                </div>
+                <div>
+                  <ul class="authentication-detail-list">
+                    <li>仅支持.jpg .bmp .png .gif的图片格式,图 片大小不超过3M</li>
+                    <li>核实手持证件与原件方向一致,对焦身份证 进行拍照</li>
+                    <li>您提供的照片众测服务平台将予以保护,不 会用于其他用途</li>
+                  </ul>
+                  <a class="authentication-detail-list-blue">实名认证帮助></a>
+                </div>
+              </el-row>
+            </div>
+          </el-col>
+        </el-row>
       </div>
     </div>
     <div class="enterprise-brn-wrapper">
-      <button class="enterprise-btn previousBtn">上一步</button>
-      <button class="enterprise-btn nextBtn">下一步</button>
+      <button class="enterprise-btn previousBtn" @click="active--" v-if="active>0">上一步</button>
+      <button class="enterprise-btn nextBtn" @click="active++" v-if="active===0">下一步</button>
+      <button class="enterprise-btn nextBtn" @click="submitEnterpriseAuth" v-if="active===1">提交审核</button>
     </div>
-
   </div>
 </template>
 
 <script>
+  import Apis from '@/js/api'
+  import Http from '@/js/http'
+  import {notify} from '@/constants/index'
+  import {storageGet} from '@/js/index'
+  import idcardPositive from '../../assets/img/idcard-positive.png'
+  import idcardBack from '../../assets/img/idcard-back.png'
   export default {
     name: "EnterpriseAuth",
     data() {
       return {
         active: 0,
-        imageUrl: ''
+        user: {},
+        canEdit:false,
+        enterpriseForm: {
+          roleList: [],//0是发包 1是接包 如果两个都有那么权限都有。
+          legalPersonName: "", //法人姓名
+          businessLicensePhoto: require('../../assets/img/business-license.png'),//企业执照
+          idCardNum: "",//身份证号码
+          address: "",//地址
+          gender: "",
+          idCardPositivePhoto: idcardPositive,//身份证正面照
+          idCardBackPhoto: idcardBack,//身份证反面照片
+          idCardDeadTime: "",//身份证过期时间
+          evaluationAgencyName:"", //企业名称
+          agencyPhoto:"", //企业logo
+        }
+
       }
     },
-    methods:{
-      handleAvatarSuccess(res, file) {
-        this.imageUrl = URL.createObjectURL(file.raw);
+    methods: {
+      submitEnterpriseAuth() {
+        Http.post(`/api/user/${this.user.id}/agency`, this.enterpriseForm).then(res => {
+          if (res) {
+            notify('success', '认证成功');
+            this.$router.push('/personal/authentication')
+          }
+        })
       },
-      beforeAvatarUpload(file) {
-        const isJPG = file.type === 'image/jpeg';
-        const isLt2M = file.size / 1024 / 1024 < 2;
-
-        if (!isJPG) {
-          this.$message.error('上传头像图片只能是 JPG 格式!');
+      //获取当前认证状态
+      getAuthStatus() {
+        Http.get(`/api/user/${this.user.id}`).then(res => {
+          if (res.agencyVO) {
+            this.authType = 1  //个人已参与认证
+            this.authStatus = res.agencyVO.authStatus
+            //成功和审核中状态不可编辑,认证失败状态可编辑
+            this.authStatus.style === 'info' ? this.canEdit = true : null
+            this.setFormInfo(res.agencyVO);
+          } else {
+            this.authType = 0  //未参与个人认证
+            this.canEdit = true
+          }
+        })
+      },
+      setFormInfo(detail) {
+        //回显认证信息
+        this.enterpriseForm.roleList = detail.roleList,
+          this.enterpriseForm.legalPersonName = detail.legalPersonName,
+          this.enterpriseForm.gender = detail.gender,
+          this.enterpriseForm.idCardNum = detail.idCardNum,
+          this.enterpriseForm.address = detail.address,
+          this.enterpriseForm.idCardPositivePhoto = detail.idCardPositivePhoto,
+          this.enterpriseForm.idCardBackPhoto = detail.idCardBackPhoto,
+          this.enterpriseForm.idCardDeadTime = detail.idCardDeadTime
+          this.enterpriseForm.businessLicensePhoto = detail.businessLicensePhoto
+          this.enterpriseForm.evaluationAgencyName = detail.evaluationAgencyName
+          this.enterpriseForm.agencyPhoto = detail.agencyPhoto
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      },
+      //文件上传前的响应函数
+      beforeFileUpload(file) {
+        // 文件大小不能超过10M
+        if (file.size > 10 * 1000 * 1000) {
+          notify('error', '单个文件大小不能超过5M')
+          return false;
         }
-        if (!isLt2M) {
-          this.$message.error('上传头像图片大小不能超过 2MB!');
+        let fileName = file.name
+        let index = fileName.lastIndexOf('.');
+        // 文件不能没有后缀
+        if (index <= 0) {
+          notify('error', '只能上传png/jpg/jpeg格式的文件')
+          return false;
         }
-        return isJPG && isLt2M;
-      }
+        let fileSuffix = fileName.substr(index)
+        // 文件后缀必须是.png或者.jpg
+        if (fileSuffix !== '.jpg' && fileSuffix !== '.png' && fileSuffix !== '.jpeg') {
+          notify('error', '只能上传png/jpg/jpeg格式的文件')
+          return false;
+        }
+      },
+      //上传文件,此处为上传图片
+      uploadFile(param) {
+        const formData = new FormData()
+        let config = {
+          //添加请求头
+          headers: {'Content-Type': 'multipart/form-data'},
+        }
+        formData.append('file', param.file)
+        //console.log(JSON.parse(this.user).userVO)
+        Http.upload(Apis.FILE.UPLOAD_IMAGE.replace('{userId}', this.user.id), formData, config).then((res) => {
+          if(param.data.type==2){
+            this.enterpriseForm.businessLicensePhoto = res.data;
+          }else if(param.data.type == 1){
+            this.enterpriseForm.IDCardBackPhoto = res.data
+          }else if(param.data.type == 0){
+            this.enterpriseForm.IDCardPositivePhoto = res.data
+          }else if(param.data.type == 3){
+            this.enterpriseForm.agencyPhoto = res.data
+
+          }
+          notify('success', '上传成功')
+          // this.$refs['agency'].validateField('photoUrl');
+        }).catch(error => {
+          notify('error', error.data)
+        })
+      },
+    },
+    mounted() {
+      this.setUserInfo();
+      this.getAuthStatus()
     }
   }
 </script>
@@ -83,25 +298,45 @@
     }
 
     .upload-wrapper {
-      display: flex;
       padding: 0 30px;
 
+      .agency-form-item {
+        margin-bottom: 10px;
+      }
       .authentication-detail {
-        padding:0 30px;
-        border-left: 1px solid rgba(220,220,220,1);
+        padding: 0 30px;
+        border-left: 1px solid rgba(220, 220, 220, 1);
+
+        .idcard-example1{
+          width: 270px;
+          height: 160px;
+          background-image: url("../../assets/img/idcard-back.png");
+          background-size: 100% 100%;
+          margin-bottom: 20px;
+        }
+        .idcard-example2{
+          width: 270px;
+          height: 160px;
+          background-image: url("../../assets/img/idcard-positive.png");
+          background-size: 100% 100%;
+          margin-bottom: 20px;
+        }
+
         .authentication-detail-title {
-          font-size:16px;
-          font-family:Source Han Sans CN;
-          font-weight:600;
-          border-bottom: 1px dashed rgba(220,220,220,1);
+          font-size: 16px;
+          font-family: Source Han Sans CN;
+          font-weight: 600;
+          border-bottom: 1px dashed rgba(220, 220, 220, 1);
           margin-bottom: 10px;
           padding-bottom: 5px;
         }
       }
+
       .authentication-detail-list {
         list-style-type: none;
         padding-left: 0;
-        li:before{
+
+        li:before {
           content: "\2022";
           color: #148AE0;
           font-size: 22px;
@@ -114,16 +349,18 @@
       margin-top: 40px;
       display: flex;
       justify-content: center;
-      .enterprise-btn{
-        border: 1px solid rgba(0,118,203,1);
+
+      .enterprise-btn {
+        border: 1px solid rgba(0, 118, 203, 1);
         width: 150px;
         background-color: white;
-        color:rgba(0,118,203,1) ;
+        color: rgba(0, 118, 203, 1);
         padding: 10px;
         margin: 0 30px;
       }
+
       .nextBtn {
-        background-color:rgba(0,118,203,1);
+        background-color: rgba(0, 118, 203, 1);
         color: white;
       }
     }

+ 204 - 65
src/pages/UserCenter/IndividualAuth.vue

@@ -1,46 +1,57 @@
 <template>
-  <div class="right-modifyPsw">
+  <div class="right-modifyPsw" id="individualAuth">
     <div class="right-modifyPsw-title">
-      <span style="font-size: 18px;font-weight: bold">个人认证</span>
+      <span style="font-size: 18px;font-weight: bold;margin-right: 10px">个人认证</span>
+      <el-tag :type="authStatus.style" v-if="authType===1">{{authStatus.text}}</el-tag>
+      <el-tag type="danger" v-if="authType===0">未认证</el-tag>
+      <el-button type="primary" class="pull-right" size="small" v-if="canEdit">编辑</el-button>
     </div>
-    <div class="individual-steps-wrapper">
-      <el-steps :active="active" process-status="finish" style="margin-bottom: 20px;width: 300px">
-        <el-step title="填写认证信息"></el-step>
-        <el-step title="认证结果"></el-step>
-      </el-steps>
-  </div>
-    <el-form ref="form" :model="form" label-width="120px" style="width: 70%">
-    <el-form-item label="真实姓名">
-      <el-input v-model="individualForm.username" placeholder="请输入您的姓名,需与身份证保持一致"></el-input>
-    </el-form-item>
-    <el-form-item label="身份证号码">
-      <el-input v-model="individualForm.idnumber" placeholder="身份证前后不能有空格"></el-input>
-    </el-form-item>
+    <!--    <div class="individual-steps-wrapper">-->
+    <!--      <el-steps :active="active" process-status="finish" style="margin-bottom: 20px;width: 300px">-->
+    <!--        <el-step title="填写认证信息"></el-step>-->
+    <!--        <el-step title="认证结果"></el-step>-->
+    <!--      </el-steps>-->
+    <!--    </div>-->
+    <el-form ref="individualForm" :model="individualForm" label-width="120px" style="width: 70%">
+      <el-form-item label="真实姓名">
+        <el-input :disabled="!canEdit" v-model="individualForm.realName" placeholder="请输入您的姓名,需与身份证保持一致"></el-input>
+      </el-form-item>
+      <el-form-item label="身份证号码">
+        <el-input :disabled="!canEdit" v-model="individualForm.idCard" placeholder="身份证前后不能有空格"></el-input>
+      </el-form-item>
       <el-form-item label="性别">
-        <el-radio-group v-model="individualForm.gender">
+        <el-radio-group v-model="individualForm.gender" :disabled="!canEdit">
           <el-radio label="男"></el-radio>
           <el-radio label="女"></el-radio>
         </el-radio-group>
       </el-form-item>
       <el-form-item label="身份证到期时间">
-        <el-input v-model="individualForm.idDate" placeholder="请按身份证背面“有效期限”如实填写"></el-input>
+        <el-input :disabled="!canEdit" v-model="individualForm.idCardDeadTime" placeholder="请按身份证背面“有效期限”如实填写"></el-input>
       </el-form-item>
       <el-form-item label="家庭或单位地址">
-        <el-input v-model="individualForm.address"></el-input>
+        <el-input :disabled="!canEdit" v-model="individualForm.address"></el-input>
+      </el-form-item>
+      <el-form-item label="认证权限">
+        <el-checkbox-group v-model="individualForm.roleList" :disabled="!canEdit">
+          <el-checkbox :label="0">发任务</el-checkbox>
+          <el-checkbox :label="1">接任务</el-checkbox>
+        </el-checkbox-group>
       </el-form-item>
     </el-form>
     <div class="upload-wrapper">
       <el-row style="width: 100%">
         <el-col :span="9" style="padding-left: 30px">
-          <div>
+          <div style="width: 280px">
             <el-upload
-              class="avatar-uploader"
+              class="avatar-uploader idcard-uploader"
+              style="border: lightgrey 1px solid"
               action="https://jsonplaceholder.typicode.com/posts/"
-              :show-file-list="false"
-              :on-success="handleAvatarSuccess"
-              :before-upload="beforeAvatarUpload">
-              <img v-if="imageUrl" :src="imageUrl" class="avatar">
-              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+              :before-upload="beforeFileUpload"
+              :http-request="uploadFile"
+              :data="{type:0}"
+              :disabled="!canEdit"
+            >
+              <img v-if="individualForm.idCardPositivePhoto" :src="individualForm.idCardPositivePhoto" class="avatar">
             </el-upload>
             <div style="text-align: center">手持身份证正面照</div>
           </div>
@@ -71,14 +82,16 @@
         <el-col :span="9" style="padding-left: 30px">
           <div>
             <el-upload
-              class="avatar-uploader"
+              class="avatar-uploader idcard-uploader"
+              style="border: lightgrey 1px solid"
               action="https://jsonplaceholder.typicode.com/posts/"
-              :show-file-list="false"
-              :on-success="handleAvatarSuccess"
-              :before-upload="beforeAvatarUpload">
-              <img v-if="imageUrl" :src="imageUrl" class="avatar">
-              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+              :before-upload="beforeFileUpload"
+              :http-request="uploadFile"
+              :data="{type:1}"
+            >
+              <img v-if="individualForm.idCardBackPhoto" :src="individualForm.idCardBackPhoto" class="avatar">
             </el-upload>
+
             <div style="text-align: center">身份证反面照</div>
           </div>
         </el-col>
@@ -103,39 +116,128 @@
 
     </div>
     <div class="enterprise-brn-wrapper">
-      <button class="enterprise-btn previousBtn">上一步</button>
-      <button class="enterprise-btn nextBtn">提交审核</button>
+      <!--      <button class="enterprise-btn previousBtn">上一步</button>-->
+      <el-button type="primary" @click="submitIndividualAuth" v-if="canEdit">提交审核</el-button>
     </div>
 
   </div>
 </template>
 
 <script>
+  import Apis from '@/js/api'
+  import Http from '@/js/http'
+  import {notify} from '@/constants/index'
+  import {storageGet} from '@/js/index'
+  import idcardPositive from '../../assets/img/idcard-positive.png'
+  import idcardBack from '../../assets/img/idcard-back.png'
+
   export default {
     name: "IndividualAuth",
     data() {
       return {
         active: 0,
-        imageUrl: '',
-      individualForm:{}
+        user: {},
+        individualForm: {
+          roleList: [],//0是发包 1是接包 如果两个都有那么权限都有。
+          realName: "",
+          gender: "",
+          idCard: "",
+          idCardPositivePhoto: idcardPositive,
+          idCardBackPhoto: idcardBack,
+          idCardDeadTime: "",
+          address: ""
+        },
+        authType: -1,
+        authDetail: {},
+        authStatus: '',
+        canEdit:false
       }
     },
-    methods:{
-      handleAvatarSuccess(res, file) {
-        this.imageUrl = URL.createObjectURL(file.raw);
+    methods: {
+      setUserInfo(){
+        this.user = storageGet('user') && storageGet('user').userVO;
       },
-      beforeAvatarUpload(file) {
-        const isJPG = file.type === 'image/jpeg';
-        const isLt2M = file.size / 1024 / 1024 < 2;
-
-        if (!isJPG) {
-          this.$message.error('上传头像图片只能是 JPG 格式!');
+      submitIndividualAuth() {
+        Http.post(`/api/user/${this.user.id}/personalAuth`, this.individualForm).then(res => {
+          if (res) {
+            notify('success', '认证成功');
+            this.$router.push('/personal/authentication')
+          }
+        })
+      },
+      //获取当前认证状态
+      getAuthStatus() {
+        Http.get(`/api/user/${this.user.id}`).then(res => {
+          if (res.personalAuthVO) {
+            this.authType = 1  //个人已参与认证
+            this.authStatus = res.personalAuthVO.authStatus
+            //成功和审核中状态不可编辑,认证失败状态可编辑
+            this.authStatus.style === 'info' ? this.canEdit = true : null
+            this.setFormInfo(res.personalAuthVO);
+          } else {
+            this.authType = 0  //未参与个人认证
+            this.canEdit = true
+          }
+        })
+      },
+      setFormInfo(detail) {
+        //回显认证信息
+        this.individualForm.roleList = detail.roleList,
+        this.individualForm.realName = detail.realName,
+        this.individualForm.gender = detail.gender,
+        this.individualForm.idCard = detail.idCard,
+        this.individualForm.address = detail.address,
+        this.individualForm.idCardPositivePhoto = detail.idCardPositivePhoto,
+        this.individualForm.idCardBackPhoto = detail.idCardBackPhoto,
+        this.individualForm.idCardDeadTime = detail.idCardDeadTime
+      },
+      //文件上传前的响应函数
+      beforeFileUpload(file) {
+        // 文件大小不能超过10M
+        if (file.size > 10 * 1000 * 1000) {
+          notify('error', '单个文件大小不能超过5M')
+          return false;
         }
-        if (!isLt2M) {
-          this.$message.error('上传头像图片大小不能超过 2MB!');
+        let fileName = file.name
+        let index = fileName.lastIndexOf('.');
+        // 文件不能没有后缀
+        if (index <= 0) {
+          notify('error', '只能上传png/jpg/jpeg格式的文件')
+          return false;
         }
-        return isJPG && isLt2M;
-      }
+        let fileSuffix = fileName.substr(index)
+        // 文件后缀必须是.png或者.jpg
+        if (fileSuffix !== '.jpg' && fileSuffix !== '.png' && fileSuffix !== '.jpeg') {
+          notify('error', '只能上传png/jpg/jpeg格式的文件')
+          return false;
+        }
+      },
+      //上传文件,此处为上传图片
+      uploadFile(param) {
+        const formData = new FormData()
+        let config = {
+          //添加请求头
+          headers: {'Content-Type': 'multipart/form-data'},
+        }
+        formData.append('file', param.file)
+        //console.log(JSON.parse(this.user).userVO)
+        Http.upload(Apis.FILE.UPLOAD_IMAGE.replace('{userId}', this.user.id), formData, config).then((res) => {
+          if (param.data.type === 0) {
+            this.individualForm.IDCardPositivePhoto = res.data
+          } else {
+            this.individualForm.IDCardBackPhoto = res.data
+          }
+
+          notify('success', '上传成功')
+          // this.$refs['agency'].validateField('photoUrl');
+        }).catch(error => {
+          notify('error', error.data)
+        })
+      },
+    },
+    mounted() {
+      this.setUserInfo();
+      this.getAuthStatus()
     }
   }
 </script>
@@ -157,46 +259,65 @@
       display: flex;
       justify-content: center;
     }
+
     .upload-wrapper {
       /*display: flex;*/
       /*padding: 0 30px;*/
 
+      .idcard-uploader {
+        width: 100%;
+
+        .avatar {
+          width: 100%;
+        }
+
+        .el-upload .el-upload--text {
+          width: 100%;
+        }
+      }
+
       .authentication-detail {
-        padding-left:20px;
-        border-left: 1px solid rgba(220,220,220,1);
+        padding-left: 20px;
+        border-left: 1px solid rgba(220, 220, 220, 1);
+
         .authentication-detail-title {
-          font-size:16px;
-          font-family:Source Han Sans CN;
-          font-weight:600;
-          border-bottom: 1px dashed rgba(220,220,220,1);
+          font-size: 16px;
+          font-family: Source Han Sans CN;
+          font-weight: 600;
+          border-bottom: 1px dashed rgba(220, 220, 220, 1);
           margin-bottom: 10px;
           padding-bottom: 5px;
         }
+
         .idcard-example1 {
           height: 140px;
           background-image: url("../../assets/img/idcard-example1.png");
           background-size: 100% 100%;
         }
+
         .idcard-example2 {
           height: 140px;
           background-image: url("../../assets/img/idcard-example2.png");
           background-size: 100% 100%;
         }
       }
+
       .authentication-detail-list {
         list-style-type: none;
         padding-left: 0;
-        font-size:12px;
-        font-family:Source Han Sans CN;
-        font-weight:400;
-        color:rgba(153,153,153,1);
-        li:before{
+        font-size: 12px;
+        font-family: Source Han Sans CN;
+        font-weight: 400;
+        color: rgba(153, 153, 153, 1);
+
+        li:before {
           content: "\2022";
-          color: rgba(153,153,153,1);
+          color: rgba(153, 153, 153, 1);
           font-size: 16px;
           margin-right: 10px;
         }
-        .authentication-detail-list-blue{
+
+        .authentication-detail-list-blue {
           color: #148AE0;
         }
 
@@ -207,19 +328,37 @@
       margin-top: 40px;
       display: flex;
       justify-content: center;
-      .enterprise-btn{
-        border: 1px solid rgba(0,118,203,1);
+
+      .enterprise-btn {
+        border: 1px solid rgba(0, 118, 203, 1);
         width: 150px;
         background-color: white;
-        color:rgba(0,118,203,1) ;
+        color: rgba(0, 118, 203, 1);
         padding: 10px;
         margin: 0 30px;
       }
+
       .nextBtn {
-        background-color:rgba(0,118,203,1);
+        background-color: rgba(0, 118, 203, 1);
         color: white;
       }
     }
 
   }
 </style>
+<style lang="less">
+  #individualAuth {
+    .avatar-uploader .idcard-uploader {
+      width: 100%;
+
+      .avatar {
+        width: 100%;
+      }
+
+      .el-upload .el-upload--text {
+        width: 100% !important;
+      }
+    }
+  }
+
+</style>

+ 8 - 8
src/pages/UserCenter/MailBinding.vue

@@ -1,21 +1,21 @@
 <template>
   <div>
     <div class="right-modifyPsw">
-      <div v-if="showBindWranning">
+      <div>
         <div class="right-modifyPsw-title">
           <span style="font-size: 18px;font-weight: bold">邮箱绑定</span>
         </div>
-        <div style="background-color: rgba(233,239,249,1);padding: 10px;margin-bottom: 30px">
+        <div style="background-color: rgba(233,239,249,1);padding: 10px;margin-bottom: 30px" v-if="showBindWranning">
           <span style="font-size: 16px">您还未绑定邮箱,为保护您帐号,建议您</span>
           <el-button type="primary" plain size="mini" @click="bindingEmail = true;showBindWranning = false">立即绑定
           </el-button>
+          <div>
+            邮箱绑定成功后,您将享受以下服务:
+          </div>
+          <div>①邮箱地址登录 可直接使用“邮箱地址”登录到众测服务平台</div>
+          <div>②重要事件提醒 进行(支付/提现/众测/中标)时,可及时收到邮件提醒</div>
+          <div>③找回账号密码 忘记密码时,可使用邮件找回密码</div>
         </div>
-        <div>
-          邮箱绑定成功后,您将享受以下服务:
-        </div>
-        <div>①邮箱地址登录 可直接使用“邮箱地址”登录到众测服务平台</div>
-        <div>②重要事件提醒 进行(支付/提现/众测/中标)时,可及时收到邮件提醒</div>
-        <div>③找回账号密码 忘记密码时,可使用邮件找回密码</div>
       </div>
       <div v-if="!showBindWranning">
         <div style="background-color: rgba(233,239,249,1);padding: 10px;margin-bottom: 30px">

Diferenças do arquivo suprimidas por serem muito extensas
+ 30 - 11
src/pages/UserCenter/Mine.vue


+ 43 - 15
src/pages/UserCenter/ModifyPsw.vue

@@ -8,14 +8,14 @@
         <i class="el-icon-warning" style="color: rgba(0, 117, 203, 1);font-size: 18px"></i>
         <span style="font-size: 16px">安全提醒:请妥善保管密码,众测服务平台人员不会以任何理由向您索取密码。</span>
       </div>
-      <el-form ref="modifyForm" :model="modifyForm" label-width="80px" style="margin-top: 20px">
-        <el-form-item label="当前密码">
+      <el-form ref="modifyForm" :rules="rules" :model="modifyForm" label-width="80px" style="margin-top: 20px; width: 40%;">
+        <el-form-item label="当前密码" prop="oldPassword">
           <el-input v-model="modifyForm.oldPassword" type="password"></el-input>
         </el-form-item>
-        <el-form-item label="新密码">
+        <el-form-item label="新密码" prop="password">
           <el-input v-model="modifyForm.password" type="password"></el-input>
         </el-form-item>
-        <el-form-item label="确认密码">
+        <el-form-item label="确认密码" prop="password2">
           <el-input v-model="modifyForm.password2" type="password"></el-input>
         </el-form-item>
         <el-form-item>
@@ -28,7 +28,7 @@
 
 <script>
   import Http from '@/js/http.js'
-  import {storageGet} from '@/js/index'
+  import {storageGet,logout} from '@/js/index'
   import {notify} from '@/constants/index'
   export default {
     name: "ModifyPsw",
@@ -40,6 +40,20 @@
           password:'',
           password2:'',
         },
+        rules: {
+            oldPassword: [
+                {required: true, message: '当前密码不可为空', trigger: 'blur'},
+                {min: 6, max: 16, message: '密码长度在 6 到 16 个字符', trigger: 'blur'}
+            ],
+            password: [
+                {required: true, message: '新密码不可为空', trigger: 'blur'},
+                {min: 6, max: 16, message: '密码长度在 6 到 16 个字符', trigger: 'blur'}
+            ],
+            password2: [
+                {required: true, message: '确认密码不可为空', trigger: 'blur'},
+                {min: 6, max: 16, message: '密码长度在 6 到 16 个字符', trigger: 'blur'}
+            ]
+        }
       }
     },
     methods:{
@@ -47,16 +61,30 @@
         this.user = storageGet('user') && storageGet('user').userVO;
       },
       ModifyPassword(){
-        let params = {
-          id:this.user.id.toString(),
-          ...this.modifyForm
-        }
-        Http.put(`/api/password/reset`,params).then(res=>{
-          window.alert('修改密码成功,跳转至登录页重新登录');
-          window.location.href = process.env.LOGIN_URL;
-        }).catch(err=>{
-          notify('error', '修改密码失败:' + err.data)
-        })
+          this.$refs['modifyForm'].validate(valid => {
+              if (valid) {
+                  let params = {
+                      id:this.user.id.toString(),
+                      ...this.modifyForm
+                  }
+                  if(this.modifyForm.password != this.modifyForm.password2){
+                      notify('error', '两次密码不一致,请重新输入!')
+                      return ;
+                  }
+
+                  Http.put(`/api/password/reset`,params).then(res=>{
+                      // notify('success', '密码修改成功,请重新登录!')
+                      window.alert('密码修改成功,请重新登录');
+                      logout().then((res) => {
+                          window.location.href = process.env.LOGIN_URL;
+                          // this.$router.push('/home')
+                      })
+
+                  }).catch(err=>{
+                      notify('error', '修改密码失败:' + err.data)
+                  })
+              }
+          })
       }
     },
     mounted() {

+ 39 - 13
src/pages/UserCenter/MyBankCard.vue

@@ -14,20 +14,20 @@
       :visible.sync="addBankCard"
       width="30%"
     >
-      <el-form ref="bankCardForm" :model="bankCardForm" label-width="80px">
-        <el-form-item label="持卡人">
+      <el-form ref="bankCardForm" :rules="rules" :model="bankCardForm" label-width="80px">
+        <el-form-item label="持卡人" prop="user">
           <el-input v-model="bankCardForm.user"></el-input>
         </el-form-item>
-        <el-form-item label="卡号">
+        <el-form-item label="卡号" prop="number">
           <el-input v-model="bankCardForm.number"></el-input>
         </el-form-item>
-        <el-form-item>
-          <el-select v-model="value" placeholder="请选择银行卡种类">
+        <el-form-item label="银行类型" prop="name">
+          <el-select  v-model="bankCardForm.name" placeholder="请选择银行卡种类"  style="width: 100%">
             <el-option
               v-for="item in bankCardType"
               :key="item.id"
               :label="item.name"
-              :value="item.id">
+              :value="item.name">
             </el-option>
           </el-select>
         </el-form-item>
@@ -52,6 +52,7 @@
   import {storageGet} from '@/js/index'
   import Http from '@/js/http.js'
   import BankCard from './BankCard'
+  import {notify} from '@/constants/index'
   export default {
     name: "MyBankCard",
     components:{
@@ -70,11 +71,23 @@
         },
         bankCardForm:{
           user:'',
-          number:''
+          number:'',
+          name:''
         },
         user:{},
         bankCardVOList:[],
-        bankCardType:[]
+        bankCardType:[],
+        rules: {
+            user: [
+                {required: true, message: '持卡人不可为空', trigger: 'blur'},
+            ],
+            number: [
+                {required: true, message: '卡号不可为空', trigger: 'blur'},
+            ],
+            name: [
+                {required: true, message: '银行类型不可为空', trigger: 'blur'}
+            ]
+        }
       }
     },
     methods:{
@@ -87,11 +100,24 @@
         this.user = storageGet('user') && storageGet('user').userVO;
       },
       handleAddBankCard(){
-        Http.post(`/api/personal/addbankcard/${this.user.id}`,this.bankCardForm).then(res=>{
-          console.log(res);
-        })
-        this.addBankCard = false
-        this.loadData();
+          this.$refs['bankCardForm'].validate(valid => {
+              if (valid) {
+                  Http.post(`/api/personal/addbankcard/${this.user.id}`,this.bankCardForm).then(res=>{
+                      // console.log(res);
+                      notify('success', "添加成功")
+                      this.addBankCard = false
+
+                      this.bankCardForm.user = '',
+                      this.bankCardForm.number = '',
+                      this.bankCardForm.name = ''
+                      this.loadData();
+
+                  }).catch(error => {
+                      notify('error', error.data)
+                  })
+              }
+          })
+
       },
       getBankType(){
         Http.get('/api/personal/banktype').then(res=>{

+ 102 - 30
src/pages/UserCenter/MyQualification.vue

@@ -15,20 +15,32 @@
       :visible.sync="addQualification"
       width="30%"
     >
-      <el-form ref="form" :model="form" label-width="80px">
-        <el-form-item label="证书名称">
+      <el-form ref="form" :rules="rules" :model="form" label-width="80px">
+        <el-form-item label="证书名称" prop="name">
           <el-input v-model="form.name"></el-input>
         </el-form-item>
-        <el-form-item label="证书编号">
+        <el-form-item label="证书编号" prop="number">
           <el-input v-model="form.number"></el-input>
         </el-form-item>
-        <el-form-item label="发证机构">
+        <el-form-item label="发证机构" prop="licensingAuthority">
           <el-input v-model="form.licensingAuthority"></el-input>
         </el-form-item>
-        <el-form-item label="发证时间">
-          <el-input v-model="form.time"></el-input>
+        <el-form-item label="发证时间" prop="time">
+<!--          <el-input v-model="form.time"></el-input>-->
+          <div class="block">
+<!--            <span class="demonstration">带快捷选项</span>-->
+            <el-date-picker
+              v-model="form.time"
+              style="width: 100%"
+              align="right"
+              type="date"
+              placeholder="选择日期"
+              :picker-options="pickerOptions">
+            </el-date-picker>
+          </div>
+
         </el-form-item>
-        <el-form-item label="是否公开">
+        <el-form-item label="是否公开" prop="isPublic">
           <el-radio-group v-model="form.isPublic">
             <el-radio :label="1">公开</el-radio>
             <el-radio :label="0">不公开</el-radio>
@@ -36,8 +48,8 @@
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button type="danger" @click="requireDeleteQualification">删 除</el-button>
     <el-button @click="addQualification = false">取 消</el-button>
+    <el-button type="danger" @click="requireDeleteQualification" v-if="this.form.id">删 除</el-button>
     <el-button type="primary" @click="handleAddQualification">确 定</el-button>
   </span>
     </el-dialog>
@@ -47,7 +59,7 @@
       :visible.sync="deleteQualification"
       width="30%"
     >
-      <span>确定删除资质“{{form.name}}”吗?</span>
+      <span>确定删除资质 <span style="font-weight: bold; font-size: 18px;">{{form.name}}</span> 吗?</span>
       <span slot="footer" class="dialog-footer">
     <el-button @click="deleteQualification = false">取 消</el-button>
     <el-button type="primary" @click="handleDeleteQualification">确 定</el-button>
@@ -61,6 +73,7 @@
   import QualificationCard from './QualificationCard'
   import {storageGet} from '@/js/index'
   import Http from '@/js/http.js'
+  import {notify} from '@/constants/index'
 
   export default {
     name: "MyQualification",
@@ -81,7 +94,51 @@
         user: {},
         qualificationVOList: [],
         // qualificationVO: {},
-        modalTitle: '新增资质'
+        modalTitle: '新增资质',
+        pickerOptions: {
+            disabledDate(time) {
+                return time.getTime() > Date.now();
+            },
+            shortcuts: [{
+                text: '今天',
+                onClick(picker) {
+                    picker.$emit('pick', new Date());
+                }
+            }, {
+                text: '昨天',
+                onClick(picker) {
+                    const date = new Date();
+                    date.setTime(date.getTime() - 3600 * 1000 * 24);
+                    picker.$emit('pick', date);
+                }
+            }, {
+                text: '一周前',
+                onClick(picker) {
+                    const date = new Date();
+                    date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
+                    picker.$emit('pick', date);
+                }
+            }]
+        },
+        value2: '',
+        rules: {
+            name: [
+                {required: true, message: '证书名称不可为空', trigger: 'blur'},
+                {min: 2, max: 50, message: '报告名称长度在 2 到 50 个字符', trigger: 'blur'}
+            ],
+            number: [
+                {required: true, message: '证书编号不可为空', trigger: 'blur'},
+            ],
+            licensingAuthority: [
+                {required: true, message: '发证机构不可为空', trigger: 'blur'}
+            ],
+            time: [
+                {required: true, message: '发证时间不可为空', trigger: 'blur'}
+            ],
+            isPublic: [
+                {required: true, message: '公开类型不可为空', trigger: 'blur'}
+            ]
+        }
       }
     },
     methods: {
@@ -94,27 +151,39 @@
         this.user = storageGet('user') && storageGet('user').userVO;
       },
       handleAddQualification() {
-        if (!this.form.id) {
-          //新增
-          Http.post(`/api/personal/addqualification/${this.user.id}`, this.form).then(res => {
-            this.addQualification = false;
-            this.loadData();
-          })
-        } else {
-          //编辑
-          let newForm = {
-            name: this.form.name,
-            number: this.form.number,
-            licensingAuthority: this.form.licensingAuthority,
-            time: this.form.time,
-            isPublic: this.form.isPublic
-          };
-          Http.put(`/api/personal/updatequalification/${this.form.id}/${this.user.id}`,newForm).then(res=>{
-            this.form = newForm;
-            this.addQualification = false;
-            this.loadData();
+          this.$refs['form'].validate(valid => {
+            if (valid) {
+                if (!this.form.id) {
+                    //新增
+                    Http.post(`/api/personal/addqualification/${this.user.id}`, this.form).then(res => {
+                        this.addQualification = false;
+                        notify('success', "添加成功")
+                        this.loadData();
+                    }).catch(error => {
+                        notify('error', error.data)
+                    })
+                } else {
+                    //编辑
+                    let newForm = {
+                        name: this.form.name,
+                        number: this.form.number,
+                        licensingAuthority: this.form.licensingAuthority,
+                        time: this.form.time,
+                        isPublic: this.form.isPublic
+                    };
+                    Http.put(`/api/personal/updatequalification/${this.form.id}/${this.user.id}`, newForm).then(res => {
+                        this.form = newForm;
+                        this.addQualification = false;
+                        notify('success', "修改成功")
+                        this.loadData();
+                    }).catch(error => {
+                        notify('error', error.data)
+                    })
+                }
+
+            }
           })
-        }
+
       },
       requireDeleteQualification(item){
         this.deleteQualification = true;
@@ -124,7 +193,10 @@
         Http.delete(`/api/personal/deletequalification/${this.form.id}/${this.user.id}`,{}).then((res) => {
           this.deleteQualification = false;
           this.addQualification = false;
+          notify('success', "删除成功")
           this.loadData();
+        }).catch(error => {
+            notify('error', error.data)
         })
       },
       handleEditQualification(item) {

+ 4 - 4
src/pages/UserCenter/QualificationCard.vue

@@ -3,16 +3,16 @@
     <el-row :gutter="15">
       <el-col :span="8" v-for="item in qualificationVOList" :key="item.id">
         <div class="qualification-card" @click="showQualificationDetail(item)">
-          <div class="qualification-card-title" style="padding: 10px;height:28px">
-            <span class="pull-left" style="font-size: 16px;font-weight: bold;line-height: 28px">{{item.name}}</span>
+          <div class="qualification-card-title" style="padding: 10px;height:24px;  overflow: hidden">
+            <span class="pull-left" style="font-size: 16px;font-weight: bold;line-height: 28px; width: 80%;">{{item.name}}</span>
             <el-button type="primary" plain class="pull-right" size="mini">编辑</el-button>
           </div>
           <div class="qualification-card-detail-wrapper">
-            <div class="qualification-card-detail">
+            <div class="qualification-card-detail" style="height:24px;  overflow: hidden">
               <div class="qualification-card-detail-title">证书编号:</div>
               <div class="qualification-card-detail-info">{{item.number}}</div>
             </div>
-            <div class="qualification-card-detail">
+            <div class="qualification-card-detail" style="height:24px;  overflow: hidden">
               <div class="qualification-card-detail-title">发证机关:</div>
               <div class="qualification-card-detail-info">{{item.licensingAuthority}}</div>
             </div>

+ 7 - 7
src/pages/UserCenter/UserCenter.vue

@@ -15,17 +15,17 @@
             <div class="menu-block-title">
               <img src="../../assets/img/count-security.png">账号安全
             </div>
-            <div class="menu-item"><router-link to="/personal/modifyPsw">修改登密码</router-link></div>
+            <div class="menu-item"><router-link to="/personal/modifyPsw">修改登密码</router-link></div>
             <div class="menu-item"><router-link to="/personal/phoneBinding">手机绑定</router-link></div>
             <div class="menu-item"><router-link to="/personal/mailBinding">邮箱绑定</router-link></div>
             <div class="menu-item"><router-link to="/personal/authentication">身份认证</router-link></div>
           </div>
-          <div class="menu-block">
-            <div class="menu-block-title">
-              <img src="../../assets/img/project-manager.png">项目管理
-            </div>
-            <div class="menu-item">我的订单</div>
-          </div>
+<!--          <div class="menu-block">-->
+<!--            <div class="menu-block-title">-->
+<!--              <img src="../../assets/img/project-manager.png">项目管理-->
+<!--            </div>-->
+<!--            <div class="menu-item">我的订单</div>-->
+<!--          </div>-->
         </div>
       </el-col>
       <el-col :span="19">

+ 3 - 2
src/router/index.js

@@ -22,10 +22,11 @@ export default new Router({
     {
       path: '/',
       name: 'Index',
-      component: Home,
+      component: resolve => require(['@/pages/Homepage/Homepage'], resolve),
       meta: {
         title: '',
-        requireAuth: false,  // false表示不需要登录,true表示需要登录
+        requireAuth: false,
+        showSlice: true
       },
     },
     {

+ 2 - 1
src/style/main.scss

@@ -337,7 +337,7 @@ a {
   color: rgba(0, 118, 203, 1);
 }
 .avatar-uploader .el-upload {
-  border: 1px dashed #d9d9d9;
+  //border: 1px dashed #d9d9d9;
   border-radius: 6px;
   cursor: pointer;
   position: relative;
@@ -369,3 +369,4 @@ a {
   padding: 0 8px !important;
   height: 38px !important;
 }
+

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff