Browse Source

修改本期要目图片拉伸

asd123a20 3 years ago
parent
commit
fb7c978363
2 changed files with 15 additions and 4 deletions
  1. 11 3
      src/views/Home.vue
  2. 4 1
      vue.config.js

+ 11 - 3
src/views/Home.vue

@@ -22,7 +22,9 @@
       <titles type="9" title="本期要目" en="Directory" @jump="jumpList"></titles>
       <div class="contentList">
         <el-card class="imgbox" v-for="(item, index) in directorylist" :key="index">
-          <img :src="item.thumbnail || imguri" alt="人物">
+          <div class="box">
+            <img :src="item.thumbnail || imguri" alt="人物">
+          </div>
           <p class="text" @click="jump(item, '9')">{{ item.title }}</p>
           <p class="date">{{ item.createAt | dates }}</p>
         </el-card>
@@ -235,10 +237,16 @@ export default {
       height: 20vw;
       /deep/ .el-card__body {
         height: 100%;
-        img {
-          display: block;
+        .box {
           height: 70%;
           width: 100%;
+          overflow: hidden;
+          display: flex;
+          align-items: center;
+          img {
+            width: 100%;
+            display: block;
+          }
         }
         p {
           color: #696969;

+ 4 - 1
vue.config.js

@@ -1,5 +1,5 @@
 
-const baseUrl = '/www'
+const baseUrl = '/'
 
 module.exports = {
   publicPath: baseUrl,
@@ -10,6 +10,9 @@ module.exports = {
       '/api/': {
         target: 'http://localhost:7001'
         // target: 'http://192.168.4.1:7001'
+      },
+      '/files/images/': {
+        target: 'http://jjzh.cc-lotus.info'
       }
     }
   }