diff --git a/.playwright-mcp/console-2026-08-01T10-36-54-982Z.log b/.playwright-mcp/console-2026-08-01T10-36-54-982Z.log new file mode 100644 index 0000000..a43e5f2 --- /dev/null +++ b/.playwright-mcp/console-2026-08-01T10-36-54-982Z.log @@ -0,0 +1,21 @@ +[ 36930ms] [LOG] {highlight: , highlightAuto: , highlightAll: , highlightElement: , highlightBlock: } @ https://test-admin.sbnews.net/src/install/plugins/hljs.ts:3 +[ 37002ms] CanceledError: get&adminapi/config/getConfig&& + at cancel (https://test-admin.sbnews.net/node_modules/.vite/deps/axios.js?v=3bc9d05f:3356:22) + at AxiosCancel.remove (https://test-admin.sbnews.net/src/utils/request/cancel.ts:24:17) + at AxiosCancel.add (https://test-admin.sbnews.net/src/utils/request/cancel.ts:14:10) + at Axios.addCancelToken (https://test-admin.sbnews.net/src/utils/request/axios.ts:80:39) + at https://test-admin.sbnews.net/src/utils/request/axios.ts:38:14 + at async Axios.request (https://test-admin.sbnews.net/node_modules/.vite/deps/axios.js?v=3bc9d05f:3123:14) +[ 37002ms] CanceledError: get&adminapi/config/getConfig&& + at cancel (https://test-admin.sbnews.net/node_modules/.vite/deps/axios.js?v=3bc9d05f:3356:22) + at AxiosCancel.remove (https://test-admin.sbnews.net/src/utils/request/cancel.ts:24:17) + at AxiosCancel.add (https://test-admin.sbnews.net/src/utils/request/cancel.ts:14:10) + at Axios.addCancelToken (https://test-admin.sbnews.net/src/utils/request/axios.ts:80:39) + at https://test-admin.sbnews.net/src/utils/request/axios.ts:38:14 + at async Axios.request (https://test-admin.sbnews.net/node_modules/.vite/deps/axios.js?v=3bc9d05f:3123:14) +[ 37100ms] [ERROR] Failed to load resource: the server responded with a status of 404 () @ https://test-admin.sbnews.net/favicon.ico:0 +[ 37475ms] [ERROR] Mixed Content: The page at 'https://test-admin.sbnews.net/' was loaded over HTTPS, but requested an insecure favicon 'http://test-server.sbnews.net/uploads/images/20260411/20260411003702d55579016.png'. This request has been blocked; the content must be served over HTTPS. @ https://test-admin.sbnews.net/:0 +[ 37490ms] [ERROR] Mixed Content: The page at 'https://test-admin.sbnews.net/' was loaded over HTTPS, but requested an insecure favicon 'http://test-server.sbnews.net/uploads/images/20260411/20260411003702d55579016.png'. This request has been blocked; the content must be served over HTTPS. @ https://test-admin.sbnews.net/:0 +[ 38060ms] [WARNING] Mixed Content: The page at 'https://test-admin.sbnews.net/login?redirect=/' was loaded over HTTPS, but requested an insecure element 'http://test-server.sbnews.net/resource/image/adminapi/default/login_image.png'. This request was automatically upgraded to HTTPS, For more information see https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html @ https://test-admin.sbnews.net/login?redirect=/:0 +[ 38093ms] [ERROR] Mixed Content: The page at 'https://test-admin.sbnews.net/login?redirect=/' was loaded over HTTPS, but requested an insecure favicon 'http://test-server.sbnews.net/uploads/images/20260411/20260411003702d55579016.png'. This request has been blocked; the content must be served over HTTPS. @ https://test-admin.sbnews.net/login?redirect=/:0 +[ 38094ms] [ERROR] Mixed Content: The page at 'https://test-admin.sbnews.net/login?redirect=/' was loaded over HTTPS, but requested an insecure favicon 'http://test-server.sbnews.net/uploads/images/20260411/20260411003702d55579016.png'. This request has been blocked; the content must be served over HTTPS. @ https://test-admin.sbnews.net/login?redirect=/:0 diff --git a/.playwright-mcp/console-2026-08-01T10-38-13-206Z.log b/.playwright-mcp/console-2026-08-01T10-38-13-206Z.log new file mode 100644 index 0000000..6a0122c --- /dev/null +++ b/.playwright-mcp/console-2026-08-01T10-38-13-206Z.log @@ -0,0 +1,29 @@ +[ 37585ms] [LOG] %c uni-router %c v1.2.7 padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold; padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold; @ https://testh5.sbnews.net/node_modules/.vite/deps/uniapp-router-next.js?v=d65138d7:1179 +[ 37623ms] [LOG] [app] onLaunch 开始执行 @ https://testh5.sbnews.net/src/App.vue?t=1785577437473:47 +[ 37657ms] [LOG] [app] onLaunch 执行完毕 @ https://testh5.sbnews.net/src/App.vue?t=1785577437473:71 +[ 37657ms] [LOG] [app] onShow: config未加载,重新拉取 @ https://testh5.sbnews.net/src/App.vue?t=1785577437473:76 +[ 37666ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/index/decorate?id=5' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 37666ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/index/decorate?id=5:0 +[ 37666ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/index/config' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 37666ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/index/config:0 +[ 37732ms] Object +[ 37666ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/index/config' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 37667ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/index/config:0 +[ 37667ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/device/register' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 37671ms] [WARNING] [device] 设备信息上报失败: {errMsg: request:fail} @ https://testh5.sbnews.net/src/utils/device.ts?t=1785577437473:74 +[ 37671ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/device/register:0 +[ 37732ms] Object +[ 37732ms] Object +[ 39200ms] [LOG] 获取分类失败=> {errMsg: request:fail abort} @ https://testh5.sbnews.net/src/pages/index/index.vue?t=1785577437465:82 +[ 39203ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/match/lists' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 39203ms] [LOG] 获取首页焦点赛程失败=> {errMsg: request:fail} @ https://testh5.sbnews.net/src/pages/index/index.vue?t=1785577437465:94 +[ 39206ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/match/lists:0 +[ 39206ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/article/cate' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 39207ms] [LOG] 获取分类失败=> {errMsg: request:fail} @ https://testh5.sbnews.net/src/pages/index/index.vue?t=1785577437465:82 +[ 39207ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/article/cate:0 +[ 39222ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/popup/list?page_path=%2Fpages%2Findex%2Findex&platform=h5' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 39223ms] [WARNING] [GlobalPopup] 拉取弹窗失败: {errMsg: request:fail} @ https://testh5.sbnews.net/src/components/global-popup/global-popup.vue:123 +[ 39223ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/popup/list?page_path=%2Fpages%2Findex%2Findex&platform=h5:0 +[ 39223ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/article/lists?page_no=1&page_size=10&is_recommend=1' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 39223ms] [LOG] 首页资讯加载失败=> {errMsg: request:fail} @ https://testh5.sbnews.net/src/pages/index/index.vue?t=1785577437465:141 +[ 39225ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/article/lists?page_no=1&page_size=10&is_recommend=1:0 diff --git a/.playwright-mcp/console-2026-08-01T10-39-58-793Z.log b/.playwright-mcp/console-2026-08-01T10-39-58-793Z.log new file mode 100644 index 0000000..f30346f --- /dev/null +++ b/.playwright-mcp/console-2026-08-01T10-39-58-793Z.log @@ -0,0 +1,18 @@ +[ 5931ms] [LOG] {highlight: , highlightAuto: , highlightAll: , highlightElement: , highlightBlock: } @ https://test-admin.sbnews.net/src/install/plugins/hljs.ts:3 +[ 6130ms] CanceledError: get&adminapi/config/getConfig&& + at cancel (https://test-admin.sbnews.net/node_modules/.vite/deps/axios.js?v=3bc9d05f:3356:22) + at AxiosCancel.remove (https://test-admin.sbnews.net/src/utils/request/cancel.ts:24:17) + at AxiosCancel.add (https://test-admin.sbnews.net/src/utils/request/cancel.ts:14:10) + at Axios.addCancelToken (https://test-admin.sbnews.net/src/utils/request/axios.ts:80:39) + at https://test-admin.sbnews.net/src/utils/request/axios.ts:38:14 + at async Axios.request (https://test-admin.sbnews.net/node_modules/.vite/deps/axios.js?v=3bc9d05f:3123:14) +[ 6131ms] CanceledError: get&adminapi/config/getConfig&& + at cancel (https://test-admin.sbnews.net/node_modules/.vite/deps/axios.js?v=3bc9d05f:3356:22) + at AxiosCancel.remove (https://test-admin.sbnews.net/src/utils/request/cancel.ts:24:17) + at AxiosCancel.add (https://test-admin.sbnews.net/src/utils/request/cancel.ts:14:10) + at Axios.addCancelToken (https://test-admin.sbnews.net/src/utils/request/axios.ts:80:39) + at https://test-admin.sbnews.net/src/utils/request/axios.ts:38:14 + at async Axios.request (https://test-admin.sbnews.net/node_modules/.vite/deps/axios.js?v=3bc9d05f:3123:14) +[ 6380ms] [ERROR] Mixed Content: The page at 'https://test-admin.sbnews.net/login?redirect=/' was loaded over HTTPS, but requested an insecure favicon 'http://test-server.sbnews.net/uploads/images/20260411/20260411003702d55579016.png'. This request has been blocked; the content must be served over HTTPS. @ https://test-admin.sbnews.net/login?redirect=/:0 +[ 6381ms] [ERROR] Mixed Content: The page at 'https://test-admin.sbnews.net/login?redirect=/' was loaded over HTTPS, but requested an insecure favicon 'http://test-server.sbnews.net/uploads/images/20260411/20260411003702d55579016.png'. This request has been blocked; the content must be served over HTTPS. @ https://test-admin.sbnews.net/login?redirect=/:0 +[ 7366ms] [WARNING] Mixed Content: The page at 'https://test-admin.sbnews.net/login?redirect=/' was loaded over HTTPS, but requested an insecure element 'http://test-server.sbnews.net/resource/image/adminapi/default/login_image.png'. This request was automatically upgraded to HTTPS, For more information see https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html @ https://test-admin.sbnews.net/login?redirect=/:0 diff --git a/.playwright-mcp/console-2026-08-01T10-40-21-788Z.log b/.playwright-mcp/console-2026-08-01T10-40-21-788Z.log new file mode 100644 index 0000000..f047300 --- /dev/null +++ b/.playwright-mcp/console-2026-08-01T10-40-21-788Z.log @@ -0,0 +1,27 @@ +[ 21198ms] [LOG] %c uni-router %c v1.2.7 padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold; padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold; @ https://testh5.sbnews.net/node_modules/.vite/deps/uniapp-router-next.js?v=d65138d7:1179 +[ 21211ms] [LOG] [app] onLaunch 开始执行 @ https://testh5.sbnews.net/src/App.vue?t=1785577437473:47 +[ 21214ms] [LOG] [app] onLaunch 执行完毕 @ https://testh5.sbnews.net/src/App.vue?t=1785577437473:71 +[ 21215ms] [LOG] [app] onShow: config未加载,重新拉取 @ https://testh5.sbnews.net/src/App.vue?t=1785577437473:76 +[ 21295ms] Object +[ 21256ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/device/register' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 21258ms] [WARNING] [device] 设备信息上报失败: {errMsg: request:fail} @ https://testh5.sbnews.net/src/utils/device.ts?t=1785577437473:74 +[ 21259ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/device/register:0 +[ 21259ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/index/decorate?id=5' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 21259ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/index/decorate?id=5:0 +[ 21259ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/index/config' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 21259ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/index/config:0 +[ 21306ms] Object +[ 21306ms] Object +[ 22145ms] [LOG] 获取分类失败=> {errMsg: request:fail abort} @ https://testh5.sbnews.net/src/pages/index/index.vue?t=1785577437465:82 +[ 22148ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/match/lists' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 22148ms] [LOG] 获取首页焦点赛程失败=> {errMsg: request:fail} @ https://testh5.sbnews.net/src/pages/index/index.vue?t=1785577437465:94 +[ 22150ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/match/lists:0 +[ 22150ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/article/cate' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 22150ms] [LOG] 获取分类失败=> {errMsg: request:fail} @ https://testh5.sbnews.net/src/pages/index/index.vue?t=1785577437465:82 +[ 22151ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/article/cate:0 +[ 22151ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/popup/list?page_path=%2Fpages%2Findex%2Findex&platform=h5' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 22151ms] [WARNING] [GlobalPopup] 拉取弹窗失败: {errMsg: request:fail} @ https://testh5.sbnews.net/src/components/global-popup/global-popup.vue:123 +[ 22151ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/popup/list?page_path=%2Fpages%2Findex%2Findex&platform=h5:0 +[ 22153ms] [ERROR] Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/article/lists?page_no=1&page_size=10&is_recommend=1' from origin 'https://testh5.sbnews.net' has been blocked by CORS policy: Permission was denied for this request to access the `loopback` address space. @ https://testh5.sbnews.net/:0 +[ 22153ms] [LOG] 首页资讯加载失败=> {errMsg: request:fail} @ https://testh5.sbnews.net/src/pages/index/index.vue?t=1785577437465:141 +[ 22155ms] [ERROR] Failed to load resource: net::ERR_FAILED @ http://127.0.0.1:8000/api/article/lists?page_no=1&page_size=10&is_recommend=1:0 diff --git a/.playwright-mcp/page-2026-08-01T10-37-32-092Z.yml b/.playwright-mcp/page-2026-08-01T10-37-32-092Z.yml new file mode 100644 index 0000000..e69de29 diff --git a/.playwright-mcp/page-2026-08-01T10-38-51-349Z.yml b/.playwright-mcp/page-2026-08-01T10-38-51-349Z.yml new file mode 100644 index 0000000..09fb1dc --- /dev/null +++ b/.playwright-mcp/page-2026-08-01T10-38-51-349Z.yml @@ -0,0 +1,12 @@ +- generic [active] [ref=f1e1]: + - generic [ref=f1e10]: + - generic [ref=f1e12]: 首页 + - generic [ref=f1e17]: 赛事 + - generic [ref=f1e22]: 加密行情 + - generic [ref=f1e27]: 彩票 + - generic [ref=f1e32]: 社区 + - generic [ref=f1e37]: 我的 + - generic: + - generic: + - generic: + - paragraph: 请求失败,请重试 \ No newline at end of file diff --git a/.playwright-mcp/page-2026-08-01T10-40-04-996Z.yml b/.playwright-mcp/page-2026-08-01T10-40-04-996Z.yml new file mode 100644 index 0000000..e69de29 diff --git a/.playwright-mcp/page-2026-08-01T10-40-43-141Z.yml b/.playwright-mcp/page-2026-08-01T10-40-43-141Z.yml new file mode 100644 index 0000000..b4a748f --- /dev/null +++ b/.playwright-mcp/page-2026-08-01T10-40-43-141Z.yml @@ -0,0 +1,12 @@ +- generic [active] [ref=f3e1]: + - generic [ref=f3e7]: + - generic [ref=f3e9]: 首页 + - generic [ref=f3e14]: 赛事 + - generic [ref=f3e19]: 加密行情 + - generic [ref=f3e24]: 彩票 + - generic [ref=f3e29]: 社区 + - generic [ref=f3e34]: 我的 + - generic: + - generic: + - generic: + - paragraph: 请求失败,请重试 \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index 4279ced..8cf9f75 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -50,9 +50,11 @@ ## 自动化执行边界 -- 除非用户在当前任务中明确要求,否则不要自动执行构建、测试、提交代码或部署。 -- 完成代码修改后,可以说明建议执行的验证命令或部署命令,但不得自行运行。 -- 用户明确要求“构建”“测试”“提交”“部署”“上线”“发布”等操作时,才执行对应命令。 +- 除非用户在当前任务中明确要求,否则不要自动执行构建或测试。 +- **持续授权:每次修改真实源码或运行配置后都必须创建 Git commit,无须再次询问。**说明文档及 `server/public/admin`、`server/public/mobile` 等生成产物不属于该触发范围。 +- **`server/` 例外:**本次修改 `server/` 下的真实运行源码或运行配置时,除提交外还必须同步测试服;无需用户重复要求。 +- `admin/`、`uniapp/`、`pc/`、`docker/`、`python/`、`qa/`、`scripts/` 等非 `server/` 源码改动只提交 commit,不自动同步测试站点;用户明确要求时除外。 +- 用户明确要求“构建”“测试”“部署”“上线”“发布”等操作时,才执行对应命令;但 `server/` 源码变更适用上述持续授权同步例外。 - 对已经由用户给出的命令,可按用户原命令执行;不要额外扩展到未要求的构建、测试、提交或部署步骤。 ## 数据库结构基准 @@ -113,16 +115,17 @@ | 7 | 幂等性 | SQL 初始化必须可重复执行 | | 8 | 文档同步 | 功能完成后更新 `docs/业务进度管理.md` | -## 代码变更后部署 +## 服务器源码变更后必须同步 -- 仅在用户明确要求部署、上线、发布或同步到测试服时,执行以下命令,将最新代码更新到测试服运行环境: +- 每次修改 `server/` 下的真实运行源码或运行配置后,完成必要的静态检查后必须先创建 Git commit,再将代码同步到测试服;这是一项持续授权,不需要用户重复要求。 +- 使用项目部署脚本并保留 `-Sudo` 参数,目标目录固定为 `/www/wwwroot/test-server.sbnews.net`,避免 Docker 创建的 root 权限文件中断更新。 +- 默认使用以下命令将最新代码更新到测试服运行环境: ```powershell -cd D:\www\gs-sport-era -powershell -ExecutionPolicy Bypass -File .\scripts\deploy-server.ps1 -Sudo -AutoIncremental -AutoIncrementalCommits 3 -RemoteDir /www/wwwroot/test-server.sbnews.net +Set-Location D:\www\gs-sport-era; powershell -ExecutionPolicy Bypass -File .\scripts\deploy-server.ps1 -Sudo -AutoIncremental -AutoIncrementalCommits 3 -RemoteDir /www/wwwroot/test-server.sbnews.net ``` -- 不要把部署视为代码变更后的默认必做步骤;未明确要求部署时,只提示可执行的部署命令。 +- `admin/`、`uniapp/`、`pc/`、`docker/`、`python/`、`qa/`、`scripts/` 等非 `server/` 源码改动必须提交 commit,但不要因此自动同步服务器。`docs/` 等说明文档不触发自动提交或服务器同步。 ## 设计稿映射 diff --git a/uniapp/src/config/index.ts b/uniapp/src/config/index.ts index 4d5444f..c6fb858 100644 --- a/uniapp/src/config/index.ts +++ b/uniapp/src/config/index.ts @@ -1,5 +1,4 @@ -// const envBaseUrl = 'https://test-server.sbnews.net/' -const envBaseUrl = 'http://127.0.0.1:8000' +const envBaseUrl = 'https://test-server.sbnews.net/' let baseUrl = `${envBaseUrl}/`