diff --git a/electron/build.js b/electron/build.js index 44ce85c02..ec4216e98 100644 --- a/electron/build.js +++ b/electron/build.js @@ -181,28 +181,12 @@ if (["dev"].includes(argv[2])) { console.log("mobile directory does not exist!"); process.exit() } - let urlChoices = []; - Array.from(new Set(config.app.map(item => item.url))).forEach(url => { - urlChoices.push({ - name: url, - value: url - }) - }) - inquirer.prompt([ - { - type: 'list', - name: 'url', - message: "选择网址", - choices: urlChoices - } - ]).then(answers => { - startBuild({ - name: 'App', - id: 'app', - platform: '', - url: answers.url, - }, false) - }); + startBuild({ + name: 'App', + id: 'app', + platform: '', + url: 'http://public/', + }, false) } else if (platform.includes(argv[2])) { // 自动编译 let data = config.app.find(({id, publish}) => id === process.env.APPID && publish.provider === process.env.PROVIDER); diff --git a/resources/assets/js/pages/login.vue b/resources/assets/js/pages/login.vue index cd4dcb003..fced9fce2 100644 --- a/resources/assets/js/pages/login.vue +++ b/resources/assets/js/pages/login.vue @@ -159,11 +159,7 @@ export default { welcomeTitle() { let title = window.systemInfo.title || "DooTask"; - if (title == "PublicDooTask") { - return "Public DooTask" - } else { - return "Welcome " + title - } + return "Welcome " + title }, loginText() { @@ -249,13 +245,15 @@ export default { }, inputServerUrl() { + let value = $A.rightDelete(this.cacheServerUrl, "/api/"); + value = $A.leftDelete(value, "http://"); $A.modalInput({ title: "使用 SSO 登录", - value: this.cacheServerUrl, + value, placeholder: "请输入服务器地址", onOk: (value, cb) => { if (value) { - this.inputServerChack(value).then(cb) + this.inputServerChack($A.trim(value)).then(cb) } else { this.clearServerUrl(); }