Files
soul-yongping/scripts/fix_souladmin_login.sh
卡若 afc2376e96 v1.19 全面改版:VIP会员系统、我的收益、创业老板排行、阅读量排序
- 后端: users表新增VIP字段, 4个VIP API (purchase/status/profile/members)
- 后端: hot接口改按user_tracks阅读量排序
- 后端: orders表支持vip产品类型, migrate新增vip_fields迁移
- 小程序「我的」: 推广中心改为我的收益, 头像VIP标识, VIP入口卡片
- 小程序「我的」: 最近阅读显示真实章节名称
- 小程序首页: 去掉内容概览, 新增创业老板排行(4列网格)
- 小程序首页: 精选推荐从hot接口获取, goToRead增加track记录
- 新增页面: VIP详情页, 会员详情页
- 开发文档精简为10个标准目录, 创建SKILL.md, 需求日志规范化

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-23 14:07:41 +08:00

49 lines
1.7 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 修复 souladmin.quwanzhi.com 登录 "Failed to fetch" 错误
# 1. Vue 管理后台 API 改为同源O1=""),请求 /api
# 2. souladmin Nginx 代理 /api 到 souldev.quwanzhi.com
set -e
cd "$(dirname "$0")/.."
SSH_PORT="22022"
BT_HOST="43.139.27.93"
ADMIN_DIST="/www/wwwroot/自营/soul-admin/dist"
echo "===== 1. 上传 patched index-CbOmKBRd.js ====="
sshpass -p 'Zhiqun1984' scp -P "$SSH_PORT" -o ConnectTimeout=15 \
"soul-admin/dist/assets/index-CbOmKBRd.js" \
root@${BT_HOST}:${ADMIN_DIST}/assets/
echo "===== 2. 配置 souladmin Nginx /api 代理 ====="
sshpass -p 'Zhiqun1984' ssh -p "$SSH_PORT" -o ConnectTimeout=20 root@${BT_HOST} 'bash -s' << 'REMOTE'
EXT_DIR="/www/server/panel/vhost/nginx/extension/souladmin.quwanzhi.com"
mkdir -p "$EXT_DIR"
API_CONF="$EXT_DIR/api-proxy.conf"
cat > "$API_CONF" << 'NGX'
location /api/ {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
add_header Access-Control-Allow-Headers "Authorization, Content-Type";
add_header Access-Control-Allow-Credentials "true";
add_header Content-Length 0;
return 204;
}
proxy_pass https://souldev.quwanzhi.com/api/;
proxy_ssl_server_name on;
proxy_http_version 1.1;
proxy_set_header Host souldev.quwanzhi.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
NGX
echo "api-proxy.conf 已写入"
nginx -t 2>&1 && nginx -s reload 2>&1
echo "Nginx 重载完成"
REMOTE
echo ""
echo "===== souladmin 登录修复完成 ====="
echo "请访问 https://souladmin.quwanzhi.com 尝试登录"