-
一个微信小程序实现婚礼邀请函与扫码获取抽奖码功能(UniApp + uViewUI)
-
一个WEB大屏实现抽奖功能(Vue2.0 + ElementUI)
-
一个后端负责逻辑处理(Python + MySQL)
npm install
npm run serve
更多详见uniapp文档
npm install
npm run serve
更多详见通用前端框架文档
导入server/sql/wedding.sql
文件
server项目根目录conf-example.json
改名为conf.json
,并修改如下
vim conf.json
去掉注释,否则报错
{
"server": {
"port": 9014, // 启动端口
"thread": 10 // 启动线程数
},
"mysql": { // mysql相关信息
"host": "127.0.0.1",
"port": 3306,
"db": "wedding",
"user": "root",
"passwd": "root"
},
"wechat": {
"appId": "xxxxx",
"AppSecret": "xxxxx"
}
}
python3 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
python3 main.py
vim /etc/systemd/system/wedding.service
注意把下边的设置应用的工作目录与Python3目录修改为自己真实的
[Unit]
Description=weddingServer
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/opt/python
ExecStart=/usr/bin/python3 /opt/python/main.py
Restart=always
ExecStop=/bin/kill -s TERM $MAINPID
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl start wedding
systemctl stop wedding
systemctl status wedding
systemctl enable wedding