mirror of
https://github.com/LingChair/LingChair-V0.git
synced 2025-12-08 01:55:50 +08:00
fix: 无法在登录时切换服务器
This commit is contained in:
@@ -170,7 +170,7 @@
|
|||||||
<i class="mdui-icon material-icons">cloud_circle</i>
|
<i class="mdui-icon material-icons">cloud_circle</i>
|
||||||
<label class="mdui-textfield-label">服务器地址</label>
|
<label class="mdui-textfield-label">服务器地址</label>
|
||||||
<input n-id="dialogSignInServer" class="mdui-textfield-input" type="text" placeholder="留空以使用网页所在地址"
|
<input n-id="dialogSignInServer" class="mdui-textfield-input" type="text" placeholder="留空以使用网页所在地址"
|
||||||
n-input-ls="server" onblur="" />
|
n-input-ls="server" n-id="dialogSignServer" onblur="setupClient(viewBinding.dialogSignServer.val())" />
|
||||||
</div>
|
</div>
|
||||||
<div class="mdui-textfield">
|
<div class="mdui-textfield">
|
||||||
<i class="mdui-icon material-icons">account_circle</i>
|
<i class="mdui-icon material-icons">account_circle</i>
|
||||||
|
|||||||
@@ -691,7 +691,7 @@ if (!localStorage.refreshToken || localStorage.refreshToken === "")
|
|||||||
|
|
||||||
let client
|
let client
|
||||||
function setUpClient(server) {
|
function setUpClient(server) {
|
||||||
if (server)
|
if (server && server !== "")
|
||||||
client = new io(server, {
|
client = new io(server, {
|
||||||
auth: {
|
auth: {
|
||||||
name: localStorage.isSignIn === "false" ? null : localStorage.userName
|
name: localStorage.isSignIn === "false" ? null : localStorage.userName
|
||||||
|
|||||||
Reference in New Issue
Block a user