index.js
5.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
const getProcessValue = (dev, ceshi, prod) => {
return process.env.NODE_ENV === 'development' ? dev : (process.ceshi ? ceshi : prod)
}
const USER_CONFIG = {
EbankTips: '因工行只支持360、IE、Safari浏览器,请将以下链接复制至360、IE、Safari浏览器打开进行支付'
}
const APP = {
/** @description token存储的名称 */
tokenName: 'token',
/** @description token在存储的时长,默认无操作后的30分钟。0 表示关闭浏览器即删除。单位 秒 */
tokenExpires: 0,
/** @description token使用的存储类型,可选值: coookie, session, 默认值是session*/
tokenType: 'cookie',
/** @description 是否只限制此子域名可以访问此token,注意这会影响到主域名和其他子域名进行token共享默认false*/
tokenDomain: process.env.NODE_ENV === 'development' ? 'localhost' :'.b2bwings.com',
/**@description 页面加载出现loading条,默认值 true*/
loading: true,
/**@description 初始的HTTP请求的全局header头*/
header: { },
/**@description API基础请求地址*/
baseUrl: {
dev: 'http://gateway-dev.b2bwings.com/',
pro: 'https://gateway.b2bwings.com/'
},
/**@description 应用的登陆API的PATH*/
loginPath: '/user/sysLogin/login',
/**@description 应用的退出API的PATH*/
logoutPath: '/v1/vendors/logout',
/**@description 401页面地址,用于提醒用户登陆状态失效*/
error404: '/404',
/**@description 菜单缓存本地的名称*/
MENU_NAEM: 'SYS_MENU',
/**@description 资源组缓存本地的名称*/
CODES_NAME: 'SYS_CODES',
/**@description 路由历史记录缓存本地的名称*/
HISTORY_NAME: 'SYS_HISTORY',
/**@description 静态资源目录,必须。用于菜单图标显示*/
STATIS_URL: 'https://b2bwings-system-image.oss-cn-shenzhen.aliyuncs.com/',
/**@description 信让的跳转URL列表 */
domainWhiteList: [
'/.*',
'http://localhost',
'http://xbd-dev.b2bwings.com',
'https://xbd-dev.b2bwings.com',
'http://xbd.b2bwings.com/',
'https://xbd.b2bwings.com/',
'https://ufa.b2bwings.com/',
'http://ufa-dev.b2bwings.com/',
'https://bwfs.oss-cn-shenzhen.aliyuncs.com',
'https://supplier-dev.b2bwings.com',
'http://supplier-dev.b2bwings.com',
'https://supplier.b2bwings.com',
'http://supplier.b2bwings.com',
'https://seller-dev.b2bwings.com',
'http://seller-dev.b2bwings.com',
'https://seller.b2bwings.com',
'http://seller.b2bwings.com',
'https://mall-dev.b2bwings.com',
'http://mall-dev.b2bwings.com',
'https://mall.b2bwings.com',
'http://mall.b2bwings.com'
],
/** 独立服务平台,主题颜色不同 */
singeService: [
{
name: '供应商工作台',
host: getProcessValue(['localhost:8087'],
['supplier-dev.b2bwings.com'],
['supplier.b2bwings.com']
),
productId: 100007,
less: 'mall'
},
{
name: '卖家工作台',
host: getProcessValue(['localhost:8085'],
['seller-dev.b2bwings.com'],
['seller.b2bwings.com']
),
productId: 100005,
less: 'mall'
},
{
name: '商城',
host: getProcessValue(['localhost:8086'],
['mall-dev.b2bwings.com'],
['mall.b2bwings.com']
),
productId: 100006,
less: 'mall'
}
],
host: getProcessValue('localhost:8088', 'xbd-dev.b2bwings.com', 'xbd.b2bwings.com'),
// 财务业务类型
FINANCIAL_BUSINESS_TYPE: (val) => {
if(val===null||val===''||val === undefined) return ''
let result = {
T100:'平台信息服务',
T201:'物流运输服务',
T202:'预付运费充值',
T300:'充值',
T301:'结算',
T302:'转账',
T303:'提现',
T304:'提现-退款',
T400:'支付手续费',
T401:'手续费-退款',
T402:'支付-退款',
T500:'渠道营销服务',
T600:'在途转可用',
T700:'退款手续费',
T800:'资金分账',
T900:'保证金缴纳',
T901:'保证金退款',
T902:'保证金抵扣',
}
return result['T'+val]?result['T'+val]:null
},
// 财务收支类型
FINANCIAL_RECEIVE_AND_PAY_TYPE: (val) => {
if(val===null||val===''||val === undefined) return ''
let types = {
t100:'收入',
t101:'支出',
t102:'预收',
t103:'预付',
t104:'应收',
t105:'应付',
t106:'核销',
t107:'在途转可用',
t108:'退款收入',
t109:'退款支出'
}
return types['t'+val]?types['t'+val]:''
},
/**@description 其他菜单的域名*/
othreDomain: getProcessValue('http://seller-dev.b2bwings.com', 'http://seller-dev.b2bwings.com', 'https://seller.b2bwings.com')
}
export default { USER_CONFIG, APP }
export { USER_CONFIG, APP }