24 lines
542 B
JavaScript
24 lines
542 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',
|
|
eventDetail: (id) => `/api/eventclient/${id}`,
|
|
apply: '/api/eventclient/apply',
|
|
|
|
wechatLogin: '/api/oauth/login',
|
|
oauthRegister: '/api/oauth/register',
|
|
myProfile: '/api/my/profile',
|
|
myAuth: '/api/my/auth',
|
|
myRegistrations: '/api/my/registrations'
|
|
};
|
|
|
|
module.exports = {
|
|
getBaseUrl,
|
|
API
|
|
};
|
|
|