commit 5fcd6b701730b68c7497b62aa549143b8a17536b Author: superlishunqin <852326703@qq.com> Date: Fri Jul 4 19:07:35 2025 +0800 online_shopping_07_04 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5a265cb --- /dev/null +++ b/.gitignore @@ -0,0 +1,178 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Flask stuff: +instance/ +.webassets-cache + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +Pipfile.lock + +# poetry +poetry.lock + +# Environments (保留配置文件,只排除本地环境变量) +.env.local +.env.development +.env.test + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# IDE +.idea/ +.vscode/ +*.swp +*.swo +*~ + +# 操作系统 +.DS_Store +.AppleDouble +.LSOverride +Thumbs.db +ehthumbs.db +Desktop.ini +$RECYCLE.BIN/ +*.cab +*.msi +*.msix +*.msm +*.msp +*.lnk + +# 虚拟环境 +venv/ +.venv/ +env/ +ENV/ +env.bak/ +venv.bak/ + +# 日志文件 +logs/*.log +*.log + +# 上传文件(用户上传的内容不需要版本控制) +app/static/uploads/* +!app/static/uploads/.gitkeep + +# 数据库文件(如果使用SQLite) +*.db +*.sqlite +*.sqlite3 + +# 临时文件 +temp/ +tmp/ +*.tmp +*.bak +*.backup + +# 测试输出 +test_output/ +test_results/ + +# 缓存文件 +.cache/ + +# 压缩文件 +*.zip +*.tar.gz +*.rar + +# 编译文件 +*.pyc + +# 性能分析 +*.prof + +# 本地开发临时文件 +scratch/ +notes.txt +todo.txt + +# Docker临时文件(保留主要Docker文件) +.dockerignore.bak + +# 部署相关临时文件 +deploy_temp/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..7965521 --- /dev/null +++ b/README.md @@ -0,0 +1,211 @@ + +
本项目为毕业设计作品,旨在展示一个完整的Web应用开发流程。
+作者:林金兴 | 指导老师:[指导老师姓名]
+点击上方的"添加新分类"来创建第一个商品分类
+总用户数
+活跃用户
+管理员数
+7天操作数
+时间 | +操作者 | +操作类型 | +操作内容 | +IP地址 | +
---|---|---|---|---|
{{ log.created_at.strftime('%m-%d %H:%M') if log.created_at else '' }} | ++ {% if log.user_type == 2 %} + 管理员 + {% else %} + 用户 + {% endif %} + {{ log.user_id }} + | +{{ log.action }} | ++ {% if log.resource_type %} + {{ log.resource_type }} + {% if log.resource_id %}#{{ log.resource_id }}{% endif %} + {% else %} + - + {% endif %} + | +{{ log.ip_address or '-' }} | +
+
+ 暂无操作日志
+ |
+
太白购物商城管理后台
+ID | +商品图片 | +商品名称 | +分类 | +价格 | +库存 | +状态 | +销量 | +创建时间 | +操作 | +
---|---|---|---|---|---|---|---|---|---|
{{ product.id }} | +
+ {% if product.main_image %}
+
+
+
+ {% endif %}
+ |
+
+
+ {{ product.name[:40] }}{% if product.name|length > 40 %}...{% endif %}
+ {% if product.brand %}
+
+ {{ product.brand }} + {% endif %} + {% if product.has_specs %} + 多规格 + {% endif %} + |
+ + {{ product.category.name if product.category else '未分类' }} + | +
+ ¥{{ "%.2f"|format(product.price) }}
+ {% if product.original_price and product.original_price > product.price %}
+ + ¥{{ "%.2f"|format(product.original_price) }} + + {% endif %} + |
+
+ {% set total_stock = product.inventory|sum(attribute='stock') if product.inventory else 0 %}
+ {% set sku_count = product.inventory|length if product.inventory else 0 %}
+
+
+
+ {{ total_stock }}
+
+ {% if sku_count > 1 %}
+
+ {{ sku_count }}个SKU + {% endif %} + {% if total_stock <= 0 %} + 缺货 + {% elif total_stock <= 10 %} + 库存不足 + {% endif %} + |
+ + {% if product.status == 1 %} + 上架 + {% else %} + 下架 + {% endif %} + | +
+ {{ product.sales_count }}
+ 浏览:{{ product.view_count }}
+ |
+
+
+ {{ product.created_at.strftime('%m-%d') if product.created_at else '' }}
+
+ {{ product.created_at.strftime('%H:%M') if product.created_at else '' }} + |
+
+
+
+ 编辑
+
+ {% if product.inventory %}
+
+ {% endif %}
+
+
+ |
+
+
+
+
+ 暂无商品数据 + {% if search or category_id or status %} + + 清除筛选 + + {% endif %} + |
+
你好,{{ user.nickname or user.username }}!开始您的购物之旅吧!
+ {% else %} +发现优质商品,享受便捷购物体验
+ 立即注册 + {% endif %} +{{ address.receiver_phone }}
+{{ address.get_full_address() }}
+{{ item.spec_combination }}
+ {% endif %} + {% if item.product.brand %} + {{ item.product.brand }} + {% endif %} +{{ order.created_at.strftime('%Y-%m-%d %H:%M:%S') }}
+已完成
+ {% else %} +请在15分钟内完成支付
+ {% endif %} +{{ order.shipped_at.strftime('%Y-%m-%d %H:%M:%S') if order.shipped_at else '已发货' }}
+ {% else %} +等待卖家发货
+ {% endif %} +{{ order.received_at.strftime('%Y-%m-%d %H:%M:%S') if order.received_at else '已确认收货' }}
+ {% else %} +等待买家确认收货
+ {% endif %} +交易成功
+ {% else %} +等待交易完成
+ {% endif %} +{{ item.spec_combination }}
+ {% endif %} + 单价:¥{{ "%.2f"|format(item.price) }} +请使用微信扫描二维码完成支付
+正在跳转到支付宝...
+正在跳转到网银...
++ 品牌:{{ product.brand }} +
+ {% endif %} + + +暂无详细描述
+ {% endif %} +商品名称 | +{{ product.name }} | +
商品品牌 | +{{ product.brand }} | +
商品分类 | +{{ product.category.name }} | +
商品重量 | +{{ product.weight }}kg | +
上架时间 | +{{ product.created_at.strftime('%Y-%m-%d') }} | +
库存信息 | ++ {% if inventory_list|length == 1 %} + {{ inventory_list[0].stock }}件 + {% else %} + 多规格商品,请选择具体规格查看库存 + {% endif %} + | +
评价功能开发中...
+{{ product.brand }}
+ {% endif %} +{{ address.receiver_phone }}
++ + {{ address.get_full_address() }} +
+ {% if address.postal_code %} ++ 邮编:{{ address.postal_code }} +
+ {% endif %} +还没有账户? 立即注册
+{{ item.spec_combination }}
+ {% endif %} +您还没有任何订单,快去购物吧!
+ + 去购物 + +用户名: | +{{ user.username }} | +
昵称: | +{{ user.nickname or '未设置' }} | +
手机号: | +{{ user.phone or '未绑定' }} | +
邮箱: | +{{ user.email or '未绑定' }} | +
性别: | ++ {% if user.gender == 1 %}男 + {% elif user.gender == 2 %}女 + {% else %}未设置 + {% endif %} + | +
注册时间: | +{{ user.created_at.strftime('%Y-%m-%d %H:%M:%S') if user.created_at else '未知' }} | +
已有账户? 立即登录
+您正在进行{type_map.get(code_type, "验证")}操作,验证码为:
+验证码有效期为10分钟,请及时使用。
+如果这不是您的操作,请忽略此邮件。
+此邮件由系统自动发送,请勿回复。
+© 2024 太白购物平台 版权所有
+文件路径: {result['file_key']}
+访问URL: {result['url']}
+点击上方的"添加新分类"来创建第一个商品分类
+总用户数
+活跃用户
+管理员数
+7天操作数
+时间 | +操作者 | +操作类型 | +操作内容 | +IP地址 | +
---|---|---|---|---|
{{ log.created_at.strftime('%m-%d %H:%M') if log.created_at else '' }} | ++ {% if log.user_type == 2 %} + 管理员 + {% else %} + 用户 + {% endif %} + {{ log.user_id }} + | +{{ log.action }} | ++ {% if log.resource_type %} + {{ log.resource_type }} + {% if log.resource_id %}#{{ log.resource_id }}{% endif %} + {% else %} + - + {% endif %} + | +{{ log.ip_address or '-' }} | +
+ 暂无操作日志 + | +
太白购物商城管理后台
+ID | +商品图片 | +商品名称 | +分类 | +价格 | +库存 | +状态 | +销量 | +创建时间 | +操作 | +
---|---|---|---|---|---|---|---|---|---|
{{ product.id }} | +
+ {% if product.main_image %}
+
+
+
+ {% endif %}
+ |
+
+
+ {{ product.name[:40] }}{% if product.name|length > 40 %}...{% endif %}
+ {% if product.brand %}
+
+ {{ product.brand }} + {% endif %} + {% if product.has_specs %} + 多规格 + {% endif %} + |
+ + {{ product.category.name if product.category else '未分类' }} + | +
+ ¥{{ "%.2f"|format(product.price) }}
+ {% if product.original_price and product.original_price > product.price %}
+ + ¥{{ "%.2f"|format(product.original_price) }} + + {% endif %} + |
+
+ {% set total_stock = product.inventory|sum(attribute='stock') if product.inventory else 0 %}
+ {% set sku_count = product.inventory|length if product.inventory else 0 %}
+
+
+
+ {{ total_stock }}
+
+ {% if sku_count > 1 %}
+
+ {{ sku_count }}个SKU + {% endif %} + {% if total_stock <= 0 %} + 缺货 + {% elif total_stock <= 10 %} + 库存不足 + {% endif %} + |
+ + {% if product.status == 1 %} + 上架 + {% else %} + 下架 + {% endif %} + | +
+ {{ product.sales_count }}
+ 浏览:{{ product.view_count }}
+ |
+
+
+ {{ product.created_at.strftime('%m-%d') if product.created_at else '' }}
+
+ {{ product.created_at.strftime('%H:%M') if product.created_at else '' }} + |
+
+
+
+ 编辑
+
+ {% if product.inventory %}
+
+ {% endif %}
+
+
+ |
+
+
+
+
+ 暂无商品数据 + {% if search or category_id or status %} + + 清除筛选 + + {% endif %} + |
+
你好,{{ user.nickname or user.username }}!开始您的购物之旅吧!
+ {% else %} +发现优质商品,享受便捷购物体验
+ 立即注册 + {% endif %} +{{ address.receiver_phone }}
+{{ address.get_full_address() }}
+{{ item.spec_combination }}
+ {% endif %} + {% if item.product.brand %} + {{ item.product.brand }} + {% endif %} +{{ order.created_at.strftime('%Y-%m-%d %H:%M:%S') }}
+已完成
+ {% else %} +请在15分钟内完成支付
+ {% endif %} +{{ order.shipped_at.strftime('%Y-%m-%d %H:%M:%S') if order.shipped_at else '已发货' }}
+ {% else %} +等待卖家发货
+ {% endif %} +{{ order.received_at.strftime('%Y-%m-%d %H:%M:%S') if order.received_at else '已确认收货' }}
+ {% else %} +等待买家确认收货
+ {% endif %} +交易成功
+ {% else %} +等待交易完成
+ {% endif %} +{{ item.spec_combination }}
+ {% endif %} + 单价:¥{{ "%.2f"|format(item.price) }} +请使用微信扫描二维码完成支付
+正在跳转到支付宝...
+正在跳转到网银...
++ 品牌:{{ product.brand }} +
+ {% endif %} + + +暂无详细描述
+ {% endif %} +商品名称 | +{{ product.name }} | +
商品品牌 | +{{ product.brand }} | +
商品分类 | +{{ product.category.name }} | +
商品重量 | +{{ product.weight }}kg | +
上架时间 | +{{ product.created_at.strftime('%Y-%m-%d') }} | +
库存信息 | ++ {% if inventory_list|length == 1 %} + {{ inventory_list[0].stock }}件 + {% else %} + 多规格商品,请选择具体规格查看库存 + {% endif %} + | +
评价功能开发中...
+{{ product.brand }}
+ {% endif %} +{{ address.receiver_phone }}
++ + {{ address.get_full_address() }} +
+ {% if address.postal_code %} ++ 邮编:{{ address.postal_code }} +
+ {% endif %} +还没有账户? 立即注册
+{{ item.spec_combination }}
+ {% endif %} +您还没有任何订单,快去购物吧!
+ + 去购物 + +用户名: | +{{ user.username }} | +
昵称: | +{{ user.nickname or '未设置' }} | +
手机号: | +{{ user.phone or '未绑定' }} | +
邮箱: | +{{ user.email or '未绑定' }} | +
性别: | ++ {% if user.gender == 1 %}男 + {% elif user.gender == 2 %}女 + {% else %}未设置 + {% endif %} + | +
注册时间: | +{{ user.created_at.strftime('%Y-%m-%d %H:%M:%S') if user.created_at else '未知' }} | +
已有账户? 立即登录
+您正在进行{type_map.get(code_type, "验证")}操作,验证码为:
+验证码有效期为10分钟,请及时使用。
+如果这不是您的操作,请忽略此邮件。
+此邮件由系统自动发送,请勿回复。
+© 2024 太白购物平台 版权所有
+文件路径: {result['file_key']}
+访问URL: {result['url']}
+