nomadro/.cursor/rules/no-webview-content.mdc
eric 98a54730ff Port nomadvip VIP into native WeChat pages and document the flow.
Add vip-course/lesson/ebook with source markdown seeds, VIP order API + admin offers, ban web-view for content, and update READMEs for weapp rebuild/extract scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-04 22:30:27 +08:00

26 lines
1.1 KiB
Plaintext
Raw Permalink 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.

---
description: 全端小程序禁止 web-view(微信/抖音/小红书/H5 SoT)
alwaysApply: true
---
# 全端小程序禁止 web-view
适用范围:`apps/miniprogram/{h5,weapp,tt,xhs}` 及一切 Taro/小程序业务页。
## 强制
- **禁止**使用 `WebView`、`web-view`、`pages/*-web`、内嵌 H5 壳承载任何业务内容。
- **禁止**用 web-view「偷懒」打开:VIP、电子书、视频课、社群、导航详情、目的地、活动、会员落地。
- 内容必须是**原生页面**:Taro 组件 + 包内/离线数据(markdown、catalog、Video、现有 reader)。
- 真外链(社群二维码页、商城):只允许复制链接 / 提示外部打开;**不得**当内容页塞进 web-view。
## 反模式
- `import { WebView } from '@tarojs/components'`
- `goPage('/pages/vip-web/...')` 或任何 `*-web` 内容页
- 导航栏标题出现 `%E4%...` 编码串却打开空白黑页(典型 web-view 失败)
## 发现即改
搜到业务页 WebView → 立刻改成原生页再继续其它需求;不得留下「先 web-view 以后再说」。