You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.5 KiB
29 lines
1.5 KiB
// 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 = {
|
|
LOGIN: `${BASE_URL}/api/customer/login-by-code`,
|
|
GET_USER_INFO: `${BASE_URL}/api/customer/me`,
|
|
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`,
|
|
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`,
|
|
}
|