Browse Source

为空的时候也可输入

李帅 3 weeks ago
parent
commit
c10601afa6
3 changed files with 12 additions and 1 deletions
  1. 5 0
      src/utils/request.js
  2. 2 1
      src/views/patientCenter/medical/yaChi.vue
  3. 5 0
      vue.config.js

+ 5 - 0
src/utils/request.js

@@ -14,9 +14,14 @@ let downloadLoadingInstance;
14 14
 export let isRelogin = { show: false };
15 15
 
16 16
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
17
+// axios.defaults.headers.post['Access-Control-Allow-Origin']='http://www.baidu.com'
18
+// axios.defaults.headers['X-Frame-Options'] = 'SAMEORIGIN'
17 19
 // 创建axios实例
18 20
 const service = axios.create({
19 21
   baseURL: process.env.VUE_APP_BASE_API,
22
+  headers: {
23
+    'X-Frame-Options': 'SAMEORIGIN'
24
+  },
20 25
   // baseURL: "http://39.105.121.97:8080/api",
21 26
   // baseURL: "http://106.74.15.131:80/api",
22 27
   

+ 2 - 1
src/views/patientCenter/medical/yaChi.vue

@@ -2777,6 +2777,7 @@ flex: 1;
2777 2777
               align-items: center;
2778 2778
               line-height: 21px;
2779 2779
               min-width: 400px;
2780
+              min-height: 20px;
2780 2781
               flex-wrap: wrap;
2781 2782
               flex: 1;
2782 2783
             "
@@ -2786,7 +2787,7 @@ flex: 1;
2786 2787
             <div
2787 2788
               v-for="(item, index) in imageInspectStr"
2788 2789
               :key="index"
2789
-              style="display: flex"
2790
+              style="display: flex;"
2790 2791
             >
2791 2792
               <!-- 如果是字符串类型,则直接显示文本 -->
2792 2793
               <span class="string" v-if="item.type === 'string'">

+ 5 - 0
vue.config.js

@@ -32,6 +32,11 @@ module.exports = {
32 32
     host: '0.0.0.0',
33 33
     port: port,
34 34
     open: true,
35
+    headers: {
36
+      'X-Frame-Options': 'SAMEORIGIN', // 只允许同源嵌套
37
+      // 或者使用ALLOW-FROM
38
+      // 'X-Frame-Options': 'ALLOW-FROM https://your-allowed-domain.com/'
39
+    },
35 40
     proxy: {
36 41
       // detail: https://cli.vuejs.org/config/#devserver-proxy
37 42
       [process.env.VUE_APP_BASE_API]: {