diff --git a/src/main/browsers/login.js b/src/main/browsers/login.js index 4eccad6c130155ed2626bc67e69ef068c40642a9..30279411395da150bd52b8285938a16d5d67bc72 100755 --- a/src/main/browsers/login.js +++ b/src/main/browsers/login.js @@ -96,7 +96,7 @@ module.exports = () => { // win.loadFile(path.resolve(__dirname, "../../../../send.html")); // win.loadURL("https://meiyin.xyz"); win.loadURL( - `https://passport.csdn.net/account/login?from=http://test-code.csdn.net/about/quicker` + `https://passport.csdn.net/account/login?from=https://gitcode.net/about/quicker` ); win.on("closed", () => { win = undefined; diff --git a/src/main/browsers/main.js b/src/main/browsers/main.js index 5089690d6bd9a0ef7340567bdaa1b5976963ab8a..edf28c2606553d31343e06fa49c3eba0704e76ce 100755 --- a/src/main/browsers/main.js +++ b/src/main/browsers/main.js @@ -15,11 +15,11 @@ module.exports = () => { : `file://${__dirname}/index.html`; win = new BrowserWindow({ - height: 186, + height: 148, // client_height useContentSize: true, resizable: true, width: 920, - frame: false, + frame: false, title: "拉比克", show: false, skipTaskbar: true, @@ -55,7 +55,7 @@ module.exports = () => { win = undefined; }); win.on("blur", () => { - win.hide(); + // win.hide(); }); }; diff --git a/src/main/common/autoUpdate.js b/src/main/common/autoUpdate.js index e8756605c35a01d67515fef77d1f16ce56055a34..1be2339b90f7c2143d48a2b9b9c736d29f336e57 100755 --- a/src/main/common/autoUpdate.js +++ b/src/main/common/autoUpdate.js @@ -1,41 +1,45 @@ -import axios from 'axios'; -import { lt } from 'semver'; -import { dialog, shell } from 'electron'; -import pkg from '../../../package.json'; -const os = require('os'); +import axios from "axios"; +import api from "../../renderer/assets/api"; +import { lt } from "semver"; +import { dialog, shell } from "electron"; +import pkg from "../../../package.json"; +const os = require("os"); const version = pkg.version; -const releaseUrl = 'http://118.195.176.247:8080/release/query'; +const releaseUrl = "http://118.195.176.247:8080/release/query"; export async function autoUpdate() { let res; try { - res = await axios.get(releaseUrl); + // res = await axios.get(releaseUrl); + res = await api.getVersions(); + console.log(res); + } catch (err) { console.log(err); } if (res) { - const latest = res.data.result[0]; + const latest = res.data[0]; const result = compareVersion2Update(version, latest.version); if (result) { const res = await dialog.showMessageBox({ - type: 'info', - title: '发现新版本', - buttons: ['Yes', 'No'], - message: `发现新版本${latest.version},更新了很多功能,${latest.msg}, 是否去下载最新的版本?`, - checkboxLabel: '以后不再提醒', + type: "info", + title: "发现新版本", + buttons: ["Yes", "No"], + message: `发现新版本${latest.version},是否去下载最新的版本?`, + checkboxLabel: "以后不再提醒", checkboxChecked: false }); if (res.response === 0) { - if (os.type() === 'Windows_NT') { + if (os.type() === "Windows_NT") { // windows await shell.openExternal(latest.downloadUrl); - } else if (os.type() === 'Darwin') { + } else if (os.type() === "Darwin") { // mac await shell.openExternal(latest.downloadUrl); } else { // 不支持提示 - dialog.showErrorBox('提示', '系统不支持'); + dialog.showErrorBox("提示", "系统不支持"); } } } diff --git a/src/renderer/App.vue b/src/renderer/App.vue index f124534c871a55aadcb7b8e15ae3ef7771869a13..13c21c96f33a9d69b5497d24e79d04af4f041b48 100755 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -1,6 +1,5 @@