Files
medical-mall/pages/mall/admin/app/pc/design/index.uvue
2026-03-18 08:36:49 +08:00

224 lines
4.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<view class="admin-page">
<view class="admin-card header-card">
<view class="title-row">
<view class="breadcrumb">
<text class="back">返回</text>
<text class="sep">/</text>
<text class="current">PC端装修</text>
</view>
<button class="btn primary">保存</button>
</view>
</view>
<view class="admin-card content-card pc-design-container">
<!-- 左侧二级菜单 -->
<view class="side-menu">
<view
v-for="item in menuItems"
:key="item.id"
class="menu-item"
:class="{ active: activeMenu === item.id }"
@click="activeMenu = item.id"
>
{{ item.title }}
</view>
</view>
<!-- 中间预览区 -->
<view class="preview-area">
<view class="preview-header">
<view class="dot-wrap">
<view class="dot"></view>
<view class="dot"></view>
<view class="dot"></view>
</view>
<view class="search-bar-sim"></view>
</view>
<view class="preview-body">
<image
class="mock-pc"
src="/static/placeholder.png"
mode="aspectFit"
></image>
</view>
</view>
<!-- 右侧设置区 -->
<view class="setting-area">
<view class="box-title">
<view class="line"></view>
<text class="text">页面设置</text>
</view>
<view class="setting-form">
<view class="setting-item">
<text class="label">建议尺寸140px * 60px</text>
<text class="desc">除LOGO图标外页面其他内容仅供参考</text>
</view>
<view class="logo-uploader">
<image class="logo-preview" src="/static/placeholder.png"></image>
<view class="upload-mask">更换图片</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref } from 'vue'
const activeMenu = ref('logo')
const menuItems = [
{ id: 'logo', title: '网站LOGO' },
{ id: 'banner', title: '首页轮播图' },
{ id: 'ad', title: '客服页面广告' },
{ id: 'menu', title: '顶部菜单配置' },
{ id: 'friend', title: '友情链接配置' },
{ id: 'about', title: '关于我们' }
]
</script>
<style scoped>
.pc-design-container {
display: flex;
flex-direction: row;
height: 700px;
padding: 0;
}
.side-menu {
width: 160px;
border-right: 1px solid #ebeef5;
padding: 20px 0;
}
.menu-item {
height: 50px;
line-height: 50px;
padding: 0 25px;
font-size: 14px;
color: #2d8cf0;
cursor: pointer;
transition: all 0.2s;
}
.menu-item.active {
background-color: #f0f7ff;
border-right: 2px solid #2d8cf0;
}
.preview-area {
flex: 1;
background-color: #f5f7fa;
padding: 40px;
display: flex;
flex-direction: column;
}
.preview-header {
height: 30px;
background-color: #fff;
border-radius: 4px 4px 0 0;
display: flex;
align-items: center;
padding: 0 10px;
gap: 15px;
}
.dot-wrap {
display: flex;
gap: 5px;
}
.dot {
width: 8px;
height: 8px;
border-radius: 50%;
background-color: #ddd;
}
.search-bar-sim {
width: 200px;
height: 14px;
background-color: #f5f5f5;
border-radius: 7px;
}
.mock-pc {
width: 100%;
flex: 1;
background-color: #fff;
}
.setting-area {
width: 300px;
border-left: 1px solid #ebeef5;
padding: 25px;
}
.box-title {
display: flex;
align-items: center;
margin-bottom: 25px;
}
.box-title .line {
width: 2px;
height: 14px;
background-color: #2d8cf0;
margin-right: 8px;
}
.box-title .text {
font-size: 14px;
font-weight: bold;
}
.setting-item {
margin-bottom: 20px;
}
.setting-item .label {
display: block;
font-size: 12px;
color: #909399;
margin-bottom: 5px;
}
.setting-item .desc {
display: block;
font-size: 12px;
color: #c0c4cc;
}
.logo-uploader {
width: 120px;
height: 80px;
border: 1px dashed #dcdfe6;
position: relative;
overflow: hidden;
border-radius: 4px;
}
.logo-preview {
width: 100%;
height: 100%;
}
.upload-mask {
position: absolute;
bottom: 0;
width: 100%;
height: 24px;
line-height: 24px;
background-color: rgba(0,0,0,0.5);
color: #fff;
font-size: 12px;
text-align: center;
}
</style>