Карточка пользователя

This commit is contained in:
iriska-gri committed 2024-01-23 09:53:49 +03:00
1 parent a6e43d4cd0
commit 20eccbf800
1 file changed
+66 -13
+66 -13
View File
@@ -2,15 +2,67 @@
<v-dialog <v-dialog
v-model="mydialog" v-model="mydialog"
persistent persistent
width="600"> width="600"
<v-card class="mx-auto"
height="350"> >
<v-card height="440">
<v-card-title class="pl-6">
Информация
</v-card-title>
<v-divider/>
<v-card-text> <v-card-text>
dfd <v-row
no-gutters
class="flex-grow-0"
>
<v-col lg=4>
<v-img
cover
min-height="180px"
max-height="180px"
:src="checkremote(`${spravURL}${userlinks.login}.jpg`)"
/>
</v-col>
<v-col class="d-flex flex-column">
<v-row
no-gutters
class="flex-grow-0 mx-3 my-1"
v-for="n in basicInformation()"
:key="n"
>
<v-col>
<span class="font-weight-medium">
{{n.title}}
</span>
<br/>
<span class="text-subtitle-1">
{{n.info}}
</span>
</v-col>
</v-row>
</v-col>
</v-row>
</v-card-text> </v-card-text>
<v-divider/> <v-divider/>
<v-card-actions class="align-self-end pt-0 "> <v-card-text class="d-flex flex-column py-2">
<v-row
no-gutters
class="flex-grow-0"
v-for="n in subInformation()"
:key="n"
>
<v-col>
<span class="font-weight-medium">
{{n.title}}
</span>
<span class="text-subtitle-1">
{{n.info}}
</span>
</v-col>
</v-row>
</v-card-text>
<v-divider/>
<v-card-actions class="align-self-end pt-0">
<v-btn <v-btn
color="modal_btn" color="modal_btn"
variant="text" variant="text"
@@ -19,13 +71,15 @@
Закрыть Закрыть
</v-btn> </v-btn>
</v-card-actions> </v-card-actions>
</v-card> </v-card>
</v-dialog> </v-dialog>
</template> </template>
<script> <script>
import { ref, computed, watch } from 'vue' import { ref, computed, watch } from 'vue'
import { axiosApiInstance } from '@/utils/axios-api' import { axiosApiInstance } from '@/utils/axios-api'
import {checkremote} from '@/utils/universal_functions'
import { spravURL } from '@/utils/axios-api'
export default { export default {
props: { props: {
@@ -46,7 +100,6 @@ export default {
const infouser = () => { const infouser = () => {
axiosApiInstance.get('api/accounts/getuser/?userlogin='+props.loging).then(res => { axiosApiInstance.get('api/accounts/getuser/?userlogin='+props.loging).then(res => {
userlinks.value=res.data userlinks.value=res.data
console.log(userlinks.value.fio);
})} })}
const mydialog = computed({ const mydialog = computed({
@@ -54,7 +107,6 @@ export default {
set: (value) => emit('update:opendialog', value) set: (value) => emit('update:opendialog', value)
}) })
watch(()=>props.opendialog,(newValue,oldValue)=>{ watch(()=>props.opendialog,(newValue,oldValue)=>{
if(newValue){ if(newValue){
infouser() infouser()
@@ -74,13 +126,14 @@ export default {
{title: 'Логин: ', info: userlinks.value.login}, {title: 'Логин: ', info: userlinks.value.login},
] ]
return { return {
mydialog, mydialog,
userlinks, userlinks,
infouser infouser,
spravURL,
checkremote,
basicInformation,
subInformation
} }
} }
} }