|
|
|
|
// API配置
|
|
|
|
|
export const BASE_URL = 'https://xukoushuniu.115.langye.net'
|
|
|
|
|
|
|
|
|
|
// 判断环境(你可以用 process.env.NODE_ENV 或自定义变量)
|
|
|
|
|
const IS_PROD = process.env.NODE_ENV === 'production';
|
|
|
|
|
|
|
|
|
|
// API接口地址
|
|
|
|
|
export const API = {
|
|
|
|
|
WECHAT_JSSDK_CONFIG: `${BASE_URL}/api/customer/wechat/jssdk-config`,
|
|
|
|
|
LOGIN: `${BASE_URL}/api/customer/login-by-code`,
|
|
|
|
|
WX_LOGIN: `${BASE_URL}/api/customer/login-by-wechat-code`,
|
|
|
|
|
STATISTICS: `${BASE_URL}/api/customer/reservation/statistics`,
|
|
|
|
|
LOGIN_ACCOUNT: `${BASE_URL}/api/customer/login`,
|
|
|
|
|
GET_USER_INFO: `${BASE_URL}/api/customer/me`,
|
|
|
|
|
UPDATE_USER_INFO: `${BASE_URL}/api/customer/profile/update`,
|
|
|
|
|
UPLOAD_FILE:`${BASE_URL}/api/customer/upload-file`,
|
|
|
|
|
SHIP_CREATE: `${BASE_URL}/api/customer/ship/create`,
|
|
|
|
|
SHIP_INDEX: `${BASE_URL}/api/customer/ship/index`,
|
|
|
|
|
SHIP_DETAIL: `${BASE_URL}/api/customer/ship/get-one`,
|
|
|
|
|
SHIP_PROPERTY_ENUM: `${BASE_URL}/api/customer/ship/get-property-enum`,
|
|
|
|
|
SHIP_DELETE: `${BASE_URL}/api/customer/ship/delete`,
|
|
|
|
|
RESERVATION_STATUS_ENUM: `${BASE_URL}/api/customer/reservation/get-status-enum`,
|
|
|
|
|
RESERVATION_CREATE: `${BASE_URL}/api/customer/reservation/create`,
|
|
|
|
|
RESERVATION_LIST: `${BASE_URL}/api/customer/reservation/index`,
|
|
|
|
|
AVAILABLE_SHIP: `${BASE_URL}/api/customer/reservation/get-available-ship`,
|
|
|
|
|
// GET_PAYMENT_QRCODE: IS_PROD
|
|
|
|
|
// ? `${BASE_URL}/api/customer/reservation/get-payment-qrcode`
|
|
|
|
|
// : `${BASE_URL}/api/customer/reservation/get-fake-payment-qrcode`,
|
|
|
|
|
GET_PAYMENT_QRCODE: `${BASE_URL}/api/customer/reservation/fake-pay`,
|
|
|
|
|
FAKE_PAY: `${BASE_URL}/api/customer/reservation/fake-pay`,
|
|
|
|
|
NOTIFICATION_LIST: `${BASE_URL}/api/customer/notifications/index`,
|
|
|
|
|
CANCEL_RESERVATION: `${BASE_URL}/api/customer/reservation/cancel`,
|
|
|
|
|
GET_DIRECTION_ENUM: `${BASE_URL}/api/customer/reservation/get-direction-enum`,
|
|
|
|
|
SHIP_UPDATE: `${BASE_URL}/api/customer/ship/update`,
|
|
|
|
|
GET_INVOICE: `${BASE_URL}/api/customer/reservation/get-invoice`,
|
|
|
|
|
GET_DAILY_RESERVATION_DEADLINE: `${BASE_URL}/api/customer/setting/get-daily-reservation-deadline`,
|
|
|
|
|
GET_GEOFENCE_BY_DIRECTION: `${BASE_URL}/api/customer/geofence/get-by-direction`,
|
|
|
|
|
|
|
|
|
|
}
|