forked from gxwebsoft/mp-10550
fix(config): 更新开发和测试环境API基础URL配置
- 将开发环境API_BASE_URL从本地地址切换到线上地址 - 将测试环境API_BASE_URL从本地地址切换到线上地址 - 移除SERVER_API_URL常量引用 - 简化gltUserTicket接口请求路径配置 - 修改用户票券列表显示票号ID替代模板名称 - 注释掉票券状态标签显示逻辑
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
export const ENV_CONFIG = {
|
export const ENV_CONFIG = {
|
||||||
// 开发环境
|
// 开发环境
|
||||||
development: {
|
development: {
|
||||||
API_BASE_URL: 'http://127.0.0.1:9200/api',
|
// API_BASE_URL: 'http://127.0.0.1:9200/api',
|
||||||
// API_BASE_URL: 'https://mp-api.websoft.top/api',
|
API_BASE_URL: 'https://mp-api.websoft.top/api',
|
||||||
APP_NAME: '开发环境',
|
APP_NAME: '开发环境',
|
||||||
DEBUG: 'true',
|
DEBUG: 'true',
|
||||||
},
|
},
|
||||||
@@ -15,8 +15,8 @@ export const ENV_CONFIG = {
|
|||||||
},
|
},
|
||||||
// 测试环境
|
// 测试环境
|
||||||
test: {
|
test: {
|
||||||
API_BASE_URL: 'http://127.0.0.1:9200/api',
|
// API_BASE_URL: 'http://127.0.0.1:9200/api',
|
||||||
// API_BASE_URL: 'https://mp-api.websoft.top/api',
|
API_BASE_URL: 'https://mp-api.websoft.top/api',
|
||||||
APP_NAME: '测试环境',
|
APP_NAME: '测试环境',
|
||||||
DEBUG: 'true',
|
DEBUG: 'true',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { GltUserTicket, GltUserTicketParam } from './model';
|
import type { GltUserTicket, GltUserTicketParam } from './model';
|
||||||
import { SERVER_API_URL } from '@/utils/server'
|
|
||||||
|
|
||||||
function normalizeTotal(input: unknown): number {
|
function normalizeTotal(input: unknown): number {
|
||||||
if (typeof input === 'number' && Number.isFinite(input)) return input;
|
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.
|
// 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.
|
// If the first one returns 0, keep trying; some tenants deploy GLT on a different host.
|
||||||
const urls = [
|
const urls = [
|
||||||
'/glt/glt-user-ticket/my-total',
|
'/glt/glt-user-ticket/my-total'
|
||||||
`${SERVER_API_URL}/glt/glt-user-ticket/my-total`,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
let lastError: unknown
|
let lastError: unknown
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ const UserTicketList = () => {
|
|||||||
<View className="flex items-start justify-between">
|
<View className="flex items-start justify-between">
|
||||||
<View className="flex-1 pr-3">
|
<View className="flex-1 pr-3">
|
||||||
<Text className="text-base font-semibold text-gray-900">
|
<Text className="text-base font-semibold text-gray-900">
|
||||||
{item.templateName || '水票'}
|
票号:{item.id}
|
||||||
</Text>
|
</Text>
|
||||||
{item.orderNo && (
|
{item.orderNo && (
|
||||||
<View className="mt-1">
|
<View className="mt-1">
|
||||||
@@ -353,9 +353,9 @@ const UserTicketList = () => {
|
|||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
<View className="flex flex-col items-end gap-2">
|
<View className="flex flex-col items-end gap-2">
|
||||||
<Tag type={item.status === 1 ? 'danger' : 'success'}>
|
{/*<Tag type={item.status === 1 ? 'danger' : 'success'}>*/}
|
||||||
{item.status === 1 ? '冻结' : '正常'}
|
{/* {item.status === 1 ? '冻结' : '正常'}*/}
|
||||||
</Tag>
|
{/*</Tag>*/}
|
||||||
<Button
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|||||||
Reference in New Issue
Block a user