Selaa lähdekoodia

Merge branch 'feature-2.0' of ssh://git.mooctest.com:1022/crowd-2019/crowd-test-service-front into feature-2.0

guo00guo 5 vuotta sitten
vanhempi
commit
9c38269677

+ 17 - 17
src/pages/HomepageSearch/ExpertCard.vue

@@ -1,24 +1,29 @@
 <template>
   <el-card class="expert-card">
-    <div>
-      <div class="card-img"><img :src="card.photo" style="height: 50px; width: 50px;"/></div>
-      <div class="card-title">
-        {{card.name}}
-      </div>
-      <div class="card-content">
-        {{card.title}}
-      </div>
+    <el-row>
+      <el-col :span="6">
+        <div class="card-img"><img :src="card.photo" style="height: 50px; width: 50px;"/></div>
+      </el-col>
+      <el-col :span="18">
+        <div class="card-title">
+          {{card.name}}
+        </div>
+        <div class="card-content">
+          {{card.title}}
+        </div>
+      </el-col>
+
       <el-divider></el-divider>
       <div class="card-detail">
         {{card.introduction}}
       </div>
       <div class="card-action">
-        <div class="btn btn-small btn-info" @click="goToDetail(card.id)">查看详情</div>
+        <div class="btn btn-small btn-info pull-right" @click="goToDetail(card.id)">查看详情</div>
         <div class="participate-num">
           <!-- <span v-bind:class="['badge',{ 'ios-platform': item.toLowerCase()=='ios','android-platform': item.toLowerCase()=='android','web-platform': item.toLowerCase()=='web'}]" v-for="item in platformType">{{item}}</span> -->
         </div>
       </div>
-    </div>
+    </el-row>
   </el-card>
 </template>
 
@@ -53,6 +58,7 @@
 
 
   .expert-card {
+    padding: 10px;
     .card-img {
       margin: 10px;
       position: relative;
@@ -60,7 +66,6 @@
     }
 
     .card-title {
-      margin: 10px;
       font-size: 24px;
       font-family: Source Han Sans CN;
       font-weight: 500;
@@ -77,12 +82,11 @@
       font-family: Source Han Sans CN;
       font-weight: 400;
       color: rgba(0, 0, 0, 1);
-      height: 70px;
       overflow: hidden;
       text-overflow: ellipsis;
       display: -webkit-box; //作为弹性伸缩盒子模型显示。
       -webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-      -webkit-line-clamp: 3; //显示的行
+      -webkit-line-clamp: 1; //显示的行
     }
 
     .card-detail {
@@ -90,7 +94,6 @@
       font-family: Source Han Sans CN;
       font-weight: 400;
       color: rgba(0, 0, 0, 1);
-      height: 70px;
       overflow: hidden;
       text-overflow: ellipsis;
       display: -webkit-box; //作为弹性伸缩盒子模型显示。
@@ -100,7 +103,4 @@
 
   }
 
-  .card-title, .card-content, .card-detail {
-    padding: 0 10px !important;
-  }
 </style>

+ 4 - 3
src/pages/UserCenter/BindingMobile.vue

@@ -35,7 +35,10 @@
     },
     methods:{
       setUserInfo() {
-        this.user = storageGet('user') && storageGet('user').userVO;
+        let userId = storageGet('user')&&storageGet('user').userVO.id;
+        Http.get(`/api/user/${userId}`).then(res=>{
+          this.user = res.userVO
+        })
       },
       getVerifyCode(){
         let params = {
@@ -68,8 +71,6 @@
           if(res.code === 20000){
             notify('success', '绑定成功');
             this.$router.push({path:'/personal/phoneBinding'});
-            //需要更改vuex和storage中得user
-            console.log(storageGet(user));
          }
         }).catch(err=> {
           notify('error', err.data);

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

@@ -49,7 +49,7 @@
       </el-form>
       <span slot="footer" class="dialog-footer">
     <el-button @click="addQualification = false">取 消</el-button>
-    <el-button type="danger" @click="requireDeleteQualification" v-if="this.form.id">删 除</el-button>
+    <el-button type="danger" @click="requireDeleteQualification" v-if="form.id">删 除</el-button>
     <el-button type="primary" @click="handleAddQualification">确 定</el-button>
   </span>
     </el-dialog>

+ 5 - 15
src/pages/UserCenter/PhoneBinding.vue

@@ -17,18 +17,6 @@
         </div>
       </div>
       <router-view></router-view>
-
-
-<!--      <el-form label-width="80px" v-if="active===1">-->
-<!--        <el-form-item label="新手机号">-->
-<!--          <el-input v-model="phoneBindingForm.phone"></el-input>-->
-<!--        </el-form-item>-->
-<!--        <el-form-item label="验证码">-->
-<!--          <el-input placeholder="验证码内容" v-model="input3" class="input-with-select">-->
-<!--            <el-button slot="append">{{hasVerifyCode ? codeTime :'获取验证码'}}</el-button>-->
-<!--          </el-input>-->
-<!--        </el-form-item>-->
-<!--      </el-form>-->
     </div>
   </div>
 </template>
@@ -53,7 +41,6 @@
           phone: '',
           verifyCode: ''
         },
-
       }
     },
     methods: {
@@ -69,8 +56,11 @@
           path: '/personal/phoneBinding/binding',
         });
       },
-      setUserInfo() {
-        this.user = storageGet('user') && storageGet('user').userVO;
+      setUserInfo(){
+        let userId = storageGet('user')&&storageGet('user').userVO.id;
+        Http.get(`/api/user/${userId}`).then(res=>{
+          this.user = res.userVO
+        })
       },
     },
     mounted() {

+ 18 - 3
src/pages/UserCenter/QualificationCard.vue

@@ -4,15 +4,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:24px;  overflow: hidden">
-            <span class="pull-left" style="font-size: 16px;font-weight: bold;line-height: 28px; width: 80%;">{{item.name}}</span>
+            <span class="qualification-card-name pull-left">{{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" style="height:24px;  overflow: hidden">
+            <div class="qualification-card-detail">
               <div class="qualification-card-detail-title">证书编号:</div>
               <div class="qualification-card-detail-info">{{item.number}}</div>
             </div>
-            <div class="qualification-card-detail" style="height:24px;  overflow: hidden">
+            <div class="qualification-card-detail">
               <div class="qualification-card-detail-title">发证机关:</div>
               <div class="qualification-card-detail-info">{{item.licensingAuthority}}</div>
             </div>
@@ -47,6 +47,17 @@
   background:rgba(255,255,255,1);
   box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13);
   margin-bottom: 10px;
+  .qualification-card-title{
+    .qualification-card-name{
+      font-size: 16px;
+      font-weight: bold;
+      line-height: 28px;
+      width: 75%;
+      overflow: hidden; //超出的文本隐藏
+      text-overflow: ellipsis; //溢出用省略号显示
+      white-space: nowrap; //溢出不换行
+    }
+  }
   .qualification-card-detail-wrapper {
     padding: 10px;
     .qualification-card-detail{
@@ -54,10 +65,14 @@
       margin-bottom: 5px;
       .qualification-card-detail-title {
         font-size: 13px;
+        white-space: nowrap; //溢出不换行
       }
       .qualification-card-detail-info {
         color: rgba(153, 153, 153, 1);
         font-size: 13px;
+        overflow: hidden; //超出的文本隐藏
+        text-overflow: ellipsis; //溢出用省略号显示
+        white-space: nowrap; //溢出不换行
       }
     }
   }

+ 8 - 4
src/pages/UserCenter/ReBindingMobile.vue

@@ -33,7 +33,7 @@
     name: "ReBindingMobile",
     data(){
       return{
-        active: 1,
+        active: 0,
         user:{},
         phoneBindingForm: {
           phone: '',
@@ -45,16 +45,20 @@
     },
     methods:{
       setUserInfo() {
-        this.user = storageGet('user') && storageGet('user').userVO;
+        let userId = storageGet('user')&&storageGet('user').userVO.id;
+        Http.get(`/api/user/${userId}`).then(res=>{
+          this.user = res.userVO
+        })
       },
       reBindingMobile(){
           if(this.active === 0){
             //1.验证原手机
             let params = {
               "id": this.user.id,
-              "mobile": this.user.mobile
+              "mobile": this.user.mobile,
+              "verifyCode":this.phoneBindingForm.verifyCode
             }
-            Http.put('/api/verify/mobile',params).then(res=>{
+            Http.put('/api/verify/old/mobile',params).then(res=>{
               if(res.code === 20000){
                 notify('success', '验证成功');
                 this.active = 1;