YD_Event.miniApp/utils/constants.js
马梓彭 b157e73eb2 新增检录进度页面
新增裁判认证页面
对接检录页面
对接成绩查询页面
2026-09-01 23:13:21 +08:00

65 lines
2.6 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}`,
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',
scoreFilters: '/api/eventclient/scores/filters',
scoreQuery: '/api/eventclient/scores/query',
checkinContext: '/api/checkin/current',
checkinStatus: '/api/checkin/status',
checkinStart: '/api/checkin/start',
checkinScan: '/api/checkin/scan',
checkinOnStage: '/api/checkin/on-stage',
checkinProgress: '/api/checkin/progress',
refereeProfileOptions: '/api/referee/profile/options',
refereeProfile: '/api/referee/profile',
refereeProfileSubmit: '/api/referee/profile/submit',
refereeApplicationQuota: '/api/referee/applications/quota',
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
};