Browse Source

为空的时候也可输入

李帅 1 month 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
 export let isRelogin = { show: false };
14
 export let isRelogin = { show: false };
15
 
15
 
16
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
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
 // 创建axios实例
19
 // 创建axios实例
18
 const service = axios.create({
20
 const service = axios.create({
19
   baseURL: process.env.VUE_APP_BASE_API,
21
   baseURL: process.env.VUE_APP_BASE_API,
22
+  headers: {
23
+    'X-Frame-Options': 'SAMEORIGIN'
24
+  },
20
   // baseURL: "http://39.105.121.97:8080/api",
25
   // baseURL: "http://39.105.121.97:8080/api",
21
   // baseURL: "http://106.74.15.131:80/api",
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
               align-items: center;
2777
               align-items: center;
2778
               line-height: 21px;
2778
               line-height: 21px;
2779
               min-width: 400px;
2779
               min-width: 400px;
2780
+              min-height: 20px;
2780
               flex-wrap: wrap;
2781
               flex-wrap: wrap;
2781
               flex: 1;
2782
               flex: 1;
2782
             "
2783
             "
@@ -2786,7 +2787,7 @@ flex: 1;
2786
             <div
2787
             <div
2787
               v-for="(item, index) in imageInspectStr"
2788
               v-for="(item, index) in imageInspectStr"
2788
               :key="index"
2789
               :key="index"
2789
-              style="display: flex"
2790
+              style="display: flex;"
2790
             >
2791
             >
2791
               <!-- 如果是字符串类型,则直接显示文本 -->
2792
               <!-- 如果是字符串类型,则直接显示文本 -->
2792
               <span class="string" v-if="item.type === 'string'">
2793
               <span class="string" v-if="item.type === 'string'">

+ 5 - 0
vue.config.js

@@ -32,6 +32,11 @@ module.exports = {
32
     host: '0.0.0.0',
32
     host: '0.0.0.0',
33
     port: port,
33
     port: port,
34
     open: true,
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
     proxy: {
40
     proxy: {
36
       // detail: https://cli.vuejs.org/config/#devserver-proxy
41
       // detail: https://cli.vuejs.org/config/#devserver-proxy
37
       [process.env.VUE_APP_BASE_API]: {
42
       [process.env.VUE_APP_BASE_API]: {