feat: 初始化多个小程序和前端项目

- 新建多个小程序的 app.js、app.json 和 app.wxss 文件
- 新建多个前端项目的 App.vue 文件
- 添加 .gitignore 文件和后端 API 的 .env.example 文件
This commit is contained in:
ylweng
2025-08-18 23:48:54 +08:00
commit 1dbfbebd05
81 changed files with 5791 additions and 0 deletions

View 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('锡林郭勒盟安格斯牛平台官网加载完成');
});