diff --git a/.claude/settings.local.json b/.claude/settings.local.json
new file mode 100644
index 0000000..6686521
--- /dev/null
+++ b/.claude/settings.local.json
@@ -0,0 +1,13 @@
+{
+ "permissions": {
+ "allow": [
+ "Bash(npm install *)",
+ "Read(//e/Demos/DemoOwns/Go/**)",
+ "Bash(npm init *)",
+ "Bash(npm uninstall *)",
+ "Bash(mkdir -p uniapp)",
+ "Bash(mkdir src *)",
+ "Bash(touch src/App.vue src/main.ts pages.json vite.config.js uni.scss)"
+ ]
+ }
+}
diff --git a/.codegraph/.gitignore b/.codegraph/.gitignore
deleted file mode 100644
index 5f220f1..0000000
--- a/.codegraph/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-# CodeGraph data files — local to each machine, not for committing.
-# Ignore everything in .codegraph/ except this file itself, so transient
-# files (the database, daemon.pid, sockets, logs) never show up in git.
-*
-!.gitignore
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5f481f0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,51 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+# platform
+platform/output
+platform/output.zip
+platform/dist.zip
+platform/dist.7z
+platform/output.7z
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
+
+.env
+.env.*
+!.example.env
+
+# uniapp
+uniapp/node_modules/
+
+# go
+go/go-platform.zip
+go/server.exe
+
+# codegraph
+.codegraph/*
+
+# mimocode
+.mimocode/node_modules
+.mimocode/package.json
+.mimocode/package-lock.json
+.mimocode/bun.lock
diff --git a/backend/.gitignore b/backend/.gitignore
deleted file mode 100644
index ec6aa96..0000000
--- a/backend/.gitignore
+++ /dev/null
@@ -1,28 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
-
-.env
-.env.*
-!.example.env
\ No newline at end of file
diff --git a/frontend/.gitignore b/frontend/.gitignore
deleted file mode 100644
index d7543ec..0000000
--- a/frontend/.gitignore
+++ /dev/null
@@ -1,28 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
-
-.env
-.env.*
-!.example.env
\ No newline at end of file
diff --git a/go/.gitignore b/go/.gitignore
deleted file mode 100644
index 0716027..0000000
--- a/go/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-go-platform.zip
-server.exe
\ No newline at end of file
diff --git a/platform/.gitignore b/platform/.gitignore
deleted file mode 100644
index d8ee227..0000000
--- a/platform/.gitignore
+++ /dev/null
@@ -1,33 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-output
-dist-ssr
-*.local
-output.zip
-dist.zip
-dist.7z
-output.7z
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
-
-.env
-.env.*
-!.example.env
\ No newline at end of file
diff --git a/uniapp/App.vue b/uniapp/App.vue
deleted file mode 100644
index 604ddcb..0000000
--- a/uniapp/App.vue
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
diff --git a/uniapp/README.md b/uniapp/README.md
deleted file mode 100644
index d83969f..0000000
--- a/uniapp/README.md
+++ /dev/null
@@ -1,75 +0,0 @@
-# 云泽网站综合管理平台 (yunzerwebsiteallinone)
-
-基于 UniApp 开发的跨平台综合管理系统
-
-## 项目结构
-
-```
-uniapp/
-├── pages/ # 页面目录
-│ ├── login/ # 登录页
-│ │ └── login.vue
-│ ├── dashboard/ # 仪表盘(首页)
-│ │ └── dashboard.vue
-│ ├── functions/ # 功能页
-│ │ └── functions.vue
-│ └── mine/ # 我的页面
-│ └── mine.vue
-├── static/ # 静态资源
-│ └── tabbar/ # TabBar 图标
-├── App.vue # 应用根组件
-├── main.js # 入口文件
-├── pages.json # 页面配置
-├── manifest.json # 应用配置
-├── uni.scss # 全局样式变量
-└── index.html # H5 入口页面
-```
-
-## 页面说明
-
-### 1. 登录页 (pages/login/login.vue)
-- 支持验证码登录和密码登录切换
-- 手机号 + 验证码 / 账号密码 双模式
-- 主题色:#1989fa
-- 登录成功后跳转到仪表盘
-
-### 2. 仪表盘 (pages/dashboard/dashboard.vue)
-- 欢迎信息(根据时间动态显示问候语)
-- 数据概览卡片(访问量、用户数、订单数、收入)
-- 快捷操作入口
-- 最近动态列表
-
-### 3. 功能页 (pages/functions/functions.vue)
-- 搜索功能
-- 常用功能网格(8个快捷入口)
-- 管理工具列表
-- 数据服务列表
-- 系统工具列表
-
-### 4. 我的 (pages/mine/mine.vue)
-- 用户头像/昵称/手机号展示
-- 统计数据(文章/粉丝/关注/获赞)
-- 订单状态入口
-- 功能菜单列表
-- 退出登录功能
-
-## TabBar 配置
-
-底部三菜单:
-- 仪表盘 (首页)
-- 功能
-- 我的
-
-登录页不在 TabBar 中,通过页面跳转访问。
-
-## 开发说明
-
-1. 使用 HBuilderX 打开本项目目录即可运行
-2. 支持 H5 / 微信小程序 / APP 等多端运行
-3. 主题色变量定义在 `uni.scss` 中:`$primary-color: #1989fa`
-
-## 注意事项
-
-- 请在 `static/tabbar/` 目录下放置 TabBar 图标(详见该目录下的 README.md)
-- 登录状态使用 `uni.storage` 本地存储
-- 所有接口调用处标注了 TODO,需根据实际后端接口对接
diff --git a/uniapp/index.html b/uniapp/index.html
deleted file mode 100644
index 90d59c7..0000000
--- a/uniapp/index.html
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
- 云泽网站综合管理平台
-
-
-
-
-
-
-
-
diff --git a/uniapp/main.js b/uniapp/main.js
deleted file mode 100644
index 9b27185..0000000
--- a/uniapp/main.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import App from './App'
-
-// #ifndef VUE3
-import Vue from 'vue'
-Vue.config.productionTip = false
-App.mpType = 'app'
-const app = new Vue({
- ...App
-})
-app.$mount()
-// #endif
-
-// #ifdef VUE3
-import { createSSRApp } from 'vue'
-export function createApp() {
- const app = createSSRApp(App)
- return { app }
-}
-// #endif
diff --git a/uniapp/manifest.json b/uniapp/manifest.json
deleted file mode 100644
index bf74253..0000000
--- a/uniapp/manifest.json
+++ /dev/null
@@ -1 +0,0 @@
-{"name": "yunzerwebsiteallinone", "appid": "", "description": "云泽网站综合管理平台", "versionName": "1.0.0", "versionCode": "100", "transformPx": false, "app-plus": {"usingComponents": true, "splashscreen": {"alwaysShowBeforeRender": true, "waiting": true, "autoclose": true, "delay": 0}, "modules": {}, "distribute": {"android": {"permissions": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]}, "ios": {}, "sdkConfigs": {}}}, "quickapp": {}, "mp-weixin": {"appid": "", "setting": {"urlCheck": false}, "usingComponents": true}, "mp-alipay": {"usingComponents": true}, "mp-baidu": {"usingComponents": true}, "mp-toutiao": {"usingComponents": true}, "uniStatistics": {"enable": false}, "h5": {"devServer": {"port": 8080, "disableHostCheck": true}}}
\ No newline at end of file
diff --git a/uniapp/package.json b/uniapp/package.json
deleted file mode 100644
index b645b77..0000000
--- a/uniapp/package.json
+++ /dev/null
@@ -1 +0,0 @@
-{"dependencies": {}, "devDependencies": {}}
\ No newline at end of file
diff --git a/uniapp/pages.json b/uniapp/pages.json
deleted file mode 100644
index 0568c9b..0000000
--- a/uniapp/pages.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "pages": [
- {
- "path": "pages/dashboard/dashboard",
- "style": {
- "navigationBarTitleText": "仪表盘"
- }
- },
- {
- "path": "pages/functions/functions",
- "style": {
- "navigationBarTitleText": "功能"
- }
- },
- {
- "path": "pages/mine/mine",
- "style": {
- "navigationBarTitleText": "我的"
- }
- },
- {
- "path": "pages/login/login",
- "style": {
- "navigationBarTitleText": "登录",
- "navigationStyle": "custom"
- }
- }
- ],
- "tabBar": {
- "color": "#999999",
- "selectedColor": "#1989fa",
- "borderStyle": "black",
- "backgroundColor": "#ffffff",
- "list": [
- {
- "pagePath": "pages/dashboard/dashboard",
- "text": "仪表盘",
- "iconPath": "static/tab/dashboard.png",
- "selectedIconPath": "static/tab/dashboard-active.png"
- },
- {
- "pagePath": "pages/functions/functions",
- "text": "功能",
- "iconPath": "static/tab/functions.png",
- "selectedIconPath": "static/tab/functions-active.png"
- },
- {
- "pagePath": "pages/mine/mine",
- "text": "我的",
- "iconPath": "static/tab/mine.png",
- "selectedIconPath": "static/tab/mine-active.png"
- }
- ]
- },
- "globalStyle": {
- "navigationBarTextStyle": "white",
- "navigationBarTitleText": "",
- "navigationBarBackgroundColor": "#1989fa",
- "backgroundColor": "#f5f5f5"
- },
- "easycom": {
- "autoscan": true,
- "custom": {}
- }
-}
diff --git a/uniapp/pages/dashboard/dashboard.vue b/uniapp/pages/dashboard/dashboard.vue
deleted file mode 100644
index 8248d3f..0000000
--- a/uniapp/pages/dashboard/dashboard.vue
+++ /dev/null
@@ -1,382 +0,0 @@
-
-
-
-
-
-
-
-
- 数据概览
-
-
-
- {{ item.value }}
- {{ item.label }}
-
- {{ item.trend > 0 ? '↑' : '↓' }} {{ Math.abs(item.trend) }}%
-
-
-
-
-
-
-
-
- 快捷操作
-
-
-
-
- {{ action.icon }}
-
- {{ action.name }}
-
-
-
-
-
-
-
- 最近动态
- 查看更多 >
-
-
-
-
-
- {{ item.title }}
- {{ item.time }}
-
-
-
-
-
-
-
-
-
-
diff --git a/uniapp/pages/functions/functions.vue b/uniapp/pages/functions/functions.vue
deleted file mode 100644
index b954264..0000000
--- a/uniapp/pages/functions/functions.vue
+++ /dev/null
@@ -1,290 +0,0 @@
-
-
-
-
-
- 🔍
-
-
-
-
-
-
-
- 常用功能
-
-
-
-
- {{ func.icon }}
-
- {{ func.name }}
-
-
-
-
-
-
-
- 管理工具
-
-
-
-
- {{ item.icon }}
-
-
- {{ item.name }}
- {{ item.desc }}
-
- >
-
-
-
-
-
-
-
- 数据服务
-
-
-
-
- {{ item.icon }}
-
-
- {{ item.name }}
- {{ item.desc }}
-
- >
-
-
-
-
-
-
-
- 系统工具
-
-
-
-
- {{ item.icon }}
-
-
- {{ item.name }}
- {{ item.desc }}
-
- >
-
-
-
-
-
-
-
-
-
diff --git a/uniapp/pages/login/login.vue b/uniapp/pages/login/login.vue
deleted file mode 100644
index 31344e6..0000000
--- a/uniapp/pages/login/login.vue
+++ /dev/null
@@ -1,403 +0,0 @@
-
-
-
-
-
-
-
-
- 验证码登录
-
-
- 密码登录
-
-
-
-
-
-
- +86
-
-
-
-
-
-
-
-
-
- {{ countdown > 0 ? countdown + 's后重发' : '获取验证码' }}
-
-
-
-
-
-
-
- {{ showPassword ? '隐藏' : '显示' }}
-
-
-
-
-
-
-
-
- 新用户注册
- 忘记密码?
-
-
-
-
-
-
-
- 我已阅读并同意
- 《用户协议》
- 和
- 《隐私政策》
-
-
-
-
-
-
-
-
diff --git a/uniapp/pages/mine/mine.vue b/uniapp/pages/mine/mine.vue
deleted file mode 100644
index 2857bcb..0000000
--- a/uniapp/pages/mine/mine.vue
+++ /dev/null
@@ -1,474 +0,0 @@
-
-
-
-
-
-
- 云
-
-
-
- {{ userInfo.nickname || '未设置昵称' }}
-
- VIP
-
-
- {{ maskedPhone }}
-
-
- 编辑
-
-
-
-
-
-
- {{ userStats.articles }}
- 文章
-
-
-
- {{ userStats.followers }}
- 粉丝
-
-
-
- {{ userStats.following }}
- 关注
-
-
-
- {{ userStats.likes }}
- 获赞
-
-
-
-
-
-
-
-
-
-
- {{ item.icon }}
-
- {{ item.count }}
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 云泽网站综合管理平台 v1.0.0
-
-
-
-
-
-
-
diff --git a/uniapp/static/tabbar/README.md b/uniapp/static/tabbar/README.md
deleted file mode 100644
index 0761169..0000000
--- a/uniapp/static/tabbar/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# TabBar 图标说明
-
-请将以下 PNG 图标放入此目录(建议尺寸 81x81px):
-
-## 必需图标文件:
-
-1. **dashboard.png** - 仪表盘图标(未选中状态)
-2. **dashboard-active.png** - 仪表盘图标(选中状态,主题色 #1989fa)
-3. **functions.png** - 功能图标(未选中状态)
-4. **functions-active.png** - 功能图标(选中状态,主题色 #1989fa)
-5. **mine.png** - 我的图标(未选中状态)
-6. **mine-active.png** - 我的图标(选中状态,主题色 #1989fa)
-
-## 图标要求:
-- 格式:PNG
-- 尺寸:81x81 像素(推荐)
-- 未选中颜色:#999999
-- 选中颜色:#1989fa
-
-## 临时方案:
-如暂无图标资源,可从 iconfont 等图标库下载对应图标,或暂时注释掉 pages.json 中的 iconPath 配置项。
diff --git a/uniapp/static/tabbar/dashboard-active.svg b/uniapp/static/tabbar/dashboard-active.svg
deleted file mode 100644
index 2380e2d..0000000
--- a/uniapp/static/tabbar/dashboard-active.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * SVG 图标 - 仪表盘(选中状态)
- * 使用时请替换为实际的 PNG 图标文件
- * 尺寸建议: 81x81 px
- */
-
diff --git a/uniapp/static/tabbar/dashboard.svg b/uniapp/static/tabbar/dashboard.svg
deleted file mode 100644
index fd887dc..0000000
--- a/uniapp/static/tabbar/dashboard.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * SVG 图标 - 仪表盘(默认状态)
- * 使用时请替换为实际的 PNG 图标文件
- * 尺寸建议: 81x81 px
- */
-
diff --git a/uniapp/static/tabbar/functions-active.svg b/uniapp/static/tabbar/functions-active.svg
deleted file mode 100644
index 9389d4d..0000000
--- a/uniapp/static/tabbar/functions-active.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * SVG 图标 - 功能(选中状态)
- * 使用时请替换为实际的 PNG 图标文件
- * 尺寸建议: 81x81 px
- */
-
diff --git a/uniapp/static/tabbar/functions.svg b/uniapp/static/tabbar/functions.svg
deleted file mode 100644
index 55d7e66..0000000
--- a/uniapp/static/tabbar/functions.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * SVG 图标 - 功能(默认状态)
- * 使用时请替换为实际的 PNG 图标文件
- * 尺寸建议: 81x81 px
- */
-
diff --git a/uniapp/static/tabbar/mine-active.svg b/uniapp/static/tabbar/mine-active.svg
deleted file mode 100644
index ecaa036..0000000
--- a/uniapp/static/tabbar/mine-active.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * SVG 图标 - 我的(选中状态)
- * 使用时请替换为实际的 PNG 图标文件
- * 尺寸建议: 81x81 px
- */
-
diff --git a/uniapp/static/tabbar/mine.svg b/uniapp/static/tabbar/mine.svg
deleted file mode 100644
index 3c0a1b3..0000000
--- a/uniapp/static/tabbar/mine.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * SVG 图标 - 我的(默认状态)
- * 使用时请替换为实际的 PNG 图标文件
- * 尺寸建议: 81x81 px
- */
-
diff --git a/uniapp/tsconfig.json b/uniapp/tsconfig.json
deleted file mode 100644
index 1eb46b0..0000000
--- a/uniapp/tsconfig.json
+++ /dev/null
@@ -1 +0,0 @@
-{"compilerOptions": {"types": ["@dcloudio/types", "miniprogram-api-typings", "@uni-helper/uni-app-types"]}, "include": ["**/*.ts", "**/*.vue", "**/*.js"], "exclude": ["node_modules", "unpackage", "src/**/*.nvue"]}
\ No newline at end of file
diff --git a/uniapp/uni.scss b/uniapp/uni.scss
deleted file mode 100644
index 4cff08b..0000000
--- a/uniapp/uni.scss
+++ /dev/null
@@ -1,14 +0,0 @@
-/* uni.scss - 全局SCSS变量 */
-$primary-color: #1989fa;
-$primary-light: #e8f4fd;
-$text-color: #333333;
-$text-secondary: #666666;
-$text-placeholder: #999999;
-$bg-color: #f5f5f5;
-$border-color: #eeeeee;
-
-/* 尺寸变量 */
-$uni-border-radius: 8rpx;
-$uni-spacing-sm: 16rpx;
-$uni-spacing-md: 24rpx;
-$uni-spacing-lg: 32rpx;
diff --git a/uniapp/utils/request.js b/uniapp/utils/request.js
deleted file mode 100644
index fbba7f9..0000000
--- a/uniapp/utils/request.js
+++ /dev/null
@@ -1,241 +0,0 @@
-/**
- * API 请求封装
- * baseURL 前缀: /app
- * 统一 token 拦截器
- */
-
-// 基础配置
-const BASE_URL = '/app'
-const TIMEOUT = 30000
-
-/**
- * 通用请求方法
- * @param {string} url - 请求路径(会自动拼接 /app 前缀)
- * @param {object} data - 请求数据
- * @param {string} method - 请求方法 GET/POST/PUT/DELETE
- * @param {object} header - 自定义请求头
- * @returns {Promise}
- */
-export function request(url, data = {}, method = 'GET', header = {}) {
- return new Promise((resolve, reject) => {
- // 获取 token
- const token = uni.getStorageSync('token')
-
- // 合并请求头
- const headers = {
- 'Content-Type': 'application/json',
- ...header
- }
-
- // 添加 token
- if (token) {
- headers['Authorization'] = `Bearer ${token}`
- }
-
- // 完整 URL
- const fullUrl = `${BASE_URL}${url}`
-
- uni.request({
- url: fullUrl,
- data,
- method,
- header: headers,
- timeout: TIMEOUT,
- success: (res) => {
- const { statusCode, data } = res
-
- // HTTP 状态码判断
- if (statusCode === 200) {
- // 业务状态码判断(假设后端返回格式为 { code: 0, data, message })
- if (data.code === 0 || data.code === 200) {
- resolve(data)
- } else if (data.code === 401) {
- // token 过期或未授权
- handleUnauthorized()
- reject(new Error(data.message || '登录已过期,请重新登录'))
- } else {
- // 其他业务错误
- uni.showToast({
- title: data.message || '请求失败',
- icon: 'none',
- duration: 2000
- })
- reject(new Error(data.message || '请求失败'))
- }
- } else if (statusCode === 401) {
- handleUnauthorized()
- reject(new Error('登录已过期,请重新登录'))
- } else if (statusCode === 403) {
- reject(new Error('没有权限访问'))
- } else if (statusCode === 404) {
- reject(new Error('请求的资源不存在'))
- } else if (statusCode >= 500) {
- uni.showToast({
- title: '服务器错误,请稍后重试',
- icon: 'none'
- })
- reject(new Error('服务器错误'))
- } else {
- reject(new Error(`请求失败(${statusCode})`))
- }
- },
- fail: (err) => {
- console.error('Request failed:', err)
-
- let errorMsg = '网络异常,请检查网络连接'
-
- if (err.errMsg.includes('timeout')) {
- errorMsg = '请求超时,请稍后重试'
- } else if (err.errMsg.includes('abort')) {
- errorMsg = '请求已取消'
- }
-
- uni.showToast({
- title: errorMsg,
- icon: 'none',
- duration: 2000
- })
-
- reject(new Error(errorMsg))
- }
- })
- })
-}
-
-/**
- * 处理未授权(token 失效)
- */
-function handleUnauthorized() {
- // 清除本地存储
- uni.removeStorageSync('token')
- uni.removeStorageSync('userInfo')
-
- // 提示用户
- uni.showToast({
- title: '登录已过期,请重新登录',
- icon: 'none',
- duration: 1500
- })
-
- // 跳转到登录页
- setTimeout(() => {
- uni.reLaunch({
- url: '/pages/login/login'
- })
- }, 1500)
-}
-
-/**
- * GET 请求
- */
-export function get(url, data = {}, header = {}) {
- return request(url, data, 'GET', header)
-}
-
-/**
- * POST 请求
- */
-export function post(url, data = {}, header = {}) {
- return request(url, data, 'POST', header)
-}
-
-/**
- * PUT 请求
- */
-export function put(url, data = {}, header = {}) {
- return request(url, data, 'PUT', header)
-}
-
-/**
- * DELETE 请求
- */
-export function del(url, data = {}, header = {}) {
- return request(url, data, 'DELETE', header)
-}
-
-/**
- * 文件上传
- * @param {string} url - 上传接口路径
- * @param {string} filePath - 本地文件路径
- * @param {object} formData - 额外表单数据
- */
-export function upload(url, filePath, formData = {}) {
- return new Promise((resolve, reject) => {
- const token = uni.getStorageSync('token')
-
- const header = {}
- if (token) {
- header['Authorization'] = `Bearer ${token}`
- }
-
- uni.uploadFile({
- url: `${BASE_URL}${url}`,
- filePath,
- name: 'file',
- formData,
- header,
- success: (res) => {
- if (res.statusCode === 200) {
- const data = JSON.parse(res.data)
- if (data.code === 0 || data.code === 200) {
- resolve(data)
- } else {
- reject(new Error(data.message || '上传失败'))
- }
- } else {
- reject(new Error('上传失败'))
- }
- },
- fail: (err) => {
- console.error('Upload failed:', err)
- reject(new Error('上传失败'))
- }
- })
- })
-}
-
-// ==================== 具体业务 API ====================
-
-/**
- * 发送短信验证码
- */
-export function sendSmsCode(data) {
- return post('/sms/send', data)
-}
-
-/**
- * 手机号验证码登录
- */
-export function phoneCodeLogin(data) {
- return post('/login/phone', data)
-}
-
-/**
- * 账号密码登录
- */
-export function passwordLogin(data) {
- return post('/login/password', data)
-}
-
-/**
- * 退出登录
- */
-export function logout() {
- return post('/logout').finally(() => {
- uni.removeStorageSync('token')
- uni.removeStorageSync('userInfo')
- })
-}
-
-export default {
- request,
- get,
- post,
- put,
- del,
- upload,
- sendSmsCode,
- phoneCodeLogin,
- passwordLogin,
- logout
-}