修复白屏问题

main
sunshine 2 years ago
parent 1d80b171d6
commit 3516636669

@ -100,7 +100,7 @@ import {showConfirm} from "@/utils/common";
import tab from "@/plugins/tab";
import modal from "@/plugins/modal";
import {getById, getDetailByReportId, update} from "@/api/mes/report";
const userStore = useUserStore()
export default {
components: {},
data() {
@ -108,8 +108,8 @@ export default {
//
customFormData: {
id: undefined,
name: userStore.name,
userId: userStore.userId,
name: this.getUserInfo.name,
userId: this.getUserInfo.userId,
orgId: undefined,
orgType: undefined,
reportTime: undefined,
@ -172,6 +172,9 @@ export default {
this.$refs.customForm.setRules(this.customRules)
},
methods: {
getUserInfo() {
return useUserStore()
},
processTypes() {
return processTypes
},

@ -94,13 +94,13 @@
import useUserStore from "@/store/modules/user";
import { processTypes, groupTypes } from "@/api/system/dict/data";
import {getOrgList, getProductList, createReport, getPlanProductList} from "@/api/mes/organization"
import { getOrgList, createReport, getPlanProductList} from "@/api/mes/organization"
import { getCurrentDate, timestampToTime } from "@/utils/dateUtil"
import { showConfirm } from "@/utils/common";
import tab from "@/plugins/tab";
import modal from "@/plugins/modal";
import { getById, getDetailByReportId, update } from "@/api/mes/report";
const userStore = useUserStore()
export default {
components: {},
data() {
@ -108,8 +108,8 @@ export default {
//
customFormData: {
id: undefined,
name: userStore.name,
userId: userStore.userId,
name: this.getUserInfo.name,
userId: this.getUserInfo.userId,
orgId: undefined,
orgType: undefined,
reportTime: undefined,
@ -172,6 +172,9 @@ export default {
this.$refs.customForm.setRules(this.customRules)
},
methods: {
getUserInfo() {
return useUserStore()
},
processTypes() {
return processTypes
},

@ -1,38 +1,24 @@
<template>
<view class="normal-login-container">
<u-sticky
class="sticky"
:custom-nav-height="0"
>
<u-navbar
title="登录"
bg-color="transparent"
:title-style="{ fontWeight: 'bold' }"
:auto-back="false"
left-icon=""
safe-area-inset-top
placeholder
/>
</u-sticky>
<view class="logo-content align-center justify-center flex">
<image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
<image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix" data="">
</image>
<text class="title">生产运营管理系统</text>
</view>
<view class="login-form-content">
<view class="input-item flex align-center">
<view class="iconfont icon-user icon"></view>
<input v-model="loginForm.username" class="input" type="text" placeholder="请输入账号" maxlength="30" />
<input v-model="loginForm.username" class="input" type="text" placeholder="请输入账号" maxlength="30" icon="" label="" max="" tip="" validator=""/>
</view>
<view class="input-item flex align-center">
<view class="iconfont icon-password icon"></view>
<input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" />
<input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" icon="" label="" max="" tip="" validator=""/>
</view>
<view v-if="captchaEnabled" class="input-item flex align-center" style="width: 60%;margin: 0px;">
<view v-if="captchaEnabled" class="input-item flex align-center" style="width: 60%;margin: 0;">
<view class="iconfont icon-code icon"></view>
<input v-model="loginForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
<input v-model="loginForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4" icon="" label="" max="" tip="" validator=""/>
<view class="login-code">
<image :src="codeUrl" @click="getCode" class="login-code-img"></image>
<image :src="codeUrl" @click="getCode" class="login-code-img" data=""></image>
</view>
</view>
<view class="action-btn">
@ -53,9 +39,7 @@ import { getCodeImg } from '@/api/login'
import { ref } from "vue";
import config from '@/config.js'
import useUserStore from '@/store/modules/user'
import { getWxCode } from '@/utils/geek';
import { wxLogin } from '@/api/oauth';
import { setToken } from '@/utils/auth';
const userStore = useUserStore()
const codeUrl = ref("");
const captchaEnabled = ref(false); //
@ -91,9 +75,9 @@ async function handleLogin() {
modal.msgError("请输入验证码")
} else {
modal.loading("登录中,请耐心等待...")
pwdLogin()
await pwdLogin()
}
}
};
//
async function pwdLogin() {
userStore.login(loginForm.value).then(() => {
@ -105,7 +89,7 @@ async function pwdLogin() {
getCode()
}
})
};
}
function loginSuccess(result) {
//
@ -115,33 +99,20 @@ function loginSuccess(result) {
});
})
}
</script>
<style lang="scss" scoped>
page {
background-color: #ffffff;
}
.sticky {
background: linear-gradient(180deg, #d4e9ff 0%, #f3f9ff 100%);
backdrop-filter: blur(27.18px);
box-shadow: 0 1px 1px 0 rgba(0, 72, 145, 0.1),
0 0.5px 0 0 rgba(0, 0, 0, 0.1);
}
.normal-login-container {
width: 100%;
min-height: 100vh;
height: 100vh;
overflow: hidden;
background-image: url(@/static/images/login/background.svg);
background-repeat: no-repeat;
background-size: 100% 100%;
background-size: cover;
.logo-content {
width: 100%;
font-size: 21px;
text-align: center;
padding-top: 15%;
padding-top: 50%;
image {
border-radius: 4px;
@ -154,8 +125,7 @@ page {
.login-form-content {
text-align: center;
margin: 20px auto;
margin-top: 15%;
margin: 15% auto 20px;
width: 80%;
.input-item {

@ -196,13 +196,12 @@ function handleBuilding() {
height: 100%;
.header-section {
margin: 10rpx;
margin: 10rpx 0;
padding: 40rpx 10rpx 80rpx 0;
box-sizing: border-box;
background-image: url('src/static/images/icon/background.png');
background-image: url('@/static/images/icon/background.png');
background-position: center center;
background-size: 100% 100%;
border-radius: 24rpx;
overflow: hidden;
color: #fff;
@ -232,6 +231,7 @@ function handleBuilding() {
.content-section {
position: relative;
top: -50px;
margin: 10rpx;
.mine-actions {
margin: 15px 15px;

Loading…
Cancel
Save