CI/CD Pipeline / Backend Build & Test (push) Waiting to run
CI/CD Pipeline / Admin Web Build (push) Waiting to run
CI/CD Pipeline / Mini Program Compile Check (push) Waiting to run
CI/CD Pipeline / Migration Validation (push) Blocked by required conditions
CI/CD Pipeline / Test Shell Guard (Phase 23 Gate) (push) Waiting to run
CI/CD Pipeline / UI Contracts (source-structure gates) (push) Waiting to run
CI/CD Pipeline / E2E (live stack) (push) Blocked by required conditions
57 lines
1.2 KiB
Vue
57 lines
1.2 KiB
Vue
<template>
|
|
<div class="operator-layout">
|
|
<van-nav-bar
|
|
:title="title"
|
|
left-arrow
|
|
fixed
|
|
placeholder
|
|
@click-left="onBack"
|
|
>
|
|
<template #right>
|
|
<span class="operator-layout__logout" @click="onLogout">退出</span>
|
|
</template>
|
|
</van-nav-bar>
|
|
<div class="operator-layout__body">
|
|
<slot />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { useRouter } from 'vue-router'
|
|
import { showConfirmDialog } from 'vant'
|
|
import { useOperatorStore } from '@/stores/operator'
|
|
|
|
withDefaults(defineProps<{ title?: string }>(), { title: '红娘工作台' })
|
|
const router = useRouter()
|
|
const operatorStore = useOperatorStore()
|
|
|
|
function onBack() {
|
|
router.replace('/operator/workbench')
|
|
}
|
|
|
|
async function onLogout() {
|
|
try {
|
|
await showConfirmDialog({ title: '退出登录', message: '确定要退出红娘工作台吗?' })
|
|
} catch {
|
|
return
|
|
}
|
|
operatorStore.logout()
|
|
router.replace('/operator/login')
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.operator-layout {
|
|
min-height: 100vh;
|
|
background: var(--mini-bg);
|
|
}
|
|
.operator-layout__body {
|
|
min-height: calc(100vh - 46px);
|
|
}
|
|
.operator-layout__logout {
|
|
color: var(--mini-text-secondary);
|
|
font-size: 13px;
|
|
}
|
|
</style>
|