Browse Source

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

yq1 6 days ago
parent
commit
4d022f30d6
5 changed files with 67 additions and 20 deletions
  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 View File

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

+ 23 - 15
src/pages/home/login.vue View File

69
 <script>
69
 <script>
70
 import "../../styles/newStyle.scss";
70
 import "../../styles/newStyle.scss";
71
 import { loginByPwd } from "@/api/login";
71
 import { loginByPwd } from "@/api/login";
72
+import {checkMobileIp} from "@/api/newlogin"
72
 import { hex_md5 } from "@/utils/md5";
73
 import { hex_md5 } from "@/utils/md5";
73
 import { Toast } from "vant";
74
 import { Toast } from "vant";
74
 import { checkMobile } from "@/utils/tools";
75
 import { checkMobile } from "@/utils/tools";
222
             // }
223
             // }
223
             //博白
224
             //博白
224
             console.log("机构ID------------------",resp.data.org.id)
225
             console.log("机构ID------------------",resp.data.org.id)
225
-            if(resp.data.org.id == 9671){
226
+            if(resp.data.org.id == 10164){
226
               this.checkMobileIp() 
227
               this.checkMobileIp() 
227
             }else{
228
             }else{
228
               this.$router.replace({ path: "/" });
229
               this.$router.replace({ path: "/" });
254
         })
255
         })
255
     },
256
     },
256
     checkMobileIp(){
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
     showForgetPwdDialog() {
281
     showForgetPwdDialog() {
274
       Dialog.confirm({
282
       Dialog.confirm({
275
         title: "账号或密码不正确",
283
         title: "账号或密码不正确",

+ 17 - 2
src/store/modules/globalConfig.js View File

797
       },
797
       },
798
       42: {
798
       42: {
799
         id: 42,
799
         id: 42,
800
-        name: 'HD(1)',
800
+        name: 'HD.',
801
         dialysis_duration: 1,
801
         dialysis_duration: 1,
802
         replacement_way: 2,
802
         replacement_way: 2,
803
         hemodialysis_machine: 1,
803
         hemodialysis_machine: 1,
1082
         zongliang_unit: 'mg',
1082
         zongliang_unit: 'mg',
1083
         gaimingcheng_unit: '',
1083
         gaimingcheng_unit: '',
1084
         gaijiliang_unit: ''
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
       // 6: {
1101
       // 6: {
1087
       //   id: 6,
1102
       //   id: 6,
1088
       //   name: '3%枸橼酸钠',
1103
       //   name: '3%枸橼酸钠',

+ 7 - 1
src/utils/request.js View File

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

+ 19 - 1
vue.config.js View File

1
 module.exports = {
1
 module.exports = {
2
     chainWebpack: config => {
2
     chainWebpack: config => {
3
       config.rule('js').include.add(/node_modules\/(dom7|swiper)\/.*/)
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
 }