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.
110 lines
2.7 KiB
110 lines
2.7 KiB
import env from '@/env/index.js'
|
|
const urlEnv = env === 'production' ? '' : `-${env}`
|
|
|
|
export const XAPPID = '503258978847966413'
|
|
|
|
// 统一支付接口
|
|
export const PAY_URL = `https://api-client-psc${urlEnv}.qniao.cn/payment-settlement-center/pay`
|
|
|
|
/**
|
|
* 上传地址
|
|
*/
|
|
export const uploadUrl = {
|
|
image: `https://api-client-yyt${urlEnv}.qniao.cn/yyt-uec/file-uploading/upload/image`,
|
|
file: `https://api-client-yyt${urlEnv}.qniao.cn/yyt-uec/file-uploading/upload/file`,
|
|
// video: `https://api-client-yyt${urlEnv}.qniao.cn/yyt-uec/file-uploading/upload/file?type=mp4`
|
|
video: `https://api-client-yyt${urlEnv}.qniao.cn/yyt-uec/file-uploading/upload/video/file?type=mp4`,
|
|
printFile: `https://api-ops-yyt${urlEnv}.qniao.cn/wukong-fast-print/printing-file/upload/file`
|
|
}
|
|
|
|
/**
|
|
* 文件类型 图片:1,视频:2
|
|
*/
|
|
export const fileType = {
|
|
IMG: 1,
|
|
VIDEO: 2
|
|
}
|
|
|
|
/**
|
|
* 收货地址是否默认 1:默认 0:非默认
|
|
*/
|
|
export const addressType = {
|
|
DEFAULT: true,
|
|
NOT_DEFAULT: false
|
|
}
|
|
|
|
/**
|
|
* 支付方式 1:微信支付 2:月结支付 4:飞算支付
|
|
*/
|
|
export const paymentMethodEnum = {
|
|
WECHAT_PAY: 1,
|
|
MONTHLY_PAY: 2,
|
|
FLY_PAY: 4
|
|
}
|
|
|
|
export const paymentMethodMap = {
|
|
[paymentMethodEnum.WECHAT_PAY]: '微信支付',
|
|
[paymentMethodEnum.MONTHLY_PAY]: '月结支付',
|
|
[paymentMethodEnum.FLY_PAY]: '飞算支付'
|
|
}
|
|
|
|
/**
|
|
* 订单状态 0:全部 40001:待付款 40002:待确认 40003:生产中 40004:运输中 40005:已完成 40009:待揽收 40006:已取消 40007:退款中
|
|
*/
|
|
export const orderStatus = {
|
|
ALL: 0,
|
|
WAIT_PAY: 40001,
|
|
WAIT_CONFIRM: 40002,
|
|
PRINTING: 40003,
|
|
TRANSPORTING: 40004,
|
|
COMPLETED: 40005,
|
|
WAIT_COLLECT: 40009,
|
|
CANCELLED: 40006,
|
|
REFUND: 40007,
|
|
REFUNDED: 40008
|
|
}
|
|
|
|
/**
|
|
* 订单全部状态 40001:待付款 40002:待确认 40003:生产中 40004:运输中 40005:已完成 40007:退款中 40008:已退款 40009:待揽收 40006:已取消
|
|
*/
|
|
export const orderStatusMap = {
|
|
40001: '待付款',
|
|
40002: '待确认',
|
|
40003: '生产中',
|
|
40004: '运输中',
|
|
40005: '已完成',
|
|
40007: '退款中',
|
|
40008: '已退款',
|
|
40006: '已取消',
|
|
40009: '待发货'
|
|
}
|
|
/**
|
|
* 物料状态 20003:已发货 20004:已完成 20005:已取消
|
|
*/
|
|
export const suppliesOrderItemStatus = {
|
|
TRANSPORTING: 20003,
|
|
COMPLETED: 20004,
|
|
CANCEL: 20005
|
|
}
|
|
/**
|
|
* 解决oss图片缓存问题
|
|
*/
|
|
let images = {
|
|
'service-bg': `https://qncloud.oss-cn-shenzhen.aliyuncs.com/wukong-printer-wx/service-bg.png`
|
|
}
|
|
|
|
function splicingTimestamps(obj) {
|
|
for (let key in obj) {
|
|
obj[key] = obj[key] + `?timeStamp=${Date.now()}`
|
|
}
|
|
return obj
|
|
}
|
|
|
|
export const imgStamp = Object.freeze(splicingTimestamps(images))
|
|
|
|
/**
|
|
* 全局事件key
|
|
*/
|
|
export const cacheKey = {
|
|
ORDER_PARAM: 'orderParam' // 订单列表查询参数参数
|
|
}
|