修改测试bug 优化页面
This commit is contained in:
@@ -12,8 +12,14 @@
|
||||
</div>
|
||||
<el-form :rules="rules" ref="formRef" size="large" class="login-form form-one" :model="form">
|
||||
<el-form-item prop="username">
|
||||
<el-input ref="usernameRef" v-model.trim="form.username" type="text" clearable placeholder="用户名"
|
||||
autocomplete="off">
|
||||
<el-input
|
||||
ref="usernameRef"
|
||||
v-model.trim="form.username"
|
||||
type="text"
|
||||
clearable
|
||||
placeholder="用户名"
|
||||
autocomplete="off"
|
||||
>
|
||||
<template #prefix>
|
||||
<span class="iconfont icon-yonghu" style="color: var(--el-color-primary)"></span>
|
||||
<!-- <Icon name="fa fa-user" style="color: var(--el-color-primary); font-size: 16px" /> -->
|
||||
@@ -21,8 +27,14 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input ref="passwordRef" v-model.trim="form.password" type="password" clearable placeholder="密码"
|
||||
autocomplete="off">
|
||||
<el-input
|
||||
ref="passwordRef"
|
||||
v-model.trim="form.password"
|
||||
type="password"
|
||||
clearable
|
||||
placeholder="密码"
|
||||
autocomplete="off"
|
||||
>
|
||||
<template #prefix>
|
||||
<!-- <Icon name="local-password" style="color: var(--el-color-primary); font-size: 16px" /> -->
|
||||
<span class="iconfont icon-mima" style="color: var(--el-color-primary)"></span>
|
||||
@@ -30,8 +42,13 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button :loading="state.submitLoading" class="submit-btn" round type="info"
|
||||
@click="onSubmit(formRef)">
|
||||
<el-button
|
||||
:loading="state.submitLoading"
|
||||
class="submit-btn"
|
||||
round
|
||||
type="info"
|
||||
@click="onSubmit(formRef)"
|
||||
>
|
||||
登录
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
@@ -105,7 +122,17 @@ onMounted(() => {
|
||||
timer = window.setTimeout(() => {
|
||||
pageBubble.init()
|
||||
}, 0)
|
||||
fetchMqttUrl()
|
||||
})
|
||||
let buildUrl = 'ws://192.168.1.103:8083/mqtt' //27
|
||||
const fetchMqttUrl = async () => {
|
||||
const response = await fetch('/')
|
||||
const mqttUrl = response.headers.get('X-Mqtt-Url')
|
||||
const zutai = response.headers.get('X-Mqttzutai-Url')
|
||||
|
||||
window.localStorage.setItem('MQTTURL', mqttUrl || buildUrl)
|
||||
window.localStorage.setItem('MQTTZUTAI', zutai || '')
|
||||
}
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
clearTimeout(timer)
|
||||
|
||||
Reference in New Issue
Block a user