From 8f45c251a68638367096bd41a1d1bf8580b3b199 Mon Sep 17 00:00:00 2001 From: zzp <34701892@qq.com> Date: Fri, 10 Oct 2025 08:57:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E7=8E=AF=E5=A2=83API=E5=9C=B0=E5=9D=80=E5=B9=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=A7=BB=E5=8A=A8=E7=AB=AF=E8=B7=AF=E7=94=B1=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改.env.production中的API地址配置,将线上环境切换为测试环境地址 在index.vue中添加移动端检测逻辑,根据设备类型和用户类型跳转不同路由 --- .env.production | 8 ++++---- src/views/pages/index/index.vue | 12 +++++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.env.production b/.env.production index 4fb8e9d..45f54ad 100644 --- a/.env.production +++ b/.env.production @@ -2,9 +2,9 @@ ENV = production # 线上环境接口地址 -VITE_API_URL = https://cankao.cs.com.cn/admin -# VITE_API_URL = http://123.60.153.169:8040/admin +# VITE_API_URL = https://cankao.cs.com.cn/admin +VITE_API_URL = http://123.60.153.169:8040/admin #H5的域名,目前是给列表里的复制用 -VITE_API_URL_H5 = https://cankao.cs.com.cn -# VITE_API_URL_H5 = http://123.60.153.169:8040 +# VITE_API_URL_H5 = https://cankao.cs.com.cn +VITE_API_URL_H5 = http://123.60.153.169:8040 diff --git a/src/views/pages/index/index.vue b/src/views/pages/index/index.vue index f7d9ac8..583275a 100644 --- a/src/views/pages/index/index.vue +++ b/src/views/pages/index/index.vue @@ -6,6 +6,8 @@ import { onMounted } from 'vue'; import { NextLoading } from '/@/utils/loading'; import { useRoute, useRouter } from 'vue-router'; +import { isMobileByWidth } from '/@/utils/Utils'; +import { Session, Local } from '/@/utils/storage'; const route = useRoute(); const router = useRouter(); @@ -15,9 +17,13 @@ onMounted(() => { console.log('🚀 ~ file: index.vue:13 ~ onMounted ~ onMounted:'); NextLoading.done(); - router.push({ - path: '/richedit', - }); + if (isMobileByWidth() && Session.get('userInfoLocal').userType == '01') { + router.push({ path: '/richeditMobile' }); + } else { + router.push({ + path: '/richedit', + }); + } });