diff --git a/package.json b/package.json index 39d965d..62e243b 100644 --- a/package.json +++ b/package.json @@ -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, diff --git a/static/preload.js b/static/preload.js index b7d329b..2e904b7 100644 --- a/static/preload.js +++ b/static/preload.js @@ -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';