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.

31 lines
1.6 KiB

// API配置
export const BASE_URL = 'https://xukoushuniu.115.langye.net'
6 months ago
// 判断环境(你可以用 process.env.NODE_ENV 或自定义变量)
const IS_PROD = process.env.NODE_ENV === 'production';
// API接口地址
export const API = {
LOGIN: `${BASE_URL}/api/customer/login-by-code`,
WX_LOGIN: `${BASE_URL}/api/customer/login-by-wechat-code`,
LOGIN_ACCOUNT: `${BASE_URL}/api/customer/login`,
GET_USER_INFO: `${BASE_URL}/api/customer/me`,
7 months ago
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`,
7 months ago
SHIP_PROPERTY_ENUM: `${BASE_URL}/api/customer/ship/get-property-enum`,
7 months ago
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`,
6 months ago
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`,
6 months ago
GET_DIRECTION_ENUM: `${BASE_URL}/api/customer/reservation/get-direction-enum`,
SHIP_UPDATE: `${BASE_URL}/api/customer/ship/update`,
}