merge: 合并服务器代码,统一品牌和配置

This commit is contained in:
Jowe
2025-12-31 01:37:16 +08:00
82 changed files with 134 additions and 14 deletions

View File

@@ -32,7 +32,8 @@
"WebFetch(domain:bocha-ai.feishu.cn)", "WebFetch(domain:bocha-ai.feishu.cn)",
"Bash(ls:*)", "Bash(ls:*)",
"Bash(git pull:*)", "Bash(git pull:*)",
"Bash(del nul)" "Bash(del nul)",
"Bash(git checkout:*)"
] ]
} }
} }

12
.gitignore vendored
View File

@@ -70,3 +70,15 @@ backup_*.sql
*.tmp *.tmp
*.bak *.bak
*.cache *.cache
# 部署相关文件
*.patch
*_deploy*.sh
*.backup
# 用户上传的文件
static/logos/*
!static/logos/.gitkeep
# 临时文件
nul

View File

@@ -41,6 +41,20 @@ class Config:
UPLOAD_FOLDER = 'static/uploads' UPLOAD_FOLDER = 'static/uploads'
MAX_CONTENT_LENGTH = 5 * 1024 * 1024 # 5MB MAX_CONTENT_LENGTH = 5 * 1024 * 1024 # 5MB
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif', 'webp'} ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif', 'webp'}
# DeepSeek API配置
DEEPSEEK_API_KEY = os.environ.get('DEEPSEEK_API_KEY')
DEEPSEEK_BASE_URL = os.environ.get('DEEPSEEK_BASE_URL') or 'https://api.deepseek.com'
# 博查 Web Search API配置
BOCHA_API_KEY = os.environ.get('BOCHA_API_KEY')
BOCHA_BASE_URL = os.environ.get('BOCHA_BASE_URL') or 'https://api.bocha.cn'
BOCHA_SEARCH_ENDPOINT = '/v1/web-search'
# 新闻搜索配置
NEWS_SEARCH_COUNT = 10 # 每次搜索返回的新闻数量
NEWS_SEARCH_FRESHNESS = 'oneMonth' # 默认搜索一个月内的新闻
NEWS_SEARCH_SUMMARY = True # 是否显示摘要
# DeepSeek API配置 # DeepSeek API配置
DEEPSEEK_API_KEY = os.environ.get('DEEPSEEK_API_KEY') DEEPSEEK_API_KEY = os.environ.get('DEEPSEEK_API_KEY')

View File

@@ -4,7 +4,7 @@
# 用法: ./manage.sh [start|stop|restart|status|logs] # 用法: ./manage.sh [start|stop|restart|status|logs]
APP_NAME="zjpb" APP_NAME="zjpb"
APP_DIR="/www/wwwroot/zjpb" APP_DIR="/opt/1panel/apps/zjpb"
VENV_DIR="$APP_DIR/venv" VENV_DIR="$APP_DIR/venv"
PID_FILE="$APP_DIR/logs/gunicorn.pid" PID_FILE="$APP_DIR/logs/gunicorn.pid"
@@ -14,7 +14,7 @@ case "$1" in
start) start)
echo "启动 $APP_NAME..." echo "启动 $APP_NAME..."
source $VENV_DIR/bin/activate source $VENV_DIR/bin/activate
gunicorn -c gunicorn_config.py app:app gunicorn -c gunicorn_config.py wsgi:app
echo "$APP_NAME 已启动" echo "$APP_NAME 已启动"
;; ;;

61
manage.sh.backup Normal file
View File

@@ -0,0 +1,61 @@
#!/bin/bash
# ZJPB 应用管理脚本
# 用法: ./manage.sh [start|stop|restart|status|logs]
APP_NAME="zjpb"
APP_DIR="/www/wwwroot/zjpb"
VENV_DIR="$APP_DIR/venv"
PID_FILE="$APP_DIR/logs/gunicorn.pid"
cd $APP_DIR
case "$1" in
start)
echo "启动 $APP_NAME..."
source $VENV_DIR/bin/activate
gunicorn -c gunicorn_config.py app:app
echo "$APP_NAME 已启动"
;;
stop)
echo "停止 $APP_NAME..."
if [ -f $PID_FILE ]; then
kill $(cat $PID_FILE)
echo "$APP_NAME 已停止"
else
echo "PID文件不存在可能未运行"
fi
;;
restart)
$0 stop
sleep 2
$0 start
;;
status)
if [ -f $PID_FILE ]; then
PID=$(cat $PID_FILE)
if ps -p $PID > /dev/null; then
echo "$APP_NAME 正在运行 (PID: $PID)"
else
echo "$APP_NAME 未运行但PID文件存在"
fi
else
echo "$APP_NAME 未运行"
fi
;;
logs)
echo "实时查看日志Ctrl+C退出"
tail -f logs/error.log
;;
*)
echo "用法: $0 {start|stop|restart|status|logs}"
exit 1
;;
esac
exit 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,22 @@
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M32.9314 26.9511L21.7996 20.5242L32.4531 14.9257L42.8674 32.9639L32.4531 38.9766L32.9314 26.9511Z" fill="url(#paint0_linear_14267_83603)"/>
<path d="M21.8015 20.5187L21.8015 33.3726L11.6264 26.9457L22.0407 8.90756L32.455 14.9203L21.8015 20.5187Z" fill="url(#paint1_linear_14267_83603)"/>
<path d="M11.6249 26.9477L21.8 33.3747L27.3659 30.1612L32.9318 26.9477L32.4535 38.9731L11.6249 38.9731L11.6249 26.9477Z" fill="url(#paint2_linear_14267_83603)"/>
<path d="M17.0052 5.99971C14.6088 4.61614 11.6133 6.34561 11.6133 9.11277L11.6133 26.9375L22.0276 8.89937L17.0052 5.99971Z" fill="#F4DBFF"/>
<path d="M47.8817 30.0613C50.2782 28.6777 50.2782 25.2188 47.8817 23.8352L32.4451 14.9228L42.8594 32.9609L47.8817 30.0613Z" fill="#FFDBF6"/>
<path d="M11.6164 44.7588C11.6164 47.526 14.6119 49.2555 17.0083 47.8719L32.445 38.9595L11.6164 38.9595L11.6164 44.7588Z" fill="#FFE9CD"/>
<defs>
<linearGradient id="paint0_linear_14267_83603" x1="38.2931" y1="34.987" x2="39.9981" y2="18.0469" gradientUnits="userSpaceOnUse">
<stop stop-color="#7333F0"/>
<stop offset="1" stop-color="#F034D0"/>
</linearGradient>
<linearGradient id="paint1_linear_14267_83603" x1="26.9397" y1="11.8049" x2="11.9028" y2="25.1964" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF5753"/>
<stop offset="1" stop-color="#FFA52D"/>
</linearGradient>
<linearGradient id="paint2_linear_14267_83603" x1="11.3626" y1="33.824" x2="31.1696" y2="38.3227" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF5753"/>
<stop offset="1" stop-color="#F034D0"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>批量导入 - ZJPB 焦提示词</title> <title>批量导入 - ZJPB - 自己品吧</title>
<!-- Google Fonts --> <!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
@@ -26,7 +26,7 @@
<!-- Logo --> <!-- Logo -->
<div class="sidebar-logo"> <div class="sidebar-logo">
<span class="material-symbols-outlined logo-icon">blur_on</span> <span class="material-symbols-outlined logo-icon">blur_on</span>
<span class="logo-text">ZJPB 焦提示词</span> <span class="logo-text">ZJPB - 自己品吧</span>
</div> </div>
<!-- 主菜单 --> <!-- 主菜单 -->

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>修改密码 - ZJPB 焦提示词</title> <title>修改密码 - ZJPB - 自己品吧</title>
<!-- Google Fonts --> <!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
@@ -26,7 +26,7 @@
<!-- Logo --> <!-- Logo -->
<div class="sidebar-logo"> <div class="sidebar-logo">
<span class="material-symbols-outlined logo-icon">blur_on</span> <span class="material-symbols-outlined logo-icon">blur_on</span>
<span class="logo-text">ZJPB 焦提示词</span> <span class="logo-text">ZJPB - 自己品吧</span>
</div> </div>
<!-- 主菜单 --> <!-- 主菜单 -->

View File

@@ -32,7 +32,7 @@
<!-- Logo --> <!-- Logo -->
<div class="sidebar-logo"> <div class="sidebar-logo">
<span class="material-symbols-outlined logo-icon">blur_on</span> <span class="material-symbols-outlined logo-icon">blur_on</span>
<span class="logo-text">ZJPB 焦提示词</span> <span class="logo-text">ZJPB - 自己品吧</span>
</div> </div>
<!-- 主菜单 --> <!-- 主菜单 -->

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>管理员登录 - ZJPB 焦提示词</title> <title>管理员登录 - ZJPB - 自己品吧</title>
<!-- Google Fonts --> <!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}ZJPB - 焦提示词 | AI工具导航{% endblock %}</title> <title>{% block title %}ZJPB - 自己品吧 | AI工具导航{% endblock %}</title>
<style> <style>
* { * {
@@ -255,7 +255,7 @@
<footer class="footer"> <footer class="footer">
<div class="footer-container"> <div class="footer-container">
<div class="footer-text"> <div class="footer-text">
<div>© 2025 ZJPB - 焦提示词 | AI工具导航. All rights reserved.</div> <div>© 2025 ZJPB - 自己品吧 | AI工具导航. All rights reserved.</div>
<div style="margin-top: 8px;"> <div style="margin-top: 8px;">
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer" style="color: var(--text-secondary); text-decoration: none;"> <a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer" style="color: var(--text-secondary); text-decoration: none;">
浙ICP备2025154782号-1 浙ICP备2025154782号-1
@@ -270,6 +270,16 @@
</div> </div>
</footer> </footer>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-LZ4FGX5LRB"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-LZ4FGX5LRB');
</script>
<!-- Microsoft Clarity 统计代码 --> <!-- Microsoft Clarity 统计代码 -->
<script type="text/javascript"> <script type="text/javascript">
(function(c,l,a,r,i,t,y){ (function(c,l,a,r,i,t,y){

View File

@@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{{ site.name }} - ZJPB 焦提示词{% endblock %} {% block title %}{{ site.name }} - ZJPB - 自己品吧{% endblock %}
{% block description %}{{ site.short_desc or site.description[:150] }}{% endblock %} {% block description %}{{ site.short_desc or site.description[:150] }}{% endblock %}
{% block keywords %}{{ site.name }},{% for tag in site.tags %}{{ tag.name }},{% endfor %}ZJPB,焦提示词,AI工具{% endblock %} {% block keywords %}{{ site.name }},{% for tag in site.tags %}{{ tag.name }},{% endfor %}ZJPB,焦提示词,AI工具{% endblock %}

View File

@@ -1,6 +1,6 @@
{% extends 'base_new.html' %} {% extends 'base_new.html' %}
{% block title %}ZJPB - 焦提示词 | 发现最新最好用的AI工具和产品{% endblock %} {% block title %}ZJPB - 自己品吧 | 发现最新最好用的AI工具和产品{% endblock %}
{% block extra_css %} {% block extra_css %}
<style> <style>

View File

@@ -137,7 +137,7 @@ class NewsSearcher:
新闻列表 新闻列表
""" """
# 构建搜索关键词:网站名称 + "最新" + "新闻" # 构建搜索关键词:网站名称 + "最新" + "新闻"
query = f"{site_name} 最新 新闻" query = f'"{site_name}" 新闻'
# 如果提供了网站URL排除网站自身的结果 # 如果提供了网站URL排除网站自身的结果
exclude = None exclude = None