select-svg 基本完成
Former-commit-id: 8e7f1a63631ec0370683eadb16a9203b835f293d [formerly 8e7f1a63631ec0370683eadb16a9203b835f293d [formerly 8e7f1a63631ec0370683eadb16a9203b835f293d [formerly 8e7f1a63631ec0370683eadb16a9203b835f293d [formerly 8e6796da5ea041da9ed2fcbf89e84c91e2b7b230 [formerly 226e52a0e20b8a9cd011e2a2b0b0da2c25b9db4b]]]]] Former-commit-id: 4fd47532611745f6cefcbbb3f9f9409c6cbb978c Former-commit-id: 4a9f59b88aa4d6a164010e2cf80a20a6ad704efb Former-commit-id: 8b2408f7205cf68a8920e6287ad7cdc6da541d13 [formerly 50abaafae7d85ed49404b471297543a95c773e68] Former-commit-id: e9c5c24e393c7cc06f275b8249a1ff10e5aea3e2 Former-commit-id: 133e32b20973babb6cb2815c5f88f925e1d68cf2 Former-commit-id: 5b4528bd6e10f53f5ca19948af5fbe40a18ae4d3 Former-commit-id: 429cc57574024a3d073657f7c773104ec29ced39 Former-commit-id: b78065290d0d26c7fe4c6b2fd41288fb115686df
This commit is contained in:
@@ -1,19 +1,9 @@
|
||||
import Mock from 'mockjs'
|
||||
|
||||
// 解决 Mock 情况下,携带 withCredentials = true,且未被拦截的跨域请求丢失 Cookies 的问题
|
||||
Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
|
||||
Mock.XHR.prototype.send = function () {
|
||||
if (this.custom.xhr) {
|
||||
this.custom.xhr.withCredentials = this.withCredentials || false
|
||||
}
|
||||
this.proxy_send(...arguments)
|
||||
}
|
||||
import d2Mock from './d2-mock'
|
||||
|
||||
// 导入所有的接口
|
||||
const req = context => context.keys().map(context)
|
||||
req(require.context('./api/', true, /\.js$/))
|
||||
const arr = req(require.context('./api/', true, /\.js$/))
|
||||
.filter(e => e.default)
|
||||
.map(e => e.default)
|
||||
|
||||
// 设置全局延时 没有延时的话有时候会检测不到数据变化 建议保留
|
||||
Mock.setup({
|
||||
timeout: '300-600'
|
||||
})
|
||||
d2Mock.load(arr)
|
||||
|
||||
Reference in New Issue
Block a user