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