|
|
1 周之前 | |
|---|---|---|
| .trae | 1 周之前 | |
| admin-web | 1 周之前 | |
| backend | 1 周之前 | |
| official-web | 1 周之前 | |
| pic | 1 周之前 | |
| .gitattributes | 1 周之前 | |
| README.MD | 1 周之前 | |
| STRATEGIC_COOPERATION_UPDATE.md | 1 周之前 |
This repository contains the complete source code for the Wangxun Chuangzhi official website system, comprising three main components: a customer-facing official website, a background management administration panel, and a backend API server.
wxgw2/
├── admin-web/ # Background Management System (Vue 3)
├── official-web/ # Official Website Frontend (Vue 3)
└── backend/ # Backend API Server (Flask)
official-web)The public-facing portal for "Wangxun Chuangzhi" (网讯创智), showcasing company information, products, solutions, and news.
cd official-web
npm install
npm run dev
admin-web)The content management system (CMS) for administrators to manage the official website's data.
cd admin-web
npm install
npm run dev
backend)The RESTful API server that powers both the Official Web and Admin Web.
The database connection string is configured in app/config.py. By default, it connects to a remote MySQL server.
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://user:password@host:port/database'
Create Virtual Environment:
cd backend
python -m venv venv
# Windows
venv\Scripts\activate
# Linux/Mac
source venv/bin/activate
Install Dependencies:
pip install -r requirements.txt
Database Initialization (Optional):
WARNING: drop_tables.py will delete all existing data.
python drop_tables.py # Reset database schema
python seed.py # Seed initial data (Admin user, etc.)
Run Server:
python run.py
The server runs on http://localhost:5000 by default.
.env)Both admin-web and official-web use .env files to configure API endpoints.
admin-web/.env:
VITE_API_BASE_URL=http://localhost:5000/api
VITE_IMG_BASE_URL=http://localhost:5000
VITE_UPLOAD_URL=http://localhost:5000/api/upload
official-web/.env:
VITE_API_BASE_URL=http://localhost:5000/api
VITE_IMG_BASE_URL=http://localhost:5000
Backend configuration is primarily handled in app/config.py. You can override settings using environment variables like SECRET_KEY, DATABASE_URL, and JWT_SECRET_KEY.
static/uploads directory is writable.npm run build and serve the dist/ directories using a web server (Nginx/Apache).