Покрасивее фон
This commit is contained in:
1 parent
689fd34a62
commit
19d248721c
6 files changed
+99
-46
No files matched your search
@@ -59,7 +59,10 @@ class CustomAuth(ModelBackend):
|
|||||||
# if True:
|
# if True:
|
||||||
status_code=resp.status_code
|
status_code=resp.status_code
|
||||||
else:
|
else:
|
||||||
|
|
||||||
status_code=200
|
status_code=200
|
||||||
|
# status_code=403
|
||||||
|
|
||||||
|
|
||||||
if status_code==200:
|
if status_code==200:
|
||||||
# try:
|
# try:
|
||||||
@@ -92,7 +95,8 @@ class CustomAuth(ModelBackend):
|
|||||||
|
|
||||||
# except Exception as e:
|
# except Exception as e:
|
||||||
# print (e)
|
# print (e)
|
||||||
elif status_code==403:
|
# elif status_code==403:
|
||||||
return None
|
# print('loh')
|
||||||
|
# return None
|
||||||
|
|
||||||
|
|
||||||
@@ -64,11 +64,34 @@
|
|||||||
|
|
||||||
>
|
>
|
||||||
Войти
|
Войти
|
||||||
|
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
<v-progress-linear v-show="AppStore.loading" indeterminate></v-progress-linear>
|
|
||||||
|
<v-progress-linear location="bottom" v-show="AppStore.loading && !alert" absolute indeterminate></v-progress-linear>
|
||||||
|
|
||||||
</v-card>
|
</v-card>
|
||||||
|
<v-alert
|
||||||
|
width = "400"
|
||||||
|
position="fixed"
|
||||||
|
class="bottom-alertauth bgerroralert"
|
||||||
|
|
||||||
|
type="error"
|
||||||
|
density="compact"
|
||||||
|
title="Ошибка авторизации"
|
||||||
|
:text="info"
|
||||||
|
v-model="alert"
|
||||||
|
|
||||||
|
|
||||||
|
closable
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<v-icon icon="mdi-alert-outline" class="pt-1"/>
|
||||||
|
</template>
|
||||||
|
</v-alert>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -82,11 +105,14 @@ const req= helpers.withMessage('Обязательное поле', required)
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
setup(){
|
setup(props, context){
|
||||||
|
|
||||||
const accountStore = useAccountStore()
|
const accountStore = useAccountStore()
|
||||||
const AppStore= useAppStore()
|
const AppStore= useAppStore()
|
||||||
const menuAuthDialog = ref(false)
|
const menuAuthDialog = ref(false)
|
||||||
|
const err = ref('')
|
||||||
|
const alert = ref(false)
|
||||||
|
|
||||||
|
|
||||||
const anon=reactive({
|
const anon=reactive({
|
||||||
username:"9966-00-",
|
username:"9966-00-",
|
||||||
@@ -110,7 +136,21 @@ export default {
|
|||||||
|
|
||||||
const logging=async()=>{
|
const logging=async()=>{
|
||||||
if (!v$.value.$error) {
|
if (!v$.value.$error) {
|
||||||
await accountStore.logging(anon)
|
|
||||||
|
try {
|
||||||
|
await accountStore.logging(anon)
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
AppStore.loading = false
|
||||||
|
alert.value=true
|
||||||
|
// console.log(, 'AppStore-------------------');
|
||||||
|
|
||||||
|
err.value = 'Ошибка авторизации'
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log(true);
|
console.log(true);
|
||||||
@@ -129,6 +169,8 @@ export default {
|
|||||||
v$,
|
v$,
|
||||||
logging,
|
logging,
|
||||||
errorer,
|
errorer,
|
||||||
|
alert,
|
||||||
|
err
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -136,5 +178,16 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.bottom-alertauth {
|
||||||
|
top: 57vh;
|
||||||
|
/* left: 38vw; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-alertauth .v-alert-title {
|
||||||
|
font-size: 1.0rem;
|
||||||
|
}
|
||||||
|
/* , rgba(163, 5, 5, 0.8) */
|
||||||
|
.bgerroralert {
|
||||||
|
background: linear-gradient(to top right, rgba(8, 4, 6, 0.8), rgba(90, 25, 50, 0.8), rgba(133, 5, 5, 0.8), rgba(192, 70, 70, 0.8));
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-app>
|
<v-app>
|
||||||
<v-app-bar
|
<v-app-bar
|
||||||
:elevation="2"
|
:elevation="accountStore.cod2user?2:0"
|
||||||
density="compact"
|
density="compact"
|
||||||
color="app_bar"
|
color="app_bar"
|
||||||
class="pl-4"
|
class="pl-4"
|
||||||
@@ -126,7 +126,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<v-row justify="center">
|
<v-row justify="center">
|
||||||
<Auth-form />
|
<Auth-form
|
||||||
|
@challengealert = "alert=true"
|
||||||
|
/>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
|
|
||||||
@@ -264,51 +266,38 @@
|
|||||||
|
|
||||||
|
|
||||||
</v-navigation-drawer>
|
</v-navigation-drawer>
|
||||||
<!-- <v-navigation-drawer
|
|
||||||
:width="8"
|
|
||||||
|
|
||||||
class="btnNav pointer"
|
|
||||||
@click="rail = !rail"
|
|
||||||
>
|
|
||||||
<v-list>
|
|
||||||
<v-icon
|
|
||||||
|
|
||||||
size="10"
|
|
||||||
:icon="rail?'mdi-chevron-right':'mdi-chevron-left'"
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
</v-list>
|
|
||||||
|
|
||||||
|
|
||||||
</v-navigation-drawer> -->
|
|
||||||
<v-main v-if="accountStore.cod2user" class="d-flex bg-main_theme">
|
<v-main v-if="accountStore.cod2user" class="d-flex bg-main_theme">
|
||||||
<router-view />
|
<router-view />
|
||||||
<!-- <div class="mystat d-flex flex-column">
|
|
||||||
<v-btn
|
|
||||||
class="mb-1"
|
|
||||||
prepend-icon="mdi-wikipedia"
|
|
||||||
size="small"
|
|
||||||
variant="outlined"
|
|
||||||
height="30"
|
|
||||||
>
|
|
||||||
Wiki
|
|
||||||
</v-btn>
|
|
||||||
<v-btn
|
|
||||||
height="30"
|
|
||||||
prepend-icon="mdi-apple-finder"
|
|
||||||
size="small"
|
|
||||||
variant="outlined"
|
|
||||||
>
|
|
||||||
МС
|
|
||||||
</v-btn>
|
|
||||||
</div> -->
|
|
||||||
</v-main>
|
</v-main>
|
||||||
<v-main v-else class="d-flex justify-center align-center text-h3 bg-teal-lighten-2">
|
<v-main v-else class="d-flex justify-center align-center text-h3 bg-teal-lighten-2">
|
||||||
<div>
|
<!-- <v-parallax
|
||||||
|
:src="`${burl}/media/newsimage/hello.png`"
|
||||||
|
>
|
||||||
|
<div class="d-flex flex-column fill-height justify-center align-center text-white">
|
||||||
|
<h1 class="text-h4 font-weight-thin mb-4">
|
||||||
|
Vuetify
|
||||||
|
</h1>
|
||||||
|
<h4 class="subheading">
|
||||||
|
Build your application today!
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
</v-parallax> -->
|
||||||
|
<v-card
|
||||||
|
class="h-100 w-100 d-flex justify-center flex-column"
|
||||||
|
:image="`${burl}/media/newsimage/hello.png`"
|
||||||
|
>
|
||||||
|
<p class="text-center text-white">Добро пожаловать на портал МИ ФНС России по ЦОД № 2</p>
|
||||||
|
<p class="mt-3 text-subtitle-1 text-center text-white">Авторизуйтесь для получения доступа к контенту портала</p>
|
||||||
|
</v-card>
|
||||||
|
<!-- <div
|
||||||
|
> :image="`${burl}/media/newsimage/hello.png`"
|
||||||
<p class="text-center">Добро пожаловать на портал МИ ФНС России по ЦОД № 2</p>
|
<p class="text-center">Добро пожаловать на портал МИ ФНС России по ЦОД № 2</p>
|
||||||
<p class="mt-3 text-subtitle-1 text-center">Авторизуйтесь для получения доступа к контенту портала</p>
|
<p class="mt-3 text-subtitle-1 text-center">Авторизуйтесь для получения доступа к контенту портала</p>
|
||||||
</div>
|
|
||||||
|
</div> -->
|
||||||
|
|
||||||
</v-main>
|
</v-main>
|
||||||
<v-navigation-drawer v-if="accountStore.cod2user"
|
<v-navigation-drawer v-if="accountStore.cod2user"
|
||||||
v-model="drawer_right"
|
v-model="drawer_right"
|
||||||
@@ -339,6 +328,7 @@ import CardUsers from '@/components/cardUsers.vue'
|
|||||||
import CardLike from '@/components/cardLike.vue'
|
import CardLike from '@/components/cardLike.vue'
|
||||||
import { pagecounter } from '@/utils/universal_functions'
|
import { pagecounter } from '@/utils/universal_functions'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
import { baseURL } from '@/utils/axios-api'
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
components: { AuthForm, OnlineUsers, CardUsers, CardLike },
|
components: { AuthForm, OnlineUsers, CardUsers, CardLike },
|
||||||
@@ -358,6 +348,8 @@ export default {
|
|||||||
const LikeDialog = ref(false)
|
const LikeDialog = ref(false)
|
||||||
const rail = ref(false)
|
const rail = ref(false)
|
||||||
const showTooltip = ref(false)
|
const showTooltip = ref(false)
|
||||||
|
const alert = ref(false)
|
||||||
|
const burl = baseURL.slice(0,-1)
|
||||||
|
|
||||||
|
|
||||||
const menuTruncated = (menus) => {
|
const menuTruncated = (menus) => {
|
||||||
@@ -462,7 +454,9 @@ export default {
|
|||||||
rail,
|
rail,
|
||||||
showTooltip,
|
showTooltip,
|
||||||
menuTruncated,
|
menuTruncated,
|
||||||
router
|
router,
|
||||||
|
alert,
|
||||||
|
burl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -478,6 +472,8 @@ export default {
|
|||||||
z-index: 1005;
|
z-index: 1005;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.btnNav .v-navigation-drawer__content {
|
.btnNav .v-navigation-drawer__content {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 MiB |
Binary file not shown.
Reference in new issue
Block a user