调整C端展示

This commit is contained in:
2025-11-26 08:50:22 +08:00
parent f987e1c625
commit 92a3076638
23 changed files with 715 additions and 1309 deletions

View File

@@ -20,8 +20,8 @@ VITE_API_URL=/api
# 开发环境跨域代理,支持配置多个
#VITE_PROXY=[["/api","http://127.0.0.1:18092/"]]
VITE_PROXY=[["/api","http://192.168.1.124:18092/"]]
#VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]
#VITE_PROXY=[["/api","http://192.168.1.124:18092/"]]
VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]
# VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文
# 开启激活验证
VITE_ACTIVATE_OPEN=false
VITE_ACTIVATE_OPEN=true

View File

@@ -25,4 +25,4 @@ VITE_PWA=true
#VITE_API_URL="/api" # 打包时用
VITE_API_URL="http://127.0.0.1:18092/"
# 开启激活验证
VITE_ACTIVATE_OPEN=false
VITE_ACTIVATE_OPEN=true

View File

@@ -1,5 +1,6 @@
<template>
<!--element-plus语言国际化全局修改为中文-->
<!-- 测试升级功能 - 2025-10-24 -->
<el-config-provider :locale="locale" :size="assemblySize" :button="buttonConfig">
<router-view />
</el-config-provider>

View File

@@ -21,10 +21,10 @@ export interface CustomAxiosRequestConfig extends InternalAxiosRequestConfig {
}
const config = {
// 默认地址请求地址,可在 .env.** 文件中修改
// 默认地址请求地址,可在 .env 开头文件中修改
baseURL: import.meta.env.VITE_API_URL as string,
// 设置超时时间
timeout: ResultEnum.TIMEOUT as number,
// 设置超时时间60s
timeout: 60000,
// 跨域时候允许携带凭证
withCredentials: true,
// post请求指定数据类型以及编码

View File

@@ -18,13 +18,15 @@
<img :src="item.img" />
</div>
<div class="test_button">
<el-button size="large" type="primary" @click="handelOpen(item)" :disabled="!item.activated">
进入检测
<el-button size="large" type="primary" @click="handelOpen(item)">
{{ item.activated ? '进入检测' : '待激活' }}
</el-button>
</div>
</el-carousel-item>
</el-carousel>
</div>
<!-- versionRegisterDialog -->
<VersionDialog ref="versionRegisterRef"></VersionDialog>
</template>
<script lang="ts" setup>
import { useAuthStore } from '@/stores/modules/auth'
@@ -32,6 +34,8 @@ import { useAppSceneStore, useModeStore } from '@/stores/modules/mode' // 引入
import { getCurrentScene } from '@/api/user/login'
import { initDynamicRouter } from '@/routers/modules/dynamicRouter'
import { useTabsStore } from '@/stores/modules/tabs'
import VersionDialog from '@/views/system/versionRegister/index.vue'
import { ref, onMounted } from 'vue'
const authStore = useAuthStore()
const modeStore = useModeStore() // 使用模式 store
@@ -39,6 +43,7 @@ const AppSceneStore = useAppSceneStore()
const activateInfo = authStore.activateInfo
const isActivateOpen = import.meta.env.VITE_ACTIVATE_OPEN
const tabsStore = useTabsStore()
const versionRegisterRef = ref<InstanceType<typeof VersionDialog> | null>(null)
const modeList = [
{
name: '模拟式模块',
@@ -64,7 +69,8 @@ const modeList = [
]
const handelOpen = async (item: any) => {
if (!item.activated) {
ElMessage.warning(`${item.name}未激活`)
// 打开版本激活弹窗
versionRegisterRef.value?.openDialog()
return
}
modeStore.setCurrentMode(item.code) // 将模式code存入 store

View File

@@ -24,7 +24,7 @@
</template>
</el-input>
</el-form-item>
<el-form-item prop="checked">
<el-form-item prop="checked" v-show="false">
<el-checkbox v-model="loginForm.checked">记住我</el-checkbox>
</el-form-item>
</el-form>