Browse Source

Chore: Chore Update

Z.X.PING 7 months ago
parent
commit
c5f2ed5494
73 changed files with 1088 additions and 3900 deletions
  1. 31 0
      .dockerignore
  2. 2 0
      .gitignore
  3. 0 1
      .vscode/extensions.json
  4. 1 0
      .vscode/settings.json
  5. 38 0
      Dockerfile
  6. 0 222
      codes/router.txt
  7. 28 0
      docker.md
  8. 6 7
      env/.env
  9. 3 0
      manifest.config.ts
  10. 145 0
      nginx.conf
  11. 1 1
      openapi-ts-request.config.ts
  12. 7 6
      package.json
  13. 221 7
      scripts/create-base-files.js
  14. 83 0
      scripts/open-dev-tools.js
  15. 8 1
      src/App.ku.vue
  16. 0 1
      src/App.vue
  17. 0 11
      src/api/foo-vue-query.ts
  18. 0 2
      src/api/login.ts
  19. 1 3
      src/env.d.ts
  20. 11 8
      src/hooks/useRequest.ts
  21. 1 4
      src/hooks/useUpload.ts
  22. 2 1
      src/http/alova.ts
  23. 3 1
      src/http/http.ts
  24. 4 3
      src/http/interceptor.ts
  25. 3 1
      src/http/tools/enum.ts
  26. 0 2
      src/main.ts
  27. 0 10
      src/pages/about/about.vue
  28. 0 50
      src/pages/about/vue-query.vue
  29. 4 20
      src/pages/login/login.vue
  30. 3 3
      src/pages/me/me.vue
  31. 1 1
      src/router/interceptor.ts
  32. 0 3
      src/service/index.ts
  33. 7 7
      src/service/pet.ts
  34. 0 151
      src/service/pet.vuequery.ts
  35. 3 3
      src/service/store.ts
  36. 0 75
      src/service/store.vuequery.ts
  37. 216 12
      src/service/types.ts
  38. 7 7
      src/service/user.ts
  39. 0 149
      src/service/user.vuequery.ts
  40. 13 11
      src/store/token.ts
  41. 1 1
      src/store/user.ts
  42. 8 8
      src/tabbar/config.ts
  43. 0 3
      src/tabbar/index.vue
  44. 14 3
      src/tabbar/store.ts
  45. 191 0
      src/types/auto-import.d.ts
  46. 0 42
      src/uni_modules/uni-icons/changelog.md
  47. 0 91
      src/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue
  48. 0 110
      src/uni_modules/uni-icons/components/uni-icons/uni-icons.vue
  49. 0 664
      src/uni_modules/uni-icons/components/uni-icons/uniicons.css
  50. BIN
      src/uni_modules/uni-icons/components/uni-icons/uniicons.ttf
  51. 0 664
      src/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts
  52. 0 649
      src/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js
  53. 0 89
      src/uni_modules/uni-icons/package.json
  54. 0 8
      src/uni_modules/uni-icons/readme.md
  55. 0 8
      src/uni_modules/uni-scss/changelog.md
  56. 0 1
      src/uni_modules/uni-scss/index.scss
  57. 0 82
      src/uni_modules/uni-scss/package.json
  58. 0 4
      src/uni_modules/uni-scss/readme.md
  59. 0 7
      src/uni_modules/uni-scss/styles/index.scss
  60. 0 3
      src/uni_modules/uni-scss/styles/setting/_border.scss
  61. 0 66
      src/uni_modules/uni-scss/styles/setting/_color.scss
  62. 0 55
      src/uni_modules/uni-scss/styles/setting/_radius.scss
  63. 0 56
      src/uni_modules/uni-scss/styles/setting/_space.scss
  64. 0 167
      src/uni_modules/uni-scss/styles/setting/_styles.scss
  65. 0 24
      src/uni_modules/uni-scss/styles/setting/_text.scss
  66. 0 146
      src/uni_modules/uni-scss/styles/setting/_variables.scss
  67. 0 19
      src/uni_modules/uni-scss/styles/tools/functions.scss
  68. 0 31
      src/uni_modules/uni-scss/theme.scss
  69. 0 62
      src/uni_modules/uni-scss/variables.scss
  70. 0 33
      src/utils/index.ts
  71. 2 0
      tsconfig.json
  72. 1 1
      uno.config.ts
  73. 18 19
      vite.config.ts

+ 31 - 0
.dockerignore

@@ -0,0 +1,31 @@
+# 依赖目录
+node_modules
+
+# 版本控制
+.git
+.gitignore
+
+# 构建产物
+/dist
+
+# 开发工具配置
+.vscode/
+.idea/
+.trae/
+.cursor/
+
+# 其他配置文件
+.github/
+.husky/
+
+# 日志文件
+logs/
+
+# 缓存文件
+.cache/
+
+*.swp
+*.swo
+
+# 操作系统文件
+.DS_Store

+ 2 - 0
.gitignore

@@ -28,6 +28,8 @@ docs/.vitepress/dist
 docs/.vitepress/cache
 
 src/types
+# 单独把这个文件排除掉,用以解决部分电脑生成的 auto-import.d.ts 的API不完整导致类型提示报错问题
+!src/types/auto-import.d.ts
 src/manifest.json
 src/pages.json
 

+ 0 - 1
.vscode/extensions.json

@@ -1,7 +1,6 @@
 {
   "recommendations": [
     "vue.volar",
-    "stylelint.vscode-stylelint",
     "esbenp.prettier-vscode",
     "dbaeumer.vscode-eslint",
     "antfu.unocss",

+ 1 - 0
.vscode/settings.json

@@ -15,6 +15,7 @@
   "explorer.fileNesting.expand": false,
   "explorer.fileNesting.patterns": {
     "README.md": "index.html,favicon.ico,robots.txt,CHANGELOG.md",
+    "docker.md": "Dockerfile,docker*.md,nginx*,.dockerignore",
     "pages.config.ts": "manifest.config.ts,openapi-ts-request.config.ts",
     "package.json": "tsconfig.json,pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc",
     "eslint.config.mjs": ".commitlintrc.*,.prettier*,.editorconfig,.commitlint.cjs,.eslint*"

+ 38 - 0
Dockerfile

@@ -0,0 +1,38 @@
+# 使用 node:24-alpine 作为基础镜像,固定版本+减少体积
+FROM node:24-alpine AS builder
+
+# 在容器中创建目录
+WORKDIR /app
+
+# 安装pnpm(使用 npm 的 --global-style 可以减少依赖安装体积)
+RUN npm install -g pnpm@10.10.0 --global-style
+# 设置pnpm镜像源
+RUN pnpm config set registry https://registry.npmmirror.com
+# 复制依赖文件
+COPY package.json pnpm-lock.yaml ./
+# 先复制scripts目录,因为prepare脚本需要用到其中的文件
+COPY scripts ./scripts
+# 安装依赖,但跳过prepare脚本(这一步会缓存,只有 package.json 或 pnpm-lock.yaml 变化时才会重新运行)
+RUN pnpm install --ignore-scripts --frozen-lockfile
+# 手动执行我们需要的docker:prepare脚本
+RUN pnpm run docker:prepare
+# 复制其余源代码
+COPY . .
+# 构建项目
+RUN pnpm run build
+
+
+# 使用nginx作为服务
+FROM nginx:1.29.1-alpine3.22 AS production-stage
+
+# 将构建好的项目复制到nginx下
+COPY --from=builder /app/dist/build/h5 /usr/share/nginx/html
+
+COPY nginx.conf /etc/nginx/nginx.conf
+
+# 暴露端口
+EXPOSE 80
+EXPOSE 443
+
+# 启动nginx
+CMD ["nginx", "-g", "daemon off;"]

+ 0 - 222
codes/router.txt

@@ -1,222 +0,0 @@
-import { getCurrentInstance, type App } from 'vue'
-import { useUserLoginStore } from '@/store/login'
-import { Pages } from './pages'
-import { LoginPopupViewer } from './loginPopupServices'
-import Loading from './Loading'
-
-/** 实时判断用户是否已登录(避免 computed 缓存) */
-function isUserLoggedIn(): boolean {
-  return useUserLoginStore().isLoggedIn
-}
-
-// 路由相关配置
-// 这里可以根据实际情况调整
-// 例如:需要登录验证的页面等
-// 以及登录页面、会员中心页面等
-
-// 需要登录验证的页面
-const authPages = [
-  Pages.USER_INFO_EDIT,
-  Pages.VIP_CENTER,
-  //Pages.PRODUCT_LIST,
-  //Pages.PRODUCT_DETAILS,
-  Pages.USER_ACCOUNT_SECURITY,
-  Pages.USER_EDIT_NICKNAME,
-  Pages.USER_ORDER_LIST,
-  Pages.USER_ORDER_DETAILS,
-  Pages.USER_MOBILE,
-  Pages.DISTRIBUTION_CENTER,
-  Pages.DISTRIBUTION_CENTER_DETAILS,
-  Pages.USER_MOBILE_CHANGE,
-  Pages.USER_PERSONAL_INFO,
-  Pages.USER_REMARK,
-  Pages.PRODUCT_ORDER_CONFIRM,
-  Pages.PRODUCT_PAY_MODE,
-  Pages.COUPON_CENTER,
-  Pages.COUPON_LIST,
-  Pages.CUSTOMER_SERVICE,
-  Pages.SHIPPING_ADDRESS_ADDED_OR_EDIT,
-  Pages.SHIPPING_ADDRESS_LIST,
-  Pages.USER_PASSWORD_CONFIG,
-  Pages.WITHDRAWAL,
-  Pages.WITHDRAWAL_RECORD_LIST,
-]
-
-/** 判断是否需要登录 */
-function getBasePath(url: string): string {
-  const index = url.indexOf('?')
-  return index !== -1 ? url.substring(0, index) : url
-}
-
-function isAuthRequired(url: string): boolean {
-  const cleanUrl = getBasePath(url)
-  console.log(`URL数据源:${authPages}`)
-  console.log(`URL原始值: ${url}`)
-  console.log(`URL过滤值: ${cleanUrl}`)
-  return authPages.some((item) => item === cleanUrl)
-}
-
-/** 缓存跳转路径 */
-function cacheRedirect(url: string) {
-  uni.setStorageSync('pending_redirect', url)
-}
-
-/** 读取并清除缓存跳转路径 */
-function consumeRedirect(): string | null {
-  const url = uni.getStorageSync('pending_redirect')
-  uni.removeStorageSync('pending_redirect')
-  return url || null
-}
-
-/** 路由核心跳转方法 */
-async function internalNavigate(
-  type: 'navigateTo' | 'redirectTo' | 'switchTab' | 'reLaunch',
-  url: string,
-  options: Record<string, any> = {},
-) {
-  const originUrl: string = url.startsWith('/') ? url : `/${url}`
-  const isAuthPage = isAuthRequired(originUrl)
-  console.log(`[Router][${type}] 跳转到:`, originUrl, '需要登录:', isAuthPage)
-  console.log(`[Router][${type}] 是否登录:`, isUserLoggedIn)
-
-  // 如果需要登录但未登录,则弹出登录框
-  if (isAuthPage && !isUserLoggedIn()) {
-    cacheRedirect(originUrl)
-    const loginResult = await LoginPopupViewer.open()
-    console.log(`[Router][${type}] 登录弹窗结果:`, loginResult)
-
-    // 如果登录失败(或用户取消),中断跳转
-    if (!loginResult) {
-      console.log(`[Router][${type}] 已终止跳转,原因:用户未登录或取消登录`)
-      Loading.showError({ msg: '已取消登录' })
-      return
-    }
-  }
-
-  // 登录状态已满足,可以安全跳转
-  try {
-    switch (type) {
-      case 'navigateTo':
-        return await uniNavigateTo(originUrl, options)
-      case 'redirectTo':
-        return await uniRedirectTo(originUrl, options)
-      case 'switchTab':
-        return await uniSwitchTab(originUrl)
-      case 'reLaunch':
-        return await uniReLaunch(originUrl)
-    }
-  } catch (error) {
-    console.error(`[Router][${type}] 跳转失败:`, error)
-  }
-}
-
-/** ✅ Promise 封装 uni API **/
-function uniNavigateTo(url: string, options: any) {
-  return new Promise((resolve, reject) => {
-    uni.navigateTo({
-      url,
-      ...options,
-      success: resolve,
-      fail: reject,
-    })
-  })
-}
-function uniRedirectTo(url: string, options: any) {
-  return new Promise((resolve, reject) => {
-    uni.redirectTo({
-      url,
-      ...options,
-      success: resolve,
-      fail: reject,
-    })
-  })
-}
-function uniSwitchTab(url: string) {
-  return new Promise((resolve, reject) => {
-    uni.switchTab({
-      url,
-      success: resolve,
-      fail: reject,
-    })
-  })
-}
-function uniReLaunch(url: string) {
-  return new Promise((resolve, reject) => {
-    uni.reLaunch({
-      url,
-      success: resolve,
-      fail: reject,
-    })
-  })
-}
-
-// ✅ Router API 对象
-// ✅ Router API 对象
-export const Router = {
-  // 页面跳转,支持登录鉴权
-  async navigateTo(opt: { url: string; requiresAuth?: boolean } & Record<string, any>) {
-    return await internalNavigate('navigateTo', opt.url, opt)
-  },
-
-  // 页面重定向,支持登录鉴权
-  async redirectTo(opt: { url: string; requiresAuth?: boolean } & Record<string, any>) {
-    return await internalNavigate('redirectTo', opt.url, opt)
-  },
-
-  // tab 页面切换
-  async switchTab(opt: { url: string }) {
-    return await internalNavigate('switchTab', opt.url, opt)
-  },
-
-  // 重新启动应用跳转
-  async reLaunch(opt: { url: string }) {
-    return await internalNavigate('reLaunch', opt.url, opt)
-  },
-
-  // 重定向别名
-  async replace(opt: { url: string; requiresAuth?: boolean } & Record<string, any>) {
-    return await internalNavigate('redirectTo', opt.url, opt)
-  },
-
-  // 返回上一级
-  async back(delta = 1) {
-    return await new Promise((resolve, reject) => {
-      uni.navigateBack({
-        delta,
-        success: resolve,
-        fail: reject,
-      })
-    })
-  },
-
-  consumeRedirect,
-}
-
-let cachedRouter: typeof Router | null = null
-
-/**
- * ✅ 全局安全获取 $Router 实例(推荐使用)
- */
-export function useRouter(): typeof Router {
-  if (cachedRouter) return cachedRouter
-
-  const instance = getCurrentInstance()
-  if (!instance) {
-    throw new Error('useRouter() 必须在 setup() 或生命周期中调用')
-  }
-
-  const router = instance.appContext.config.globalProperties.$Router
-  if (!router) {
-    throw new Error('$Router 尚未注入,请在 main.ts 中使用 app.use(RouterPlugin)')
-  }
-
-  cachedRouter = router
-  return router
-}
-
-/** ✅ 注册为全局插件 */
-export default {
-  install(app: App) {
-    app.config.globalProperties.$Router = Router
-  },
-}

+ 28 - 0
docker.md

@@ -0,0 +1,28 @@
+## Docker
+
+根据提供的 `Dockerfile`,可以通过以下步骤构建并运行镜像:
+
+### 1. 构建Docker镜像
+
+在项目根目录执行以下命令:
+
+- `-t unibest:v1-2025091701`:为镜像指定名称和标签,YYYYMMDD+编号
+- `.`:表示使用当前目录的Dockerfile
+
+```bash
+docker build -t unibest:v1-2025091701 .
+docker build -t unibest:v1-2025091702 .
+```
+### 2. 运行Docker容器
+使用以下命令运行容器:
+
+```bash
+docker run -d --name unibest-v1-2025091701 -p 80:80 unibest:v1-2025091701
+docker run -d --name unibest-v1-2025091702 -p 80:80 unibest:v1-2025091702
+```
+
+- `-d`:表示在后台运行容器
+- `-p 80:80`:将容器的80端口映射到主机的80端口
+- `--name unibest-v1-2025091701`:为容器指定一个名称
+
+

+ 6 - 7
env/.env

@@ -6,20 +6,19 @@ VITE_WX_APPID = 'wxa2abb91f64032a2b'
 
 # h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
 # https://uniapp.dcloud.net.cn/collocation/manifest.html#h5-router
+# 比如你要部署到 https://unibest.tech/doc/ ,则配置为 /doc/
 VITE_APP_PUBLIC_BASE=/
 
 # 后台请求地址
 VITE_SERVER_BASEURL = 'https://ukw0y1.laf.run'
-# 后台上传地址
-VITE_UPLOAD_BASEURL = 'https://ukw0y1.laf.run/upload'
+# 备注:如果后台带统一前缀,则也要加到后面,eg: https://ukw0y1.laf.run/api
 
-# 注意,如果是微信小程序,还有一套请求地址的配置,在 `src/utils/index.ts` 中
+# 注意,如果是微信小程序,还有一套请求地址的配置,根据 develop、trial、release 分别设置上传地址,见 `src/utils/index.ts`。
 
 # h5是否需要配置代理
-VITE_APP_PROXY_ENABLE = true
-VITE_APP_PROXY_PREFIX = '/api'
-# 后端是否有统一前缀 /api,决定本地代码的时候是否需要去掉 /api 前缀。这里面默认是没有的,即前端会把/api 转发去掉
-VITE_SERVER_HAS_API_PREFIX = false
+VITE_APP_PROXY_ENABLE = false
+# 下面的不用修改,只要不跟你后台的统一前缀冲突就行。如果修改了,记得修改 `nginx` 里面的配置
+VITE_APP_PROXY_PREFIX = '/fg-api'
 
 # 第二个请求地址 (目前alova中可以使用)
 VITE_API_SECONDARY_URL = 'https://ukw0y1.laf.run'

+ 3 - 0
manifest.config.ts

@@ -135,6 +135,9 @@ export default defineManifestConfig({
   'mp-alipay': {
     usingComponents: true,
     styleIsolation: 'shared',
+    optimization: {
+      subPackages: true,
+    },
   },
   'mp-baidu': {
     usingComponents: true,

+ 145 - 0
nginx.conf

@@ -0,0 +1,145 @@
+# 配置工作进程数,通常设置为 CPU 核心数
+worker_processes auto;
+
+# 错误日志配置
+error_log /var/log/nginx/error.log warn;
+pid /var/run/nginx.pid;
+
+events {
+  worker_connections 1024;
+  # 开启多路复用
+  use epoll;
+}
+
+# 文件描述符限制 - 移到这里,在http块之前
+worker_rlimit_nofile 65535;
+
+http {
+  # 日志格式定义
+  log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+                  '$status $body_bytes_sent "$http_referer" '
+                  '"$http_user_agent" "$http_x_forwarded_for"';
+  
+  # 访问日志配置
+  access_log /var/log/nginx/access.log main;
+
+  # 高效文件传输设置
+  sendfile on;
+  tcp_nopush on;
+  tcp_nodelay on;
+  
+  # 连接超时设置
+  keepalive_timeout 65;
+  keepalive_requests 100;
+
+  # gzip 压缩优化
+  gzip on;
+  gzip_vary on;
+  gzip_comp_level 6;
+  gzip_min_length 1000;
+  gzip_buffers 16 8k;
+  gzip_http_version 1.1;
+  # 增加更多文件类型
+  gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon;
+
+  # 全局设置
+  # 合理限制请求体大小,根据实际需求调整
+  client_max_body_size 10m;
+  client_body_buffer_size 128k;
+  client_header_timeout 60s;
+  client_body_timeout 60s;
+  
+  server {
+    listen 80;
+    server_name _;
+    gunzip on;
+    gzip_static always;
+    include /etc/nginx/mime.types;
+    absolute_redirect off;
+    root /usr/share/nginx/html;
+
+    # 安全相关响应头
+    add_header X-Frame-Options SAMEORIGIN;
+    add_header X-XSS-Protection "1; mode=block";
+    add_header X-Content-Type-Options nosniff;
+    # 根据实际情况调整 CSP
+    # add_header Content-Security-Policy "default-src 'self'";
+
+    # 处理 SPA 应用路由
+    location / {
+      try_files $uri $uri/ /index.html;
+      index index.html index.htm;
+    }
+
+    # HTML 和 JSON 文件 - 短缓存策略
+    location ~ .*\.(html|json)$ {
+      add_header Cache-Control "public, max-age=300, must-revalidate";
+    }
+
+    # 静态资源 - 长缓存策略
+    location ~ .*\.(jpg|jpeg|png|gif|bmp|webp|svg|ico|ttf|woff|woff2|eot|mp4|mp3|swf)$ {
+      add_header Cache-Control "public, max-age=31536000, immutable";
+      expires 365d;
+      access_log off;
+    }
+
+    # JS 和 CSS - 带版本号的长缓存
+    location ~ .*\.(js|css)$ {
+      add_header Cache-Control "public, max-age=31536000, immutable";
+      expires 365d;
+      access_log off;
+    }
+
+    # 接口转发 - 替换为实际后端地址
+    # location ^~ /fg-api {
+    #   proxy_http_version 1.1;
+    #   proxy_set_header X-Real-IP $remote_addr;
+    #   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+    #   proxy_set_header X-Forwarded-Proto $scheme;
+    #   proxy_set_header Host $host;
+
+    #   # 后端是HTTPS时的必要配置
+    #   proxy_ssl_server_name on;
+    #   proxy_ssl_protocols TLSv1.2 TLSv1.3;
+    #   proxy_ssl_session_reuse on;
+      
+    #   # 对于生产环境,应该尽量使用有效的证书而不是依赖``proxy_ssl_verify off;`` ,因为这会带来安全风险
+    #   proxy_ssl_verify off;
+
+    #   # TODO:替换为实际后端服务地址
+    #   # 注意在URL末尾添加了斜杠,这样Nginx会去掉 /fg-api 前缀
+    #   # 前端请求 http://your-domain.com/fg-api/users 转发到 https://ukw0y1.laf.run/users
+    #   proxy_pass https://ukw0y1.laf.run/;
+
+    #   # 上面一行的效果与下面2行一样的效果,都是为了去掉 /fg-api 前缀
+    #   # 显式移除/fg-api前缀
+    #   # rewrite ^/fg-api(.*)$ $1 break; 
+    #   # 域名末尾不需要斜杠了
+    #   # proxy_pass https://ukw0y1.laf.run;
+
+    #   proxy_connect_timeout 60s;
+    #   proxy_send_timeout 60s;
+    #   proxy_read_timeout 60s;
+
+    #   proxy_buffers 8 32k;
+    #   proxy_buffer_size 64k;
+    #   proxy_busy_buffers_size 128k;
+
+    #   proxy_next_upstream error timeout http_500 http_502 http_503 http_504;
+    # }
+
+    # 错误页面配置
+    error_page 404 /index.html;
+    error_page 500 502 503 504 /50x.html;
+    location = /50x.html {
+      root /usr/share/nginx/html;
+    }
+
+    # 禁止访问隐藏文件
+    location ~ /\. {
+      deny all;
+      access_log off;
+      log_not_found off;
+    }
+  }
+}

+ 1 - 1
openapi-ts-request.config.ts

@@ -6,7 +6,7 @@ export default [
     serversPath: './src/service',
     requestLibPath: `import request from '@/http/vue-query';\n import { CustomRequestOptions } from '@/http/types';`,
     requestOptionsType: 'CustomRequestOptions',
-    isGenReactQuery: true,
+    isGenReactQuery: false,
     reactQueryMode: 'vue',
     isGenJavaScript: false,
   },

+ 7 - 6
package.json

@@ -1,9 +1,9 @@
 {
   "name": "unibest",
   "type": "module",
-  "version": "3.15.1",
-  "unibest-version": "3.15.1",
-  "update-time": "2025-09-11",
+  "version": "3.16.3",
+  "unibest-version": "3.16.3",
+  "update-time": "2025-09-16",
   "packageManager": "pnpm@10.10.0",
   "description": "unibest - 最好的 uniapp 开发模板",
   "generate-time": "用户创建项目时生成",
@@ -22,7 +22,7 @@
     "url-old": "https://github.com/codercup/unibest/issues"
   },
   "engines": {
-    "node": ">=22",
+    "node": ">=20",
     "pnpm": ">=9"
   },
   "scripts": {
@@ -89,6 +89,7 @@
     "type-check": "vue-tsc --noEmit",
     "openapi-ts-request": "openapi-ts",
     "prepare": "git init && husky && node ./scripts/create-base-files.js",
+    "docker:prepare": "node ./scripts/create-base-files.js",
     "lint": "eslint",
     "lint:fix": "eslint --fix"
   },
@@ -111,7 +112,6 @@
     "@dcloudio/uni-mp-weixin": "3.0.0-4070620250821001",
     "@dcloudio/uni-mp-xhs": "3.0.0-4070620250821001",
     "@dcloudio/uni-quickapp-webview": "3.0.0-4070620250821001",
-    "@tanstack/vue-query": "^5.62.16",
     "abortcontroller-polyfill": "^1.7.8",
     "alova": "^3.3.3",
     "dayjs": "1.11.10",
@@ -119,7 +119,7 @@
     "pinia": "2.0.36",
     "pinia-plugin-persistedstate": "3.2.1",
     "vue": "^3.4.21",
-    "wot-design-uni": "^1.11.1",
+    "wot-design-uni": "^1.12.4",
     "z-paging": "2.8.7"
   },
   "devDependencies": {
@@ -164,6 +164,7 @@
     "postcss-scss": "^4.0.9",
     "rollup-plugin-visualizer": "^6.0.3",
     "sass": "1.77.8",
+    "std-env": "^3.9.0",
     "typescript": "~5.8.0",
     "unocss": "66.0.0",
     "unplugin-auto-import": "^20.0.0",

+ 221 - 7
scripts/create-base-files.js

@@ -8,23 +8,237 @@ const __filename = fileURLToPath(import.meta.url)
 const __dirname = path.dirname(__filename)
 
 const manifest = {
-  name: 'unibest',
-  description: 'unibest - 最好的 uniapp 开发模板',
-  versionName: '1.0.0',
-  versionCode: '100',
+  'name': 'unibest',
+  'appid': '__UNI__D1E5001',
+  'description': '',
+  'versionName': '1.0.0',
+  'versionCode': '100',
+  'transformPx': false,
+  'app-plus': {
+    usingComponents: true,
+    nvueStyleCompiler: 'uni-app',
+    compilerVersion: 3,
+    splashscreen: {
+      alwaysShowBeforeRender: true,
+      waiting: true,
+      autoclose: true,
+      delay: 0,
+    },
+    modules: {},
+    distribute: {
+      android: {
+        permissions: [
+          '<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>',
+          '<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>',
+          '<uses-permission android:name="android.permission.VIBRATE"/>',
+          '<uses-permission android:name="android.permission.READ_LOGS"/>',
+          '<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>',
+          '<uses-feature android:name="android.hardware.camera.autofocus"/>',
+          '<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>',
+          '<uses-permission android:name="android.permission.CAMERA"/>',
+          '<uses-permission android:name="android.permission.GET_ACCOUNTS"/>',
+          '<uses-permission android:name="android.permission.READ_PHONE_STATE"/>',
+          '<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>',
+          '<uses-permission android:name="android.permission.WAKE_LOCK"/>',
+          '<uses-permission android:name="android.permission.FLASHLIGHT"/>',
+          '<uses-feature android:name="android.hardware.camera"/>',
+          '<uses-permission android:name="android.permission.WRITE_SETTINGS"/>',
+        ],
+        minSdkVersion: 21,
+        targetSdkVersion: 30,
+        abiFilters: [
+          'armeabi-v7a',
+          'arm64-v8a',
+        ],
+      },
+      ios: {},
+      sdkConfigs: {},
+      icons: {
+        android: {
+          hdpi: 'static/app/icons/72x72.png',
+          xhdpi: 'static/app/icons/96x96.png',
+          xxhdpi: 'static/app/icons/144x144.png',
+          xxxhdpi: 'static/app/icons/192x192.png',
+        },
+        ios: {
+          appstore: 'static/app/icons/1024x1024.png',
+          ipad: {
+            'app': 'static/app/icons/76x76.png',
+            'app@2x': 'static/app/icons/152x152.png',
+            'notification': 'static/app/icons/20x20.png',
+            'notification@2x': 'static/app/icons/40x40.png',
+            'proapp@2x': 'static/app/icons/167x167.png',
+            'settings': 'static/app/icons/29x29.png',
+            'settings@2x': 'static/app/icons/58x58.png',
+            'spotlight': 'static/app/icons/40x40.png',
+            'spotlight@2x': 'static/app/icons/80x80.png',
+          },
+          iphone: {
+            'app@2x': 'static/app/icons/120x120.png',
+            'app@3x': 'static/app/icons/180x180.png',
+            'notification@2x': 'static/app/icons/40x40.png',
+            'notification@3x': 'static/app/icons/60x60.png',
+            'settings@2x': 'static/app/icons/58x58.png',
+            'settings@3x': 'static/app/icons/87x87.png',
+            'spotlight@2x': 'static/app/icons/80x80.png',
+            'spotlight@3x': 'static/app/icons/120x120.png',
+          },
+        },
+      },
+    },
+    compatible: {
+      ignoreVersion: true,
+    },
+  },
+  'quickapp': {},
+  'mp-weixin': {
+    appid: 'wxa2abb91f64032a2b',
+    setting: {
+      urlCheck: false,
+      es6: true,
+      minified: true,
+    },
+    usingComponents: true,
+    optimization: {
+      subPackages: true,
+    },
+  },
+  'mp-alipay': {
+    usingComponents: true,
+    styleIsolation: 'shared',
+    optimization: {
+      subPackages: true,
+    },
+  },
+  'mp-baidu': {
+    usingComponents: true,
+  },
+  'mp-toutiao': {
+    usingComponents: true,
+  },
+  'uniStatistics': {
+    enable: false,
+  },
+  'vueVersion': '3',
+  'h5': {
+    router: {
+      base: '/',
+    },
+  },
 }
 
 const pages = {
+  globalStyle: {
+    navigationStyle: 'default',
+    navigationBarTitleText: 'unibest',
+    navigationBarBackgroundColor: '#f8f8f8',
+    navigationBarTextStyle: 'black',
+    backgroundColor: '#FFFFFF',
+  },
+  easycom: {
+    autoscan: true,
+    custom: {
+      '^fg-(.*)': '@/components/fg-$1/fg-$1.vue',
+      '^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)': 'z-paging/components/z-paging$1/z-paging$1.vue',
+    },
+  },
+  tabBar: {
+    custom: true,
+    color: '#999999',
+    selectedColor: '#018d71',
+    backgroundColor: '#F8F8F8',
+    borderStyle: 'black',
+    height: '50px',
+    fontSize: '10px',
+    iconWidth: '24px',
+    spacing: '3px',
+    list: [
+      {
+        text: '首页',
+        pagePath: 'pages/index/index',
+      },
+      {
+        text: '关于',
+        pagePath: 'pages/about/about',
+      },
+      {
+        text: '我的',
+        pagePath: 'pages/me/me',
+      },
+    ],
+  },
   pages: [
     {
       path: 'pages/index/index',
+      type: 'home',
+      style: {
+        navigationStyle: 'custom',
+        navigationBarTitleText: '首页',
+      },
+    },
+    {
+      path: 'pages/about/about',
+      type: 'page',
       style: {
-        navigationBarTitleText: 'uni-app',
+        navigationBarTitleText: '关于',
+      },
+      excludeLoginPath: false,
+    },
+    {
+      path: 'pages/about/alova',
+      type: 'page',
+      style: {
+        navigationBarTitleText: 'Alova 演示',
+      },
+    },
+    {
+      path: 'pages/login/login',
+      type: 'page',
+      style: {
+        navigationBarTitleText: '登录',
+      },
+    },
+    {
+      path: 'pages/login/register',
+      type: 'page',
+      style: {
+        navigationBarTitleText: '注册',
+      },
+    },
+    {
+      path: 'pages/me/me',
+      type: 'page',
+      style: {
+        navigationBarTitleText: '我的',
       },
     },
   ],
+  subPackages: [
+    {
+      root: 'pages-sub',
+      pages: [
+        {
+          path: 'demo/index',
+          type: 'page',
+          style: {
+            navigationBarTitleText: '分包页面',
+          },
+        },
+      ],
+    },
+  ],
 }
 
 // 使用修复后的 __dirname 来解析文件路径
-fs.writeFileSync(path.resolve(__dirname, '../src/manifest.json'), JSON.stringify(manifest, null, 2))
-fs.writeFileSync(path.resolve(__dirname, '../src/pages.json'), JSON.stringify(pages, null, 2))
+const manifestPath = path.resolve(__dirname, '../src/manifest.json')
+const pagesPath = path.resolve(__dirname, '../src/pages.json')
+
+// 确保 src 目录存在
+const srcDir = path.resolve(__dirname, '../src')
+if (!fs.existsSync(srcDir)) {
+  fs.mkdirSync(srcDir, { recursive: true })
+}
+
+// 写入文件
+fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2))
+fs.writeFileSync(pagesPath, JSON.stringify(pages, null, 2))

+ 83 - 0
scripts/open-dev-tools.js

@@ -0,0 +1,83 @@
+import { exec } from 'node:child_process'
+import fs from 'node:fs'
+import path from 'node:path'
+import process from 'node:process'
+
+/**
+ * 打开开发者工具
+ */
+function _openDevTools() {
+  const platform = process.platform // darwin, win32, linux
+  const { UNI_PLATFORM } = process.env // mp, mp-weixin, mp-alipay
+
+  const uniPlatformText = UNI_PLATFORM === 'mp' || UNI_PLATFORM === 'mp-weixin' ? '微信小程序' : UNI_PLATFORM === 'mp-alipay' ? '支付宝小程序' : '小程序'
+
+  // 项目路径(构建输出目录)
+  const projectPath = path.resolve(process.cwd(), `dist/dev/${UNI_PLATFORM}`)
+
+  // 检查构建输出目录是否存在
+  if (!fs.existsSync(projectPath)) {
+    console.log(`❌ ${uniPlatformText}构建目录不存在:`, projectPath)
+    return
+  }
+
+  console.log(`🚀 正在打开${uniPlatformText}开发者工具...`)
+
+  // 根据不同操作系统执行不同命令
+  let command = ''
+
+  if (platform === 'darwin') {
+    // macOS
+    if (UNI_PLATFORM === 'mp-weixin') {
+      command = `/Applications/wechatwebdevtools.app/Contents/MacOS/cli -o "${projectPath}"`
+    }
+    else if (UNI_PLATFORM === 'mp-alipay') {
+      command = `/Applications/小程序开发者工具.app/Contents/MacOS/小程序开发者工具 --p "${projectPath}"`
+    }
+  }
+  else if (platform === 'win32' || platform === 'win64') {
+    // Windows
+    if (UNI_PLATFORM === 'mp-weixin') {
+      command = `"C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat" -o "${projectPath}"`
+    }
+  }
+  else {
+    // Linux 或其他系统
+    console.log('❌ 当前系统不支持自动打开微信开发者工具')
+    return
+  }
+
+  exec(command, (error, stdout, stderr) => {
+    if (error) {
+      console.log(`❌ 打开${uniPlatformText}开发者工具失败:`, error.message)
+      console.log(`💡 请确保${uniPlatformText}开发者工具服务端口已启用`)
+      console.log(`💡 可以手动打开${uniPlatformText}开发者工具并导入项目:`, projectPath)
+      return
+    }
+
+    if (stderr) {
+      console.log('⚠️ 警告:', stderr)
+    }
+
+    console.log(`✅ ${uniPlatformText}开发者工具已打开`)
+
+    if (stdout) {
+      console.log(stdout)
+    }
+  })
+}
+
+export default function openDevTools() {
+  // 首次构建标记
+  let isFirstBuild = true
+
+  return {
+    name: 'uni-devtools',
+    writeBundle() {
+      if (isFirstBuild && process.env.UNI_PLATFORM?.includes('mp')) {
+        isFirstBuild = false
+        _openDevTools()
+      }
+    },
+  }
+}

+ 8 - 1
src/App.ku.vue

@@ -11,7 +11,14 @@ const isCurrentPageTabbar = ref(true)
 onShow(() => {
   console.log('App.ku.vue onShow', currRoute())
   const { path } = currRoute()
-  isCurrentPageTabbar.value = isPageTabbar(path)
+  // “蜡笔小开心”提到本地是 '/pages/index/index',线上是 '/' 导致线上 tabbar 不见了
+  // 所以这里需要判断一下,如果是 '/' 就当做首页,也要显示 tabbar
+  if (path === '/') {
+    isCurrentPageTabbar.value = true
+  }
+  else {
+    isCurrentPageTabbar.value = isPageTabbar(path)
+  }
 })
 
 const helloKuRoot = ref('Hello AppKuVue')

+ 0 - 1
src/App.vue

@@ -1,7 +1,6 @@
 <script setup lang="ts">
 import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'
 import { navigateToInterceptor } from '@/router/interceptor'
-import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'
 
 onLaunch((options) => {
   console.log('App Launch', options)

+ 0 - 11
src/api/foo-vue-query.ts

@@ -1,11 +0,0 @@
-import { queryOptions } from '@tanstack/vue-query'
-import { getFooAPI } from './foo'
-
-export function getFooQueryOptions(name: string) {
-  return queryOptions({
-    queryFn: async ({ queryKey }) => {
-      return getFooAPI(queryKey[1])
-    },
-    queryKey: ['getFoo', name],
-  })
-}

+ 0 - 2
src/api/login.ts

@@ -7,8 +7,6 @@ import { http } from '@/http/http'
 export interface ILoginForm {
   username: string
   password: string
-  code?: string
-  uuid?: string
 }
 
 /**

+ 1 - 3
src/env.d.ts

@@ -18,13 +18,11 @@ interface ImportMetaEnv {
   /** H5是否需要代理 */
   readonly VITE_APP_PROXY_ENABLE: 'true' | 'false'
   /** H5是否需要代理,需要的话有个前缀 */
-  readonly VITE_APP_PROXY_PREFIX: string // 一般是/api
+  readonly VITE_APP_PROXY_PREFIX: string
   /** 后端是否有统一前缀 /api */
   readonly VITE_SERVER_HAS_API_PREFIX: 'true' | 'false'
   /** 认证模式,'single' | 'double' ==> 单token | 双token */
   readonly VITE_AUTH_MODE: 'single' | 'double'
-  /** 上传图片地址 */
-  readonly VITE_UPLOAD_BASEURL: string
   /** 是否清除console */
   readonly VITE_DELETE_CONSOLE: string
   // 更多环境变量...

+ 11 - 8
src/hooks/useRequest.ts

@@ -1,4 +1,5 @@
 import type { Ref } from 'vue'
+import { ref } from 'vue'
 
 interface IUseRequestOptions<T> {
   /** 是否立即执行 */
@@ -7,11 +8,11 @@ interface IUseRequestOptions<T> {
   initialData?: T
 }
 
-interface IUseRequestReturn<T> {
+interface IUseRequestReturn<T, P = undefined> {
   loading: Ref<boolean>
   error: Ref<boolean | Error>
   data: Ref<T | undefined>
-  run: () => Promise<T | undefined>
+  run: (args?: P) => Promise<T | undefined>
 }
 
 /**
@@ -22,16 +23,16 @@ interface IUseRequestReturn<T> {
  * @param options.initialData 初始化数据,默认为undefined。
  * @returns 返回一个对象{loading, error, data, run},包含请求的加载状态、错误信息、响应数据和手动触发请求的函数。
  */
-export default function useRequest<T>(
-  func: () => Promise<T>,
+export default function useRequest<T, P = undefined>(
+  func: (args?: P) => Promise<T>,
   options: IUseRequestOptions<T> = { immediate: false },
-): IUseRequestReturn<T> {
+): IUseRequestReturn<T, P> {
   const loading = ref(false)
   const error = ref(false)
   const data = ref<T | undefined>(options.initialData) as Ref<T | undefined>
-  const run = async () => {
+  const run = async (args?: P) => {
     loading.value = true
-    return func()
+    return func(args)
       .then((res) => {
         data.value = res
         error.value = false
@@ -46,6 +47,8 @@ export default function useRequest<T>(
       })
   }
 
-  options.immediate && run()
+  if (options.immediate) {
+    (run as (args?: P) => Promise<T | undefined>)({} as P)
+  }
   return { loading, error, data, run }
 }

+ 1 - 4
src/hooks/useUpload.ts

@@ -1,7 +1,4 @@
 import { ref } from 'vue'
-import { getEnvBaseUploadUrl } from '@/utils'
-
-const VITE_UPLOAD_BASEURL = `${getEnvBaseUploadUrl()}`
 
 type TfileType = 'image' | 'file'
 type TImage = 'png' | 'jpg' | 'jpeg' | 'webp' | '*'
@@ -138,7 +135,7 @@ async function uploadFile({
   onComplete: () => void
 }) {
   uni.uploadFile({
-    url: VITE_UPLOAD_BASEURL,
+    url: '/upload',
     filePath: tempFilePath,
     name: 'file',
     formData,

+ 2 - 1
src/http/alova.ts

@@ -100,7 +100,8 @@ const alovaInstance = createAlova({
 
     // 处理业务逻辑错误
     const { code, message, data } = rawData as IResponse
-    if (code !== ResultEnum.Success) {
+    // 0和200当做成功都很普遍,这里直接兼容两者,见 ResultEnum
+    if (code !== ResultEnum.Success0 && code !== ResultEnum.Success200) {
       if (config.meta?.toast !== false) {
         uni.showToast({
           title: message,

+ 3 - 1
src/http/http.ts

@@ -25,7 +25,8 @@ export function http<T>(options: CustomRequestOptions) {
         if (res.statusCode >= 200 && res.statusCode < 300) {
           // 2.1  处理业务逻辑错误
           const { code, message, data } = res.data as IResponse<T>
-          if (code !== ResultEnum.Success) {
+          // 0和200当做成功都很普遍,这里直接兼容两者,见 ResultEnum
+          if (code !== ResultEnum.Success0 && code !== ResultEnum.Success200) {
             throw new Error(`请求错误[${code}]:${message}`)
           }
           return resolve(data as T)
@@ -175,6 +176,7 @@ export function httpDelete<T>(url: string, query?: Record<string, any>, header?:
   })
 }
 
+// 支持与 axios 类似的API调用
 http.get = httpGet
 http.post = httpPost
 http.put = httpPut

+ 4 - 3
src/http/interceptor.ts

@@ -24,8 +24,7 @@ const httpInterceptor = {
     // 非 http 开头需拼接地址
     if (!options.url.startsWith('http')) {
       // #ifdef H5
-      // console.log(__VITE_APP_PROXY__)
-      if (JSON.parse(__VITE_APP_PROXY__)) {
+      if (JSON.parse(import.meta.env.VITE_APP_PROXY_ENABLE)) {
         // 自动拼接代理前缀
         options.url = import.meta.env.VITE_APP_PROXY_PREFIX + options.url
       }
@@ -43,8 +42,9 @@ const httpInterceptor = {
     options.timeout = 60000 // 60s
     // 2. (可选)添加小程序端请求头标识
     options.header = {
-      platform, // 可选,与 uniapp 定义的平台一致,告诉后台来源
       ...options.header,
+      'Content-Type': 'application/json; charset=utf-8',
+      platform, // 可选,与 uniapp 定义的平台一致,告诉后台来源
     }
     // 3. 添加 token 请求头标识
     const tokenStore = useTokenStore()
@@ -53,6 +53,7 @@ const httpInterceptor = {
     if (token) {
       options.header.Authorization = `Bearer ${token}`
     }
+    return options
   },
 }
 

+ 3 - 1
src/http/tools/enum.ts

@@ -1,5 +1,7 @@
 export enum ResultEnum {
-  Success = 0, // 成功
+  // 0和200当做成功都很普遍,这里直接兼容两者(PS:0和200通常都不会当做错误码,但是有的接口会返回0,有的接口会返回200)
+  Success0 = 0, // 成功
+  Success200 = 200, // 成功
   Error = 400, // 错误
   Unauthorized = 401, // 未授权
   Forbidden = 403, // 禁止访问(原为forbidden)

+ 0 - 2
src/main.ts

@@ -1,4 +1,3 @@
-import { VueQueryPlugin } from '@tanstack/vue-query'
 import { createSSRApp } from 'vue'
 import App from './App.vue'
 import { requestInterceptor } from './http/interceptor'
@@ -13,7 +12,6 @@ export function createApp() {
   app.use(store)
   app.use(routeInterceptor)
   app.use(requestInterceptor)
-  app.use(VueQueryPlugin)
 
   return {
     app,

+ 0 - 10
src/pages/about/about.vue

@@ -56,11 +56,6 @@ function gotoAlova() {
     url: '/pages/about/alova',
   })
 }
-function gotoVueQuery() {
-  uni.navigateTo({
-    url: '/pages/about/vue-query',
-  })
-}
 function gotoSubPage() {
   uni.navigateTo({
     url: '/pages-sub/demo/index',
@@ -129,11 +124,6 @@ onShow(() => {
         切换tabbar
       </button>
     </view>
-    <view class="text-center">
-      <button type="primary" size="mini" class="w-160px" @click="gotoVueQuery">
-        vue-query 示例页面
-      </button>
-    </view>
     <view class="text-center">
       <button type="primary" size="mini" class="w-160px" @click="gotoSubPage">
         前往分包页面

+ 0 - 50
src/pages/about/vue-query.vue

@@ -1,50 +0,0 @@
-<script lang="ts" setup>
-import { useQuery } from '@tanstack/vue-query'
-import { foo } from '@/api/foo'
-import { getFooQueryOptions } from '@/api/foo-vue-query'
-
-definePage({
-  style: {
-    navigationBarTitleText: 'Vue Query 演示',
-  },
-})
-
-// 简单使用
-onShow(async () => {
-  const res = await foo()
-  console.log('res: ', res)
-})
-
-// vue-query 版
-const {
-  data,
-  error,
-  isLoading: loading,
-  refetch: send,
-} = useQuery(getFooQueryOptions('菲鸽-vue-query'))
-</script>
-
-<template>
-  <view class="p-6 text-center">
-    <button type="primary" size="mini" class="my-6 w-160px" @click="send">
-      发送请求
-    </button>
-    <view class="h-16">
-      <view v-if="loading">
-        loading...
-      </view>
-      <block v-else>
-        <view class="text-xl">
-          请求数据如下
-        </view>
-        <view class="text-green leading-8">
-          {{ JSON.stringify(data) }}
-        </view>
-      </block>
-    </view>
-  </view>
-</template>
-
-<style lang="scss" scoped>
-//
-</style>

+ 4 - 20
src/pages/login/login.vue

@@ -32,27 +32,11 @@ async function doLogin() {
     return
   }
   try {
-    // 有的时候后端会用一个接口返回token和用户信息,有的时候会分开2个接口(各有利弊,看业务场景和系统复杂度),这里使用2个接口返回的来模拟
-    // 1/2 调用接口回来后设置token信息
-    // 这里用单token来模拟
-    tokenStore.setTokenInfo({
-      token: '123456',
-      expiresIn: 60 * 60 * 24 * 7,
+    // 调用登录接口
+    await tokenStore.login({
+      username: '菲鸽',
+      password: '123456',
     })
-
-    // 2/2 调用接口回来后设置用户信息
-    // const res = await login({
-    //   username: '菲鸽',
-    //   password: '123456',
-    // })
-    // console.log('接口拿到的登录信息:', res)
-    userStore.setUserInfo({
-      userId: 123456,
-      username: 'abc123456',
-      nickname: '菲鸽',
-      avatar: 'https://oss.laf.run/ukw0y1-site/avatar.jpg',
-    })
-
     console.log(redirectUrl.value)
   }
   catch (error) {

+ 3 - 3
src/pages/me/me.vue

@@ -20,7 +20,7 @@ const { userInfo } = storeToRefs(userStore)
 // #ifndef MP-WEIXIN
 // 上传头像
 const { run: uploadAvatar } = useUpload<IUploadSuccessInfo>(
-  import.meta.env.VITE_UPLOAD_BASEURL,
+  '/upload',
   {},
   {
     onSuccess: (res) => {
@@ -34,9 +34,9 @@ const { run: uploadAvatar } = useUpload<IUploadSuccessInfo>(
 // 微信小程序下登录
 async function handleLogin() {
   // #ifdef MP-WEIXIN
-
   // 微信登录
   await tokenStore.wxLogin()
+
   // #endif
   // #ifndef MP-WEIXIN
   uni.navigateTo({
@@ -52,7 +52,7 @@ function onChooseAvatar(e: any) {
   console.log('选择头像', e.detail)
   const { avatarUrl } = e.detail
   const { run } = useUpload<IUploadSuccessInfo>(
-    import.meta.env.VITE_UPLOAD_BASEURL,
+    '/upload',
     {},
     {
       onSuccess: (res) => {

+ 1 - 1
src/router/interceptor.ts

@@ -47,7 +47,7 @@ export const navigateToInterceptor = {
     tabbarStore.setAutoCurIdx(path)
 
     // 小程序里面使用平台自带的登录,则不走下面的逻辑
-    if (isMp && LOGIN_PAGE_ENABLE_IN_MP) {
+    if (isMp && !LOGIN_PAGE_ENABLE_IN_MP) {
       return true // 明确表示允许路由继续执行
     }
 

+ 0 - 3
src/service/index.ts

@@ -4,8 +4,5 @@ export * from './types';
 export * from './displayEnumLabel';
 
 export * from './pet';
-export * from './pet.vuequery';
 export * from './store';
-export * from './store.vuequery';
 export * from './user';
-export * from './user.vuequery';

+ 7 - 7
src/service/pet.ts

@@ -1,7 +1,7 @@
 /* eslint-disable */
 // @ts-ignore
 import request from '@/http/vue-query';
-import type { CustomRequestOptions } from '@/http/types';
+import { CustomRequestOptions } from '@/http/types';
 
 import * as API from './types';
 
@@ -47,7 +47,7 @@ export async function petPetIdUsingGet({
   options,
 }: {
   // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.petPetIdUsingGetParams;
+  params: API.PetPetIdUsingGetParams;
   options?: CustomRequestOptions;
 }) {
   const { petId: param0, ...queryParams } = params;
@@ -66,7 +66,7 @@ export async function petPetIdUsingPost({
   options,
 }: {
   // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.petPetIdUsingPostParams;
+  params: API.PetPetIdUsingPostParams;
   body: API.PetPetIdUsingPostBody;
   options?: CustomRequestOptions;
 }) {
@@ -89,7 +89,7 @@ export async function petPetIdUsingDelete({
   options,
 }: {
   // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.petPetIdUsingDeleteParams;
+  params: API.PetPetIdUsingDeleteParams;
   options?: CustomRequestOptions;
 }) {
   const { petId: param0, ...queryParams } = params;
@@ -109,7 +109,7 @@ export async function petPetIdUploadImageUsingPost({
   options,
 }: {
   // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.petPetIdUploadImageUsingPostParams;
+  params: API.PetPetIdUploadImageUsingPostParams;
   body: API.PetPetIdUploadImageUsingPostBody;
   file?: File;
   options?: CustomRequestOptions;
@@ -154,7 +154,7 @@ export async function petFindByStatusUsingGet({
   options,
 }: {
   // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.petFindByStatusUsingGetParams;
+  params: API.PetFindByStatusUsingGetParams;
   options?: CustomRequestOptions;
 }) {
   return request<API.Pet[]>('/pet/findByStatus', {
@@ -172,7 +172,7 @@ export async function petFindByTagsUsingGet({
   options,
 }: {
   // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.petFindByTagsUsingGetParams;
+  params: API.PetFindByTagsUsingGetParams;
   options?: CustomRequestOptions;
 }) {
   return request<API.Pet[]>('/pet/findByTags', {

+ 0 - 151
src/service/pet.vuequery.ts

@@ -1,151 +0,0 @@
-/* eslint-disable */
-// @ts-ignore
-import { queryOptions, useMutation } from '@tanstack/vue-query';
-import type { DefaultError } from '@tanstack/vue-query';
-import request from '@/http/vue-query';
-import type { CustomRequestOptions } from '@/http/types';
-
-import * as apis from './pet';
-import * as API from './types';
-
-/** Update an existing pet PUT /pet */
-export function usePetUsingPutMutation(options?: {
-  onSuccess?: (value?: unknown) => void;
-  onError?: (error?: DefaultError) => void;
-}) {
-  const { onSuccess, onError } = options || {};
-
-  const response = useMutation({
-    mutationFn: apis.petUsingPut,
-    onSuccess(data: unknown) {
-      onSuccess?.(data);
-    },
-    onError(error) {
-      onError?.(error);
-    },
-  });
-
-  return response;
-}
-
-/** Add a new pet to the store POST /pet */
-export function usePetUsingPostMutation(options?: {
-  onSuccess?: (value?: unknown) => void;
-  onError?: (error?: DefaultError) => void;
-}) {
-  const { onSuccess, onError } = options || {};
-
-  const response = useMutation({
-    mutationFn: apis.petUsingPost,
-    onSuccess(data: unknown) {
-      onSuccess?.(data);
-    },
-    onError(error) {
-      onError?.(error);
-    },
-  });
-
-  return response;
-}
-
-/** Find pet by ID Returns a single pet GET /pet/${param0} */
-export function petPetIdUsingGetQueryOptions(options: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.petPetIdUsingGetParams;
-  options?: CustomRequestOptions;
-}) {
-  return queryOptions({
-    queryFn: async ({ queryKey }) => {
-      return apis.petPetIdUsingGet(queryKey[1] as typeof options);
-    },
-    queryKey: ['petPetIdUsingGet', options],
-  });
-}
-
-/** Updates a pet in the store with form data POST /pet/${param0} */
-export function usePetPetIdUsingPostMutation(options?: {
-  onSuccess?: (value?: unknown) => void;
-  onError?: (error?: DefaultError) => void;
-}) {
-  const { onSuccess, onError } = options || {};
-
-  const response = useMutation({
-    mutationFn: apis.petPetIdUsingPost,
-    onSuccess(data: unknown) {
-      onSuccess?.(data);
-    },
-    onError(error) {
-      onError?.(error);
-    },
-  });
-
-  return response;
-}
-
-/** Deletes a pet DELETE /pet/${param0} */
-export function usePetPetIdUsingDeleteMutation(options?: {
-  onSuccess?: (value?: unknown) => void;
-  onError?: (error?: DefaultError) => void;
-}) {
-  const { onSuccess, onError } = options || {};
-
-  const response = useMutation({
-    mutationFn: apis.petPetIdUsingDelete,
-    onSuccess(data: unknown) {
-      onSuccess?.(data);
-    },
-    onError(error) {
-      onError?.(error);
-    },
-  });
-
-  return response;
-}
-
-/** uploads an image POST /pet/${param0}/uploadImage */
-export function usePetPetIdUploadImageUsingPostMutation(options?: {
-  onSuccess?: (value?: API.ApiResponse) => void;
-  onError?: (error?: DefaultError) => void;
-}) {
-  const { onSuccess, onError } = options || {};
-
-  const response = useMutation({
-    mutationFn: apis.petPetIdUploadImageUsingPost,
-    onSuccess(data: API.ApiResponse) {
-      onSuccess?.(data);
-    },
-    onError(error) {
-      onError?.(error);
-    },
-  });
-
-  return response;
-}
-
-/** Finds Pets by status Multiple status values can be provided with comma separated strings GET /pet/findByStatus */
-export function petFindByStatusUsingGetQueryOptions(options: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.petFindByStatusUsingGetParams;
-  options?: CustomRequestOptions;
-}) {
-  return queryOptions({
-    queryFn: async ({ queryKey }) => {
-      return apis.petFindByStatusUsingGet(queryKey[1] as typeof options);
-    },
-    queryKey: ['petFindByStatusUsingGet', options],
-  });
-}
-
-/** Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. GET /pet/findByTags */
-export function petFindByTagsUsingGetQueryOptions(options: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.petFindByTagsUsingGetParams;
-  options?: CustomRequestOptions;
-}) {
-  return queryOptions({
-    queryFn: async ({ queryKey }) => {
-      return apis.petFindByTagsUsingGet(queryKey[1] as typeof options);
-    },
-    queryKey: ['petFindByTagsUsingGet', options],
-  });
-}

+ 3 - 3
src/service/store.ts

@@ -1,7 +1,7 @@
 /* eslint-disable */
 // @ts-ignore
 import request from '@/http/vue-query';
-import type { CustomRequestOptions } from '@/http/types';
+import { CustomRequestOptions } from '@/http/types';
 
 import * as API from './types';
 
@@ -41,7 +41,7 @@ export async function storeOrderOrderIdUsingGet({
   options,
 }: {
   // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.storeOrderOrderIdUsingGetParams;
+  params: API.StoreOrderOrderIdUsingGetParams;
   options?: CustomRequestOptions;
 }) {
   const { orderId: param0, ...queryParams } = params;
@@ -59,7 +59,7 @@ export async function storeOrderOrderIdUsingDelete({
   options,
 }: {
   // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.storeOrderOrderIdUsingDeleteParams;
+  params: API.StoreOrderOrderIdUsingDeleteParams;
   options?: CustomRequestOptions;
 }) {
   const { orderId: param0, ...queryParams } = params;

+ 0 - 75
src/service/store.vuequery.ts

@@ -1,75 +0,0 @@
-/* eslint-disable */
-// @ts-ignore
-import { queryOptions, useMutation } from '@tanstack/vue-query';
-import type { DefaultError } from '@tanstack/vue-query';
-import request from '@/http/vue-query';
-import type { CustomRequestOptions } from '@/http/types';
-
-import * as apis from './store';
-import * as API from './types';
-
-/** Returns pet inventories by status Returns a map of status codes to quantities GET /store/inventory */
-export function storeInventoryUsingGetQueryOptions(options: {
-  options?: CustomRequestOptions;
-}) {
-  return queryOptions({
-    queryFn: async ({ queryKey }) => {
-      return apis.storeInventoryUsingGet(queryKey[1] as typeof options);
-    },
-    queryKey: ['storeInventoryUsingGet', options],
-  });
-}
-
-/** Place an order for a pet POST /store/order */
-export function useStoreOrderUsingPostMutation(options?: {
-  onSuccess?: (value?: API.Order) => void;
-  onError?: (error?: DefaultError) => void;
-}) {
-  const { onSuccess, onError } = options || {};
-
-  const response = useMutation({
-    mutationFn: apis.storeOrderUsingPost,
-    onSuccess(data: API.Order) {
-      onSuccess?.(data);
-    },
-    onError(error) {
-      onError?.(error);
-    },
-  });
-
-  return response;
-}
-
-/** Find purchase order by ID For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions GET /store/order/${param0} */
-export function storeOrderOrderIdUsingGetQueryOptions(options: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.storeOrderOrderIdUsingGetParams;
-  options?: CustomRequestOptions;
-}) {
-  return queryOptions({
-    queryFn: async ({ queryKey }) => {
-      return apis.storeOrderOrderIdUsingGet(queryKey[1] as typeof options);
-    },
-    queryKey: ['storeOrderOrderIdUsingGet', options],
-  });
-}
-
-/** Delete purchase order by ID For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors DELETE /store/order/${param0} */
-export function useStoreOrderOrderIdUsingDeleteMutation(options?: {
-  onSuccess?: (value?: unknown) => void;
-  onError?: (error?: DefaultError) => void;
-}) {
-  const { onSuccess, onError } = options || {};
-
-  const response = useMutation({
-    mutationFn: apis.storeOrderOrderIdUsingDelete,
-    onSuccess(data: unknown) {
-      onSuccess?.(data);
-    },
-    onError(error) {
-      onError?.(error);
-    },
-  });
-
-  return response;
-}

+ 216 - 12
src/service/types.ts

@@ -32,16 +32,38 @@ export type Pet = {
   status?: 'available' | 'pending' | 'sold';
 };
 
-export type petFindByStatusUsingGetParams = {
+export type PetFindByStatusUsingGetParams = {
   /** Status values that need to be considered for filter */
   status: ('available' | 'pending' | 'sold')[];
 };
 
-export type petFindByTagsUsingGetParams = {
+export type PetFindByStatusUsingGetResponses = {
+  /**
+   * successful operation
+   */
+  200: Pet[];
+  /**
+   * Invalid status value
+   */
+  400: unknown;
+};
+
+export type PetFindByTagsUsingGetParams = {
   /** Tags to filter by */
   tags: string[];
 };
 
+export type PetFindByTagsUsingGetResponses = {
+  /**
+   * successful operation
+   */
+  200: Pet[];
+  /**
+   * Invalid tag value
+   */
+  400: unknown;
+};
+
 export type PetPetIdUploadImageUsingPostBody = {
   /** Additional data to pass to server */
   additionalMetadata?: string;
@@ -49,21 +71,54 @@ export type PetPetIdUploadImageUsingPostBody = {
   file?: string;
 };
 
-export type petPetIdUploadImageUsingPostParams = {
+export type PetPetIdUploadImageUsingPostParams = {
   /** ID of pet to update */
   petId: number;
 };
 
-export type petPetIdUsingDeleteParams = {
+export type PetPetIdUploadImageUsingPostResponses = {
+  /**
+   * successful operation
+   */
+  200: ApiResponse;
+};
+
+export type PetPetIdUsingDeleteParams = {
   /** Pet id to delete */
   petId: number;
 };
 
-export type petPetIdUsingGetParams = {
+export type PetPetIdUsingDeleteResponses = {
+  /**
+   * Invalid ID supplied
+   */
+  400: unknown;
+  /**
+   * Pet not found
+   */
+  404: unknown;
+};
+
+export type PetPetIdUsingGetParams = {
   /** ID of pet to return */
   petId: number;
 };
 
+export type PetPetIdUsingGetResponses = {
+  /**
+   * successful operation
+   */
+  200: Pet;
+  /**
+   * Invalid ID supplied
+   */
+  400: unknown;
+  /**
+   * Pet not found
+   */
+  404: unknown;
+};
+
 export type PetPetIdUsingPostBody = {
   /** Updated name of the pet */
   name?: string;
@@ -71,11 +126,40 @@ export type PetPetIdUsingPostBody = {
   status?: string;
 };
 
-export type petPetIdUsingPostParams = {
+export type PetPetIdUsingPostParams = {
   /** ID of pet that needs to be updated */
   petId: number;
 };
 
+export type PetPetIdUsingPostResponses = {
+  /**
+   * Invalid input
+   */
+  405: unknown;
+};
+
+export type PetUsingPostResponses = {
+  /**
+   * Invalid input
+   */
+  405: unknown;
+};
+
+export type PetUsingPutResponses = {
+  /**
+   * Invalid ID supplied
+   */
+  400: unknown;
+  /**
+   * Pet not found
+   */
+  404: unknown;
+  /**
+   * Validation exception
+   */
+  405: unknown;
+};
+
 export enum StatusEnum {
   'available' = 'available',
   'pending' = 'pending',
@@ -92,16 +176,60 @@ export enum StatusEnum2 {
 
 export type IStatusEnum2 = keyof typeof StatusEnum2;
 
-export type storeOrderOrderIdUsingDeleteParams = {
+export type StoreInventoryUsingGetResponses = {
+  /**
+   * successful operation
+   */
+  200: Record<string, number>;
+};
+
+export type StoreOrderOrderIdUsingDeleteParams = {
   /** ID of the order that needs to be deleted */
   orderId: number;
 };
 
-export type storeOrderOrderIdUsingGetParams = {
+export type StoreOrderOrderIdUsingDeleteResponses = {
+  /**
+   * Invalid ID supplied
+   */
+  400: unknown;
+  /**
+   * Order not found
+   */
+  404: unknown;
+};
+
+export type StoreOrderOrderIdUsingGetParams = {
   /** ID of pet that needs to be fetched */
   orderId: number;
 };
 
+export type StoreOrderOrderIdUsingGetResponses = {
+  /**
+   * successful operation
+   */
+  200: Order;
+  /**
+   * Invalid ID supplied
+   */
+  400: unknown;
+  /**
+   * Order not found
+   */
+  404: unknown;
+};
+
+export type StoreOrderUsingPostResponses = {
+  /**
+   * successful operation
+   */
+  200: Order;
+  /**
+   * Invalid Order
+   */
+  400: unknown;
+};
+
 export type Tag = {
   id?: number;
   name?: string;
@@ -121,26 +249,102 @@ export type User = {
 
 export type UserCreateWithArrayUsingPostBody = User[];
 
+export type UserCreateWithArrayUsingPostResponses = {
+  /**
+   * successful operation
+   */
+  default: unknown;
+};
+
 export type UserCreateWithListUsingPostBody = User[];
 
-export type userLoginUsingGetParams = {
+export type UserCreateWithListUsingPostResponses = {
+  /**
+   * successful operation
+   */
+  default: unknown;
+};
+
+export type UserLoginUsingGetParams = {
   /** The user name for login */
   username: string;
   /** The password for login in clear text */
   password: string;
 };
 
-export type userUsernameUsingDeleteParams = {
+export type UserLoginUsingGetResponses = {
+  /**
+   * successful operation
+   */
+  200: string;
+  /**
+   * Invalid username/password supplied
+   */
+  400: unknown;
+};
+
+export type UserLogoutUsingGetResponses = {
+  /**
+   * successful operation
+   */
+  default: unknown;
+};
+
+export type UserUsernameUsingDeleteParams = {
   /** The name that needs to be deleted */
   username: string;
 };
 
-export type userUsernameUsingGetParams = {
+export type UserUsernameUsingDeleteResponses = {
+  /**
+   * Invalid username supplied
+   */
+  400: unknown;
+  /**
+   * User not found
+   */
+  404: unknown;
+};
+
+export type UserUsernameUsingGetParams = {
   /** The name that needs to be fetched. Use user1 for testing.  */
   username: string;
 };
 
-export type userUsernameUsingPutParams = {
+export type UserUsernameUsingGetResponses = {
+  /**
+   * successful operation
+   */
+  200: User;
+  /**
+   * Invalid username supplied
+   */
+  400: unknown;
+  /**
+   * User not found
+   */
+  404: unknown;
+};
+
+export type UserUsernameUsingPutParams = {
   /** name that need to be updated */
   username: string;
 };
+
+export type UserUsernameUsingPutResponses = {
+  /**
+   * Invalid user supplied
+   */
+  400: unknown;
+  /**
+   * User not found
+   */
+  404: unknown;
+};
+
+export type UserUsingPostResponses = {
+  /**
+   * successful operation
+   */
+  default: unknown;
+};

+ 7 - 7
src/service/user.ts

@@ -1,7 +1,7 @@
 /* eslint-disable */
 // @ts-ignore
 import request from '@/http/vue-query';
-import type { CustomRequestOptions } from '@/http/types';
+import { CustomRequestOptions } from '@/http/types';
 
 import * as API from './types';
 
@@ -29,7 +29,7 @@ export async function userUsernameUsingGet({
   options,
 }: {
   // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.userUsernameUsingGetParams;
+  params: API.UserUsernameUsingGetParams;
   options?: CustomRequestOptions;
 }) {
   const { username: param0, ...queryParams } = params;
@@ -48,7 +48,7 @@ export async function userUsernameUsingPut({
   options,
 }: {
   // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.userUsernameUsingPutParams;
+  params: API.UserUsernameUsingPutParams;
   body: API.User;
   options?: CustomRequestOptions;
 }) {
@@ -71,7 +71,7 @@ export async function userUsernameUsingDelete({
   options,
 }: {
   // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.userUsernameUsingDeleteParams;
+  params: API.UserUsernameUsingDeleteParams;
   options?: CustomRequestOptions;
 }) {
   const { username: param0, ...queryParams } = params;
@@ -119,16 +119,16 @@ export async function userCreateWithListUsingPost({
   });
 }
 
-/** Logs user into the system GET /auth/login */
+/** Logs user into the system GET /user/login */
 export async function userLoginUsingGet({
   params,
   options,
 }: {
   // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.userLoginUsingGetParams;
+  params: API.UserLoginUsingGetParams;
   options?: CustomRequestOptions;
 }) {
-  return request<string>('/auth/login', {
+  return request<string>('/user/login', {
     method: 'GET',
     params: {
       ...params,

+ 0 - 149
src/service/user.vuequery.ts

@@ -1,149 +0,0 @@
-/* eslint-disable */
-// @ts-ignore
-import { queryOptions, useMutation } from '@tanstack/vue-query';
-import type { DefaultError } from '@tanstack/vue-query';
-import request from '@/http/vue-query';
-import type { CustomRequestOptions } from '@/http/types';
-
-import * as apis from './user';
-import * as API from './types';
-
-/** Create user This can only be done by the logged in user. 返回值: successful operation POST /user */
-export function useUserUsingPostMutation(options?: {
-  onSuccess?: (value?: unknown) => void;
-  onError?: (error?: DefaultError) => void;
-}) {
-  const { onSuccess, onError } = options || {};
-
-  const response = useMutation({
-    mutationFn: apis.userUsingPost,
-    onSuccess(data: unknown) {
-      onSuccess?.(data);
-    },
-    onError(error) {
-      onError?.(error);
-    },
-  });
-
-  return response;
-}
-
-/** Get user by user name GET /user/${param0} */
-export function userUsernameUsingGetQueryOptions(options: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.userUsernameUsingGetParams;
-  options?: CustomRequestOptions;
-}) {
-  return queryOptions({
-    queryFn: async ({ queryKey }) => {
-      return apis.userUsernameUsingGet(queryKey[1] as typeof options);
-    },
-    queryKey: ['userUsernameUsingGet', options],
-  });
-}
-
-/** Updated user This can only be done by the logged in user. PUT /user/${param0} */
-export function useUserUsernameUsingPutMutation(options?: {
-  onSuccess?: (value?: unknown) => void;
-  onError?: (error?: DefaultError) => void;
-}) {
-  const { onSuccess, onError } = options || {};
-
-  const response = useMutation({
-    mutationFn: apis.userUsernameUsingPut,
-    onSuccess(data: unknown) {
-      onSuccess?.(data);
-    },
-    onError(error) {
-      onError?.(error);
-    },
-  });
-
-  return response;
-}
-
-/** Delete user This can only be done by the logged in user. DELETE /user/${param0} */
-export function useUserUsernameUsingDeleteMutation(options?: {
-  onSuccess?: (value?: unknown) => void;
-  onError?: (error?: DefaultError) => void;
-}) {
-  const { onSuccess, onError } = options || {};
-
-  const response = useMutation({
-    mutationFn: apis.userUsernameUsingDelete,
-    onSuccess(data: unknown) {
-      onSuccess?.(data);
-    },
-    onError(error) {
-      onError?.(error);
-    },
-  });
-
-  return response;
-}
-
-/** Creates list of users with given input array 返回值: successful operation POST /user/createWithArray */
-export function useUserCreateWithArrayUsingPostMutation(options?: {
-  onSuccess?: (value?: unknown) => void;
-  onError?: (error?: DefaultError) => void;
-}) {
-  const { onSuccess, onError } = options || {};
-
-  const response = useMutation({
-    mutationFn: apis.userCreateWithArrayUsingPost,
-    onSuccess(data: unknown) {
-      onSuccess?.(data);
-    },
-    onError(error) {
-      onError?.(error);
-    },
-  });
-
-  return response;
-}
-
-/** Creates list of users with given input array 返回值: successful operation POST /user/createWithList */
-export function useUserCreateWithListUsingPostMutation(options?: {
-  onSuccess?: (value?: unknown) => void;
-  onError?: (error?: DefaultError) => void;
-}) {
-  const { onSuccess, onError } = options || {};
-
-  const response = useMutation({
-    mutationFn: apis.userCreateWithListUsingPost,
-    onSuccess(data: unknown) {
-      onSuccess?.(data);
-    },
-    onError(error) {
-      onError?.(error);
-    },
-  });
-
-  return response;
-}
-
-/** Logs user into the system GET /auth/login */
-export function userLoginUsingGetQueryOptions(options: {
-  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
-  params: API.userLoginUsingGetParams;
-  options?: CustomRequestOptions;
-}) {
-  return queryOptions({
-    queryFn: async ({ queryKey }) => {
-      return apis.userLoginUsingGet(queryKey[1] as typeof options);
-    },
-    queryKey: ['userLoginUsingGet', options],
-  });
-}
-
-/** Logs out current logged in user session 返回值: successful operation GET /user/logout */
-export function userLogoutUsingGetQueryOptions(options: {
-  options?: CustomRequestOptions;
-}) {
-  return queryOptions({
-    queryFn: async ({ queryKey }) => {
-      return apis.userLogoutUsingGet(queryKey[1] as typeof options);
-    },
-    queryKey: ['userLogoutUsingGet', options],
-  });
-}

+ 13 - 11
src/store/token.ts

@@ -1,3 +1,6 @@
+import type {
+  ILoginForm,
+} from '@/api/login'
 import type { IAuthLoginRes } from '@/api/types/login'
 import { defineStore } from 'pinia'
 import { computed, ref } from 'vue' // 修复:导入 computed
@@ -93,19 +96,16 @@ export const useTokenStore = defineStore(
 
     /**
      * 用户登录
-     * @param credentials 登录参数
+     * 有的时候后端会用一个接口返回token和用户信息,有的时候会分开2个接口,一个获取token,一个获取用户信息
+     * (各有利弊,看业务场景和系统复杂度),这里使用2个接口返回的来模拟
+     * @param loginForm 登录参数
      * @returns 登录结果
      */
-    const login = async (credentials: {
-      username: string
-      password: string
-      code: string
-      uuid: string
-    }) => {
+    const login = async (loginForm: ILoginForm) => {
       try {
-        const res = await _login(credentials)
+        const res = await _login(loginForm)
         console.log('普通登录-res: ', res)
-        await _postLogin(res.data)
+        await _postLogin(res)
         uni.showToast({
           title: '登录成功',
           icon: 'success',
@@ -124,6 +124,8 @@ export const useTokenStore = defineStore(
 
     /**
      * 微信登录
+     * 有的时候后端会用一个接口返回token和用户信息,有的时候会分开2个接口,一个获取token,一个获取用户信息
+     * (各有利弊,看业务场景和系统复杂度),这里使用2个接口返回的来模拟
      * @returns 登录结果
      */
     const wxLogin = async () => {
@@ -133,7 +135,7 @@ export const useTokenStore = defineStore(
         console.log('微信登录-code: ', code)
         const res = await _wxLogin(code)
         console.log('微信登录-res: ', res)
-        await _postLogin(res.data)
+        await _postLogin(res)
         uni.showToast({
           title: '登录成功',
           icon: 'success',
@@ -193,7 +195,7 @@ export const useTokenStore = defineStore(
         const refreshToken = tokenInfo.value.refreshToken
         const res = await _refreshToken(refreshToken)
         console.log('刷新token-res: ', res)
-        setTokenInfo(res.data)
+        setTokenInfo(res)
         return res
       }
       catch (error) {

+ 1 - 1
src/store/user.ts

@@ -43,7 +43,7 @@ export const useUserStore = defineStore(
      */
     const fetchUserInfo = async () => {
       const res = await getUserInfo()
-      setUserInfo(res.data)
+      setUserInfo(res)
       return res
     }
 

+ 8 - 8
src/tabbar/config.ts

@@ -52,7 +52,7 @@ export type CustomTabBarItemBadge = number | 'dot'
 export interface CustomTabBarItem {
   text: string
   pagePath: string
-  iconType: 'uniUi' | 'uiLib' | 'unocss' | 'iconfont' | 'image' // 不建议用 image 模式,需要配置2张图
+  iconType: 'uiLib' | 'unocss' | 'iconfont' | 'image' // 不建议用 image 模式,需要配置2张图
   icon: any // 其实是 string 类型,这里是为了避免 ts 报错 (tabbar/index.vue 里面 uni-icons 那行)
   iconActive?: string // 只有在 image 模式下才需要,传递的是高亮的图片(PS: 不建议用 image 模式)
   badge?: CustomTabBarItemBadge
@@ -64,11 +64,11 @@ export const customTabbarList: CustomTabBarItem[] = [
   {
     text: '首页',
     pagePath: 'pages/index/index',
-    // 本框架内置了 uniapp 官方UI库 (uni-ui)的图标库
-    // 使用方式如:<uni-icons type="home" size="30"/>
-    // 图标列表地址:https://uniapp.dcloud.net.cn/component/uniui/uni-icons.html
-    iconType: 'uniUi',
-    icon: 'home',
+    // 注意 unocss 图标需要如下处理:(二选一)
+    // 1)在fg-tabbar.vue页面上引入一下并注释掉(见tabbar/index.vue代码第2行)
+    // 2)配置到 unocss.config.ts 的 safelist 中
+    iconType: 'unocss',
+    icon: 'i-carbon-home',
     // badge: 'dot',
   },
   {
@@ -84,8 +84,8 @@ export const customTabbarList: CustomTabBarItem[] = [
   {
     pagePath: 'pages/me/me',
     text: '我的',
-    iconType: 'uniUi',
-    icon: 'contact',
+    iconType: 'unocss',
+    icon: 'i-carbon-user',
     // badge: 100,
   },
   // 其他类型演示

+ 0 - 3
src/tabbar/index.vue

@@ -88,9 +88,6 @@ function getImageByIndex(index: number, item: CustomTabBarItem) {
             </view>
           </view>
           <view v-else class="relative px-3 text-center">
-            <template v-if="item.iconType === 'uniUi'">
-              <uni-icons :type="item.icon" size="20" :color="getColorByIndex(index)" />
-            </template>
             <template v-if="item.iconType === 'uiLib'">
               <!-- TODO: 以下内容请根据选择的UI库自行替换 -->
               <!-- 如:<wd-icon name="home" /> (https://wot-design-uni.cn/component/icon.html) -->

+ 14 - 3
src/tabbar/store.ts

@@ -1,7 +1,9 @@
 import type { CustomTabBarItem, CustomTabBarItemBadge } from './config'
 import { reactive } from 'vue'
 
-import { FG_LOG_ENABLE } from '@/router/interceptor'
+import { isNeedLoginMode } from '@/router/config'
+import { FG_LOG_ENABLE, judgeIsExcludePath } from '@/router/interceptor'
+import { useTokenStore } from '@/store/token'
 import { tabbarList as _tabbarList, customTabbarEnable } from './config'
 
 // TODO 1/2: 中间的鼓包tabbarItem的开关
@@ -36,8 +38,12 @@ const tabbarStore = reactive({
   curIdx: uni.getStorageSync('app-tabbar-index') || 0,
   prevIdx: uni.getStorageSync('app-tabbar-index') || 0,
   setCurIdx(idx: number) {
-    this.curIdx = idx
-    uni.setStorageSync('app-tabbar-index', idx)
+    const tokenStore = useTokenStore()
+    // 已登录 或 (url 需要登录 && 在白名单 || 不需要登录 && 不在黑名单) (关于 白名单|黑名单 逻辑: src/router/interceptor.ts)
+    if (tokenStore.hasLogin || (isNeedLoginMode && judgeIsExcludePath(tabbarList[idx].pagePath)) || (!isNeedLoginMode && !judgeIsExcludePath(tabbarList[idx].pagePath))) {
+      this.curIdx = idx
+      uni.setStorageSync('app-tabbar-index', idx)
+    }
   },
   setTabbarItemBadge(idx: number, badge: CustomTabBarItemBadge) {
     if (tabbarList[idx]) {
@@ -45,6 +51,11 @@ const tabbarStore = reactive({
     }
   },
   setAutoCurIdx(path: string) {
+    // '/' 当做首页
+    if (path === '/') {
+      this.setCurIdx(0)
+      return
+    }
     const index = tabbarList.findIndex(item => item.pagePath === path)
     FG_LOG_ENABLE && console.log('index:', index, path)
     // console.log('tabbarList:', tabbarList)

+ 191 - 0
src/types/auto-import.d.ts

@@ -0,0 +1,191 @@
+/* eslint-disable */
+/* prettier-ignore */
+// @ts-nocheck
+// noinspection JSUnusedGlobalSymbols
+// Generated by unplugin-auto-import
+// biome-ignore lint: disable
+export {}
+declare global {
+  const EffectScope: typeof import('vue')['EffectScope']
+  const computed: typeof import('vue')['computed']
+  const createApp: typeof import('vue')['createApp']
+  const customRef: typeof import('vue')['customRef']
+  const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
+  const defineComponent: typeof import('vue')['defineComponent']
+  const effectScope: typeof import('vue')['effectScope']
+  const getCurrentInstance: typeof import('vue')['getCurrentInstance']
+  const getCurrentScope: typeof import('vue')['getCurrentScope']
+  const getCurrentWatcher: typeof import('vue')['getCurrentWatcher']
+  const h: typeof import('vue')['h']
+  const inject: typeof import('vue')['inject']
+  const isProxy: typeof import('vue')['isProxy']
+  const isReactive: typeof import('vue')['isReactive']
+  const isReadonly: typeof import('vue')['isReadonly']
+  const isRef: typeof import('vue')['isRef']
+  const isShallow: typeof import('vue')['isShallow']
+  const markRaw: typeof import('vue')['markRaw']
+  const nextTick: typeof import('vue')['nextTick']
+  const onActivated: typeof import('vue')['onActivated']
+  const onAddToFavorites: typeof import('@dcloudio/uni-app')['onAddToFavorites']
+  const onBackPress: typeof import('@dcloudio/uni-app')['onBackPress']
+  const onBeforeMount: typeof import('vue')['onBeforeMount']
+  const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
+  const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
+  const onDeactivated: typeof import('vue')['onDeactivated']
+  const onError: typeof import('@dcloudio/uni-app')['onError']
+  const onErrorCaptured: typeof import('vue')['onErrorCaptured']
+  const onHide: typeof import('@dcloudio/uni-app')['onHide']
+  const onLaunch: typeof import('@dcloudio/uni-app')['onLaunch']
+  const onLoad: typeof import('@dcloudio/uni-app')['onLoad']
+  const onMounted: typeof import('vue')['onMounted']
+  const onNavigationBarButtonTap: typeof import('@dcloudio/uni-app')['onNavigationBarButtonTap']
+  const onNavigationBarSearchInputChanged: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputChanged']
+  const onNavigationBarSearchInputClicked: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputClicked']
+  const onNavigationBarSearchInputConfirmed: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputConfirmed']
+  const onNavigationBarSearchInputFocusChanged: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputFocusChanged']
+  const onPageNotFound: typeof import('@dcloudio/uni-app')['onPageNotFound']
+  const onPageScroll: typeof import('@dcloudio/uni-app')['onPageScroll']
+  const onPullDownRefresh: typeof import('@dcloudio/uni-app')['onPullDownRefresh']
+  const onReachBottom: typeof import('@dcloudio/uni-app')['onReachBottom']
+  const onReady: typeof import('@dcloudio/uni-app')['onReady']
+  const onRenderTracked: typeof import('vue')['onRenderTracked']
+  const onRenderTriggered: typeof import('vue')['onRenderTriggered']
+  const onResize: typeof import('@dcloudio/uni-app')['onResize']
+  const onScopeDispose: typeof import('vue')['onScopeDispose']
+  const onServerPrefetch: typeof import('vue')['onServerPrefetch']
+  const onShareAppMessage: typeof import('@dcloudio/uni-app')['onShareAppMessage']
+  const onShareTimeline: typeof import('@dcloudio/uni-app')['onShareTimeline']
+  const onShow: typeof import('@dcloudio/uni-app')['onShow']
+  const onTabItemTap: typeof import('@dcloudio/uni-app')['onTabItemTap']
+  const onThemeChange: typeof import('@dcloudio/uni-app')['onThemeChange']
+  const onUnhandledRejection: typeof import('@dcloudio/uni-app')['onUnhandledRejection']
+  const onUnload: typeof import('@dcloudio/uni-app')['onUnload']
+  const onUnmounted: typeof import('vue')['onUnmounted']
+  const onUpdated: typeof import('vue')['onUpdated']
+  const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
+  const provide: typeof import('vue')['provide']
+  const reactive: typeof import('vue')['reactive']
+  const readonly: typeof import('vue')['readonly']
+  const ref: typeof import('vue')['ref']
+  const resolveComponent: typeof import('vue')['resolveComponent']
+  const shallowReactive: typeof import('vue')['shallowReactive']
+  const shallowReadonly: typeof import('vue')['shallowReadonly']
+  const shallowRef: typeof import('vue')['shallowRef']
+  const toRaw: typeof import('vue')['toRaw']
+  const toRef: typeof import('vue')['toRef']
+  const toRefs: typeof import('vue')['toRefs']
+  const toValue: typeof import('vue')['toValue']
+  const triggerRef: typeof import('vue')['triggerRef']
+  const unref: typeof import('vue')['unref']
+  const useAttrs: typeof import('vue')['useAttrs']
+  const useCssModule: typeof import('vue')['useCssModule']
+  const useCssVars: typeof import('vue')['useCssVars']
+  const useId: typeof import('vue')['useId']
+  const useModel: typeof import('vue')['useModel']
+  const useRequest: typeof import('../hooks/useRequest')['default']
+  const useSlots: typeof import('vue')['useSlots']
+  const useTemplateRef: typeof import('vue')['useTemplateRef']
+  const useUpload: typeof import('../hooks/useUpload')['default']
+  const watch: typeof import('vue')['watch']
+  const watchEffect: typeof import('vue')['watchEffect']
+  const watchPostEffect: typeof import('vue')['watchPostEffect']
+  const watchSyncEffect: typeof import('vue')['watchSyncEffect']
+}
+// for type re-export
+declare global {
+  // @ts-ignore
+  export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, ShallowRef, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
+  import('vue')
+}
+
+// for vue template auto import
+import { UnwrapRef } from 'vue'
+declare module 'vue' {
+  interface GlobalComponents {}
+  interface ComponentCustomProperties {
+    readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
+    readonly computed: UnwrapRef<typeof import('vue')['computed']>
+    readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
+    readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
+    readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
+    readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
+    readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
+    readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
+    readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
+    readonly getCurrentWatcher: UnwrapRef<typeof import('vue')['getCurrentWatcher']>
+    readonly h: UnwrapRef<typeof import('vue')['h']>
+    readonly inject: UnwrapRef<typeof import('vue')['inject']>
+    readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
+    readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
+    readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
+    readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
+    readonly isShallow: UnwrapRef<typeof import('vue')['isShallow']>
+    readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
+    readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
+    readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
+    readonly onAddToFavorites: UnwrapRef<typeof import('@dcloudio/uni-app')['onAddToFavorites']>
+    readonly onBackPress: UnwrapRef<typeof import('@dcloudio/uni-app')['onBackPress']>
+    readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
+    readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']>
+    readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
+    readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
+    readonly onError: UnwrapRef<typeof import('@dcloudio/uni-app')['onError']>
+    readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']>
+    readonly onHide: UnwrapRef<typeof import('@dcloudio/uni-app')['onHide']>
+    readonly onLaunch: UnwrapRef<typeof import('@dcloudio/uni-app')['onLaunch']>
+    readonly onLoad: UnwrapRef<typeof import('@dcloudio/uni-app')['onLoad']>
+    readonly onMounted: UnwrapRef<typeof import('vue')['onMounted']>
+    readonly onNavigationBarButtonTap: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarButtonTap']>
+    readonly onNavigationBarSearchInputChanged: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputChanged']>
+    readonly onNavigationBarSearchInputClicked: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputClicked']>
+    readonly onNavigationBarSearchInputConfirmed: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputConfirmed']>
+    readonly onNavigationBarSearchInputFocusChanged: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputFocusChanged']>
+    readonly onPageNotFound: UnwrapRef<typeof import('@dcloudio/uni-app')['onPageNotFound']>
+    readonly onPageScroll: UnwrapRef<typeof import('@dcloudio/uni-app')['onPageScroll']>
+    readonly onPullDownRefresh: UnwrapRef<typeof import('@dcloudio/uni-app')['onPullDownRefresh']>
+    readonly onReachBottom: UnwrapRef<typeof import('@dcloudio/uni-app')['onReachBottom']>
+    readonly onReady: UnwrapRef<typeof import('@dcloudio/uni-app')['onReady']>
+    readonly onRenderTracked: UnwrapRef<typeof import('vue')['onRenderTracked']>
+    readonly onRenderTriggered: UnwrapRef<typeof import('vue')['onRenderTriggered']>
+    readonly onResize: UnwrapRef<typeof import('@dcloudio/uni-app')['onResize']>
+    readonly onScopeDispose: UnwrapRef<typeof import('vue')['onScopeDispose']>
+    readonly onServerPrefetch: UnwrapRef<typeof import('vue')['onServerPrefetch']>
+    readonly onShareAppMessage: UnwrapRef<typeof import('@dcloudio/uni-app')['onShareAppMessage']>
+    readonly onShareTimeline: UnwrapRef<typeof import('@dcloudio/uni-app')['onShareTimeline']>
+    readonly onShow: UnwrapRef<typeof import('@dcloudio/uni-app')['onShow']>
+    readonly onTabItemTap: UnwrapRef<typeof import('@dcloudio/uni-app')['onTabItemTap']>
+    readonly onThemeChange: UnwrapRef<typeof import('@dcloudio/uni-app')['onThemeChange']>
+    readonly onUnhandledRejection: UnwrapRef<typeof import('@dcloudio/uni-app')['onUnhandledRejection']>
+    readonly onUnload: UnwrapRef<typeof import('@dcloudio/uni-app')['onUnload']>
+    readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
+    readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
+    readonly onWatcherCleanup: UnwrapRef<typeof import('vue')['onWatcherCleanup']>
+    readonly provide: UnwrapRef<typeof import('vue')['provide']>
+    readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
+    readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
+    readonly ref: UnwrapRef<typeof import('vue')['ref']>
+    readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
+    readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
+    readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
+    readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
+    readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
+    readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
+    readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
+    readonly toValue: UnwrapRef<typeof import('vue')['toValue']>
+    readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
+    readonly unref: UnwrapRef<typeof import('vue')['unref']>
+    readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
+    readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
+    readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
+    readonly useId: UnwrapRef<typeof import('vue')['useId']>
+    readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
+    readonly useRequest: UnwrapRef<typeof import('../hooks/useRequest')['default']>
+    readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
+    readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
+    readonly useUpload: UnwrapRef<typeof import('../hooks/useUpload')['default']>
+    readonly watch: UnwrapRef<typeof import('vue')['watch']>
+    readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
+    readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
+    readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
+  }
+}

+ 0 - 42
src/uni_modules/uni-icons/changelog.md

@@ -1,42 +0,0 @@
-## 2.0.10(2024-06-07)
-- 优化 uni-app x 中,size 属性的类型
-## 2.0.9(2024-01-12)
-fix: 修复图标大小默认值错误的问题
-## 2.0.8(2023-12-14)
-- 修复 项目未使用 ts 情况下,打包报错的bug
-## 2.0.7(2023-12-14)
-- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug
-## 2.0.6(2023-12-11)
-- 优化 兼容老版本icon类型,如 top ,bottom 等
-## 2.0.5(2023-12-11)
-- 优化 兼容老版本icon类型,如 top ,bottom 等
-## 2.0.4(2023-12-06)
-- 优化 uni-app x 下示例项目图标排序
-## 2.0.3(2023-12-06)
-- 修复 nvue下引入组件报错的bug
-## 2.0.2(2023-12-05)
--优化 size 属性支持单位
-## 2.0.1(2023-12-05)
-- 新增 uni-app x 支持定义图标
-## 1.3.5(2022-01-24)
-- 优化 size 属性可以传入不带单位的字符串数值
-## 1.3.4(2022-01-24)
-- 优化 size 支持其他单位
-## 1.3.3(2022-01-17)
-- 修复 nvue 有些图标不显示的bug,兼容老版本图标
-## 1.3.2(2021-12-01)
-- 优化 示例可复制图标名称
-## 1.3.1(2021-11-23)
-- 优化 兼容旧组件 type 值
-## 1.3.0(2021-11-19)
-- 新增 更多图标
-- 优化 自定义图标使用方式
-- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
-## 1.1.7(2021-11-08)
-## 1.2.0(2021-07-30)
-- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
-## 1.1.5(2021-05-12)
-- 新增 组件示例地址
-## 1.1.4(2021-02-05)
-- 调整为uni_modules目录规范

+ 0 - 91
src/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue

@@ -1,91 +0,0 @@
-<template>
-  <text class="uni-icons" :style="styleObj">
-    <slot>{{unicode}}</slot>
-  </text>
-</template>
-
-<script>
-  import { fontData, IconsDataItem } from './uniicons_file'
-
-  /**
-   * Icons 图标
-   * @description 用于展示 icon 图标
-   * @tutorial https://ext.dcloud.net.cn/plugin?id=28
-   * @property {Number,String} size 图标大小
-   * @property {String} type 图标图案,参考示例
-   * @property {String} color 图标颜色
-   * @property {String} customPrefix 自定义图标
-   * @event {Function} click 点击 Icon 触发事件
-   */
-  export default {
-    name: "uni-icons",
-    props: {
-      type: {
-        type: String,
-        default: ''
-      },
-      color: {
-        type: String,
-        default: '#333333'
-      },
-      size: {
-        type: [Number, String],
-        default: 16
-      },
-      fontFamily: {
-        type: String,
-        default: ''
-      }
-    },
-    data() {
-      return {};
-    },
-    computed: {
-      unicode() : string {
-        let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type })
-        if (codes !== null) {
-          return codes.unicode
-        }
-        return ''
-      },
-      iconSize() : string {
-        const size = this.size
-        if (typeof size == 'string') {
-          const reg = /^[0-9]*$/g
-          return reg.test(size as string) ? '' + size + 'px' : '' + size;
-          // return '' + this.size
-        }
-        return this.getFontSize(size as number)
-      },
-      styleObj() : UTSJSONObject {
-        if (this.fontFamily !== '') {
-          return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily }
-        }
-        return { color: this.color, fontSize: this.iconSize }
-      }
-    },
-    created() { },
-    methods: {
-      /**
-       * 字体大小
-       */
-      getFontSize(size : number) : string {
-        return size + 'px';
-      },
-    },
-  }
-</script>
-
-<style scoped>
-  @font-face {
-    font-family: UniIconsFontFamily;
-    src: url('./uniicons.ttf');
-  }
-
-  .uni-icons {
-    font-family: UniIconsFontFamily;
-    font-size: 18px;
-    font-style: normal;
-    color: #333;
-  }
-</style>

+ 0 - 110
src/uni_modules/uni-icons/components/uni-icons/uni-icons.vue

@@ -1,110 +0,0 @@
-<template>
-	<!-- #ifdef APP-NVUE -->
-	<text :style="styleObj" class="uni-icons" @click="_onClick">{{unicode}}</text>
-	<!-- #endif -->
-	<!-- #ifndef APP-NVUE -->
-	<text :style="styleObj" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick">
-		<slot></slot>
-	</text>
-	<!-- #endif -->
-</template>
-
-<script>
-	import { fontData } from './uniicons_file_vue.js';
-
-	const getVal = (val) => {
-		const reg = /^[0-9]*$/g
-		return (typeof val === 'number' || reg.test(val)) ? val + 'px' : val;
-	}
-
-	// #ifdef APP-NVUE
-	var domModule = weex.requireModule('dom');
-	import iconUrl from './uniicons.ttf'
-	domModule.addRule('fontFace', {
-		'fontFamily': "uniicons",
-		'src': "url('" + iconUrl + "')"
-	});
-	// #endif
-
-	/**
-	 * Icons 图标
-	 * @description 用于展示 icons 图标
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=28
-	 * @property {Number} size 图标大小
-	 * @property {String} type 图标图案,参考示例
-	 * @property {String} color 图标颜色
-	 * @property {String} customPrefix 自定义图标
-	 * @event {Function} click 点击 Icon 触发事件
-	 */
-	export default {
-		name: 'UniIcons',
-		emits: ['click'],
-		props: {
-			type: {
-				type: String,
-				default: ''
-			},
-			color: {
-				type: String,
-				default: '#333333'
-			},
-			size: {
-				type: [Number, String],
-				default: 16
-			},
-			customPrefix: {
-				type: String,
-				default: ''
-			},
-			fontFamily: {
-				type: String,
-				default: ''
-			}
-		},
-		data() {
-			return {
-				icons: fontData
-			}
-		},
-		computed: {
-			unicode() {
-				let code = this.icons.find(v => v.font_class === this.type)
-				if (code) {
-					return code.unicode
-				}
-				return ''
-			},
-			iconSize() {
-				return getVal(this.size)
-			},
-			styleObj() {
-				if (this.fontFamily !== '') {
-					return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`
-				}
-				return `color: ${this.color}; font-size: ${this.iconSize};`
-			}
-		},
-		methods: {
-			_onClick() {
-				this.$emit('click')
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	/* #ifndef APP-NVUE */
-	@import './uniicons.css';
-
-	@font-face {
-		font-family: uniicons;
-		src: url('./uniicons.ttf');
-	}
-
-	/* #endif */
-	.uni-icons {
-		font-family: uniicons;
-		text-decoration: none;
-		text-align: center;
-	}
-</style>

+ 0 - 664
src/uni_modules/uni-icons/components/uni-icons/uniicons.css

@@ -1,664 +0,0 @@
-
-.uniui-cart-filled:before {
-  content: "\e6d0";
-}
-
-.uniui-gift-filled:before {
-  content: "\e6c4";
-}
-
-.uniui-color:before {
-  content: "\e6cf";
-}
-
-.uniui-wallet:before {
-  content: "\e6b1";
-}
-
-.uniui-settings-filled:before {
-  content: "\e6ce";
-}
-
-.uniui-auth-filled:before {
-  content: "\e6cc";
-}
-
-.uniui-shop-filled:before {
-  content: "\e6cd";
-}
-
-.uniui-staff-filled:before {
-  content: "\e6cb";
-}
-
-.uniui-vip-filled:before {
-  content: "\e6c6";
-}
-
-.uniui-plus-filled:before {
-  content: "\e6c7";
-}
-
-.uniui-folder-add-filled:before {
-  content: "\e6c8";
-}
-
-.uniui-color-filled:before {
-  content: "\e6c9";
-}
-
-.uniui-tune-filled:before {
-  content: "\e6ca";
-}
-
-.uniui-calendar-filled:before {
-  content: "\e6c0";
-}
-
-.uniui-notification-filled:before {
-  content: "\e6c1";
-}
-
-.uniui-wallet-filled:before {
-  content: "\e6c2";
-}
-
-.uniui-medal-filled:before {
-  content: "\e6c3";
-}
-
-.uniui-fire-filled:before {
-  content: "\e6c5";
-}
-
-.uniui-refreshempty:before {
-  content: "\e6bf";
-}
-
-.uniui-location-filled:before {
-  content: "\e6af";
-}
-
-.uniui-person-filled:before {
-  content: "\e69d";
-}
-
-.uniui-personadd-filled:before {
-  content: "\e698";
-}
-
-.uniui-arrowthinleft:before {
-  content: "\e6d2";
-}
-
-.uniui-arrowthinup:before {
-  content: "\e6d3";
-}
-
-.uniui-arrowthindown:before {
-  content: "\e6d4";
-}
-
-.uniui-back:before {
-  content: "\e6b9";
-}
-
-.uniui-forward:before {
-  content: "\e6ba";
-}
-
-.uniui-arrow-right:before {
-  content: "\e6bb";
-}
-
-.uniui-arrow-left:before {
-  content: "\e6bc";
-}
-
-.uniui-arrow-up:before {
-  content: "\e6bd";
-}
-
-.uniui-arrow-down:before {
-  content: "\e6be";
-}
-
-.uniui-arrowthinright:before {
-  content: "\e6d1";
-}
-
-.uniui-down:before {
-  content: "\e6b8";
-}
-
-.uniui-bottom:before {
-  content: "\e6b8";
-}
-
-.uniui-arrowright:before {
-  content: "\e6d5";
-}
-
-.uniui-right:before {
-  content: "\e6b5";
-}
-
-.uniui-up:before {
-  content: "\e6b6";
-}
-
-.uniui-top:before {
-  content: "\e6b6";
-}
-
-.uniui-left:before {
-  content: "\e6b7";
-}
-
-.uniui-arrowup:before {
-  content: "\e6d6";
-}
-
-.uniui-eye:before {
-  content: "\e651";
-}
-
-.uniui-eye-filled:before {
-  content: "\e66a";
-}
-
-.uniui-eye-slash:before {
-  content: "\e6b3";
-}
-
-.uniui-eye-slash-filled:before {
-  content: "\e6b4";
-}
-
-.uniui-info-filled:before {
-  content: "\e649";
-}
-
-.uniui-reload:before {
-  content: "\e6b2";
-}
-
-.uniui-micoff-filled:before {
-  content: "\e6b0";
-}
-
-.uniui-map-pin-ellipse:before {
-  content: "\e6ac";
-}
-
-.uniui-map-pin:before {
-  content: "\e6ad";
-}
-
-.uniui-location:before {
-  content: "\e6ae";
-}
-
-.uniui-starhalf:before {
-  content: "\e683";
-}
-
-.uniui-star:before {
-  content: "\e688";
-}
-
-.uniui-star-filled:before {
-  content: "\e68f";
-}
-
-.uniui-calendar:before {
-  content: "\e6a0";
-}
-
-.uniui-fire:before {
-  content: "\e6a1";
-}
-
-.uniui-medal:before {
-  content: "\e6a2";
-}
-
-.uniui-font:before {
-  content: "\e6a3";
-}
-
-.uniui-gift:before {
-  content: "\e6a4";
-}
-
-.uniui-link:before {
-  content: "\e6a5";
-}
-
-.uniui-notification:before {
-  content: "\e6a6";
-}
-
-.uniui-staff:before {
-  content: "\e6a7";
-}
-
-.uniui-vip:before {
-  content: "\e6a8";
-}
-
-.uniui-folder-add:before {
-  content: "\e6a9";
-}
-
-.uniui-tune:before {
-  content: "\e6aa";
-}
-
-.uniui-auth:before {
-  content: "\e6ab";
-}
-
-.uniui-person:before {
-  content: "\e699";
-}
-
-.uniui-email-filled:before {
-  content: "\e69a";
-}
-
-.uniui-phone-filled:before {
-  content: "\e69b";
-}
-
-.uniui-phone:before {
-  content: "\e69c";
-}
-
-.uniui-email:before {
-  content: "\e69e";
-}
-
-.uniui-personadd:before {
-  content: "\e69f";
-}
-
-.uniui-chatboxes-filled:before {
-  content: "\e692";
-}
-
-.uniui-contact:before {
-  content: "\e693";
-}
-
-.uniui-chatbubble-filled:before {
-  content: "\e694";
-}
-
-.uniui-contact-filled:before {
-  content: "\e695";
-}
-
-.uniui-chatboxes:before {
-  content: "\e696";
-}
-
-.uniui-chatbubble:before {
-  content: "\e697";
-}
-
-.uniui-upload-filled:before {
-  content: "\e68e";
-}
-
-.uniui-upload:before {
-  content: "\e690";
-}
-
-.uniui-weixin:before {
-  content: "\e691";
-}
-
-.uniui-compose:before {
-  content: "\e67f";
-}
-
-.uniui-qq:before {
-  content: "\e680";
-}
-
-.uniui-download-filled:before {
-  content: "\e681";
-}
-
-.uniui-pyq:before {
-  content: "\e682";
-}
-
-.uniui-sound:before {
-  content: "\e684";
-}
-
-.uniui-trash-filled:before {
-  content: "\e685";
-}
-
-.uniui-sound-filled:before {
-  content: "\e686";
-}
-
-.uniui-trash:before {
-  content: "\e687";
-}
-
-.uniui-videocam-filled:before {
-  content: "\e689";
-}
-
-.uniui-spinner-cycle:before {
-  content: "\e68a";
-}
-
-.uniui-weibo:before {
-  content: "\e68b";
-}
-
-.uniui-videocam:before {
-  content: "\e68c";
-}
-
-.uniui-download:before {
-  content: "\e68d";
-}
-
-.uniui-help:before {
-  content: "\e679";
-}
-
-.uniui-navigate-filled:before {
-  content: "\e67a";
-}
-
-.uniui-plusempty:before {
-  content: "\e67b";
-}
-
-.uniui-smallcircle:before {
-  content: "\e67c";
-}
-
-.uniui-minus-filled:before {
-  content: "\e67d";
-}
-
-.uniui-micoff:before {
-  content: "\e67e";
-}
-
-.uniui-closeempty:before {
-  content: "\e66c";
-}
-
-.uniui-clear:before {
-  content: "\e66d";
-}
-
-.uniui-navigate:before {
-  content: "\e66e";
-}
-
-.uniui-minus:before {
-  content: "\e66f";
-}
-
-.uniui-image:before {
-  content: "\e670";
-}
-
-.uniui-mic:before {
-  content: "\e671";
-}
-
-.uniui-paperplane:before {
-  content: "\e672";
-}
-
-.uniui-close:before {
-  content: "\e673";
-}
-
-.uniui-help-filled:before {
-  content: "\e674";
-}
-
-.uniui-paperplane-filled:before {
-  content: "\e675";
-}
-
-.uniui-plus:before {
-  content: "\e676";
-}
-
-.uniui-mic-filled:before {
-  content: "\e677";
-}
-
-.uniui-image-filled:before {
-  content: "\e678";
-}
-
-.uniui-locked-filled:before {
-  content: "\e668";
-}
-
-.uniui-info:before {
-  content: "\e669";
-}
-
-.uniui-locked:before {
-  content: "\e66b";
-}
-
-.uniui-camera-filled:before {
-  content: "\e658";
-}
-
-.uniui-chat-filled:before {
-  content: "\e659";
-}
-
-.uniui-camera:before {
-  content: "\e65a";
-}
-
-.uniui-circle:before {
-  content: "\e65b";
-}
-
-.uniui-checkmarkempty:before {
-  content: "\e65c";
-}
-
-.uniui-chat:before {
-  content: "\e65d";
-}
-
-.uniui-circle-filled:before {
-  content: "\e65e";
-}
-
-.uniui-flag:before {
-  content: "\e65f";
-}
-
-.uniui-flag-filled:before {
-  content: "\e660";
-}
-
-.uniui-gear-filled:before {
-  content: "\e661";
-}
-
-.uniui-home:before {
-  content: "\e662";
-}
-
-.uniui-home-filled:before {
-  content: "\e663";
-}
-
-.uniui-gear:before {
-  content: "\e664";
-}
-
-.uniui-smallcircle-filled:before {
-  content: "\e665";
-}
-
-.uniui-map-filled:before {
-  content: "\e666";
-}
-
-.uniui-map:before {
-  content: "\e667";
-}
-
-.uniui-refresh-filled:before {
-  content: "\e656";
-}
-
-.uniui-refresh:before {
-  content: "\e657";
-}
-
-.uniui-cloud-upload:before {
-  content: "\e645";
-}
-
-.uniui-cloud-download-filled:before {
-  content: "\e646";
-}
-
-.uniui-cloud-download:before {
-  content: "\e647";
-}
-
-.uniui-cloud-upload-filled:before {
-  content: "\e648";
-}
-
-.uniui-redo:before {
-  content: "\e64a";
-}
-
-.uniui-images-filled:before {
-  content: "\e64b";
-}
-
-.uniui-undo-filled:before {
-  content: "\e64c";
-}
-
-.uniui-more:before {
-  content: "\e64d";
-}
-
-.uniui-more-filled:before {
-  content: "\e64e";
-}
-
-.uniui-undo:before {
-  content: "\e64f";
-}
-
-.uniui-images:before {
-  content: "\e650";
-}
-
-.uniui-paperclip:before {
-  content: "\e652";
-}
-
-.uniui-settings:before {
-  content: "\e653";
-}
-
-.uniui-search:before {
-  content: "\e654";
-}
-
-.uniui-redo-filled:before {
-  content: "\e655";
-}
-
-.uniui-list:before {
-  content: "\e644";
-}
-
-.uniui-mail-open-filled:before {
-  content: "\e63a";
-}
-
-.uniui-hand-down-filled:before {
-  content: "\e63c";
-}
-
-.uniui-hand-down:before {
-  content: "\e63d";
-}
-
-.uniui-hand-up-filled:before {
-  content: "\e63e";
-}
-
-.uniui-hand-up:before {
-  content: "\e63f";
-}
-
-.uniui-heart-filled:before {
-  content: "\e641";
-}
-
-.uniui-mail-open:before {
-  content: "\e643";
-}
-
-.uniui-heart:before {
-  content: "\e639";
-}
-
-.uniui-loop:before {
-  content: "\e633";
-}
-
-.uniui-pulldown:before {
-  content: "\e632";
-}
-
-.uniui-scan:before {
-  content: "\e62a";
-}
-
-.uniui-bars:before {
-  content: "\e627";
-}
-
-.uniui-checkbox:before {
-  content: "\e62b";
-}
-
-.uniui-checkbox-filled:before {
-  content: "\e62c";
-}
-
-.uniui-shop:before {
-  content: "\e62f";
-}
-
-.uniui-headphones:before {
-  content: "\e630";
-}
-
-.uniui-cart:before {
-  content: "\e631";
-}

BIN
src/uni_modules/uni-icons/components/uni-icons/uniicons.ttf


+ 0 - 664
src/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts

@@ -1,664 +0,0 @@
-
-export type IconsData = {
-	id : string
-	name : string
-	font_family : string
-	css_prefix_text : string
-	description : string
-	glyphs : Array<IconsDataItem>
-}
-
-export type IconsDataItem = {
-	font_class : string
-	unicode : string
-}
-
-
-export const fontData = [
-  {
-    "font_class": "arrow-down",
-    "unicode": "\ue6be"
-  },
-  {
-    "font_class": "arrow-left",
-    "unicode": "\ue6bc"
-  },
-  {
-    "font_class": "arrow-right",
-    "unicode": "\ue6bb"
-  },
-  {
-    "font_class": "arrow-up",
-    "unicode": "\ue6bd"
-  },
-  {
-    "font_class": "auth",
-    "unicode": "\ue6ab"
-  },
-  {
-    "font_class": "auth-filled",
-    "unicode": "\ue6cc"
-  },
-  {
-    "font_class": "back",
-    "unicode": "\ue6b9"
-  },
-  {
-    "font_class": "bars",
-    "unicode": "\ue627"
-  },
-  {
-    "font_class": "calendar",
-    "unicode": "\ue6a0"
-  },
-  {
-    "font_class": "calendar-filled",
-    "unicode": "\ue6c0"
-  },
-  {
-    "font_class": "camera",
-    "unicode": "\ue65a"
-  },
-  {
-    "font_class": "camera-filled",
-    "unicode": "\ue658"
-  },
-  {
-    "font_class": "cart",
-    "unicode": "\ue631"
-  },
-  {
-    "font_class": "cart-filled",
-    "unicode": "\ue6d0"
-  },
-  {
-    "font_class": "chat",
-    "unicode": "\ue65d"
-  },
-  {
-    "font_class": "chat-filled",
-    "unicode": "\ue659"
-  },
-  {
-    "font_class": "chatboxes",
-    "unicode": "\ue696"
-  },
-  {
-    "font_class": "chatboxes-filled",
-    "unicode": "\ue692"
-  },
-  {
-    "font_class": "chatbubble",
-    "unicode": "\ue697"
-  },
-  {
-    "font_class": "chatbubble-filled",
-    "unicode": "\ue694"
-  },
-  {
-    "font_class": "checkbox",
-    "unicode": "\ue62b"
-  },
-  {
-    "font_class": "checkbox-filled",
-    "unicode": "\ue62c"
-  },
-  {
-    "font_class": "checkmarkempty",
-    "unicode": "\ue65c"
-  },
-  {
-    "font_class": "circle",
-    "unicode": "\ue65b"
-  },
-  {
-    "font_class": "circle-filled",
-    "unicode": "\ue65e"
-  },
-  {
-    "font_class": "clear",
-    "unicode": "\ue66d"
-  },
-  {
-    "font_class": "close",
-    "unicode": "\ue673"
-  },
-  {
-    "font_class": "closeempty",
-    "unicode": "\ue66c"
-  },
-  {
-    "font_class": "cloud-download",
-    "unicode": "\ue647"
-  },
-  {
-    "font_class": "cloud-download-filled",
-    "unicode": "\ue646"
-  },
-  {
-    "font_class": "cloud-upload",
-    "unicode": "\ue645"
-  },
-  {
-    "font_class": "cloud-upload-filled",
-    "unicode": "\ue648"
-  },
-  {
-    "font_class": "color",
-    "unicode": "\ue6cf"
-  },
-  {
-    "font_class": "color-filled",
-    "unicode": "\ue6c9"
-  },
-  {
-    "font_class": "compose",
-    "unicode": "\ue67f"
-  },
-  {
-    "font_class": "contact",
-    "unicode": "\ue693"
-  },
-  {
-    "font_class": "contact-filled",
-    "unicode": "\ue695"
-  },
-  {
-    "font_class": "down",
-    "unicode": "\ue6b8"
-  },
-	{
-	  "font_class": "bottom",
-	  "unicode": "\ue6b8"
-	},
-  {
-    "font_class": "download",
-    "unicode": "\ue68d"
-  },
-  {
-    "font_class": "download-filled",
-    "unicode": "\ue681"
-  },
-  {
-    "font_class": "email",
-    "unicode": "\ue69e"
-  },
-  {
-    "font_class": "email-filled",
-    "unicode": "\ue69a"
-  },
-  {
-    "font_class": "eye",
-    "unicode": "\ue651"
-  },
-  {
-    "font_class": "eye-filled",
-    "unicode": "\ue66a"
-  },
-  {
-    "font_class": "eye-slash",
-    "unicode": "\ue6b3"
-  },
-  {
-    "font_class": "eye-slash-filled",
-    "unicode": "\ue6b4"
-  },
-  {
-    "font_class": "fire",
-    "unicode": "\ue6a1"
-  },
-  {
-    "font_class": "fire-filled",
-    "unicode": "\ue6c5"
-  },
-  {
-    "font_class": "flag",
-    "unicode": "\ue65f"
-  },
-  {
-    "font_class": "flag-filled",
-    "unicode": "\ue660"
-  },
-  {
-    "font_class": "folder-add",
-    "unicode": "\ue6a9"
-  },
-  {
-    "font_class": "folder-add-filled",
-    "unicode": "\ue6c8"
-  },
-  {
-    "font_class": "font",
-    "unicode": "\ue6a3"
-  },
-  {
-    "font_class": "forward",
-    "unicode": "\ue6ba"
-  },
-  {
-    "font_class": "gear",
-    "unicode": "\ue664"
-  },
-  {
-    "font_class": "gear-filled",
-    "unicode": "\ue661"
-  },
-  {
-    "font_class": "gift",
-    "unicode": "\ue6a4"
-  },
-  {
-    "font_class": "gift-filled",
-    "unicode": "\ue6c4"
-  },
-  {
-    "font_class": "hand-down",
-    "unicode": "\ue63d"
-  },
-  {
-    "font_class": "hand-down-filled",
-    "unicode": "\ue63c"
-  },
-  {
-    "font_class": "hand-up",
-    "unicode": "\ue63f"
-  },
-  {
-    "font_class": "hand-up-filled",
-    "unicode": "\ue63e"
-  },
-  {
-    "font_class": "headphones",
-    "unicode": "\ue630"
-  },
-  {
-    "font_class": "heart",
-    "unicode": "\ue639"
-  },
-  {
-    "font_class": "heart-filled",
-    "unicode": "\ue641"
-  },
-  {
-    "font_class": "help",
-    "unicode": "\ue679"
-  },
-  {
-    "font_class": "help-filled",
-    "unicode": "\ue674"
-  },
-  {
-    "font_class": "home",
-    "unicode": "\ue662"
-  },
-  {
-    "font_class": "home-filled",
-    "unicode": "\ue663"
-  },
-  {
-    "font_class": "image",
-    "unicode": "\ue670"
-  },
-  {
-    "font_class": "image-filled",
-    "unicode": "\ue678"
-  },
-  {
-    "font_class": "images",
-    "unicode": "\ue650"
-  },
-  {
-    "font_class": "images-filled",
-    "unicode": "\ue64b"
-  },
-  {
-    "font_class": "info",
-    "unicode": "\ue669"
-  },
-  {
-    "font_class": "info-filled",
-    "unicode": "\ue649"
-  },
-  {
-    "font_class": "left",
-    "unicode": "\ue6b7"
-  },
-  {
-    "font_class": "link",
-    "unicode": "\ue6a5"
-  },
-  {
-    "font_class": "list",
-    "unicode": "\ue644"
-  },
-  {
-    "font_class": "location",
-    "unicode": "\ue6ae"
-  },
-  {
-    "font_class": "location-filled",
-    "unicode": "\ue6af"
-  },
-  {
-    "font_class": "locked",
-    "unicode": "\ue66b"
-  },
-  {
-    "font_class": "locked-filled",
-    "unicode": "\ue668"
-  },
-  {
-    "font_class": "loop",
-    "unicode": "\ue633"
-  },
-  {
-    "font_class": "mail-open",
-    "unicode": "\ue643"
-  },
-  {
-    "font_class": "mail-open-filled",
-    "unicode": "\ue63a"
-  },
-  {
-    "font_class": "map",
-    "unicode": "\ue667"
-  },
-  {
-    "font_class": "map-filled",
-    "unicode": "\ue666"
-  },
-  {
-    "font_class": "map-pin",
-    "unicode": "\ue6ad"
-  },
-  {
-    "font_class": "map-pin-ellipse",
-    "unicode": "\ue6ac"
-  },
-  {
-    "font_class": "medal",
-    "unicode": "\ue6a2"
-  },
-  {
-    "font_class": "medal-filled",
-    "unicode": "\ue6c3"
-  },
-  {
-    "font_class": "mic",
-    "unicode": "\ue671"
-  },
-  {
-    "font_class": "mic-filled",
-    "unicode": "\ue677"
-  },
-  {
-    "font_class": "micoff",
-    "unicode": "\ue67e"
-  },
-  {
-    "font_class": "micoff-filled",
-    "unicode": "\ue6b0"
-  },
-  {
-    "font_class": "minus",
-    "unicode": "\ue66f"
-  },
-  {
-    "font_class": "minus-filled",
-    "unicode": "\ue67d"
-  },
-  {
-    "font_class": "more",
-    "unicode": "\ue64d"
-  },
-  {
-    "font_class": "more-filled",
-    "unicode": "\ue64e"
-  },
-  {
-    "font_class": "navigate",
-    "unicode": "\ue66e"
-  },
-  {
-    "font_class": "navigate-filled",
-    "unicode": "\ue67a"
-  },
-  {
-    "font_class": "notification",
-    "unicode": "\ue6a6"
-  },
-  {
-    "font_class": "notification-filled",
-    "unicode": "\ue6c1"
-  },
-  {
-    "font_class": "paperclip",
-    "unicode": "\ue652"
-  },
-  {
-    "font_class": "paperplane",
-    "unicode": "\ue672"
-  },
-  {
-    "font_class": "paperplane-filled",
-    "unicode": "\ue675"
-  },
-  {
-    "font_class": "person",
-    "unicode": "\ue699"
-  },
-  {
-    "font_class": "person-filled",
-    "unicode": "\ue69d"
-  },
-  {
-    "font_class": "personadd",
-    "unicode": "\ue69f"
-  },
-  {
-    "font_class": "personadd-filled",
-    "unicode": "\ue698"
-  },
-  {
-    "font_class": "personadd-filled-copy",
-    "unicode": "\ue6d1"
-  },
-  {
-    "font_class": "phone",
-    "unicode": "\ue69c"
-  },
-  {
-    "font_class": "phone-filled",
-    "unicode": "\ue69b"
-  },
-  {
-    "font_class": "plus",
-    "unicode": "\ue676"
-  },
-  {
-    "font_class": "plus-filled",
-    "unicode": "\ue6c7"
-  },
-  {
-    "font_class": "plusempty",
-    "unicode": "\ue67b"
-  },
-  {
-    "font_class": "pulldown",
-    "unicode": "\ue632"
-  },
-  {
-    "font_class": "pyq",
-    "unicode": "\ue682"
-  },
-  {
-    "font_class": "qq",
-    "unicode": "\ue680"
-  },
-  {
-    "font_class": "redo",
-    "unicode": "\ue64a"
-  },
-  {
-    "font_class": "redo-filled",
-    "unicode": "\ue655"
-  },
-  {
-    "font_class": "refresh",
-    "unicode": "\ue657"
-  },
-  {
-    "font_class": "refresh-filled",
-    "unicode": "\ue656"
-  },
-  {
-    "font_class": "refreshempty",
-    "unicode": "\ue6bf"
-  },
-  {
-    "font_class": "reload",
-    "unicode": "\ue6b2"
-  },
-  {
-    "font_class": "right",
-    "unicode": "\ue6b5"
-  },
-  {
-    "font_class": "scan",
-    "unicode": "\ue62a"
-  },
-  {
-    "font_class": "search",
-    "unicode": "\ue654"
-  },
-  {
-    "font_class": "settings",
-    "unicode": "\ue653"
-  },
-  {
-    "font_class": "settings-filled",
-    "unicode": "\ue6ce"
-  },
-  {
-    "font_class": "shop",
-    "unicode": "\ue62f"
-  },
-  {
-    "font_class": "shop-filled",
-    "unicode": "\ue6cd"
-  },
-  {
-    "font_class": "smallcircle",
-    "unicode": "\ue67c"
-  },
-  {
-    "font_class": "smallcircle-filled",
-    "unicode": "\ue665"
-  },
-  {
-    "font_class": "sound",
-    "unicode": "\ue684"
-  },
-  {
-    "font_class": "sound-filled",
-    "unicode": "\ue686"
-  },
-  {
-    "font_class": "spinner-cycle",
-    "unicode": "\ue68a"
-  },
-  {
-    "font_class": "staff",
-    "unicode": "\ue6a7"
-  },
-  {
-    "font_class": "staff-filled",
-    "unicode": "\ue6cb"
-  },
-  {
-    "font_class": "star",
-    "unicode": "\ue688"
-  },
-  {
-    "font_class": "star-filled",
-    "unicode": "\ue68f"
-  },
-  {
-    "font_class": "starhalf",
-    "unicode": "\ue683"
-  },
-  {
-    "font_class": "trash",
-    "unicode": "\ue687"
-  },
-  {
-    "font_class": "trash-filled",
-    "unicode": "\ue685"
-  },
-  {
-    "font_class": "tune",
-    "unicode": "\ue6aa"
-  },
-  {
-    "font_class": "tune-filled",
-    "unicode": "\ue6ca"
-  },
-  {
-    "font_class": "undo",
-    "unicode": "\ue64f"
-  },
-  {
-    "font_class": "undo-filled",
-    "unicode": "\ue64c"
-  },
-  {
-    "font_class": "up",
-    "unicode": "\ue6b6"
-  },
-	{
-	  "font_class": "top",
-	  "unicode": "\ue6b6"
-	},
-  {
-    "font_class": "upload",
-    "unicode": "\ue690"
-  },
-  {
-    "font_class": "upload-filled",
-    "unicode": "\ue68e"
-  },
-  {
-    "font_class": "videocam",
-    "unicode": "\ue68c"
-  },
-  {
-    "font_class": "videocam-filled",
-    "unicode": "\ue689"
-  },
-  {
-    "font_class": "vip",
-    "unicode": "\ue6a8"
-  },
-  {
-    "font_class": "vip-filled",
-    "unicode": "\ue6c6"
-  },
-  {
-    "font_class": "wallet",
-    "unicode": "\ue6b1"
-  },
-  {
-    "font_class": "wallet-filled",
-    "unicode": "\ue6c2"
-  },
-  {
-    "font_class": "weibo",
-    "unicode": "\ue68b"
-  },
-  {
-    "font_class": "weixin",
-    "unicode": "\ue691"
-  }
-] as IconsDataItem[]
-
-// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)

+ 0 - 649
src/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js

@@ -1,649 +0,0 @@
-
-export const fontData = [
-  {
-    "font_class": "arrow-down",
-    "unicode": "\ue6be"
-  },
-  {
-    "font_class": "arrow-left",
-    "unicode": "\ue6bc"
-  },
-  {
-    "font_class": "arrow-right",
-    "unicode": "\ue6bb"
-  },
-  {
-    "font_class": "arrow-up",
-    "unicode": "\ue6bd"
-  },
-  {
-    "font_class": "auth",
-    "unicode": "\ue6ab"
-  },
-  {
-    "font_class": "auth-filled",
-    "unicode": "\ue6cc"
-  },
-  {
-    "font_class": "back",
-    "unicode": "\ue6b9"
-  },
-  {
-    "font_class": "bars",
-    "unicode": "\ue627"
-  },
-  {
-    "font_class": "calendar",
-    "unicode": "\ue6a0"
-  },
-  {
-    "font_class": "calendar-filled",
-    "unicode": "\ue6c0"
-  },
-  {
-    "font_class": "camera",
-    "unicode": "\ue65a"
-  },
-  {
-    "font_class": "camera-filled",
-    "unicode": "\ue658"
-  },
-  {
-    "font_class": "cart",
-    "unicode": "\ue631"
-  },
-  {
-    "font_class": "cart-filled",
-    "unicode": "\ue6d0"
-  },
-  {
-    "font_class": "chat",
-    "unicode": "\ue65d"
-  },
-  {
-    "font_class": "chat-filled",
-    "unicode": "\ue659"
-  },
-  {
-    "font_class": "chatboxes",
-    "unicode": "\ue696"
-  },
-  {
-    "font_class": "chatboxes-filled",
-    "unicode": "\ue692"
-  },
-  {
-    "font_class": "chatbubble",
-    "unicode": "\ue697"
-  },
-  {
-    "font_class": "chatbubble-filled",
-    "unicode": "\ue694"
-  },
-  {
-    "font_class": "checkbox",
-    "unicode": "\ue62b"
-  },
-  {
-    "font_class": "checkbox-filled",
-    "unicode": "\ue62c"
-  },
-  {
-    "font_class": "checkmarkempty",
-    "unicode": "\ue65c"
-  },
-  {
-    "font_class": "circle",
-    "unicode": "\ue65b"
-  },
-  {
-    "font_class": "circle-filled",
-    "unicode": "\ue65e"
-  },
-  {
-    "font_class": "clear",
-    "unicode": "\ue66d"
-  },
-  {
-    "font_class": "close",
-    "unicode": "\ue673"
-  },
-  {
-    "font_class": "closeempty",
-    "unicode": "\ue66c"
-  },
-  {
-    "font_class": "cloud-download",
-    "unicode": "\ue647"
-  },
-  {
-    "font_class": "cloud-download-filled",
-    "unicode": "\ue646"
-  },
-  {
-    "font_class": "cloud-upload",
-    "unicode": "\ue645"
-  },
-  {
-    "font_class": "cloud-upload-filled",
-    "unicode": "\ue648"
-  },
-  {
-    "font_class": "color",
-    "unicode": "\ue6cf"
-  },
-  {
-    "font_class": "color-filled",
-    "unicode": "\ue6c9"
-  },
-  {
-    "font_class": "compose",
-    "unicode": "\ue67f"
-  },
-  {
-    "font_class": "contact",
-    "unicode": "\ue693"
-  },
-  {
-    "font_class": "contact-filled",
-    "unicode": "\ue695"
-  },
-  {
-    "font_class": "down",
-    "unicode": "\ue6b8"
-  },
-	{
-	  "font_class": "bottom",
-	  "unicode": "\ue6b8"
-	},
-  {
-    "font_class": "download",
-    "unicode": "\ue68d"
-  },
-  {
-    "font_class": "download-filled",
-    "unicode": "\ue681"
-  },
-  {
-    "font_class": "email",
-    "unicode": "\ue69e"
-  },
-  {
-    "font_class": "email-filled",
-    "unicode": "\ue69a"
-  },
-  {
-    "font_class": "eye",
-    "unicode": "\ue651"
-  },
-  {
-    "font_class": "eye-filled",
-    "unicode": "\ue66a"
-  },
-  {
-    "font_class": "eye-slash",
-    "unicode": "\ue6b3"
-  },
-  {
-    "font_class": "eye-slash-filled",
-    "unicode": "\ue6b4"
-  },
-  {
-    "font_class": "fire",
-    "unicode": "\ue6a1"
-  },
-  {
-    "font_class": "fire-filled",
-    "unicode": "\ue6c5"
-  },
-  {
-    "font_class": "flag",
-    "unicode": "\ue65f"
-  },
-  {
-    "font_class": "flag-filled",
-    "unicode": "\ue660"
-  },
-  {
-    "font_class": "folder-add",
-    "unicode": "\ue6a9"
-  },
-  {
-    "font_class": "folder-add-filled",
-    "unicode": "\ue6c8"
-  },
-  {
-    "font_class": "font",
-    "unicode": "\ue6a3"
-  },
-  {
-    "font_class": "forward",
-    "unicode": "\ue6ba"
-  },
-  {
-    "font_class": "gear",
-    "unicode": "\ue664"
-  },
-  {
-    "font_class": "gear-filled",
-    "unicode": "\ue661"
-  },
-  {
-    "font_class": "gift",
-    "unicode": "\ue6a4"
-  },
-  {
-    "font_class": "gift-filled",
-    "unicode": "\ue6c4"
-  },
-  {
-    "font_class": "hand-down",
-    "unicode": "\ue63d"
-  },
-  {
-    "font_class": "hand-down-filled",
-    "unicode": "\ue63c"
-  },
-  {
-    "font_class": "hand-up",
-    "unicode": "\ue63f"
-  },
-  {
-    "font_class": "hand-up-filled",
-    "unicode": "\ue63e"
-  },
-  {
-    "font_class": "headphones",
-    "unicode": "\ue630"
-  },
-  {
-    "font_class": "heart",
-    "unicode": "\ue639"
-  },
-  {
-    "font_class": "heart-filled",
-    "unicode": "\ue641"
-  },
-  {
-    "font_class": "help",
-    "unicode": "\ue679"
-  },
-  {
-    "font_class": "help-filled",
-    "unicode": "\ue674"
-  },
-  {
-    "font_class": "home",
-    "unicode": "\ue662"
-  },
-  {
-    "font_class": "home-filled",
-    "unicode": "\ue663"
-  },
-  {
-    "font_class": "image",
-    "unicode": "\ue670"
-  },
-  {
-    "font_class": "image-filled",
-    "unicode": "\ue678"
-  },
-  {
-    "font_class": "images",
-    "unicode": "\ue650"
-  },
-  {
-    "font_class": "images-filled",
-    "unicode": "\ue64b"
-  },
-  {
-    "font_class": "info",
-    "unicode": "\ue669"
-  },
-  {
-    "font_class": "info-filled",
-    "unicode": "\ue649"
-  },
-  {
-    "font_class": "left",
-    "unicode": "\ue6b7"
-  },
-  {
-    "font_class": "link",
-    "unicode": "\ue6a5"
-  },
-  {
-    "font_class": "list",
-    "unicode": "\ue644"
-  },
-  {
-    "font_class": "location",
-    "unicode": "\ue6ae"
-  },
-  {
-    "font_class": "location-filled",
-    "unicode": "\ue6af"
-  },
-  {
-    "font_class": "locked",
-    "unicode": "\ue66b"
-  },
-  {
-    "font_class": "locked-filled",
-    "unicode": "\ue668"
-  },
-  {
-    "font_class": "loop",
-    "unicode": "\ue633"
-  },
-  {
-    "font_class": "mail-open",
-    "unicode": "\ue643"
-  },
-  {
-    "font_class": "mail-open-filled",
-    "unicode": "\ue63a"
-  },
-  {
-    "font_class": "map",
-    "unicode": "\ue667"
-  },
-  {
-    "font_class": "map-filled",
-    "unicode": "\ue666"
-  },
-  {
-    "font_class": "map-pin",
-    "unicode": "\ue6ad"
-  },
-  {
-    "font_class": "map-pin-ellipse",
-    "unicode": "\ue6ac"
-  },
-  {
-    "font_class": "medal",
-    "unicode": "\ue6a2"
-  },
-  {
-    "font_class": "medal-filled",
-    "unicode": "\ue6c3"
-  },
-  {
-    "font_class": "mic",
-    "unicode": "\ue671"
-  },
-  {
-    "font_class": "mic-filled",
-    "unicode": "\ue677"
-  },
-  {
-    "font_class": "micoff",
-    "unicode": "\ue67e"
-  },
-  {
-    "font_class": "micoff-filled",
-    "unicode": "\ue6b0"
-  },
-  {
-    "font_class": "minus",
-    "unicode": "\ue66f"
-  },
-  {
-    "font_class": "minus-filled",
-    "unicode": "\ue67d"
-  },
-  {
-    "font_class": "more",
-    "unicode": "\ue64d"
-  },
-  {
-    "font_class": "more-filled",
-    "unicode": "\ue64e"
-  },
-  {
-    "font_class": "navigate",
-    "unicode": "\ue66e"
-  },
-  {
-    "font_class": "navigate-filled",
-    "unicode": "\ue67a"
-  },
-  {
-    "font_class": "notification",
-    "unicode": "\ue6a6"
-  },
-  {
-    "font_class": "notification-filled",
-    "unicode": "\ue6c1"
-  },
-  {
-    "font_class": "paperclip",
-    "unicode": "\ue652"
-  },
-  {
-    "font_class": "paperplane",
-    "unicode": "\ue672"
-  },
-  {
-    "font_class": "paperplane-filled",
-    "unicode": "\ue675"
-  },
-  {
-    "font_class": "person",
-    "unicode": "\ue699"
-  },
-  {
-    "font_class": "person-filled",
-    "unicode": "\ue69d"
-  },
-  {
-    "font_class": "personadd",
-    "unicode": "\ue69f"
-  },
-  {
-    "font_class": "personadd-filled",
-    "unicode": "\ue698"
-  },
-  {
-    "font_class": "personadd-filled-copy",
-    "unicode": "\ue6d1"
-  },
-  {
-    "font_class": "phone",
-    "unicode": "\ue69c"
-  },
-  {
-    "font_class": "phone-filled",
-    "unicode": "\ue69b"
-  },
-  {
-    "font_class": "plus",
-    "unicode": "\ue676"
-  },
-  {
-    "font_class": "plus-filled",
-    "unicode": "\ue6c7"
-  },
-  {
-    "font_class": "plusempty",
-    "unicode": "\ue67b"
-  },
-  {
-    "font_class": "pulldown",
-    "unicode": "\ue632"
-  },
-  {
-    "font_class": "pyq",
-    "unicode": "\ue682"
-  },
-  {
-    "font_class": "qq",
-    "unicode": "\ue680"
-  },
-  {
-    "font_class": "redo",
-    "unicode": "\ue64a"
-  },
-  {
-    "font_class": "redo-filled",
-    "unicode": "\ue655"
-  },
-  {
-    "font_class": "refresh",
-    "unicode": "\ue657"
-  },
-  {
-    "font_class": "refresh-filled",
-    "unicode": "\ue656"
-  },
-  {
-    "font_class": "refreshempty",
-    "unicode": "\ue6bf"
-  },
-  {
-    "font_class": "reload",
-    "unicode": "\ue6b2"
-  },
-  {
-    "font_class": "right",
-    "unicode": "\ue6b5"
-  },
-  {
-    "font_class": "scan",
-    "unicode": "\ue62a"
-  },
-  {
-    "font_class": "search",
-    "unicode": "\ue654"
-  },
-  {
-    "font_class": "settings",
-    "unicode": "\ue653"
-  },
-  {
-    "font_class": "settings-filled",
-    "unicode": "\ue6ce"
-  },
-  {
-    "font_class": "shop",
-    "unicode": "\ue62f"
-  },
-  {
-    "font_class": "shop-filled",
-    "unicode": "\ue6cd"
-  },
-  {
-    "font_class": "smallcircle",
-    "unicode": "\ue67c"
-  },
-  {
-    "font_class": "smallcircle-filled",
-    "unicode": "\ue665"
-  },
-  {
-    "font_class": "sound",
-    "unicode": "\ue684"
-  },
-  {
-    "font_class": "sound-filled",
-    "unicode": "\ue686"
-  },
-  {
-    "font_class": "spinner-cycle",
-    "unicode": "\ue68a"
-  },
-  {
-    "font_class": "staff",
-    "unicode": "\ue6a7"
-  },
-  {
-    "font_class": "staff-filled",
-    "unicode": "\ue6cb"
-  },
-  {
-    "font_class": "star",
-    "unicode": "\ue688"
-  },
-  {
-    "font_class": "star-filled",
-    "unicode": "\ue68f"
-  },
-  {
-    "font_class": "starhalf",
-    "unicode": "\ue683"
-  },
-  {
-    "font_class": "trash",
-    "unicode": "\ue687"
-  },
-  {
-    "font_class": "trash-filled",
-    "unicode": "\ue685"
-  },
-  {
-    "font_class": "tune",
-    "unicode": "\ue6aa"
-  },
-  {
-    "font_class": "tune-filled",
-    "unicode": "\ue6ca"
-  },
-  {
-    "font_class": "undo",
-    "unicode": "\ue64f"
-  },
-  {
-    "font_class": "undo-filled",
-    "unicode": "\ue64c"
-  },
-  {
-    "font_class": "up",
-    "unicode": "\ue6b6"
-  },
-	{
-	  "font_class": "top",
-	  "unicode": "\ue6b6"
-	},
-  {
-    "font_class": "upload",
-    "unicode": "\ue690"
-  },
-  {
-    "font_class": "upload-filled",
-    "unicode": "\ue68e"
-  },
-  {
-    "font_class": "videocam",
-    "unicode": "\ue68c"
-  },
-  {
-    "font_class": "videocam-filled",
-    "unicode": "\ue689"
-  },
-  {
-    "font_class": "vip",
-    "unicode": "\ue6a8"
-  },
-  {
-    "font_class": "vip-filled",
-    "unicode": "\ue6c6"
-  },
-  {
-    "font_class": "wallet",
-    "unicode": "\ue6b1"
-  },
-  {
-    "font_class": "wallet-filled",
-    "unicode": "\ue6c2"
-  },
-  {
-    "font_class": "weibo",
-    "unicode": "\ue68b"
-  },
-  {
-    "font_class": "weixin",
-    "unicode": "\ue691"
-  }
-]
-
-// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)

+ 0 - 89
src/uni_modules/uni-icons/package.json

@@ -1,89 +0,0 @@
-{
-  "id": "uni-icons",
-  "displayName": "uni-icons 图标",
-  "version": "2.0.10",
-  "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
-  "keywords": [
-    "uni-ui",
-    "uniui",
-    "icon",
-    "图标"
-],
-  "repository": "https://github.com/dcloudio/uni-ui",
-  "engines": {
-    "HBuilderX": "^3.2.14"
-  },
-  "directories": {
-    "example": "../../temps/example_temps"
-  },
-"dcloudext": {
-    "sale": {
-      "regular": {
-        "price": "0.00"
-      },
-      "sourcecode": {
-        "price": "0.00"
-      }
-    },
-    "contact": {
-      "qq": ""
-    },
-    "declaration": {
-      "ads": "无",
-      "data": "无",
-      "permissions": "无"
-    },
-    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
-    "type": "component-vue"
-  },
-  "uni_modules": {
-    "dependencies": ["uni-scss"],
-    "encrypt": [],
-    "platforms": {
-      "cloud": {
-        "tcb": "y",
-        "aliyun": "y",
-        "alipay": "n"
-      },
-      "client": {
-        "App": {
-          "app-vue": "y",
-          "app-nvue": "y",
-          "app-uvue": "y"
-        },
-        "H5-mobile": {
-          "Safari": "y",
-          "Android Browser": "y",
-          "微信浏览器(Android)": "y",
-          "QQ浏览器(Android)": "y"
-        },
-        "H5-pc": {
-          "Chrome": "y",
-          "IE": "y",
-          "Edge": "y",
-          "Firefox": "y",
-          "Safari": "y"
-        },
-        "小程序": {
-          "微信": "y",
-          "阿里": "y",
-          "百度": "y",
-          "字节跳动": "y",
-          "QQ": "y",
-					"钉钉": "y",
-					"快手": "y",
-					"飞书": "y",
-					"京东": "y"
-        },
-        "快应用": {
-          "华为": "y",
-          "联盟": "y"
-        },
-        "Vue": {
-            "vue2": "y",
-            "vue3": "y"
-        }
-      }
-    }
-  }
-}

+ 0 - 8
src/uni_modules/uni-icons/readme.md

@@ -1,8 +0,0 @@
-## Icons 图标
-> **组件名:uni-icons**
-> 代码块: `uIcons`
-
-用于展示 icons 图标 。
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 0 - 8
src/uni_modules/uni-scss/changelog.md

@@ -1,8 +0,0 @@
-## 1.0.3(2022-01-21)
-- 优化 组件示例
-## 1.0.2(2021-11-22)
-- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
-## 1.0.1(2021-11-22)
-- 修复 vue3中scss语法兼容问题
-## 1.0.0(2021-11-18)
-- init

+ 0 - 1
src/uni_modules/uni-scss/index.scss

@@ -1 +0,0 @@
-@import './styles/index.scss';

+ 0 - 82
src/uni_modules/uni-scss/package.json

@@ -1,82 +0,0 @@
-{
-  "id": "uni-scss",
-  "displayName": "uni-scss 辅助样式",
-  "version": "1.0.3",
-  "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
-  "keywords": [
-    "uni-scss",
-    "uni-ui",
-    "辅助样式"
-],
-  "repository": "https://github.com/dcloudio/uni-ui",
-  "engines": {
-    "HBuilderX": "^3.1.0"
-  },
-  "dcloudext": {
-    "category": [
-        "JS SDK",
-        "通用 SDK"
-    ],
-    "sale": {
-      "regular": {
-        "price": "0.00"
-      },
-      "sourcecode": {
-        "price": "0.00"
-      }
-    },
-    "contact": {
-      "qq": ""
-    },
-    "declaration": {
-      "ads": "无",
-      "data": "无",
-      "permissions": "无"
-    },
-    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
-  },
-  "uni_modules": {
-    "dependencies": [],
-    "encrypt": [],
-    "platforms": {
-      "cloud": {
-        "tcb": "y",
-        "aliyun": "y"
-      },
-      "client": {
-        "App": {
-          "app-vue": "y",
-          "app-nvue": "u"
-        },
-        "H5-mobile": {
-          "Safari": "y",
-          "Android Browser": "y",
-          "微信浏览器(Android)": "y",
-          "QQ浏览器(Android)": "y"
-        },
-        "H5-pc": {
-          "Chrome": "y",
-          "IE": "y",
-          "Edge": "y",
-          "Firefox": "y",
-          "Safari": "y"
-        },
-        "小程序": {
-          "微信": "y",
-          "阿里": "y",
-          "百度": "y",
-          "字节跳动": "y",
-          "QQ": "y"
-        },
-        "快应用": {
-          "华为": "n",
-          "联盟": "n"
-        },
-        "Vue": {
-            "vue2": "y",
-            "vue3": "y"
-        }
-      }
-    }
-  }
-}

+ 0 - 4
src/uni_modules/uni-scss/readme.md

@@ -1,4 +0,0 @@
-`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 0 - 7
src/uni_modules/uni-scss/styles/index.scss

@@ -1,7 +0,0 @@
-@import './setting/_variables.scss';
-@import './setting/_border.scss';
-@import './setting/_color.scss';
-@import './setting/_space.scss';
-@import './setting/_radius.scss';
-@import './setting/_text.scss';
-@import './setting/_styles.scss';

+ 0 - 3
src/uni_modules/uni-scss/styles/setting/_border.scss

@@ -1,3 +0,0 @@
-.uni-border {
-	border: 1px $uni-border-1 solid;
-}

+ 0 - 66
src/uni_modules/uni-scss/styles/setting/_color.scss

@@ -1,66 +0,0 @@
-
-// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
-// @mixin get-styles($k,$c) {
-// 	@if $k == size or $k == weight{
-// 		font-#{$k}:#{$c}
-// 	}@else{
-// 		#{$k}:#{$c}
-// 	}
-// }
-$uni-ui-color:(
-	// 主色
-	primary: $uni-primary,
-	primary-disable: $uni-primary-disable,
-	primary-light: $uni-primary-light,
-	// 辅助色
-	success: $uni-success,
-	success-disable: $uni-success-disable,
-	success-light: $uni-success-light,
-	warning: $uni-warning,
-	warning-disable: $uni-warning-disable,
-	warning-light: $uni-warning-light,
-	error: $uni-error,
-	error-disable: $uni-error-disable,
-	error-light: $uni-error-light,
-	info: $uni-info,
-	info-disable: $uni-info-disable,
-	info-light: $uni-info-light,
-	// 中性色
-	main-color: $uni-main-color,
-	base-color: $uni-base-color,
-	secondary-color: $uni-secondary-color,
-	extra-color: $uni-extra-color,
-	// 背景色
-	bg-color: $uni-bg-color,
-	// 边框颜色
-	border-1: $uni-border-1,
-	border-2: $uni-border-2,
-	border-3: $uni-border-3,
-	border-4: $uni-border-4,
-	// 黑色
-	black:$uni-black,
-	// 白色
-	white:$uni-white,
-	// 透明
-	transparent:$uni-transparent
-) !default;
-@each $key, $child in $uni-ui-color {
-	.uni-#{"" + $key} {
-		color: $child;
-	}
-	.uni-#{"" + $key}-bg {
-		background-color: $child;
-	}
-}
-.uni-shadow-sm {
-	box-shadow: $uni-shadow-sm;
-}
-.uni-shadow-base {
-	box-shadow: $uni-shadow-base;
-}
-.uni-shadow-lg {
-	box-shadow: $uni-shadow-lg;
-}
-.uni-mask {
-	background-color:$uni-mask;
-}

+ 0 - 55
src/uni_modules/uni-scss/styles/setting/_radius.scss

@@ -1,55 +0,0 @@
-@mixin radius($r,$d:null ,$important: false){
-  $radius-value:map-get($uni-radius, $r) if($important, !important, null);
-  // Key exists within the $uni-radius variable
-  @if (map-has-key($uni-radius, $r) and  $d){
-		@if $d == t {
-				border-top-left-radius:$radius-value;
-				border-top-right-radius:$radius-value;
-		}@else if $d == r {
-				border-top-right-radius:$radius-value;
-				border-bottom-right-radius:$radius-value;
-		}@else if $d == b {
-				border-bottom-left-radius:$radius-value;
-				border-bottom-right-radius:$radius-value;
-		}@else if $d == l {
-				border-top-left-radius:$radius-value;
-				border-bottom-left-radius:$radius-value;
-		}@else if $d == tl {
-				border-top-left-radius:$radius-value;
-		}@else if $d == tr {
-				border-top-right-radius:$radius-value;
-		}@else if $d == br {
-				border-bottom-right-radius:$radius-value;
-		}@else if $d == bl {
-				border-bottom-left-radius:$radius-value;
-		}
-  }@else{
-		border-radius:$radius-value;
-  }
-}
-
-@each $key, $child in $uni-radius {
-	@if($key){
-		.uni-radius-#{"" + $key} {
-				@include radius($key)
-		}
-	}@else{
-		.uni-radius {
-				@include radius($key)
-		}
-	}
-}
-
-@each $direction in t, r, b, l,tl, tr, br, bl {
-	@each $key, $child in $uni-radius {
-		@if($key){
-			.uni-radius-#{"" + $direction}-#{"" + $key} {
-				@include radius($key,$direction,false)
-			}
-		}@else{
-			.uni-radius-#{$direction} {
-				@include radius($key,$direction,false)
-			}
-		}
-	}
-}

+ 0 - 56
src/uni_modules/uni-scss/styles/setting/_space.scss

@@ -1,56 +0,0 @@
-
-@mixin fn($space,$direction,$size,$n) {
-	@if $n {
-		#{$space}-#{$direction}: #{$size*$uni-space-root}px
-	} @else {
-		 #{$space}-#{$direction}: #{-$size*$uni-space-root}px
-	}
-}
-@mixin get-styles($direction,$i,$space,$n){
-	@if $direction == t {
-		@include fn($space, top,$i,$n);
-	} 
-	@if $direction == r {
-		@include fn($space, right,$i,$n);
-	} 
-	@if $direction == b {
-		@include fn($space, bottom,$i,$n);
-	} 
-	@if $direction == l {
-	 @include fn($space, left,$i,$n);
-	} 
-	@if $direction == x {
-		@include fn($space, left,$i,$n);
-		@include fn($space, right,$i,$n);
-	} 
-	@if $direction == y {
-		@include fn($space, top,$i,$n);
-		@include fn($space, bottom,$i,$n);
-	} 
-	@if $direction == a {
-		@if $n {
-			#{$space}:#{$i*$uni-space-root}px;
-		} @else {
-			#{$space}:#{-$i*$uni-space-root}px;
-		}
-	} 
-}
-
-@each $orientation in m,p {
-	$space: margin;
-	@if $orientation == m {
-		$space: margin;
-	} @else {
-		$space: padding;
-	}
-	@for $i from 0 through 16 {
-		@each $direction in t, r, b, l, x, y, a {
-			.uni-#{$orientation}#{$direction}-#{$i} { 
-				@include  get-styles($direction,$i,$space,true);
-			} 
-			.uni-#{$orientation}#{$direction}-n#{$i} { 
-				@include  get-styles($direction,$i,$space,false);
-			}
-		}
-	}
-}

+ 0 - 167
src/uni_modules/uni-scss/styles/setting/_styles.scss

@@ -1,167 +0,0 @@
-/* #ifndef APP-NVUE */
-
-$-color-white:#fff;
-$-color-black:#000;
-@mixin base-style($color) {
-	color: #fff;
-	background-color: $color;
-	border-color: mix($-color-black, $color, 8%);
-	&:not([hover-class]):active {
-		background: mix($-color-black, $color, 10%);
-		border-color: mix($-color-black, $color, 20%);
-		color: $-color-white;
-		outline: none;
-	}
-}
-@mixin is-color($color) {
-	@include base-style($color);
-	&[loading] {
-		@include base-style($color);
-		&::before {
-			margin-right:5px;
-		}
-	}
-	&[disabled] {
-	  &,
-		&[loading],
-	  &:not([hover-class]):active {
-	    color: $-color-white;
-			border-color: mix(darken($color,10%), $-color-white);
-	    background-color: mix($color, $-color-white);
-	  }
-	}
-
-}
-@mixin base-plain-style($color) {
-	color:$color;
-	background-color: mix($-color-white, $color, 90%);
-	border-color: mix($-color-white, $color, 70%);
-	&:not([hover-class]):active {
-	  background: mix($-color-white, $color, 80%);
-	  color: $color;
-	  outline: none;
-		border-color: mix($-color-white, $color, 50%);
-	}
-}
-@mixin is-plain($color){
-	&[plain] {
-		@include base-plain-style($color);
-		&[loading] {
-			@include base-plain-style($color);
-			&::before {
-				margin-right:5px;
-			}
-		}
-		&[disabled] {
-		  &,
-		  &:active {
-		    color: mix($-color-white, $color, 40%);
-		    background-color: mix($-color-white, $color, 90%);
-				border-color: mix($-color-white, $color, 80%);
-		  }
-		}
-	}
-}
-
-
-.uni-btn {
-	margin: 5px;
-	color: #393939;
-	border:1px solid #ccc;
-	font-size: 16px;
-	font-weight: 200;
-	background-color: #F9F9F9;
-	// TODO 暂时处理边框隐藏一边的问题
-	overflow: visible;
-	&::after{
-		border: none;
-	}
-
-	&:not([type]),&[type=default] {
-		color: #999;
-		&[loading] {
-			background: none;
-			&::before {
-				margin-right:5px;
-			}
-		}
-
-
-
-		&[disabled]{
-			color: mix($-color-white, #999, 60%);
-		  &,
-			&[loading],
-		  &:active {
-				color: mix($-color-white, #999, 60%);
-		    background-color: mix($-color-white,$-color-black , 98%);
-				border-color: mix($-color-white,  #999, 85%);
-		  }
-		}
-
-		&[plain] {
-			color: #999;
-			background: none;
-			border-color: $uni-border-1;
-			&:not([hover-class]):active {
-				background: none;
-			  color: mix($-color-white, $-color-black, 80%);
-				border-color: mix($-color-white, $-color-black, 90%);
-			  outline: none;
-			}
-			&[disabled]{
-			  &,
-				&[loading],
-			  &:active {
-			    background: none;
-					color: mix($-color-white, #999, 60%);
-					border-color: mix($-color-white,  #999, 85%);
-			  }
-			}
-		}
-	}
-
-	&:not([hover-class]):active {
-	  color: mix($-color-white, $-color-black, 50%);
-	}
-
-	&[size=mini] {
-		font-size: 16px;
-		font-weight: 200;
-		border-radius: 8px;
-	}
-
-
-
-	&.uni-btn-small {
-		font-size: 14px;
-	}
-	&.uni-btn-mini {
-		font-size: 12px;
-	}
-
-	&.uni-btn-radius {
-		border-radius: 999px;
-	}
-	&[type=primary] {
-		@include is-color($uni-primary);
-		@include is-plain($uni-primary)
-	}
-	&[type=success] {
-		@include is-color($uni-success);
-		@include is-plain($uni-success)
-	}
-	&[type=error] {
-		@include is-color($uni-error);
-		@include is-plain($uni-error)
-	}
-	&[type=warning] {
-		@include is-color($uni-warning);
-		@include is-plain($uni-warning)
-	}
-	&[type=info] {
-		@include is-color($uni-info);
-		@include is-plain($uni-info)
-	}
-}
-/* #endif */

+ 0 - 24
src/uni_modules/uni-scss/styles/setting/_text.scss

@@ -1,24 +0,0 @@
-@mixin get-styles($k,$c) {
-	@if $k == size or $k == weight{
-		font-#{$k}:#{$c}
-	}@else{
-		#{$k}:#{$c}
-	}
-}
-
-@each $key, $child in $uni-headings {
-	/* #ifndef APP-NVUE */
-	.uni-#{$key} {
-		@each $k, $c in $child {
-			@include get-styles($k,$c)
-		}
-	}
-	/* #endif */
-	/* #ifdef APP-NVUE */
-	.container .uni-#{$key} {
-		@each $k, $c in $child {
-			@include get-styles($k,$c)
-		}
-	}
-	/* #endif */
-}

+ 0 - 146
src/uni_modules/uni-scss/styles/setting/_variables.scss

@@ -1,146 +0,0 @@
-// @use "sass:math";
-@import  '../tools/functions.scss';
-// 间距基础倍数
-$uni-space-root: 2 !default;
-// 边框半径默认值
-$uni-radius-root:5px !default;
-$uni-radius: () !default;
-// 边框半径断点
-$uni-radius: map-deep-merge(
-  (
-    0: 0,
-		// TODO 当前版本暂时不支持 sm 属性
-    // 'sm': math.div($uni-radius-root, 2),
-    null: $uni-radius-root,
-    'lg': $uni-radius-root * 2,
-    'xl': $uni-radius-root * 6,
-    'pill': 9999px,
-    'circle': 50%
-  ),
-  $uni-radius
-);
-// 字体家族
-$body-font-family: 'Roboto', sans-serif !default;
-// 文本
-$heading-font-family: $body-font-family !default;
-$uni-headings: () !default;
-$letterSpacing: -0.01562em;
-$uni-headings: map-deep-merge(
-  (
-    'h1': (
-      size: 32px,
-			weight: 300,
-			line-height: 50px,
-			// letter-spacing:-0.01562em
-    ),
-    'h2': (
-      size: 28px,
-      weight: 300,
-      line-height: 40px,
-      // letter-spacing: -0.00833em
-    ),
-    'h3': (
-      size: 24px,
-      weight: 400,
-      line-height: 32px,
-      // letter-spacing: normal
-    ),
-    'h4': (
-      size: 20px,
-      weight: 400,
-      line-height: 30px,
-      // letter-spacing: 0.00735em
-    ),
-    'h5': (
-      size: 16px,
-      weight: 400,
-      line-height: 24px,
-      // letter-spacing: normal
-    ),
-    'h6': (
-      size: 14px,
-      weight: 500,
-      line-height: 18px,
-      // letter-spacing: 0.0125em
-    ),
-    'subtitle': (
-      size: 12px,
-      weight: 400,
-      line-height: 20px,
-      // letter-spacing: 0.00937em
-    ),
-    'body': (
-      font-size: 14px,
-			font-weight: 400,
-			line-height: 22px,
-			// letter-spacing: 0.03125em
-    ),
-    'caption': (
-      'size': 12px,
-      'weight': 400,
-      'line-height': 20px,
-      // 'letter-spacing': 0.03333em,
-      // 'text-transform': false
-    )
-  ),
-  $uni-headings
-);
-
-
-
-// 主色
-$uni-primary: #2979ff !default;
-$uni-primary-disable:lighten($uni-primary,20%) !default;
-$uni-primary-light: lighten($uni-primary,25%) !default;
-
-// 辅助色
-// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
-$uni-success: #18bc37 !default;
-$uni-success-disable:lighten($uni-success,20%) !default;
-$uni-success-light: lighten($uni-success,25%) !default;
-
-$uni-warning: #f3a73f !default;
-$uni-warning-disable:lighten($uni-warning,20%) !default;
-$uni-warning-light: lighten($uni-warning,25%) !default;
-
-$uni-error: #e43d33 !default;
-$uni-error-disable:lighten($uni-error,20%) !default;
-$uni-error-light: lighten($uni-error,25%) !default;
-
-$uni-info: #8f939c !default;
-$uni-info-disable:lighten($uni-info,20%) !default;
-$uni-info-light: lighten($uni-info,25%) !default;
-
-// 中性色
-// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
-$uni-main-color: #3a3a3a !default; 			// 主要文字
-$uni-base-color: #6a6a6a !default;			// 常规文字
-$uni-secondary-color: #909399 !default;	// 次要文字
-$uni-extra-color: #c7c7c7 !default;			// 辅助说明
-
-// 边框颜色
-$uni-border-1: #F0F0F0 !default;
-$uni-border-2: #EDEDED !default;
-$uni-border-3: #DCDCDC !default;
-$uni-border-4: #B9B9B9 !default;
-
-// 常规色
-$uni-black: #000000 !default;
-$uni-white: #ffffff !default;
-$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
-
-// 背景色
-$uni-bg-color: #f7f7f7 !default;
-
-/* 水平间距 */
-$uni-spacing-sm: 8px !default;
-$uni-spacing-base: 15px !default;
-$uni-spacing-lg: 30px !default;
-
-// 阴影
-$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
-$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
-$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
-
-// 蒙版
-$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;

+ 0 - 19
src/uni_modules/uni-scss/styles/tools/functions.scss

@@ -1,19 +0,0 @@
-// 合并 map
-@function map-deep-merge($parent-map, $child-map){
-	$result: $parent-map;
-	@each $key, $child in $child-map {
-		$parent-has-key: map-has-key($result, $key);
-		$parent-value: map-get($result, $key);
-		$parent-type: type-of($parent-value);
-		$child-type: type-of($child);
-		$parent-is-map: $parent-type == map;
-		$child-is-map: $child-type == map;
-			
-		@if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
-			$result: map-merge($result, ( $key: $child ));
-		}@else {
-			$result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
-		}
-	}
-	@return $result;
-};

+ 0 - 31
src/uni_modules/uni-scss/theme.scss

@@ -1,31 +0,0 @@
-// 间距基础倍数
-$uni-space-root: 2;
-// 边框半径默认值
-$uni-radius-root:5px;
-// 主色
-$uni-primary: #2979ff;
-// 辅助色
-$uni-success: #4cd964;
-// 警告色
-$uni-warning: #f0ad4e;
-// 错误色
-$uni-error: #dd524d;
-// 描述色
-$uni-info: #909399;
-// 中性色
-$uni-main-color: #303133;
-$uni-base-color: #606266;
-$uni-secondary-color: #909399;
-$uni-extra-color: #C0C4CC;
-// 背景色
-$uni-bg-color: #f5f5f5;
-// 边框颜色
-$uni-border-1: #DCDFE6;
-$uni-border-2: #E4E7ED;
-$uni-border-3: #EBEEF5;
-$uni-border-4: #F2F6FC;
-
-// 常规色
-$uni-black: #000000;
-$uni-white: #ffffff;
-$uni-transparent: rgba($color: #000000, $alpha: 0);

+ 0 - 62
src/uni_modules/uni-scss/variables.scss

@@ -1,62 +0,0 @@
-@import './styles/setting/_variables.scss';
-// 间距基础倍数
-$uni-space-root: 2;
-// 边框半径默认值
-$uni-radius-root:5px;
-
-// 主色
-$uni-primary: #2979ff;
-$uni-primary-disable:mix(#fff,$uni-primary,50%);
-$uni-primary-light: mix(#fff,$uni-primary,80%);
-
-// 辅助色
-// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
-$uni-success: #18bc37;
-$uni-success-disable:mix(#fff,$uni-success,50%);
-$uni-success-light: mix(#fff,$uni-success,80%);
-
-$uni-warning: #f3a73f;
-$uni-warning-disable:mix(#fff,$uni-warning,50%);
-$uni-warning-light: mix(#fff,$uni-warning,80%);
-
-$uni-error: #e43d33;
-$uni-error-disable:mix(#fff,$uni-error,50%);
-$uni-error-light: mix(#fff,$uni-error,80%);
-
-$uni-info: #8f939c;
-$uni-info-disable:mix(#fff,$uni-info,50%);
-$uni-info-light: mix(#fff,$uni-info,80%);
-
-// 中性色
-// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
-$uni-main-color: #3a3a3a; 			// 主要文字
-$uni-base-color: #6a6a6a;			// 常规文字
-$uni-secondary-color: #909399;	// 次要文字
-$uni-extra-color: #c7c7c7;			// 辅助说明
-
-// 边框颜色
-$uni-border-1: #F0F0F0;
-$uni-border-2: #EDEDED;
-$uni-border-3: #DCDCDC;
-$uni-border-4: #B9B9B9;
-
-// 常规色
-$uni-black: #000000;
-$uni-white: #ffffff;
-$uni-transparent: rgba($color: #000000, $alpha: 0);
-
-// 背景色
-$uni-bg-color: #f7f7f7;
-
-/* 水平间距 */
-$uni-spacing-sm: 8px;
-$uni-spacing-base: 15px;
-$uni-spacing-lg: 30px;
-
-// 阴影
-$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
-$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
-$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
-
-// 蒙版
-$uni-mask: rgba($color: #000000, $alpha: 0.4);

+ 0 - 33
src/utils/index.ts

@@ -144,39 +144,6 @@ export function getEnvBaseUrl() {
   return baseUrl
 }
 
-/**
- * 根据微信小程序当前环境,判断应该获取的 UPLOAD_BASEURL
- */
-export function getEnvBaseUploadUrl() {
-  // 请求基准地址
-  let baseUploadUrl = import.meta.env.VITE_UPLOAD_BASEURL
-
-  const VITE_UPLOAD_BASEURL__WEIXIN_DEVELOP = 'https://ukw0y1.laf.run/upload'
-  const VITE_UPLOAD_BASEURL__WEIXIN_TRIAL = 'https://ukw0y1.laf.run/upload'
-  const VITE_UPLOAD_BASEURL__WEIXIN_RELEASE = 'https://ukw0y1.laf.run/upload'
-
-  // 微信小程序端环境区分
-  if (isMpWeixin) {
-    const {
-      miniProgram: { envVersion },
-    } = uni.getAccountInfoSync()
-
-    switch (envVersion) {
-      case 'develop':
-        baseUploadUrl = VITE_UPLOAD_BASEURL__WEIXIN_DEVELOP || baseUploadUrl
-        break
-      case 'trial':
-        baseUploadUrl = VITE_UPLOAD_BASEURL__WEIXIN_TRIAL || baseUploadUrl
-        break
-      case 'release':
-        baseUploadUrl = VITE_UPLOAD_BASEURL__WEIXIN_RELEASE || baseUploadUrl
-        break
-    }
-  }
-
-  return baseUploadUrl
-}
-
 /**
  * 是否是双token模式
  */

+ 2 - 0
tsconfig.json

@@ -17,6 +17,8 @@
       "miniprogram-api-typings",
       "wot-design-uni/global.d.ts",
       "z-paging/types",
+      "./src/types/async-component.d.ts",
+      "./src/types/async-import.d.ts",
       "./src/typings.d.ts"
     ],
     "allowJs": true,

+ 1 - 1
uno.config.ts

@@ -51,7 +51,7 @@ export default defineConfig({
     },
   ],
   // 动态图标需要在这里配置,或者写在vue页面中注释掉
-  safelist: ['i-carbon-code'],
+  safelist: ['i-carbon-code', 'i-carbon-home', 'i-carbon-user'],
   rules: [
     [
       'p-safe',

+ 18 - 19
vite.config.ts

@@ -24,9 +24,10 @@ import UnoCSS from 'unocss/vite'
 import AutoImport from 'unplugin-auto-import/vite'
 import { defineConfig, loadEnv } from 'vite'
 import ViteRestart from 'vite-plugin-restart'
+import openDevTools from './scripts/open-dev-tools'
 
 // https://vitejs.dev/config/
-export default ({ command, mode }) => {
+export default defineConfig(({ command, mode }) => {
   // @see https://unocss.dev/
   // const UnoCSS = (await import('unocss/vite')).default
   // console.log(mode === process.env.NODE_ENV) // true
@@ -52,7 +53,6 @@ export default ({ command, mode }) => {
     VITE_DELETE_CONSOLE,
     VITE_APP_PUBLIC_BASE,
     VITE_APP_PROXY_ENABLE,
-    VITE_SERVER_HAS_API_PREFIX,
     VITE_APP_PROXY_PREFIX,
   } = env
   console.log('环境变量 env -> ', env)
@@ -71,6 +71,18 @@ export default ({ command, mode }) => {
       UniLayouts(),
       UniPlatform(),
       UniManifest(),
+      // Optimization 插件需要 page.json 文件,故应在 UniPages 插件之后执行
+      Optimization({
+        enable: {
+          'optimization': true,
+          'async-import': true,
+          'async-component': true,
+        },
+        dts: {
+          base: 'src/types',
+        },
+        logger: false,
+      }),
       // UniXXX 需要在 Uni 之前引入
       {
         // 临时解决 dcloudio 官方的 @dcloudio/uni-mp-compiler 出现的编译 BUG
@@ -91,19 +103,6 @@ export default ({ command, mode }) => {
         dirs: ['src/hooks'], // 自动导入 hooks
         vueTemplate: true, // default false
       }),
-      // Optimization 插件需要 page.json 文件,故应在 UniPages 插件之后执行
-      Optimization({
-        enable: {
-          'optimization': true,
-          'async-import': true,
-          'async-component': true,
-        },
-        dts: {
-          base: 'src/types',
-        },
-        logger: false,
-      }),
-
       ViteRestart({
         // 通过这个插件,在修改vite.config.js文件则不需要重新运行也生效配置
         restart: ['vite.config.js'],
@@ -135,6 +134,8 @@ export default ({ command, mode }) => {
       // 若存在改变 pages.json 的插件,请将 UniKuRoot 放置其后
       UniKuRoot(),
       Uni(),
+      // 自动打开开发者工具插件 (必须修改 .env 文件中的 VITE_WX_APPID)
+      openDevTools(),
     ],
     define: {
       __UNI_PLATFORM__: JSON.stringify(UNI_PLATFORM),
@@ -168,9 +169,7 @@ export default ({ command, mode }) => {
               target: VITE_SERVER_BASEURL,
               changeOrigin: true,
               // 后端有/api前缀则不做处理,没有则需要去掉
-              rewrite: path => JSON.parse(VITE_SERVER_HAS_API_PREFIX)
-                ? path
-                : path.replace(new RegExp(`^${VITE_APP_PROXY_PREFIX}`), ''),
+              rewrite: path => path.replace(new RegExp(`^${VITE_APP_PROXY_PREFIX}`), ''),
             },
           }
         : undefined,
@@ -187,4 +186,4 @@ export default ({ command, mode }) => {
       minify: mode === 'development' ? false : 'esbuild',
     },
   })
-}
+})