Ver código fonte

Merge remote-tracking branch 'origin/20230223_pad_vue_new_branch' into 20230223_pad_vue_new_branch

yq1 6 dias atrás
pai
commit
4d022f30d6
5 arquivos alterados com 67 adições e 20 exclusões
  1. 1 1
      build/cdn.json
  2. 23 15
      src/pages/home/login.vue
  3. 17 2
      src/store/modules/globalConfig.js
  4. 7 1
      src/utils/request.js
  5. 19 1
      vue.config.js

+ 1 - 1
build/cdn.json Ver arquivo

@@ -1,3 +1,3 @@
1 1
 {
2
-  "version": "2999.999.13691"
2
+  "version": "2999.999.13699"
3 3
 }

+ 23 - 15
src/pages/home/login.vue Ver arquivo

@@ -69,6 +69,7 @@
69 69
 <script>
70 70
 import "../../styles/newStyle.scss";
71 71
 import { loginByPwd } from "@/api/login";
72
+import {checkMobileIp} from "@/api/newlogin"
72 73
 import { hex_md5 } from "@/utils/md5";
73 74
 import { Toast } from "vant";
74 75
 import { checkMobile } from "@/utils/tools";
@@ -222,7 +223,7 @@ export default {
222 223
             // }
223 224
             //博白
224 225
             console.log("机构ID------------------",resp.data.org.id)
225
-            if(resp.data.org.id == 9671){
226
+            if(resp.data.org.id == 10164){
226 227
               this.checkMobileIp() 
227 228
             }else{
228 229
               this.$router.replace({ path: "/" });
@@ -254,22 +255,29 @@ export default {
254 255
         })
255 256
     },
256 257
     checkMobileIp(){
257
-      console.log("000000000000000000000000000000000000")
258
-      var that = this
259
-      axios.get('https://192.168.2.6:8080/test').then(function(response) {
260
-          console.log("response",response)
261
-          console.log("response.data.data.flag",response.data.data.flag)
262
-          if (response.data.state == 0) {
263
-            that.$message.error(response.data.data.msg);
264
-            return false
265
-          } 
266
-          if(response.data.state == 1) {
267
-            console.log("hahahahh")
268
-            that.$router.replace({ path: "/" });
269
-          }
270
-        }).catch(function(error) {
258
+      checkMobileIp().then(response=>{
259
+        if(response.data.state == 1){
260
+          
261
+        }
271 262
       })
272 263
     },
264
+    // checkMobileIp(){
265
+    //   console.log("000000000000000000000000000000000000")
266
+    //   var that = this
267
+    //   axios.get('https://192.168.2.80:8080/test').then(function(response) {
268
+    //       console.log("response",response)
269
+    //       console.log("response.data.data.flag",response.data.data.flag)
270
+    //       if (response.data.state == 0) {
271
+    //         that.$message.error(response.data.data.msg);
272
+    //         return false
273
+    //       } 
274
+    //       if(response.data.state == 1) {
275
+    //         console.log("hahahahh")
276
+    //         that.$router.replace({ path: "/" });
277
+    //       }
278
+    //     }).catch(function(error) {
279
+    //   })
280
+    // },
273 281
     showForgetPwdDialog() {
274 282
       Dialog.confirm({
275 283
         title: "账号或密码不正确",

+ 17 - 2
src/store/modules/globalConfig.js Ver arquivo

@@ -797,7 +797,7 @@ const global_config = {
797 797
       },
798 798
       42: {
799 799
         id: 42,
800
-        name: 'HD(1)',
800
+        name: 'HD.',
801 801
         dialysis_duration: 1,
802 802
         replacement_way: 2,
803 803
         hemodialysis_machine: 1,
@@ -1082,7 +1082,22 @@ const global_config = {
1082 1082
         zongliang_unit: 'mg',
1083 1083
         gaimingcheng_unit: '',
1084 1084
         gaijiliang_unit: ''
1085
-      }
1085
+      },
1086
+      18: {
1087
+        id: 18,
1088
+        name: '贝米肝素钠注射液',
1089
+        type: 1,
1090
+        shouji: 1,
1091
+        weichi: 1,
1092
+        zongliang: 1,
1093
+        gaimingcheng: -1,
1094
+        gaijiliang: -1,
1095
+        shouji_unit: 'iu',
1096
+        weichi_unit: 'iu/h',
1097
+        zongliang_unit: 'iu',
1098
+        gaimingcheng_unit: '',
1099
+        gaijiliang_unit: ''
1100
+      },
1086 1101
       // 6: {
1087 1102
       //   id: 6,
1088 1103
       //   name: '3%枸橼酸钠',

+ 7 - 1
src/utils/request.js Ver arquivo

@@ -1,15 +1,21 @@
1 1
 import axios from "axios";
2 2
 // import { Toast } from 'mint-ui'
3 3
 import { Toast } from "vant";
4
+const https = require('https');
5
+
4 6
 
5 7
 import context from '../../src/main.js'
6 8
 
9
+const agent = new https.Agent({
10
+  rejectUnauthorized: false  // 忽略证书验证
11
+});
7 12
 
8 13
 // create an axios instance
9 14
 const service = axios.create({
10 15
   baseURL: process.env.BASE_API, // api的base_url
11 16
   timeout: 30000, // request timeout
12
-  withCredentials: true
17
+  withCredentials: true,
18
+  httpsAgent: agent,
13 19
 });
14 20
 
15 21
 var self = this;

+ 19 - 1
vue.config.js Ver arquivo

@@ -1,5 +1,23 @@
1 1
 module.exports = {
2 2
     chainWebpack: config => {
3 3
       config.rule('js').include.add(/node_modules\/(dom7|swiper)\/.*/)
4
-    }
4
+    },
5
+    // devServer: {
6
+    //   https: {
7
+    //     // 不验证证书
8
+    //     disableHostCheck: true,
9
+    //     cert: false,
10
+    //     key: false,
11
+    //     ca: false
12
+    //   },
13
+    //   proxy: {
14
+    //     '/api': {
15
+    //       target: 'https://192.168.2.80:8080/test', // 替换为你的 API 地址
16
+    //       changeOrigin: true,
17
+    //       secure: false,  // 跳过对目标地址的证书验证
18
+    //       pathRewrite: { '^/api': '' },
19
+    //     }
20
+    //   }
21
+    // }
22
+  
5 23
 }