feat: 修改生产环境API地址并添加移动端路由判断

修改.env.production中的API地址配置,将线上环境切换为测试环境地址
在index.vue中添加移动端检测逻辑,根据设备类型和用户类型跳转不同路由
This commit is contained in:
zzp 2025-10-10 08:57:34 +08:00
parent adada825ba
commit 8f45c251a6
2 changed files with 13 additions and 7 deletions

View File

@ -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

View File

@ -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();
if (isMobileByWidth() && Session.get('userInfoLocal').userType == '01') {
router.push({ path: '/richeditMobile' });
} else {
router.push({
path: '/richedit',
});
}
});
</script>