版本号更新
This commit is contained in:
@@ -53,12 +53,16 @@
|
||||
<div class="from-input-item">
|
||||
<el-button class="loginButton" color="#8f7ee7" type="primary"
|
||||
@click="onSubmit">登录</el-button>
|
||||
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="version center-justify ">版本号:{{ version }}</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -69,6 +73,20 @@ import { useRouter } from 'vue-router';
|
||||
import { login } from '@/api/account';
|
||||
import { getToken, setToken, setUser, setUserPass, getUserPass } from '@/utils/storage';
|
||||
import { ElLoading } from 'element-plus';
|
||||
import { usePythonBridge } from '@/utils/pythonBridge'
|
||||
|
||||
|
||||
const { getVersion } = usePythonBridge();
|
||||
let version = ref('0.0.0');
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
getVersion().then((res) => {
|
||||
version.value = res;
|
||||
})
|
||||
}, 500);
|
||||
|
||||
})
|
||||
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
@@ -78,6 +96,7 @@ const formData = ref({
|
||||
});
|
||||
|
||||
|
||||
|
||||
const onSubmit = () => {
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
@@ -88,6 +107,7 @@ const onSubmit = () => {
|
||||
login({
|
||||
userId: formData.value.userId,
|
||||
password: formData.value.password,
|
||||
source: 'app'
|
||||
}).then((res) => {
|
||||
loading.close();
|
||||
console.log(res)
|
||||
@@ -101,7 +121,7 @@ const onSubmit = () => {
|
||||
}
|
||||
|
||||
} else {
|
||||
alert('账号或密码错误');
|
||||
// alert('账号或密码错误');
|
||||
}
|
||||
|
||||
}).catch((err) => {
|
||||
@@ -141,6 +161,18 @@ const onSubmit = () => {
|
||||
overflow: hidden;
|
||||
/* 防止内容溢出 */
|
||||
|
||||
.version {
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
font-size: 20px;
|
||||
bottom: 20px;
|
||||
left: calc(50% - 50px);
|
||||
// box-sizing: border-box;
|
||||
// width: 1600px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.background-video {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
Reference in New Issue
Block a user