fix(config): 更新开发和测试环境API基础URL配置

- 将开发环境API_BASE_URL从本地地址切换到线上地址
- 将测试环境API_BASE_URL从本地地址切换到线上地址
- 移除SERVER_API_URL常量引用
- 简化gltUserTicket接口请求路径配置
- 修改用户票券列表显示票号ID替代模板名称
- 注释掉票券状态标签显示逻辑
This commit is contained in:
2026-02-05 11:14:36 +08:00
parent 5e90c48b8b
commit 5dc70a1c3c
3 changed files with 9 additions and 11 deletions

View File

@@ -2,8 +2,8 @@
export const ENV_CONFIG = {
// 开发环境
development: {
API_BASE_URL: 'http://127.0.0.1:9200/api',
// API_BASE_URL: 'https://mp-api.websoft.top/api',
// API_BASE_URL: 'http://127.0.0.1:9200/api',
API_BASE_URL: 'https://mp-api.websoft.top/api',
APP_NAME: '开发环境',
DEBUG: 'true',
},
@@ -15,8 +15,8 @@ export const ENV_CONFIG = {
},
// 测试环境
test: {
API_BASE_URL: 'http://127.0.0.1:9200/api',
// API_BASE_URL: 'https://mp-api.websoft.top/api',
// API_BASE_URL: 'http://127.0.0.1:9200/api',
API_BASE_URL: 'https://mp-api.websoft.top/api',
APP_NAME: '测试环境',
DEBUG: 'true',
}

View File

@@ -1,7 +1,6 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GltUserTicket, GltUserTicketParam } from './model';
import { SERVER_API_URL } from '@/utils/server'
function normalizeTotal(input: unknown): number {
if (typeof input === 'number' && Number.isFinite(input)) return input;
@@ -144,8 +143,7 @@ export async function getMyGltUserTicketTotal(userId?: number) {
// Try both the configured BaseUrl host and the auth-server host.
// If the first one returns 0, keep trying; some tenants deploy GLT on a different host.
const urls = [
'/glt/glt-user-ticket/my-total',
`${SERVER_API_URL}/glt/glt-user-ticket/my-total`,
'/glt/glt-user-ticket/my-total'
]
let lastError: unknown

View File

@@ -339,7 +339,7 @@ const UserTicketList = () => {
<View className="flex items-start justify-between">
<View className="flex-1 pr-3">
<Text className="text-base font-semibold text-gray-900">
{item.templateName || '水票'}
{item.id}
</Text>
{item.orderNo && (
<View className="mt-1">
@@ -353,9 +353,9 @@ const UserTicketList = () => {
)}
</View>
<View className="flex flex-col items-end gap-2">
<Tag type={item.status === 1 ? 'danger' : 'success'}>
{item.status === 1 ? '冻结' : '正常'}
</Tag>
{/*<Tag type={item.status === 1 ? 'danger' : 'success'}>*/}
{/* {item.status === 1 ? '冻结' : '正常'}*/}
{/*</Tag>*/}
<Button
size="small"
type="primary"