mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-17 09:06:56 +08:00
feat:增加request功能
This commit is contained in:
parent
1eeb0fad9a
commit
a535c5d89b
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rubick2",
|
||||
"version": "0.0.6-beta.1",
|
||||
"version": "0.0.7-beta.1",
|
||||
"author": "muwoo <2424880409@qq.com>",
|
||||
"description": "An electron-vue project",
|
||||
"license": null,
|
||||
|
@ -1,5 +1,5 @@
|
||||
const {getData, getlocalDataFile, saveData} = require("./utils");
|
||||
|
||||
const axios = require('axios');
|
||||
const marked = require("marked");
|
||||
const rendererMD = new marked.Renderer();
|
||||
const path = require('path');
|
||||
@ -255,6 +255,14 @@ window.rubick = {
|
||||
|
||||
shellOpenPath(path) {
|
||||
shell.openPath(path)
|
||||
},
|
||||
|
||||
request(config = {}) {
|
||||
return axios.create({
|
||||
timeout: 10000,
|
||||
withCredentials: true,
|
||||
...config,
|
||||
});
|
||||
}
|
||||
}
|
||||
const preloadPath = getQueryVariable('preloadPath') || './preload.js';
|
||||
|
Loading…
x
Reference in New Issue
Block a user