vue3布局实现宠物医疗寄养商城服务app的ui原型图代码
代码语言:html
所属分类:布局界面
代码描述:vue3布局实现宠物医疗寄养商城服务app的ui原型图代码
代码标签: vue 布局 宠物 医疗 寄养 商城 服务 app ui 原型图 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>爱宠生活 - 宠物综合服务平台</title> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue.global.prod.3.5.17.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/echarts.5.5.0.js"></script> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; color: #333; } .app { max-width: 414px; margin: 0 auto; background: white; min-height: 100vh; position: relative; box-shadow: 0 0 20px rgba(0,0,0,0.1); } .header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 20px; position: relative; } .header h1 { font-size: 24px; font-weight: 600; } .header .subtitle { font-size: 14px; opacity: 0.8; margin-top: 5px; } .nav-bar { display: flex; background: white; border-top: 1px solid #eee; position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 414px; z-index: 1000; } .nav-item { flex: 1; text-align: center; padding: 12px 8px; cursor: pointer; transition: all 0.3s; border: none; background: none; color: #666; } .nav-item.active { color: #667eea; background: rgba(102, 126, 234, 0.1); } .nav-item svg { width: 24px; height: 24px; margin-bottom: 4px; } .nav-item span { display: block; font-size: 12px; } .content { padding: 20px; padding-bottom: 80px; min-height: calc(100vh - 100px); } .card { background: white; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); border: 1px solid #f0f0f0; } .btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: 500; transition: all 0.3s; } .btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3); } .btn-secondary { background: #f8f9fa; color: #667eea; border: 1px solid #667eea; } .search-bar { background: white; border-radius: 25px; padding: 12px 20px; margin: 20px 0; border: 1px solid #eee; display: flex; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.1); } .search-bar input { border: none; outline: none; flex: 1; margin-left: 10px; font-size: 16px; } .grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 20px 0; } .grid-item { background: white; border-radius: 12px; padding: 20px; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.08); cursor: pointer; transition: all 0.3s; border: 1px solid #f0f0f0; } .grid-item:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); } .grid-item svg { width: 40px; height: 40px; color: #667eea; margin-bottom: 12px; } .product-item, .pet-item, .appointment-item { display: flex; background: white; border-radius: 12px; padding: 16px; margin-bottom: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); border: 1px solid #f0f0f0; } .product-item img, .pet-item img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; margin-right: 16px; } .product-info, .pet-info { flex: 1; } .product-name, .pet-name { font-weight: 600; font-size: 16px; margin-bottom: 8px; } .product-price { color: #e74c3c; font-weight: 600; font-size: 18px; } .pet-breed, .pet-age { color: #666; font-size: 14px; margin-bottom: 4px; } .form-group { margin-bottom: 20px; } .form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #333; } .form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; transition: border-color 0.3s; } .form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); } .social-post { background: white; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); border: 1px solid #f0f0f0; } .post-header { display: flex; align-items: center; margin-bottom: 12px; } .post-avatar { width: 40px; height: 40px; border-radius: 50%; margin-right: 12px; } .post-author { font-weight: 600; margin-bottom: 2px; } .post-time { color: #666; font-size: 12px; } .post-image { width: 100%; border-radius: 8px; margin: 12px 0; } .post-actions { display: flex; justify-content: space-around; padding-top: 12px; border-top: 1px solid #eee; } .action-btn { display: flex; align-items: center; background: none; border: none; color: #666; cursor: pointer; padding: 8px; border-radius: 6px; transition: all 0.3s; } .action-btn:hover { background: #f8f9fa; color: #667eea; } .action-btn svg { width: 18px; height: 18px; margin-right: 6px; } .stats-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 20px 0; } .stat-card { background: white; border-radius: 12px; padding: 20px; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.08); border: 1px solid #f0f0f0; } .stat-number { font-size: 28px; font-weight: 600; color: #667eea; margin-bottom: 8px; } .stat-label { color: #666; font-size: 14px; } .back-btn { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); border: none; color: white; padding: 8px; border-radius: 50%; cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; } .floating-btn { position: fixed; bottom: 90px; right: 20px; width: 56px; height: 56px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 50%; cursor: pointer; box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3); display: flex; align-items: center; justify-content: center; z-index: 999; } .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 2000; } .modal-content { background: white; border-radius: 12px; padding: 24px; margin: 20px; max-width: 350px; width: 100%; } .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .modal-title { font-size: 18px; font-weight: 600; } .close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: #666; } .hidden { display: none !important; } .cart-badge { position: absolute; top: -8px; right: -8px; background: #e74c3c; color: white; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; } .tab-container { display: flex; background: #f8f9fa; border-radius: 8px; padding: 4px; margin-bottom: 20px; } .tab-btn { flex: 1; background: none; border: none; padding: 12px; border-radius: 6px; cursor: pointer; transition: all 0.3s; font-weight: 500; } .tab-btn.active { background: white; color: #667eea; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .appointment-status { padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; } .status-pending { background: #fff3cd; color: #856404; } .status-confirmed { background: #d4edda; color: #155724; } .status-completed { background: #d1ecf1; color: #0c5460; } </style> </head> <body> <div id="app"> <div class="app"> <!-- 头部 --> <div class="header" v-if="!hideHeader"> <button class="back-btn" v-if="currentPage !== 'home'" @click="goBack"> <svg viewBox="0 0 24 24" fill="currentColor"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/> </svg> </button> <h1>{{ pageTitle }}</h1> <div class="subtitle">{{ pageSubtitle }}</div> </div> <!-- 主内容区域 --> <div class="content"> <!-- 首页 --> <div v-if="currentPage === 'home'"> <!-- 搜索栏 --> <div class="search-bar"> <svg viewBox="0 0 24 24" fil.........完整代码请登录后点击上方下载按钮下载查看
网友评论0