|
|
|
@ -1,11 +1,11 @@ |
|
|
|
<template> |
|
|
|
<view class="page-staff-board"> |
|
|
|
<view class="nav-bar" :style="{ top: statusBarHeight + 'px' }"> |
|
|
|
<view class="nav-left"> |
|
|
|
<text class="nav-logo">🍸</text> |
|
|
|
<text class="nav-brand">纯瘾大</text> |
|
|
|
<view class="top-bar"> |
|
|
|
<view class="top-left"> |
|
|
|
<text class="top-logo">🍸</text> |
|
|
|
<text class="top-brand">纯瘾大</text> |
|
|
|
</view> |
|
|
|
<view class="nav-right"> |
|
|
|
<view class="top-right"> |
|
|
|
<text class="logout-btn" @tap="onLogout">退出</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -62,7 +62,6 @@ export default { |
|
|
|
const recipeVisible = ref(false) |
|
|
|
const recipeCardNo = ref('') |
|
|
|
const recipeItems = ref([]) |
|
|
|
const statusBarHeight = ref(0) |
|
|
|
|
|
|
|
async function loadOrders() { |
|
|
|
try { |
|
|
|
@ -96,25 +95,23 @@ export default { |
|
|
|
function onLogout() { staff.logout(); uni.redirectTo({ url: '/pages/staff/login' }) } |
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
const systemInfo = uni.getSystemInfoSync() |
|
|
|
statusBarHeight.value = systemInfo.statusBarHeight |
|
|
|
loadOrders(); loadCounts(); startPoll('board', () => { loadOrders(); loadCounts() }, 10000) |
|
|
|
}) |
|
|
|
onUnmounted(() => stopPoll('board')) |
|
|
|
|
|
|
|
return { staff, tabs, activeTab, orders, counts, recipeVisible, recipeCardNo, recipeItems, statusBarHeight, switchTab, onConfirm, onCancel, onDone, onDetail, onRecipe, onChat, onLogout } |
|
|
|
return { staff, tabs, activeTab, orders, counts, recipeVisible, recipeCardNo, recipeItems, switchTab, onConfirm, onCancel, onDone, onDetail, onRecipe, onChat, onLogout } |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
.page-staff-board{min-height:100vh;display:flex;flex-direction:column;background:var(--bg);width:100%} |
|
|
|
.nav-bar{height:100rpx;position:fixed;top:0;z-index:100;background:var(--bg);display:flex;align-items:center;justify-content:space-between;padding:0 28rpx;border-bottom:1px solid var(--border);width:100%} |
|
|
|
.nav-left{display:flex;align-items:center;gap:16rpx} |
|
|
|
.nav-logo{font-size:44rpx} |
|
|
|
.nav-brand{font-size:32rpx;font-weight:900;color:var(--gold)} |
|
|
|
.top-bar{height:100rpx;display:flex;align-items:center;justify-content:space-between;padding:0 28rpx;border-bottom:1px solid var(--border);flex-shrink:0} |
|
|
|
.top-left{display:flex;align-items:center;gap:16rpx} |
|
|
|
.top-logo{font-size:44rpx} |
|
|
|
.top-brand{font-size:32rpx;font-weight:900;color:var(--gold)} |
|
|
|
.logout-btn{font-size:26rpx;color:var(--red)} |
|
|
|
.staff-info{background:var(--bg-card);padding:16rpx 32rpx;font-size:24rpx;color:var(--text-dim);border-bottom:1px solid var(--border);margin-top:100rpx} |
|
|
|
.staff-info{background:var(--bg-card);padding:16rpx 32rpx;font-size:24rpx;color:var(--text-dim);border-bottom:1px solid var(--border)} |
|
|
|
.board-tabs{display:flex;border-bottom:1px solid var(--border);background:var(--bg);flex-shrink:0} |
|
|
|
.board-tab{flex:1;padding:24rpx;text-align:center;font-size:26rpx;font-weight:600;color:var(--text-dim);border-bottom:4rpx solid transparent} |
|
|
|
.board-tab.active{color:var(--gold);border-bottom-color:var(--gold)} |
|
|
|
|