Shannon_mu 3 năm trước cách đây
mục cha
commit
ddcbdc9ce4

+ 3 - 4
accessControlSystem/src/utils/http.js

@@ -8,8 +8,7 @@ import config from '@/config';
 const CancelToken = axios.CancelToken;
 const source = CancelToken.source();
 var http = axios.create({
-    timout: 30000,
-    baseURL: config.baseApi
+    timout: 30000
 });
 
 // axios request 拦截器
@@ -34,8 +33,8 @@ http.interceptors.request.use(
         // } else if (config.url.indexOf('/card') !== -1) {
         //     config.url = config.url;
         // }
-        if (config.url.indexOf('/card') !== -1) {
-            config.baseURL = 'http://127.0.0.1:8099'
+        if (config.url.indexOf('/cards') !== -1) {
+            // config.baseURL = 'http://127.0.0.1:8099'
         }
         // config.headers['Accept'] = '*/*'
         config.headers[localStorage.getItem('SC_token') && 'Authorization'] = 'Bearer ' + localStorage.getItem('SC_token');

+ 1 - 1
accessControlSystem/src/views/accessControlCard/popups/addManagemenCard.vue

@@ -123,7 +123,7 @@ export default {
         getReadCard() {
             new Promise((resolve) => {
 
-                this.$http.get('/card/load').then(({ data, status, msg }) => {
+                this.$http.get('/cards/card/load').then(({ data, status, msg }) => {
                     if (status == 0) {
                         if (!!data) {
                             // this.$message.success(msg);