zhaoke 1 year ago
parent
commit
c82860ce9e
5 changed files with 10 additions and 14 deletions
  1. 0 7
      public/index.html
  2. 3 2
      src/utils/request-base.js
  3. 3 2
      src/utils/request-gat.js
  4. 3 2
      src/utils/request.js
  5. 1 1
      src/views/dashboard/index.vue

+ 0 - 7
public/index.html

@@ -7,13 +7,6 @@
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <title><%= webpackConfig.name %></title>
     <script src="<%= BASE_URL %>config.js"></script>
-    <script src="https://pv.sohu.com/cityjson?ie=utf-8"></script>
-    <script type="text/javascript">
-      var Ip = returnCitySN['cip']
-      var cityname = returnCitySN['cname']
-      localStorage.setItem('Ip', Ip)
-      localStorage.setItem('cityname', cityname)
-    </script>
   </head>
   <body>
     <noscript>

+ 3 - 2
src/utils/request-base.js

@@ -99,8 +99,7 @@ service.interceptors.response.use(
           EndTime,
           OperateResult,
           Ident: Ident ?? '',
-          AppId: '9',
-          OperateIP: localStorage.getItem('Ip') ?? null
+          AppId: '9'
         }
       }
       if (islogin) {
@@ -108,6 +107,7 @@ service.interceptors.response.use(
           config.data.OperatorId = (res.returnData.UserId ?? '').toString()
           config.data.LogId = (res.returnData.LogId ?? '').toString()
           config.data.UserName = (res.returnData.UserName ?? '').toString()
+          config.data.OperateIP = (res.returnData.LogId ?? '').toString()
         } else {
           const loginData = typeof data === 'string' ? JSON.parse(data) : data
           config.data.UserName = loginData.LoginName.toString()
@@ -116,6 +116,7 @@ service.interceptors.response.use(
         config.data.OperatorId = getUserId()
         config.data.LogId = getLogId()
         config.data.UserName = getUserName()
+        config.data.OperateIP = getLogId()
       }
       service(config)
     }

+ 3 - 2
src/utils/request-gat.js

@@ -99,8 +99,7 @@ service.interceptors.response.use(
           EndTime,
           OperateResult,
           Ident: Ident ?? '',
-          AppId: '9',
-          OperateIP: localStorage.getItem('Ip') ?? null
+          AppId: '9'
         }
       }
       if (islogin) {
@@ -108,6 +107,7 @@ service.interceptors.response.use(
           config.data.OperatorId = (res.returnData.UserId ?? '').toString()
           config.data.LogId = (res.returnData.LogId ?? '').toString()
           config.data.UserName = (res.returnData.UserName ?? '').toString()
+          config.data.OperateIP = (res.returnData.LogId ?? '').toString()
         } else {
           const loginData = typeof data === 'string' ? JSON.parse(data) : data
           config.data.UserName = loginData.LoginName.toString()
@@ -116,6 +116,7 @@ service.interceptors.response.use(
         config.data.OperatorId = getUserId()
         config.data.LogId = getLogId()
         config.data.UserName = getUserName()
+        config.data.OperateIP = getLogId()
       }
       service(config)
     }

+ 3 - 2
src/utils/request.js

@@ -100,8 +100,7 @@ service.interceptors.response.use(
           EndTime,
           OperateResult,
           Ident: Ident ?? '',
-          AppId: '9',
-          OperateIP: localStorage.getItem('Ip') ?? null
+          AppId: '9'
         }
       }
       if (islogin) {
@@ -109,6 +108,7 @@ service.interceptors.response.use(
           config.data.OperatorId = (res.returnData.UserId ?? '').toString()
           config.data.LogId = (res.returnData.LogId ?? '').toString()
           config.data.UserName = (res.returnData.UserName ?? '').toString()
+          config.data.OperateIP = (res.returnData.LogId ?? '').toString()
         } else {
           const loginData = typeof data === 'string' ? JSON.parse(data) : data
           config.data.UserName = loginData.LoginName.toString()
@@ -117,6 +117,7 @@ service.interceptors.response.use(
         config.data.OperatorId = getUserId()
         config.data.LogId = getLogId()
         config.data.UserName = getUserName()
+        config.data.OperateIP = getLogId()
       }
       service(config)
     }

+ 1 - 1
src/views/dashboard/index.vue

@@ -406,7 +406,7 @@ export default {
               Ident: '',
               OperateResult: '已跳转',
               AppId: '9',
-              OperateIP: localStorage.getItem('Ip') ?? null,
+              OperateIP: getLogId(),
               OperatorId: getUserId(),
               LogId: getLogId(),
               UserName: getUserName()