feat: 初始化多个小程序和前端项目
- 新建多个小程序的 app.js、app.json 和 app.wxss 文件 - 新建多个前端项目的 App.vue 文件 - 添加 .gitignore 文件和后端 API 的 .env.example 文件
This commit is contained in:
200
frontend/website/css/style.css
Normal file
200
frontend/website/css/style.css
Normal file
@@ -0,0 +1,200 @@
|
||||
/* 锡林郭勒盟安格斯牛平台官网样式 */
|
||||
:root {
|
||||
--primary-color: #4CAF50;
|
||||
--secondary-color: #388E3C;
|
||||
--accent-color: #FF9800;
|
||||
--light-color: #f5f5f5;
|
||||
--dark-color: #333;
|
||||
--text-color: #333;
|
||||
--border-radius: 4px;
|
||||
--box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Arial', sans-serif;
|
||||
line-height: 1.6;
|
||||
color: var(--text-color);
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* 头部样式 */
|
||||
header {
|
||||
background-color: var(--primary-color);
|
||||
color: white;
|
||||
padding: 1rem 0;
|
||||
box-shadow: var(--box-shadow);
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: 1.8rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
nav ul li {
|
||||
margin-right: 1.5rem;
|
||||
}
|
||||
|
||||
nav ul li a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
nav ul li a:hover {
|
||||
color: var(--light-color);
|
||||
}
|
||||
|
||||
/* 主要内容区域 */
|
||||
main {
|
||||
min-height: calc(100vh - 140px);
|
||||
}
|
||||
|
||||
/* 英雄区域 */
|
||||
.hero {
|
||||
background: linear-gradient(rgba(76, 175, 80, 0.8), rgba(56, 142, 60, 0.9)), url('../images/hero-bg.jpg') no-repeat center center/cover;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 4rem 0;
|
||||
}
|
||||
|
||||
.hero h2 {
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.hero p {
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.cta-buttons {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 0.8rem 1.5rem;
|
||||
border-radius: var(--border-radius);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.btn.primary {
|
||||
background-color: var(--accent-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn.primary:hover {
|
||||
background-color: #F57C00;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.btn.secondary {
|
||||
background-color: transparent;
|
||||
color: white;
|
||||
border: 2px solid white;
|
||||
}
|
||||
|
||||
.btn.secondary:hover {
|
||||
background-color: white;
|
||||
color: var(--primary-color);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
/* 特色功能区域 */
|
||||
.features {
|
||||
padding: 4rem 0;
|
||||
background-color: var(--light-color);
|
||||
}
|
||||
|
||||
.features h2 {
|
||||
text-align: center;
|
||||
font-size: 2rem;
|
||||
margin-bottom: 3rem;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.feature-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.feature-card {
|
||||
background: white;
|
||||
padding: 2rem;
|
||||
border-radius: var(--border-radius);
|
||||
box-shadow: var(--box-shadow);
|
||||
text-align: center;
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.feature-card:hover {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
|
||||
.feature-card h3 {
|
||||
color: var(--primary-color);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
/* 页脚 */
|
||||
footer {
|
||||
background-color: var(--dark-color);
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 1.5rem 0;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 768px) {
|
||||
header h1 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
nav ul li {
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
|
||||
.hero h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.hero p {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.cta-buttons {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.feature-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
69
frontend/website/index.html
Normal file
69
frontend/website/index.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>锡林郭勒盟安格斯牛数字化管理平台</title>
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="container">
|
||||
<h1>锡林郭勒盟安格斯牛数字化管理平台</h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="#home">首页</a></li>
|
||||
<li><a href="#about">关于我们</a></li>
|
||||
<li><a href="#services">服务</a></li>
|
||||
<li><a href="#contact">联系我们</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<section id="home" class="hero">
|
||||
<div class="container">
|
||||
<h2>推动畜牧业数字化转型</h2>
|
||||
<p>打造锡林郭勒盟安格斯牛全产业链数字化管理平台</p>
|
||||
<div class="cta-buttons">
|
||||
<a href="#" class="btn primary">平台入口</a>
|
||||
<a href="#" class="btn secondary">了解详情</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="features" class="features">
|
||||
<div class="container">
|
||||
<h2>平台特色</h2>
|
||||
<div class="feature-grid">
|
||||
<div class="feature-card">
|
||||
<h3>养殖管理</h3>
|
||||
<p>全流程数字化养殖管理,提升养殖效率</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3>交易撮合</h3>
|
||||
<p>安全可靠的活牛交易平台,保障交易双方权益</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3>金融监管</h3>
|
||||
<p>银行与保险机构数字化监管,降低金融风险</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3>政府监管</h3>
|
||||
<p>政府数字化监管平台,提升监管效率</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<p>© 2025 锡林郭勒盟安格斯牛数字化管理平台. 保留所有权利.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
64
frontend/website/js/main.js
Normal file
64
frontend/website/js/main.js
Normal file
@@ -0,0 +1,64 @@
|
||||
// 锡林郭勒盟安格斯牛平台官网JavaScript
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// 平滑滚动效果
|
||||
const links = document.querySelectorAll('a[href^="#"]');
|
||||
|
||||
links.forEach(link => {
|
||||
link.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
const targetId = this.getAttribute('href');
|
||||
const targetElement = document.querySelector(targetId);
|
||||
|
||||
if (targetElement) {
|
||||
window.scrollTo({
|
||||
top: targetElement.offsetTop - 70,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 简单的移动端菜单切换
|
||||
const mobileMenuButton = document.createElement('button');
|
||||
mobileMenuButton.classList.add('mobile-menu-toggle');
|
||||
mobileMenuButton.innerHTML = '☰';
|
||||
mobileMenuButton.setAttribute('aria-label', '切换菜单');
|
||||
|
||||
const header = document.querySelector('header');
|
||||
const nav = document.querySelector('nav');
|
||||
|
||||
if (header && nav) {
|
||||
header.insertBefore(mobileMenuButton, nav);
|
||||
|
||||
mobileMenuButton.addEventListener('click', function() {
|
||||
nav.classList.toggle('active');
|
||||
});
|
||||
}
|
||||
|
||||
// 添加一些简单的交互效果
|
||||
const featureCards = document.querySelectorAll('.feature-card');
|
||||
|
||||
featureCards.forEach(card => {
|
||||
card.addEventListener('mouseenter', function() {
|
||||
this.style.boxShadow = '0 5px 15px rgba(0, 0, 0, 0.2)';
|
||||
});
|
||||
|
||||
card.addEventListener('mouseleave', function() {
|
||||
this.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.1)';
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// 简单的表单验证示例
|
||||
function validateForm(form) {
|
||||
// 这里可以添加表单验证逻辑
|
||||
console.log('表单验证');
|
||||
return true;
|
||||
}
|
||||
|
||||
// 页面加载完成后的初始化
|
||||
window.addEventListener('load', function() {
|
||||
console.log('锡林郭勒盟安格斯牛平台官网加载完成');
|
||||
});
|
||||
Reference in New Issue
Block a user