mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 19:23:26 +00:00
优化移动客户端登录逻辑
This commit is contained in:
parent
8522b4610d
commit
a9c10a3e0b
18
electron/build.js
vendored
18
electron/build.js
vendored
@ -181,28 +181,12 @@ if (["dev"].includes(argv[2])) {
|
|||||||
console.log("mobile directory does not exist!");
|
console.log("mobile directory does not exist!");
|
||||||
process.exit()
|
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({
|
startBuild({
|
||||||
name: 'App',
|
name: 'App',
|
||||||
id: 'app',
|
id: 'app',
|
||||||
platform: '',
|
platform: '',
|
||||||
url: answers.url,
|
url: 'http://public/',
|
||||||
}, false)
|
}, false)
|
||||||
});
|
|
||||||
} else if (platform.includes(argv[2])) {
|
} else if (platform.includes(argv[2])) {
|
||||||
// 自动编译
|
// 自动编译
|
||||||
let data = config.app.find(({id, publish}) => id === process.env.APPID && publish.provider === process.env.PROVIDER);
|
let data = config.app.find(({id, publish}) => id === process.env.APPID && publish.provider === process.env.PROVIDER);
|
||||||
|
|||||||
@ -159,11 +159,7 @@ export default {
|
|||||||
|
|
||||||
welcomeTitle() {
|
welcomeTitle() {
|
||||||
let title = window.systemInfo.title || "DooTask";
|
let title = window.systemInfo.title || "DooTask";
|
||||||
if (title == "PublicDooTask") {
|
|
||||||
return "Public DooTask"
|
|
||||||
} else {
|
|
||||||
return "Welcome " + title
|
return "Welcome " + title
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
loginText() {
|
loginText() {
|
||||||
@ -249,13 +245,15 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
inputServerUrl() {
|
inputServerUrl() {
|
||||||
|
let value = $A.rightDelete(this.cacheServerUrl, "/api/");
|
||||||
|
value = $A.leftDelete(value, "http://");
|
||||||
$A.modalInput({
|
$A.modalInput({
|
||||||
title: "使用 SSO 登录",
|
title: "使用 SSO 登录",
|
||||||
value: this.cacheServerUrl,
|
value,
|
||||||
placeholder: "请输入服务器地址",
|
placeholder: "请输入服务器地址",
|
||||||
onOk: (value, cb) => {
|
onOk: (value, cb) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
this.inputServerChack(value).then(cb)
|
this.inputServerChack($A.trim(value)).then(cb)
|
||||||
} else {
|
} else {
|
||||||
this.clearServerUrl();
|
this.clearServerUrl();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user