feat: 联盟返佣系统规范化并打通技能广场(无 ICP 证合规变现主路径)
- 新增 AffiliateProgram / AffiliateLink / AffiliateClick 规范化 Prisma 模型 取代原手写裸表 affiliate_stats / affiliate_clicks - 新增迁移 prisma/migrations/20260711000000_add_affiliate_models - 重构 affiliate.service.ts 改用 Prisma ORM,消除 $queryRawUnsafe SQL 注入 - 重构 affiliate.controller.ts 接口:programs / links(?skillId,?toolId) / stats / click - 前端 affiliate 页接入真实接口,移除硬编码 demo 数据 - 技能详情页新增「学此技能推荐使用的工具」联盟链接区块 - 新增 affiliate.service.spec.ts(4 用例通过)与幂等种子 seed-affiliate.ts - 更新 docs/progress/current.md,明确无 ICP 经营许可证下以联盟返佣为合规变现主路径 - 含此前工作区未提交改动(工具 slug 路由、支付/订单、SEO 等) Co-Authored-By: opencode <opencode@anthropic.com>
This commit is contained in:
@@ -1,4 +1,92 @@
|
||||
# 宇之然 AI - robots.txt
|
||||
# https://yuzhiran.com/robots.txt
|
||||
|
||||
User-agent: *
|
||||
Allow: /
|
||||
|
||||
# 禁止抓取后台管理页面
|
||||
Disallow: /admin/
|
||||
Disallow: /auth/
|
||||
Disallow: /my/
|
||||
Disallow: /dashboard/
|
||||
Disallow: /notifications/
|
||||
Disallow: /enterprise/
|
||||
Disallow: /learning/
|
||||
|
||||
# 禁止抓取 API 路径
|
||||
Disallow: /api/
|
||||
Disallow: /_next/
|
||||
|
||||
# 允许搜索引擎抓取重要页面
|
||||
Allow: /tools/
|
||||
Allow: /courses/
|
||||
Allow: /skills/
|
||||
Allow: /practices/
|
||||
Allow: /prompts/
|
||||
Allow: /contents/
|
||||
Allow: /community/
|
||||
Allow: /discover/
|
||||
Allow: /sandbox/
|
||||
Allow: /marketplace/
|
||||
Allow: /about/
|
||||
Allow: /privacy/
|
||||
Allow: /terms/
|
||||
|
||||
# 爬虫抓取频率限制
|
||||
Crawl-delay: 1
|
||||
|
||||
# 搜索引擎验证
|
||||
User-agent: Googlebot
|
||||
Allow: /
|
||||
Disallow: /admin/
|
||||
Disallow: /auth/
|
||||
Disallow: /my/
|
||||
Disallow: /dashboard/
|
||||
Disallow: /notifications/
|
||||
Disallow: /enterprise/
|
||||
Disallow: /learning/
|
||||
Disallow: /api/
|
||||
Disallow: /_next/
|
||||
Crawl-delay: 0
|
||||
|
||||
User-agent: Bingbot
|
||||
Allow: /
|
||||
Disallow: /admin/
|
||||
Disallow: /auth/
|
||||
Disallow: /my/
|
||||
Disallow: /dashboard/
|
||||
Disallow: /notifications/
|
||||
Disallow: /enterprise/
|
||||
Disallow: /learning/
|
||||
Disallow: /api/
|
||||
Disallow: /_next/
|
||||
Crawl-delay: 1
|
||||
|
||||
User-agent: Baiduspider
|
||||
Allow: /
|
||||
Disallow: /admin/
|
||||
Disallow: /auth/
|
||||
Disallow: /my/
|
||||
Disallow: /dashboard/
|
||||
Disallow: /notifications/
|
||||
Disallow: /enterprise/
|
||||
Disallow: /learning/
|
||||
Disallow: /api/
|
||||
Disallow: /_next/
|
||||
Crawl-delay: 2
|
||||
|
||||
User-agent: Yandex
|
||||
Allow: /
|
||||
Disallow: /admin/
|
||||
Disallow: /auth/
|
||||
Disallow: /my/
|
||||
Disallow: /dashboard/
|
||||
Disallow: /notifications/
|
||||
Disallow: /enterprise/
|
||||
Disallow: /learning/
|
||||
Disallow: /api/
|
||||
Disallow: /_next/
|
||||
Crawl-delay: 1
|
||||
|
||||
# Sitemap 位置
|
||||
Sitemap: https://yuzhiran.com/sitemap.xml
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/webmanifest",
|
||||
"name": "宇之然 AI - AI 工具与知识社区",
|
||||
"short_name": "宇之然 AI",
|
||||
"description": "面向大众化分领域用户的 AI 工具与知识社区,涵盖 AI 通识、提示词工程、智能体教程、模型百科、AI 沙盒实战等",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"orientation": "portrait-primary",
|
||||
"background_color": "#ffffff",
|
||||
"theme_color": "#0c8ee7",
|
||||
"categories": ["education", "productivity", "utilities"],
|
||||
"lang": "zh-CN",
|
||||
"dir": "ltr",
|
||||
"scope": "/",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/favicon.ico",
|
||||
"sizes": "any",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "/favicon.png",
|
||||
"sizes": "16x16 32x32 48x48 64x64 128x128 256x256",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/icon.svg",
|
||||
"sizes": "any",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any maskable"
|
||||
}
|
||||
],
|
||||
"shortcuts": [
|
||||
{
|
||||
"name": "AI 工具",
|
||||
"short_name": "工具",
|
||||
"description": "浏览 AI 工具指南",
|
||||
"url": "/tools",
|
||||
"icons": [{ "src": "/favicon.png", "sizes": "192x192" }]
|
||||
},
|
||||
{
|
||||
"name": "AI 沙盒",
|
||||
"short_name": "沙盒",
|
||||
"description": "AI 对话沙盒实战",
|
||||
"url": "/sandbox",
|
||||
"icons": [{ "src": "/favicon.png", "sizes": "192x192" }]
|
||||
},
|
||||
{
|
||||
"name": "课程学习",
|
||||
"short_name": "课程",
|
||||
"description": "AI 课程学习",
|
||||
"url": "/courses",
|
||||
"icons": [{ "src": "/favicon.png", "sizes": "192x192" }]
|
||||
},
|
||||
{
|
||||
"name": "技能广场",
|
||||
"short_name": "技能",
|
||||
"description": "AI 技能广场",
|
||||
"url": "/skills",
|
||||
"icons": [{ "src": "/favicon.png", "sizes": "192x192" }]
|
||||
}
|
||||
],
|
||||
"share_target": {
|
||||
"action": "/search",
|
||||
"method": "GET",
|
||||
"enctype": "application/x-www-form-urlencoded",
|
||||
"params": {
|
||||
"title": "title",
|
||||
"text": "text",
|
||||
"url": "url"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user