jcq 1 tydzień temu
rodzic
commit
b5c0b5a9ef
4 zmienionych plików z 15 dodań i 7 usunięć
  1. 5 2
      .env
  2. BIN
      dist.zip
  3. 2 2
      src/views/login/component/password.vue
  4. 8 3
      src/views/marketing/data/index.vue

+ 5 - 2
.env

@@ -5,9 +5,12 @@ VITE_IS_MICRO= true
 VITE_PUBLIC_PATH = /
 
 # 后端请求前缀
-VITE_API_URL = http://192.168.10.101:9999
+
+# VITE_API_URL = http://43.199.205.45:9999
+
+# VITE_API_URL = http://192.168.10.101:9999
 # VITE_API_URL = http://192.168.3.118:9999
-#  VITE_API_URL = http://192.168.3.17:9999
+ VITE_API_URL = http://192.168.3.17:9999
 
 # OAUTH2 密码模式客户端信息
 VITE_OAUTH2_PASSWORD_CLIENT='pig:pig'

BIN
dist.zip


+ 2 - 2
src/views/login/component/password.vue

@@ -75,8 +75,8 @@ const state = reactive({
   isShowPassword: false, // 是否显示密码
   ruleForm: {
     // 表单数据
-    username: 'admin', // 用户名
-    password: '123456', // 密码
+    username: '', // 用户名
+    password: '', // 密码
     code: '', // 验证码
     randomStr: '', // 验证码随机数
   },

+ 8 - 3
src/views/marketing/data/index.vue

@@ -25,7 +25,7 @@
           <template #default="{ row }">{{ row.clientID }}</template>
         </el-table-column>
         <el-table-column label="IP" prop="updateTime" show-overflow-tooltip>
-          <template #default="{ row }">{{ getIp(row.deviceInfo || '{}') }}</template>
+          <template #default="{ row }">{{ row.clientIp }}</template>
         </el-table-column>
         <el-table-column label="设备信息" min-width="150" prop="deviceInfo" show-overflow-tooltip>
           <template #header>
@@ -124,11 +124,16 @@ const getIp = (jsonString: string) => {
 
 const getDeviceName = (jsonString: string) => {
   if(!jsonString) return '';
-  const nameMatch = jsonString.match(/"name"\s*:\s*"([^"]+)"/);
+  const nameMatch = jsonString.match(/"model"\s*:\s*"([^"]+)"/);
+  console.log(nameMatch);
+  
   const systemNameMatch = jsonString.match(/"systemName"\s*:\s*"([^"]+)"/);
+  const version = jsonString.match(/"version"\s*:\s*"([^"]+)"/);
   const name = nameMatch ? nameMatch[1] : 'unKnown';
   const systemName = systemNameMatch ? systemNameMatch[1] : 'unKnown';
-  return `设备名称:${name}; 系统名称:${systemName}`
+  const versionName = version ? version[1] : '';
+
+  return `设备名称:${name}; 系统版本:${systemName} ${versionName}`
 }
 
 const timeRange = computed({