mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-03 16:02:08 +00:00
优化移动客户端登录逻辑
This commit is contained in:
parent
8522b4610d
commit
a9c10a3e0b
28
electron/build.js
vendored
28
electron/build.js
vendored
@ -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);
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user