Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
5762eb3
feat(components): add the feature of feedback
159357254680 Feb 6, 2026
9bf5c8f
refactor: unify data layer with Zustand stores and harden project hyg…
Jun 6, 2026
2e6ccaf
chore(deps): align Taro 4.0.6, babel-preset-taro, and eslint-typescript
Jun 6, 2026
dfafec6
ci: consolidate lint and build into a single workflow
Jun 6, 2026
87a2d33
feat(subpackages): split profile, feedback, and course into plan B do…
Jun 6, 2026
d1db8ba
fix: unwrap 401 retries, preserve deep links, and resolve question fr…
Jun 6, 2026
210b910
chore: fix ESLint errors and update README after subpackage migration
Jun 7, 2026
fc6f9a3
fix: silence Sass @import warnings and stabilize BottomInput on @mention
Jun 7, 2026
05c834f
fix: resolve react-hooks exhaustive-deps and stabilize Zustand selectors
Jun 7, 2026
2448bcd
feat: visitor anonymous reads, component layout, and comment fixes
Jun 7, 2026
0e4e06c
fix: scope resource 401s and harden request layer
Jun 7, 2026
5cfdb03
refactor: dedupe clipboard logic and stabilize list keys
Jun 7, 2026
6bb9948
refactor: converge comment types, decouple store UI, sink optimistic …
Jun 7, 2026
e049807
refactor: finish store-page split for comments, search, and history
Jun 7, 2026
2d5c120
refactor: folderize stores and introduce actions layer for cross-doma…
Jun 8, 2026
dedf6ab
refactor: 移除 actions 层并将页面编排下沉至 page model
Jun 11, 2026
96cf6ed
fix: align feedback v2 APIs and search input for release upload.
Jun 12, 2026
8b522d0
feat: add review gate guard with plaza/notification fallback screens
Jun 15, 2026
2f9a918
feat: search paging, pull refresh, and list/form UX polish
Jun 17, 2026
212cf0f
fix: clear user caches on logout and sort notifications newest-first
Jul 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"taro/react",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:react-hooks/recommended",
"prettier",
"plugin:prettier/recommended"
Expand All @@ -27,6 +27,7 @@
"react/jsx-curly-brace-presence": ["warn", { "props": "never", "children": "never" }],
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "warn",
"@typescript-eslint/no-explicit-any": "off",
"unused-imports/no-unused-vars": [
"warn",
{
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/build_test.yml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint & Format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: yarn

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn install --immutable

- name: Prettier
run: yarn prettier --check .

- name: ESLint
run: npx eslint .

build:
name: Build WeChat Mini Program
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: yarn

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn install --immutable

- name: Build
run: yarn build:weapp

- name: Upload build artifact
uses: actions/upload-artifact@v4
if: success()
with:
name: weapp-dist-${{ github.sha }}
path: dist/
retention-days: 7
42 changes: 0 additions & 42 deletions .github/workflows/lint_and_format_check.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
dist/
myrepo.bundle
graphify-out/
deploy_versions/
.temp/
.rn_temp/
Expand Down
122 changes: 102 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div align="center">
<img width="130" src="https://github.com/MuxiKeStack/muxiK-StackFrontend2.0/blob/main/src/common/assets/img/login/Icon.png" alt="muxiK-StackFrontend2.0 logo">
<h1 align="center">muxiK-StackFrontend2.0</h1>
<h3>muxiK-StackFrontend2.0</h3>
<h3>木犀课栈微信小程序</h3>
<a href="https://github.com/MuxiKeStack/muxiK-StackFrontend2.0"><strong>探索项目文档 »</strong></a>
<br />
<br />
Expand All @@ -18,38 +18,120 @@

</div>

## 🔖 项目导览
## 项目简介

### ✨ 提交规范
木犀课栈前端,基于 **Taro 4 + React 18** 的微信小程序。业务数据通过 **Zustand store** 统一管理,页面不直接调用 REST API。

**技术栈:** Taro 4.0.6 · React 18 · Zustand · TypeScript · Sass · Tailwind(weapp-tw)· Yarn 4

## 本地开发

### 环境要求

- Node.js 18+
- 微信开发者工具(打开编译产物目录 `dist/`)

### 常用命令

```bash
git clone https://github.com/MuxiKeStack/muxiK-StackFrontend2.0.git
cd muxiK-StackFrontend2.0
yarn
yarn dev:weapp # 监听编译,产物输出到 dist/
yarn build:weapp # 生产构建
yarn lint # ESLint
yarn prettier # 格式化
```

### 微信开发者工具

1. `project.config.json` 中 `miniprogramRoot` 指向 **`dist/`**
2. 终端先跑 `yarn dev:weapp` 或 `yarn build:weapp`,再在开发者工具中打开项目根目录
3. 若出现页面路径找不到、组件 `wx://not-found` 等异常,先清缓存再重建:

```bash
rm -rf dist node_modules/.cache .swc
yarn build:weapp
```

开发者工具内:**清缓存 → 全部清除 → 重新编译**。

## 目录结构

```
src/
├── pages/ # 主包页面(Tab、高频链路)
│ ├── main/ # 广场
│ ├── guide/ # 手册
│ ├── profile/ # 我的(Tab 壳)
│ ├── myclass/ # 我的课程(Tab「+」入口)
│ ├── classInfo/ # 课程详情
│ ├── notification/ # 消息
│ ├── research/ # 搜索
│ └── login/
├── subpackages/ # 分包(方案 B:按业务域组织)
│ ├── profile/ # 个人中心低频:收藏、评课历史、编辑资料
│ ├── feedback/ # 意见反馈
│ └── course/ # 评课 / 问答
├── common/ # 组件、请求、工具、常量
│ └── constants/routes.ts # 分包页面跳转路径
├── store/ # Zustand 数据层
└── app.config.ts # 主包 / 分包注册
```

### 分包说明

| 分包 | 页面 | 说明 |
| ---------------------- | ----------------------------------------------------- | -------------- |
| **主包** | login、四个 Tab、myclass、classInfo、research | 冷启动必载 |
| `subpackages/profile` | myCollection、evaluationHistory、editUser | 从「我的」进入 |
| `subpackages/feedback` | main、writefeedback、history、detail | 意见反馈全流程 |
| `subpackages/course` | evaluate、evaluateInfo、questionInfo、publishQuestion | 评课与问答 |

新增分包页面时:

1. 在 `src/subpackages/<域>/pages/` 下建页面
2. 在 `src/app.config.ts` 的 `subpackages` 中注册
3. 在 `src/common/constants/routes.ts` 补充路径,跳转统一使用 `ROUTES`

## 数据层约定

- **API 只在 store 里调用**,页面通过 store 的 `load` / action 读写数据
- **加载策略**(`src/store/types.ts`):
- `cache-first`:有缓存先用,没有再请求
- `network-first`:先请求,失败用旧缓存兜底(如 FAQ)
- `network-only`:只请求、不读缓存(登录、提交等写操作)
- 工具函数 `loadData` / `sourceLabel` 见 `src/store/loadUtils.ts`
- store 统一从 `src/store/index.ts` 导出

## CI

GitHub Actions 工作流见 `.github/workflows/ci.yml`:

| Job | 内容 |
| ----------------- | -------------------------------------------------------- |
| **Lint & Format** | Prettier check、ESLint |
| **Build** | `yarn build:weapp`,成功时上传 `dist/` 产物(保留 7 天) |

触发:`push` 到 `main`、任意 `pull_request`、手动 `workflow_dispatch`。

## 提交规范

- 🎉 init:项目初始化
- ✨ feat:新增功能(feature)
- 🐞 fix:修复bug
- 🐞 fix:修复 bug
- 📃 docs:文档修改
- 🌈 style:代码样式修改,不影响原代码逻辑
- ✅ test:测试相关的改动
- 🔨 refactor:代码重构
- 🔧 chore:建制过程或辅助工具的变动

### 🎯 相容环境

- 现代浏览器(Chrome >= 64, Edge >= 79, Firefox >= 78, Safari >= 12)

### 💻 本地调试

```bash
$ git clone https://github.com/MuxiKeStack/muxiK-StackFrontend2.0.git
$ cd muxiK-StackFrontend2.0
$ yarn
$ yarn dev:weapp
```

### 📝 授权
## 授权

上述文件皆以 MIT 许可授权
上述文件皆以 MIT 许可授权

> 详细之授权请参考 [LICENSE](LICENSE) 文件

### 📄 内部文档
## 内部文档

项目进度和未来计划请参考 [飞书文档](https://muxi.feishu.cn/docx/Q1PwdIMH0opWwRxG8WccgeClnck?from=from_copylink)
22 changes: 22 additions & 0 deletions config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,20 @@ const config = {
compiler: {
type: 'webpack5',
prebundle: {
enable: false,
force: true,
exclude: ['taro-ui'],
},
},
cache: {
enable: true, // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
},
mini: {
sassLoaderOption: {
sassOptions: {
silenceDeprecations: ['import'],
},
},
postcss: {
pxtransform: {
enable: true,
Expand All @@ -61,6 +68,9 @@ const config = {
},
},
},
miniCssExtractPluginOption: {
ignoreOrder: true,
},
optimizeMainPackage: {
enable: true,
exclude: [
Expand Down Expand Up @@ -105,9 +115,21 @@ const config = {
// });
},
},
sass: {
resource: [
path.resolve(__dirname, '..', 'src/common/styles/tokens/_index.scss'),
path.resolve(__dirname, '..', 'src/common/styles/functions/_index.scss'),
path.resolve(__dirname, '..', 'src/common/styles/mixins/_index.scss'),
],
},
h5: {
publicPath: '/',
staticDirectory: 'static',
sassLoaderOption: {
sassOptions: {
silenceDeprecations: ['import'],
},
},
postcss: {
autoprefixer: {
enable: true,
Expand Down
2 changes: 2 additions & 0 deletions docs/测试文档.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
已过期,有没有人想写文档

<div align="center">
<h1 align="center">muxiK-StackFrontend2.0</h1>

Expand Down
2 changes: 2 additions & 0 deletions docs/进度文档.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
已过期,有没有人想写文档

<div align="center">
<h1 align="center">muxiK-StackFrontend2.0</h1>

Expand Down
Binary file removed myrepo.bundle
Binary file not shown.
Loading
Loading