|
@@ -77,7 +77,7 @@
|
|
|
class="layui-input" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="layui-form-item" lay-filter="Account">
|
|
|
+ <div class="layui-form-item is-hide" lay-filter="Account">
|
|
|
<label class="layui-form-label" data-content="Account"></label>
|
|
|
<div class="layui-input-block">
|
|
|
<input type="text"
|
|
@@ -88,7 +88,7 @@
|
|
|
class="layui-input" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="layui-form-item" lay-filter="Password">
|
|
|
+ <div class="layui-form-item is-hide" lay-filter="Password">
|
|
|
<label class="layui-form-label" data-content="Password"></label>
|
|
|
<div class="layui-inline">
|
|
|
<input type="password"
|
|
@@ -128,8 +128,6 @@
|
|
|
const { $api, $t, $regExp, $loading } = runtime;
|
|
|
const { form, layer } = layui;
|
|
|
const formFilter = "FormServerLogin";
|
|
|
- const CHINA_SERVER_ADDRESS = "cloud.xinglinghui.com:9096";
|
|
|
- const GERMARY_SERVER_ADDRESS = "cloud.flyinsono.com:9096";
|
|
|
this.onload = async function () {
|
|
|
form.verify({
|
|
|
server_address: function (value, item) {
|
|
@@ -203,14 +201,13 @@
|
|
|
ServerPort: data.Port
|
|
|
});
|
|
|
}
|
|
|
- let accountInput = form.find(formFilter, "AccountInput");
|
|
|
- if (data.DongleId == data.Account) {
|
|
|
- accountInput.val("");
|
|
|
+ let account = form.find(formFilter, "Account");
|
|
|
+ let password = form.find(formFilter, "Password");
|
|
|
+ if (data.IsLoginWithAccountAndPassword) {
|
|
|
+ account.show();
|
|
|
+ password.show();
|
|
|
}
|
|
|
-
|
|
|
- if (!data.IsLoginWithAccountAndPassword) {
|
|
|
- let account = form.find(formFilter, "Account");
|
|
|
- let password = form.find(formFilter, "Password");
|
|
|
+ else {
|
|
|
account.hide();
|
|
|
password.hide();
|
|
|
}
|
|
@@ -219,23 +216,12 @@
|
|
|
}
|
|
|
|
|
|
async function initServerNodeSelect() {
|
|
|
- let res = await $api("server", "GetServerList");
|
|
|
+ let res = await $api("server", "GetServerList",);
|
|
|
if (!res.IsSuccess) return;
|
|
|
let options = [];
|
|
|
- options.push(
|
|
|
- `<option value="${CHINA_SERVER_ADDRESS}" data-content="CloudServerInChina">${$t(
|
|
|
- "CloudServerInChina"
|
|
|
- )}</option>`
|
|
|
- );
|
|
|
- options.push(
|
|
|
- `<option value="${GERMARY_SERVER_ADDRESS}" data-content="CloudServerInGermany">${$t(
|
|
|
- "CloudServerInGermany"
|
|
|
- )}</option>`
|
|
|
- );
|
|
|
res.Data.forEach((x) => {
|
|
|
- if (CHINA_SERVER_ADDRESS !== x && GERMARY_SERVER_ADDRESS !== x) {
|
|
|
- options.push(`<option value="${x}">${x}</option>`);
|
|
|
- }
|
|
|
+ options.push(`<option value="${x.Host}:${x.Port}">${$t(x.DisplayName)}</option>`);
|
|
|
+
|
|
|
});
|
|
|
options.push(
|
|
|
`<option value="custom" data-content="CloudServerByCustom">${$t(
|