YD_Event.miniApp/utils/constants.js
ltx d17f43135d feat: 完善多角色赛事服务功能
- 新增参赛者、裁判、检录员角色识别及角色化首页与个人中心
- 新增裁判注册、身份认证提示、赛事执裁报名及报名记录查询
- 新增检录工作台,支持检录任务、轮次状态与运动员检录操作
- 新增赛事成绩查询页面及成绩详情展示
- 封装成绩、检录和裁判报名接口,补充请求参数清理逻辑
- 新增检录 Tab 图标、页面路由及本地开发配置
- 新增 Git 忽略规则,排除依赖、构建缓存、日志和本地工具文件
2026-08-07 11:28:38 +08:00

57 lines
2.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const getBaseUrl = () => {
const app = getApp();
return app && app.globalData && app.globalData.baseUrl ? app.globalData.baseUrl : '';
};
const API = {
banners: '/api/eventclient/banners',
eventList: '/api/eventclient/list',
eventMyList: '/api/eventclient/my-events',
eventDetail: (id) => `/api/eventclient/${id}`,
eventRegistrationStatus: (registrationId) => `/api/eventclient/status/${registrationId}`,
myRegistrationDetail: (registrationId) => `/api/eventclient/my-registration/${registrationId}`,
apply: '/api/eventclient/apply',
calculateAmount: '/api/eventclient/calculate-amount',
calculateRefundAmount: '/api/eventclient/calculate-refund-amount',
cancelRegistrationRefund: '/api/eventclient/cancel-registration-refund',
couponValidate: '/api/eventclient/coupon/validate',
syncPayment: (registrationId) => `/api/eventclient/sync-payment/${registrationId}`,
cancelRegistration: (registrationId) => `/api/eventclient/cancel/${registrationId}`,
wechatLogin: '/api/oauth/login',
loginByCode: '/api/oauth/login',
// Refresh token endpoint (请按后端实际接口路径修改)
oauthRefreshToken: '/api/oauth/refresh-token',
oauthRegister: '/api/oauth/register',
oauthResetPassword: '/api/oauth/reset-password',
sendVerificationCode: '/api/sms/sendverificationcode',
/** 小程序 wx.login 的 code 换 openid(按后端实际路径修改) */
wechatOpenidByJsCode: '/api/wechat/jscode2session',
myProfile: '/api/my/profile',
updateProfile: '/api/my/avatar/url',
myAuth: '/api/my/auth',
myRegistrations: '/api/my/registrations',
myPoints: '/api/my/points',
myOrders: '/api/my/orders',
myTeams: '/api/my/teams',
myCertificates: '/api/my/certificates',
// 成绩查询、检录接口(后端接入时保持页面层无需改动)
scoreEvents: '/api/eventclient/scores/events',
scoreQuery: '/api/eventclient/scores/query',
checkinContext: '/api/checkin/current',
checkinStatus: '/api/checkin/status',
refereeApplications: '/api/referee/applications',
refereeApply: '/api/referee/applications/apply',
fileUpload: '/api/file/upload',
uploadMaterial: '/api/eventclient/upload-material',
ocrIdCard: '/api/ocr/recognize/idcard',
ocrPassport: '/api/ocr/recognize/passport',
ocrHousehold: '/api/ocr/recognize/household'
};
module.exports = {
getBaseUrl,
API
};