YD_Event.miniApp/utils/constants.js
2026-04-03 17:57:08 +08:00

34 lines
976 B
JavaScript

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}`,
apply: '/api/eventclient/apply',
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',
myProfile: '/api/my/profile',
myAuth: '/api/my/auth',
myRegistrations: '/api/my/registrations',
myPoints: '/api/my/points',
myOrders: '/api/my/orders',
myTeams: '/api/my/teams',
myCertificates: '/api/my/certificates'
};
module.exports = {
getBaseUrl,
API
};