Commit d0896c02 authored by nick zheng's avatar nick zheng

chore: 默认请求DEV环境

parent 1a97ebc4
...@@ -16,8 +16,6 @@ export interface Response<T> { ...@@ -16,8 +16,6 @@ export interface Response<T> {
pagingInfo?: PagingInfoParams & { totalPages: number; totalRows: number } pagingInfo?: PagingInfoParams & { totalPages: number; totalRows: number }
} }
const ENV = import.meta.env.VITE_APP_ENV
function handleLogout() { function handleLogout() {
const currentRoute = router.currentRoute.value const currentRoute = router.currentRoute.value
...@@ -27,7 +25,7 @@ function handleLogout() { ...@@ -27,7 +25,7 @@ function handleLogout() {
} }
const service = axios.create({ const service = axios.create({
baseURL: `${BASE_URLS[ENV]}/api/rest`, baseURL: `${BASE_URLS[window.ENV || 'DEV']}/api/rest`,
timeout: 7000, timeout: 7000,
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
......
...@@ -10,8 +10,6 @@ const { pageContentWrapRef, tableContentY } = useTableScrollY() ...@@ -10,8 +10,6 @@ const { pageContentWrapRef, tableContentY } = useTableScrollY()
const router = useRouter() const router = useRouter()
const ENV = import.meta.env.VITE_APP_ENV
const channelPublishList = reactive([ const channelPublishList = reactive([
{ {
type: 'web', type: 'web',
...@@ -32,12 +30,12 @@ function handleClickChannelPublishTableAction(actionType: string) { ...@@ -32,12 +30,12 @@ function handleClickChannelPublishTableAction(actionType: string) {
} }
function handleAccessPage() { function handleAccessPage() {
const channelUrl = `${INDEX_URLS[ENV]}share/web_source/${router.currentRoute.value.params.agentId}` const channelUrl = `${INDEX_URLS[window.ENV || 'DEV']}share/web_source/${router.currentRoute.value.params.agentId}`
location.href = channelUrl location.href = channelUrl
} }
function handleCopyShareLink() { function handleCopyShareLink() {
const channelUrl = `${INDEX_URLS[ENV]}share/web_source/${router.currentRoute.value.params.agentId}` const channelUrl = `${INDEX_URLS[window.ENV || 'DEV']}share/web_source/${router.currentRoute.value.params.agentId}`
copyToClip(channelUrl) copyToClip(channelUrl)
window.$message.success('链接复制成功,快分享给你的好友吧!') window.$message.success('链接复制成功,快分享给你的好友吧!')
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment