50 lines
1.2 KiB
JavaScript
50 lines
1.2 KiB
JavaScript
const payModel = {
|
|
WECHAT: {
|
|
title: '微信',
|
|
imgUrl: '/static/orderImg/wechat.svg', //微信
|
|
bgColor: '#09BB07',
|
|
rgba: 'rgba(9,187,7,0.8)'
|
|
},
|
|
ALIPAY: {
|
|
title: '支付宝',
|
|
imgUrl: '/static/orderImg/zfb.svg', //支付宝
|
|
bgColor: '#458FFF',
|
|
rgba: 'rgba(69,143,255,0.8)'
|
|
},
|
|
YSFPAY: {
|
|
title: '云闪付',
|
|
imgUrl: '/static/orderImg/ysf.svg', // 云闪付
|
|
bgColor: '#FF5B4C',
|
|
rgba: 'rgba(255,91,76,0.8)'
|
|
},
|
|
UNIONPAY: {
|
|
title: '银联',
|
|
imgUrl: '/static/orderImg/union-pay.svg', // 银联
|
|
bgColor: '#0D131A',
|
|
rgba: 'rgba(13,19,26,0.8)'
|
|
},
|
|
OTHER: {
|
|
title: '其他',
|
|
imgUrl: '/static/orderImg/default-pay.svg', //其他
|
|
bgColor: '#5F36C4',
|
|
rgba: 'rgba(95,54,196,0.8)'
|
|
},
|
|
}
|
|
const payState = {
|
|
0: { text: '订单生成', color: '#2980FD' },
|
|
1: { text: '支付中', color: '#FFAA33' },
|
|
2: { text: '支付成功', color: '#09BB07' },
|
|
3: { text: '支付失败', color: '#CB2972' },
|
|
4: { text: '已撤销', color: '#808080' },
|
|
5: { text: '已退款', color: '#FF5B4C' },
|
|
6: { text: '订单关闭', color: '#D9D9D9' },
|
|
}
|
|
const payImg = (key) => payModel[key] || {}
|
|
|
|
const payStateMap = (key) => payState[key] || {}
|
|
|
|
export default {
|
|
payImg,
|
|
payStateMap,
|
|
}
|