Explorar el Código

refactor: 移除未使用的代码和功能模块

清理未使用的页面、组件、路由配置和主题相关代码
移除登录拦截和分包配置相关逻辑
简化首页和个人中心页面
feige996 hace 5 meses
padre
commit
53f27a1917

+ 0 - 1
package.json

@@ -121,7 +121,6 @@
     "pinia-plugin-persistedstate": "3.2.1",
     "vue": "^3.4.21",
     "vue-router": "4.5.1",
-    "wot-design-uni": "^1.12.4",
     "z-paging": "2.8.7"
   },
   "devDependencies": {

+ 0 - 13
pnpm-lock.yaml

@@ -90,9 +90,6 @@ importers:
       vue-router:
         specifier: 4.5.1
         version: 4.5.1(vue@3.4.21(typescript@5.8.3))
-      wot-design-uni:
-        specifier: ^1.12.4
-        version: 1.12.4(vue@3.4.21(typescript@5.8.3))
       z-paging:
         specifier: 2.8.7
         version: 2.8.7
@@ -6143,12 +6140,6 @@ packages:
     resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==}
     engines: {node: '>=0.10.0'}
 
-  wot-design-uni@1.12.4:
-    resolution: {integrity: sha512-GE7hfJ+RKRCiWtEkhoQ5gz3fbwNB69EzLcXiIUPK2gawk9+hp7KescjplcxdxGfeuCJUlhF6wW9VUEe86h/63g==}
-    engines: {HBuilderX: ^3.8.7}
-    peerDependencies:
-      vue: '>=3.2.47'
-
   wrap-ansi@7.0.0:
     resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
     engines: {node: '>=10'}
@@ -13874,10 +13865,6 @@ snapshots:
 
   word-wrap@1.2.5: {}
 
-  wot-design-uni@1.12.4(vue@3.4.21(typescript@5.8.3)):
-    dependencies:
-      vue: 3.4.21(typescript@5.8.3)
-
   wrap-ansi@7.0.0:
     dependencies:
       ansi-styles: 4.3.0

+ 6 - 13
src/App.ku.vue

@@ -1,12 +1,9 @@
 <script setup lang="ts">
 import { ref } from 'vue'
-import { useThemeStore } from '@/store'
 import FgTabbar from '@/tabbar/index.vue'
 import { isPageTabbar } from './tabbar/store'
 import { currRoute } from './utils'
 
-const themeStore = useThemeStore()
-
 const isCurrentPageTabbar = ref(true)
 onShow(() => {
   console.log('App.ku.vue onShow', currRoute())
@@ -31,16 +28,12 @@ defineExpose({
 </script>
 
 <template>
-  <wd-config-provider :theme-vars="themeStore.themeVars" :theme="themeStore.theme">
-    <!-- 这个先隐藏了,知道这样用就行 -->
-    <view class="hidden text-center">
-      {{ helloKuRoot }},这里可以配置全局的东西
-    </view>
+  <!-- 这个先隐藏了,知道这样用就行 -->
+  <view class="hidden text-center">
+    {{ helloKuRoot }},这里可以配置全局的东西
+  </view>
 
-    <KuRootView />
+  <KuRootView />
 
-    <FgTabbar v-if="isCurrentPageTabbar" />
-    <wd-toast />
-    <wd-message-box />
-  </wd-config-provider>
+  <FgTabbar v-if="isCurrentPageTabbar" />
 </template>

+ 2 - 2
src/App.vue

@@ -3,10 +3,10 @@ import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'
 import { navigateToInterceptor } from '@/router/interceptor'
 
 onLaunch((options) => {
-  console.log('App Launch', options)
+  console.log('App.vue onLaunch', options)
 })
 onShow((options) => {
-  console.log('App Show', options)
+  console.log('App.vue onShow', options)
   // 处理直接进入页面路由的情况:如h5直接输入路由、微信小程序分享后进入等
   // https://github.com/unibest-tech/unibest/issues/192
   if (options?.path) {

+ 0 - 7
src/layouts/default.vue

@@ -1,10 +1,3 @@
-<script lang="ts" setup>
-const testUniLayoutExposedData = ref('testUniLayoutExposedData')
-defineExpose({
-  testUniLayoutExposedData,
-})
-</script>
-
 <template>
   <slot />
 </template>

+ 0 - 3
src/pages-fg/404/README.md

@@ -1,3 +0,0 @@
-# 404 页面
-
-`404页面` 只有在路由不存在时才会显示,如果您不需要可以删除该页面。但是建议保留。

+ 0 - 30
src/pages-fg/404/index.vue

@@ -1,30 +0,0 @@
-<script lang="ts" setup>
-import { HOME_PAGE } from '@/utils'
-
-definePage({
-  style: {
-    // 'custom' 表示开启自定义导航栏,默认 'default'
-    navigationStyle: 'custom',
-  },
-})
-
-function goBack() {
-  // 当pages.config.ts中配置了tabbar页面时,使用switchTab切换到首页
-  // 否则使用navigateTo返回首页
-  uni.switchTab({ url: HOME_PAGE })
-}
-</script>
-
-<template>
-  <view class="h-screen flex flex-col items-center justify-center">
-    <view> 404 </view>
-    <view> 页面不存在 </view>
-    <button class="mt-6 w-40 text-center" @click="goBack">
-      返回首页
-    </button>
-  </view>
-</template>
-
-<style lang="scss" scoped>
-//
-</style>

+ 0 - 3
src/pages-fg/REAME.md

@@ -1,3 +0,0 @@
-# pages-fg 说明
-
-为了尽量减少主包的大小,一些无关紧要但经常需要的页面(如登录页、注册页、404页等)放在了 `pages-fg` 目录下。

+ 0 - 20
src/pages-fg/login/README.md

@@ -1,20 +0,0 @@
-# 登录页
-需要输入账号、密码/验证码的登录页。
-
-## 适用性
-
-本页面主要用于 `h5` 和 `APP`。
-
-小程序通常有平台的登录方式 `uni.login` 通常用不到登录页,所以不适用于 `小程序`。(即默认情况下,小程序环境是不会走登录拦截逻辑的。)
-
-但是如果您的小程序也需要现实的 `登录页` 那也是可以使用的。
-
-在 `src/router/config.ts` 中有一个变量 `LOGIN_PAGE_ENABLE_IN_MP` 来控制是否在小程序中使用 `H5的登录页`。
-
-更多信息请看 `src/router` 文件夹的内容。
-
-## 登录跳转
-
-目前登录的跳转逻辑主要在 `src/router/interceptor.ts` 和 `src/pages/login/login.vue` 里面,默认会在登录后自动重定向到来源/配置的页面。
-
-如果与您的业务不符,您可以自行修改。

+ 0 - 87
src/pages-fg/login/login.vue

@@ -1,87 +0,0 @@
-<script lang="ts" setup>
-import { useTokenStore } from '@/store/token'
-import { useUserStore } from '@/store/user'
-import { tabbarList } from '@/tabbar/config'
-import { isPageTabbar } from '@/tabbar/store'
-import { ensureDecodeURIComponent } from '@/utils'
-import { parseUrlToObj } from '@/utils/index'
-
-definePage({
-  style: {
-    navigationBarTitleText: '登录',
-  },
-})
-
-const redirectUrl = ref('')
-onLoad((options) => {
-  console.log('login options: ', options)
-  if (options.redirect) {
-    redirectUrl.value = ensureDecodeURIComponent(options.redirect)
-  }
-  else {
-    redirectUrl.value = tabbarList[0].pagePath
-  }
-  console.log('redirectUrl.value: ', redirectUrl.value)
-})
-
-const userStore = useUserStore()
-const tokenStore = useTokenStore()
-async function doLogin() {
-  if (tokenStore.hasLogin) {
-    uni.navigateBack()
-    return
-  }
-  try {
-    // 调用登录接口
-    await tokenStore.login({
-      username: '菲鸽',
-      password: '123456',
-    })
-    console.log(redirectUrl.value)
-  }
-  catch (error) {
-    console.log('登录失败', error)
-  }
-  let path = redirectUrl.value
-  if (!path.startsWith('/')) {
-    path = `/${path}`
-  }
-  const { path: _path, query } = parseUrlToObj(path)
-  console.log('_path:', _path, 'query:', query, 'path:', path)
-  console.log('isPageTabbar(_path):', isPageTabbar(_path))
-  if (isPageTabbar(_path)) {
-    // 经过我的测试 switchTab 不能带 query 参数, 不管是放到 url  还是放到 query ,
-    // 最后跳转过去的时候都会丢失 query 信息
-    uni.switchTab({
-      url: path,
-    })
-    // uni.switchTab({
-    //   url: _path,
-    //   query,
-    // })
-  }
-  else {
-    // 自己决定是 redirectTo 还是 navigateBack
-    // uni.redirectTo({
-    //   url: path,
-    // })
-    uni.navigateBack()
-  }
-}
-</script>
-
-<template>
-  <view class="login">
-    <!-- 本页面是非MP的登录页,主要用于 h5 和 APP -->
-    <view class="text-center">
-      登录页
-    </view>
-    <button class="mt-4 w-40 text-center" @click="doLogin">
-      点击模拟登录
-    </button>
-  </view>
-</template>
-
-<style lang="scss" scoped>
-//
-</style>

+ 0 - 34
src/pages-fg/login/register.vue

@@ -1,34 +0,0 @@
-<script lang="ts" setup>
-import { LOGIN_PAGE } from '@/router/config'
-
-definePage({
-  style: {
-    navigationBarTitleText: '注册',
-  },
-})
-
-function doRegister() {
-  uni.showToast({
-    title: '注册成功',
-  })
-  // 注册成功后跳转到登录页
-  uni.navigateTo({
-    url: LOGIN_PAGE,
-  })
-}
-</script>
-
-<template>
-  <view class="login">
-    <view class="text-center">
-      注册页
-    </view>
-    <button class="mt-4 w-40 text-center" @click="doRegister">
-      点击模拟注册
-    </button>
-  </view>
-</template>
-
-<style lang="scss" scoped>
-//
-</style>

+ 0 - 134
src/pages-sub/about/about.vue

@@ -1,134 +0,0 @@
-<script lang="ts" setup>
-import { isApp, isAppAndroid, isAppHarmony, isAppIOS, isAppPlus, isH5, isMpWeixin, isWeb } from '@uni-helper/uni-env'
-import { LOGIN_PAGE } from '@/router/config'
-import { useTokenStore } from '@/store'
-import RequestOpenApiComp from './components/request-openapi.vue'
-import RequestComp from './components/request.vue'
-import UploadComp from './components/Upload.vue'
-import VBindCss from './components/VBindCss.vue'
-
-definePage({
-  style: {
-    navigationBarTitleText: '关于',
-  },
-  // 登录授权(可选):跟以前的 needLogin 类似功能,但是同时支持黑白名单,详情请见 arc/router 文件夹
-  excludeLoginPath: false,
-})
-
-const tokenStore = useTokenStore()
-// 浏览器打印 isH5为true, isWeb为false,大家尽量用 isH5
-console.log({ isApp, isAppAndroid, isAppHarmony, isAppIOS, isAppPlus, isH5, isMpWeixin, isWeb })
-
-function gotoLogin() {
-  if (tokenStore.hasLogin) {
-    uni.showToast({
-      title: '已登录,不能去登录页',
-      icon: 'none',
-    })
-    return
-  }
-  uni.navigateTo({
-    url: `${LOGIN_PAGE}?redirect=${encodeURIComponent('/pages-sub/about/about?a=1&b=2')}`,
-  })
-}
-function logout() {
-  // 清空用户信息
-  tokenStore.logout()
-  // 执行退出登录逻辑
-  uni.showToast({
-    title: '退出登录成功',
-    icon: 'success',
-  })
-}
-
-function gotoScroll() {
-  uni.navigateTo({
-    url: '/pages-sub/demo/scroll',
-  })
-}
-
-function gotoAlova() {
-  uni.navigateTo({
-    url: '/pages-sub/about/alova',
-  })
-}
-function gotoSubPage() {
-  uni.navigateTo({
-    url: '/pages-sub/demo/index',
-  })
-}
-
-// uniLayout里面的变量通过 expose 暴露出来后可以在 onReady 钩子获取到(onLoad 钩子不行)
-const uniLayout = ref()
-onLoad(() => {
-  console.log('onLoad:', uniLayout.value) // onLoad: undefined
-})
-onReady(() => {
-  console.log('onReady:', uniLayout.value) // onReady: Proxy(Object)
-  console.log('onReady:', uniLayout.value.testUniLayoutExposedData) // onReady: testUniLayoutExposedData
-})
-// 结论:第一次通过onShow获取不到,但是可以通过 onReady获取到,后面就可以通过onShow获取到了
-onShow(() => {
-  console.log('onShow:', uniLayout.value) // onReady: Proxy(Object)
-  console.log('onShow:', uniLayout.value?.testUniLayoutExposedData) // onReady: testUniLayoutExposedData
-})
-
-const uniKuRoot = ref()
-// 结论:(同上)第一次通过onShow获取不到,但是可以通过 onReady获取到,后面就可以通过onShow获取到了
-onReady(() => {
-  console.log('onReady uniKuRoot exposeRef', uniKuRoot.value?.exposeRef)
-})
-onShow(() => {
-  console.log('onShow uniKuRoot exposeRef', uniKuRoot.value?.exposeRef)
-})
-</script>
-
-<template root="uniKuRoot">
-  <!-- page-meta 使用范例 -->
-  <page-meta page-style="overflow: auto" />
-  <view>
-    <view class="mt-8 text-center text-xl text-gray-400">
-      请求调用、unocss、static图片
-    </view>
-    <view class="my-2 text-center">
-      <image src="/static/images/avatar.jpg" class="h-100px w-100px" />
-    </view>
-    <view class="my-2 text-center">
-      当前是否登录:{{ tokenStore.hasLogin }}
-    </view>
-    <view class="m-auto max-w-600px flex items-center">
-      <button class="mt-4 w-40 text-center" @click="gotoLogin">
-        点击去登录页
-      </button>
-      <button class="mt-4 w-40 text-center" @click="logout">
-        点击退出登录
-      </button>
-    </view>
-    <RequestOpenApiComp />
-    <RequestComp />
-    <UploadComp />
-    <VBindCss />
-    <view class="mb-6 h-1px bg-#eee" />
-    <view class="text-center">
-      <button type="primary" size="mini" class="w-240px" @click="gotoScroll">
-        前往上拉和下拉加载更多页面
-      </button>
-    </view>
-    <view class="text-center">
-      <button type="primary" size="mini" class="w-160px" @click="gotoAlova">
-        前往 alova 示例页面
-      </button>
-    </view>
-    <view class="text-center">
-      <button type="primary" size="mini" class="w-160px" @click="gotoSubPage">
-        前往分包页面
-      </button>
-    </view>
-    <view class="mt-6 text-center text-sm">
-      <view class="inline-block w-80% text-gray-400">
-        为了方便脚手架动态生成不同UI模板,本页的按钮统一使用UI库无关的原生button
-      </view>
-    </view>
-    <view class="h-6" />
-  </view>
-</template>

+ 0 - 53
src/pages-sub/about/alova.vue

@@ -1,53 +0,0 @@
-<script lang="ts" setup>
-import { useRequest } from 'alova/client'
-import { foo } from '@/api/foo-alova'
-
-definePage({
-  style: {
-    navigationBarTitleText: 'Alova 演示',
-  },
-})
-
-const initialData = undefined
-
-const { loading, data, send } = useRequest(foo, {
-  initialData,
-  immediate: true,
-})
-console.log(data)
-function reset() {
-  data.value = initialData
-}
-</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 class="text-red">
-        {{ data?.id }}
-      </view>
-    </view>
-    <button type="default" size="mini" class="my-6 w-160px" @click="reset">
-      重置数据
-    </button>
-  </view>
-</template>
-
-<style lang="scss" scoped>
-//
-</style>

+ 0 - 25
src/pages-sub/about/components/Upload.vue

@@ -1,25 +0,0 @@
-<template>
-  <view class="p-4 text-center">
-    <button type="primary" size="mini" class="w-160px" @click="run">
-      选择图片并上传
-    </button>
-    <view v-if="loading" class="h-10 text-blue">
-      上传...
-    </view>
-    <template v-else>
-      <view class="m-2">
-        上传后返回的接口数据:
-      </view>
-      <view class="m-2">
-        {{ data }}
-      </view>
-      <view class="m-auto h-40 max-w-40">
-        <image v-if="data" :src="data.url" mode="scaleToFill" />
-      </view>
-    </template>
-  </view>
-</template>
-
-<script lang="ts" setup>
-const { loading, data, run } = useUpload()
-</script>

+ 0 - 28
src/pages-sub/about/components/VBindCss.vue

@@ -1,28 +0,0 @@
-<script lang="ts" setup>
-// root 插件更新到 1.3.4之后,都正常了。
-const testBindCssVariable = ref('red')
-function changeTestBindCssVariable() {
-  if (testBindCssVariable.value === 'red') {
-    testBindCssVariable.value = 'green'
-  }
-  else {
-    testBindCssVariable.value = 'red'
-  }
-}
-</script>
-
-<template>
-  <button class="mt-4 w-60 text-center" @click="changeTestBindCssVariable">
-    toggle v-bind css变量
-  </button>
-  <view class="test-css my-2 text-center">
-    测试v-bind css变量的具体文案
-  </view>
-</template>
-
-<style lang="scss" scoped>
-.test-css {
-  color: v-bind(testBindCssVariable);
-  font-size: 24px;
-}
-</style>

+ 0 - 64
src/pages-sub/about/components/request-openapi.vue

@@ -1,64 +0,0 @@
-<script lang="ts" setup>
-import type { InfoUsingGetResponse } from '@/service'
-import { infoUsingGet, listAllUsingGet } from '@/service'
-
-const loading = ref(false)
-const error = ref<Error | null>(null)
-const userInfo = ref<InfoUsingGetResponse>()
-
-// openapi 请求示例
-async function getUserInfo() {
-  try {
-    loading.value = true
-    const res = await infoUsingGet({})
-    console.log(res)
-    userInfo.value = res
-    error.value = null
-  }
-  catch (err) {
-    error.value = err as Error
-    userInfo.value = null
-  }
-  finally {
-    loading.value = false
-  }
-}
-
-// openapi + useRequest 请求示例
-const { data: userList, loading: loading2, run } = useRequest(() => listAllUsingGet({}), {
-  immediate: false,
-})
-</script>
-
-<template>
-  <view class="p-6 text-center">
-    <view class="my-4 text-center">
-      1)直接使用 openapi 生成的请求
-    </view>
-    <view class="my-4 text-center">
-      <button type="primary" size="mini" class="w-160px" @click="getUserInfo">
-        发送请求
-      </button>
-      <view class="text-xl">
-        请求数据如下
-      </view>
-      <view class="text-green leading-8">
-        {{ JSON.stringify(userInfo) }}
-      </view>
-    </view>
-    <view class="my-4 text-center">
-      2)直接使用 openapi + useRequest 生成的请求
-    </view>
-    <view class="my-4 flex items-center gap-2 text-center">
-      <button type="primary" size="mini" class="w-160px" @click="run">
-        发送请求
-      </button>
-    </view>
-    <view class="text-xl">
-      请求数据如下
-    </view>
-    <view class="text-green leading-8">
-      {{ JSON.stringify(userList) }}
-    </view>
-  </view>
-</template>

+ 0 - 75
src/pages-sub/about/components/request.vue

@@ -1,75 +0,0 @@
-<script lang="ts" setup>
-import type { IFooItem } from '@/api/foo'
-import { getFooAPI } from '@/api/foo'
-
-// const initialData = {
-//   name: 'initialData',
-//   id: '1234',
-// }
-const initialData = undefined
-
-// 直接请求示例
-async function reqFooAPI() {
-  try {
-    const res = await getFooAPI('菲鸽')
-    console.log('直接请求示例res', res)
-  }
-  catch (err) {
-    console.log(err)
-  }
-}
-reqFooAPI()
-
-// 直接useRequest请求示例
-const { loading, error, data, run } = useRequest<IFooItem>(() => getFooAPI('菲鸽'), {
-  immediate: true,
-  initialData,
-})
-
-function reset() {
-  data.value = initialData
-}
-</script>
-
-<template>
-  <view class="p-6 text-center">
-    <view class="my-2">
-      pages 里面的 vue 文件会扫描成页面,将自动添加到 pages.json 里面。
-    </view>
-    <view class="my-2 text-green-400">
-      但是 components 里面的 vue 不会。
-    </view>
-
-    <view class="my-4 text-center">
-      <button type="primary" size="mini" class="w-160px" @click="run">
-        发送请求
-      </button>
-    </view>
-    <view class="h-16">
-      <view v-if="loading">
-        loading...
-      </view>
-      <block v-else>
-        <view v-if="error instanceof Error" class="text-red leading-8">
-          错误: {{ error.message }}
-        </view>
-        <view v-else-if="error" class="text-red leading-8">
-          错误: 未知错误
-        </view>
-        <view v-else>
-          <view class="text-xl">
-            请求数据如下
-          </view>
-          <view class="text-green leading-8">
-            {{ JSON.stringify(data) }}
-          </view>
-        </view>
-      </block>
-    </view>
-    <view class="my-4 text-center">
-      <button type="warn" size="mini" class="w-160px" :disabled="!data" @click="reset">
-        重置数据
-      </button>
-    </view>
-  </view>
-</template>

+ 0 - 48
src/pages-sub/demo/components/request.vue

@@ -1,48 +0,0 @@
-<script lang="ts" setup>
-import type { IFooItem } from '@/api/foo'
-import { getFooAPI } from '@/api/foo'
-
-const recommendUrl = ref('http://laf.run/signup?code=ohaOgIX')
-
-// const initialData = {
-//   name: 'initialData',
-//   id: '1234',
-// }
-const initialData = undefined
-const { loading, error, data, run } = useRequest<IFooItem>(() => getFooAPI('菲鸽'), {
-  immediate: true,
-  initialData,
-})
-
-function reset() {
-  data.value = initialData
-}
-</script>
-
-<template>
-  <view class="p-6 text-center">
-    <view class="my-2 text-center">
-      <button type="primary" size="mini" class="w-160px" @click="run">
-        发送请求
-      </button>
-    </view>
-    <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 class="my-6 text-center">
-      <button type="warn" size="mini" class="w-160px" :disabled="!data" @click="reset">
-        重置数据
-      </button>
-    </view>
-  </view>
-</template>

+ 0 - 44
src/pages-sub/demo/index.vue

@@ -1,44 +0,0 @@
-<script lang="ts" setup>
-// code here
-import RequestComp from './components/request.vue'
-
-definePage({
-  style: {
-    navigationBarTitleText: '分包页面',
-  },
-})
-
-function gotoScroll() {
-  uni.navigateTo({
-    url: '/pages-sub/demo/scroll',
-  })
-}
-</script>
-
-<template>
-  <view class="text-center">
-    <view class="m-8">
-      http://localhost:9000/#/pages-sub/demo/index
-    </view>
-    <view class="my-4 text-green-500">
-      分包页面demo
-    </view>
-    <view class="text-blue-500">
-      分包页面里面的components示例
-    </view>
-    <button class="my-4" type="primary" size="mini" @click="gotoScroll">
-      跳转到上拉刷新和下拉加载更多
-    </button>
-    <view>
-      <RequestComp />
-      <view class="mt-4">
-        本地SVG图标示例
-      </view>
-      <view class="i-my-icons-copyright text-red" />
-    </view>
-  </view>
-</template>
-
-<style lang="scss" scoped>
-//
-</style>

+ 0 - 72
src/pages-sub/demo/scroll.vue

@@ -1,72 +0,0 @@
-<script setup lang="ts">
-// uniapp 页面生命周期
-import { onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
-
-import { useScroll } from '@/hooks/useScroll'
-
-definePage({
-  style: {
-    navigationBarTitleText: '上拉刷新和下拉加载更多',
-    enablePullDownRefresh: true,
-    onReachBottomDistance: 100,
-  },
-})
-
-// 模拟异步获取数据的函数
-function mockFetchData(page: number, pageSize: number): Promise<{ id: number, name: string }[]> {
-  return new Promise((resolve) => {
-    setTimeout(() => {
-      if (page > 5) {
-        // 模拟没有更多数据
-        resolve([])
-        return
-      }
-      const data = Array.from({ length: pageSize }, (_, i) => ({
-        id: (page - 1) * pageSize + i + 1,
-        name: `item ${(page - 1) * pageSize + i + 1}`,
-      }))
-      resolve(data)
-    }, 1000)
-  })
-}
-
-const { list, loading, finished, error, refresh, loadMore } = useScroll({
-  fetchData: mockFetchData,
-  pageSize: 10,
-})
-
-onPullDownRefresh(async () => {
-  console.log('onPullDownRefresh')
-  console.log('onPullDownRefresh')
-  console.log('onPullDownRefresh')
-  await refresh()
-  uni.stopPullDownRefresh()
-})
-
-onReachBottom(() => {
-  loadMore()
-})
-</script>
-
-<template>
-  <view class="h-screen p-4">
-    <view v-if="error" class="text-center text-red-500">
-      加载失败,请重试
-    </view>
-    <view v-else>
-      <view
-        v-for="item in list"
-        :key="item.id"
-        class="my-2 h-20 flex items-center justify-center rounded bg-gray-100"
-      >
-        {{ item.name }}
-      </view>
-      <view v-if="loading" class="py-4 text-center text-gray-500">
-        加载中...
-      </view>
-      <view v-if="finished" class="py-4 text-center text-gray-500">
-        没有更多了
-      </view>
-    </view>
-  </view>
-</template>

+ 1 - 62
src/pages/index/index.vue

@@ -1,7 +1,4 @@
 <script lang="ts" setup>
-import { useThemeStore } from '@/store'
-import { safeAreaInsets } from '@/utils/systemInfo'
-
 defineOptions({
   name: 'Home',
 })
@@ -15,8 +12,6 @@ definePage({
   },
 })
 
-const themeStore = useThemeStore()
-
 const description = ref(
   'unibest 是一个集成了多种工具和技术的 uniapp 开发模板,由 uniapp + Vue3 + Ts + Vite5 + UnoCss + VSCode 构建,模板具有代码提示、自动格式化、统一配置、代码片段等功能,并内置了许多常用的基本组件和基本功能,让你编写 uniapp 拥有 best 体验。',
 )
@@ -25,18 +20,10 @@ console.log('index/index 首页打印了')
 onLoad(() => {
   console.log('测试 uni API 自动引入: onLoad')
 })
-
-// #region gotoAbout
-function gotoAbout() {
-  uni.navigateTo({
-    url: '/pages-sub/about/about',
-  })
-}
-// #endregion
 </script>
 
 <template>
-  <view class="bg-white px-4 pt-2" :style="{ marginTop: `${safeAreaInsets?.top}px` }">
+  <view class="bg-white px-4 pt-safe">
     <view class="mt-10">
       <image src="/static/logo.svg" alt="" class="mx-auto block h-28 w-28" />
     </view>
@@ -62,53 +49,5 @@ function gotoAbout() {
         https://unibest.tech
       </text>
     </view>
-
-    <!-- #ifdef H5 -->
-    <view class="mt-4 text-center">
-      <a href="https://unibest.tech/base/3-plugin" target="_blank" class="text-green-500">
-        新手请看必看章节1:
-      </a>
-    </view>
-    <!-- #endif -->
-    <!-- #ifdef MP-WEIXIN -->
-    <view class="mt-4 text-center">
-      新手请看必看章节1:
-      <text class="text-green-500">
-        https://unibest.tech/base/3-plugin
-      </text>
-    </view>
-    <!-- #endif -->
-    <!-- #ifdef H5 -->
-    <view class="mt-4 text-center">
-      <a href="https://unibest.tech/base/14-faq" target="_blank" class="text-green-500">
-        新手请看必看章节2:
-      </a>
-    </view>
-    <!-- #endif -->
-    <!-- #ifdef MP-WEIXIN -->
-    <view class="mt-4 text-center">
-      新手请看必看章节2:
-      <text class="text-green-500">
-        https://unibest.tech/base/14-faq
-      </text>
-    </view>
-    <!-- #endif -->
-
-    <view class="mt-4 text-center">
-      <wd-button type="primary" class="ml-2" @click="themeStore.setThemeVars({ colorTheme: 'red' })">
-        设置主题变量
-      </wd-button>
-    </view>
-    <view class="mt-4 text-center">
-      UI组件官网:<text class="text-green-500">
-        https://wot-design-uni.cn
-      </text>
-    </view>
-    <view class="mt-4 text-center">
-      <wd-button type="primary" class="ml-2" @click="gotoAbout">
-        前往示例页
-      </wd-button>
-    </view>
-    <view class="h-6" />
   </view>
 </template>

+ 2 - 203
src/pages/me/me.vue

@@ -1,214 +1,13 @@
 <script lang="ts" setup>
-import type { IUploadSuccessInfo } from '@/api/types/login'
-import { storeToRefs } from 'pinia'
-import { LOGIN_PAGE } from '@/router/config'
-import { useUserStore } from '@/store'
-import { useTokenStore } from '@/store/token'
-import { useUpload } from '@/utils/uploadFile'
-
 definePage({
   style: {
     navigationBarTitleText: '我的',
   },
 })
-
-const userStore = useUserStore()
-const tokenStore = useTokenStore()
-// 使用storeToRefs解构userInfo
-const { userInfo } = storeToRefs(userStore)
-
-// #ifndef MP-WEIXIN
-// 上传头像
-const { run: uploadAvatar } = useUpload<IUploadSuccessInfo>(
-  '/upload',
-  {},
-  {
-    onSuccess: (res) => {
-      console.log('h5头像上传成功', res)
-      useUserStore().setUserAvatar(res.url)
-    },
-  },
-)
-// #endif
-
-// 微信小程序下登录
-async function handleLogin() {
-  // #ifdef MP-WEIXIN
-  // 微信登录
-  await tokenStore.wxLogin()
-
-  // #endif
-  // #ifndef MP-WEIXIN
-  uni.navigateTo({
-    url: `${LOGIN_PAGE}?redirect=${encodeURIComponent('/pages/me/me')}`,
-  })
-  // #endif
-}
-
-// #ifdef MP-WEIXIN
-
-// 微信小程序下选择头像事件
-function onChooseAvatar(e: any) {
-  console.log('选择头像', e.detail)
-  const { avatarUrl } = e.detail
-  const { run } = useUpload<IUploadSuccessInfo>(
-    '/upload',
-    {},
-    {
-      onSuccess: (res) => {
-        console.log('wx头像上传成功', res)
-        useUserStore().setUserAvatar(res.url)
-      },
-    },
-    avatarUrl,
-  )
-  run()
-}
-// #endif
-// #ifdef MP-WEIXIN
-// 微信小程序下设置用户名
-function getUserInfo(e: any) {
-  console.log(e.detail)
-}
-// #endif
-
-// 退出登录
-function handleLogout() {
-  uni.showModal({
-    title: '提示',
-    content: '确定要退出登录吗?',
-    success: (res) => {
-      if (res.confirm) {
-        // 清空用户信息
-        useTokenStore().logout()
-        // 执行退出登录逻辑
-        uni.showToast({
-          title: '退出登录成功',
-          icon: 'success',
-        })
-        // #ifdef MP-WEIXIN
-        // 微信小程序,去首页
-        // uni.reLaunch({ url: '/pages/index/index' })
-        // #endif
-        // #ifndef MP-WEIXIN
-        // 非微信小程序,去登录页
-        // uni.navigateTo({ url: LOGIN_PAGE })
-        // #endif
-      }
-    },
-  })
-}
 </script>
 
 <template>
-  <view class="profile-container">
-    <!-- 用户信息区域 -->
-    <view class="user-info-section">
-      <!-- #ifdef MP-WEIXIN -->
-      <button class="avatar-button" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
-        <image :src="userInfo.avatar" mode="scaleToFill" class="h-full w-full" />
-      </button>
-      <!-- #endif -->
-      <!-- #ifndef MP-WEIXIN -->
-      <view class="avatar-wrapper" @click="uploadAvatar">
-        <image :src="userInfo.avatar" mode="scaleToFill" class="h-full w-full" />
-      </view>
-      <!-- #endif -->
-      <view class="user-details">
-        <!-- #ifdef MP-WEIXIN -->
-        <input
-          v-model="userInfo.username"
-          type="nickname"
-          class="weui-input"
-          placeholder="请输入昵称"
-        >
-        <!-- #endif -->
-        <!-- #ifndef MP-WEIXIN -->
-        <view class="username">
-          {{ userInfo.username }}
-        </view>
-        <!-- #endif -->
-        <view class="user-id">
-          ID: {{ userInfo.userId }}
-        </view>
-      </view>
-    </view>
-
-    <view class="mt-3 break-all px-3">
-      {{ JSON.stringify(userInfo, null, 2) }}
-    </view>
-
-    <view class="mt-20 px-3">
-      <view class="m-auto w-160px text-center">
-        <button v-if="tokenStore.hasLogin" type="warn" class="w-full" @click="handleLogout">
-          退出登录
-        </button>
-        <button v-else type="primary" class="w-full" @click="handleLogin">
-          登录
-        </button>
-      </view>
-    </view>
+  <view class="mt-10 text-center text-green-500">
+    我的页面
   </view>
 </template>
-
-<style lang="scss" scoped>
-/* 基础样式 */
-.profile-container {
-  overflow: hidden;
-  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
-  // background-color: #f7f8fa;
-}
-/* 用户信息区域 */
-.user-info-section {
-  display: flex;
-  align-items: center;
-  padding: 40rpx;
-  margin: 30rpx 30rpx 20rpx;
-  background-color: #fff;
-  border-radius: 24rpx;
-  box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.08);
-  transition: all 0.3s ease;
-}
-
-.avatar-wrapper {
-  width: 160rpx;
-  height: 160rpx;
-  margin-right: 40rpx;
-  overflow: hidden;
-  border: 4rpx solid #f5f5f5;
-  border-radius: 50%;
-  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
-}
-.avatar-button {
-  height: 160rpx;
-  width: 160rpx;
-  padding: 0;
-  margin-right: 40rpx;
-  overflow: hidden;
-  border: 4rpx solid #f5f5f5;
-  border-radius: 50%;
-  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
-}
-.user-details {
-  flex: 1;
-}
-
-.username {
-  margin-bottom: 12rpx;
-  font-size: 38rpx;
-  font-weight: 600;
-  color: #333;
-  letter-spacing: 0.5rpx;
-}
-
-.user-id {
-  font-size: 28rpx;
-  color: #666;
-}
-
-.user-created {
-  margin-top: 8rpx;
-  font-size: 24rpx;
-  color: #999;
-}
-</style>

+ 0 - 31
src/router/config.ts

@@ -1,31 +0,0 @@
-import { getAllPages } from '@/utils'
-
-export const LOGIN_STRATEGY_MAP = {
-  DEFAULT_NO_NEED_LOGIN: 0, // 黑名单策略,默认可以进入APP
-  DEFAULT_NEED_LOGIN: 1, // 白名单策略,默认不可以进入APP,需要强制登录
-}
-// TODO: 1/3 登录策略,默认使用`无需登录策略`,即默认不需要登录就可以访问
-export const LOGIN_STRATEGY = LOGIN_STRATEGY_MAP.DEFAULT_NO_NEED_LOGIN
-export const isNeedLoginMode = LOGIN_STRATEGY === LOGIN_STRATEGY_MAP.DEFAULT_NEED_LOGIN
-
-export const LOGIN_PAGE = '/pages-fg/login/login'
-export const REGISTER_PAGE = '/pages-fg/login/register'
-export const NOT_FOUND_PAGE = '/pages-fg/404/index'
-
-export const LOGIN_PAGE_LIST = [LOGIN_PAGE, REGISTER_PAGE]
-
-// 在 definePage 里面配置了 excludeLoginPath 的页面,功能与 EXCLUDE_LOGIN_PATH_LIST 相同
-export const excludeLoginPathList = getAllPages('excludeLoginPath').map(page => page.path)
-
-// 排除在外的列表,白名单策略指白名单列表,黑名单策略指黑名单列表
-// TODO: 2/3 在 definePage 配置 excludeLoginPath,或者在下面配置 EXCLUDE_LOGIN_PATH_LIST
-export const EXCLUDE_LOGIN_PATH_LIST = [
-  '/pages/xxx/index', // 示例值
-  '/pages-sub/xxx/index', // 示例值
-  ...excludeLoginPathList, // 都是以 / 开头的 path
-]
-
-// 在小程序里面是否使用H5的登录页,默认为 false
-// 如果为 true 则复用 h5 的登录逻辑
-// TODO: 3/3 确定自己的登录页是否需要在小程序里面使用
-export const LOGIN_PAGE_ENABLE_IN_MP = false

+ 2 - 77
src/router/interceptor.ts

@@ -1,24 +1,12 @@
-import { isMp } from '@uni-helper/uni-env'
 /**
  * by 菲鸽 on 2025-08-19
  * 路由拦截,通常也是登录拦截
  * 黑、白名单的配置,请看 config.ts 文件, EXCLUDE_LOGIN_PATH_LIST
  */
-import { useTokenStore } from '@/store/token'
-import { isPageTabbar, tabbarStore } from '@/tabbar/store'
-import { getAllPages, getLastPage, HOME_PAGE, parseUrlToObj } from '@/utils/index'
-import { toLoginPage } from '@/utils/toLoginPage'
-import { EXCLUDE_LOGIN_PATH_LIST, isNeedLoginMode, LOGIN_PAGE, LOGIN_PAGE_ENABLE_IN_MP, NOT_FOUND_PAGE } from './config'
+import { tabbarStore } from '@/tabbar/store'
+import { getAllPages, getLastPage, parseUrlToObj } from '@/utils/index'
 
 export const FG_LOG_ENABLE = false
-export function judgeIsExcludePath(path: string) {
-  const isDev = import.meta.env.DEV
-  if (!isDev) {
-    return EXCLUDE_LOGIN_PATH_LIST.includes(path)
-  }
-  const allExcludeLoginPages = getAllPages('excludeLoginPath') // dev 环境下,需要每次都重新获取,否则新配置就不会生效
-  return EXCLUDE_LOGIN_PATH_LIST.includes(path) || (isDev && allExcludeLoginPages.some(page => page.path === path))
-}
 
 export const navigateToInterceptor = {
   // 注意,这里的url是 '/' 开头的,如 '/pages/index/index',跟 'pages.json' 里面的 path 不同
@@ -47,74 +35,11 @@ export const navigateToInterceptor = {
     // 处理路由不存在的情况
     if (path !== '/' && !getAllPages().some(page => page.path !== path)) {
       console.warn('路由不存在:', path)
-      uni.navigateTo({ url: NOT_FOUND_PAGE })
       return false // 明确表示阻止原路由继续执行
     }
 
     // 处理直接进入路由非首页时,tabbarIndex 不正确的问题
     tabbarStore.setAutoCurIdx(path)
-
-    // 小程序里面使用平台自带的登录,则不走下面的逻辑
-    if (isMp && !LOGIN_PAGE_ENABLE_IN_MP) {
-      return true // 明确表示允许路由继续执行
-    }
-
-    const tokenStore = useTokenStore()
-    FG_LOG_ENABLE && console.log('tokenStore.hasLogin:', tokenStore.hasLogin)
-
-    // 不管黑白名单,登录了就直接去吧(但是当前不能是登录页)
-    if (tokenStore.hasLogin) {
-      if (path !== LOGIN_PAGE) {
-        return true // 明确表示允许路由继续执行
-      }
-      else {
-        console.log('已经登录,但是还在登录页', myQuery.redirect)
-        const url = myQuery.redirect || HOME_PAGE
-        if (isPageTabbar(url)) {
-          uni.switchTab({ url })
-        }
-        else {
-          uni.navigateTo({ url })
-        }
-        return false // 明确表示阻止原路由继续执行
-      }
-    }
-    let fullPath = path
-
-    if (Object.keys(myQuery).length) {
-      fullPath += `?${Object.keys(myQuery).map(key => `${key}=${myQuery[key]}`).join('&')}`
-    }
-    const redirectQuery = `?redirect=${encodeURIComponent(fullPath)}`
-
-    // #region 1/2 默认需要登录的情况(白名单策略) ---------------------------
-    if (isNeedLoginMode) {
-      // 需要登录里面的 EXCLUDE_LOGIN_PATH_LIST 表示白名单,可以直接通过
-      if (judgeIsExcludePath(path)) {
-        return true // 明确表示允许路由继续执行
-      }
-      // 否则需要重定向到登录页
-      else {
-        if (path === LOGIN_PAGE) {
-          return true // 明确表示允许路由继续执行
-        }
-        FG_LOG_ENABLE && console.log('1 isNeedLogin(白名单策略) url:', fullPath)
-        toLoginPage({ queryString: redirectQuery })
-        return false // 明确表示阻止原路由继续执行
-      }
-    }
-    // #endregion 1/2 默认需要登录的情况(白名单策略) ---------------------------
-
-    // #region 2/2 默认不需要登录的情况(黑名单策略) ---------------------------
-    else {
-      // 不需要登录里面的 EXCLUDE_LOGIN_PATH_LIST 表示黑名单,需要重定向到登录页
-      if (judgeIsExcludePath(path)) {
-        FG_LOG_ENABLE && console.log('2 isNeedLogin(黑名单策略) url:', fullPath)
-        toLoginPage({ queryString: redirectQuery })
-        return false // 修改为false,阻止原路由继续执行
-      }
-      return true // 明确表示允许路由继续执行
-    }
-    // #endregion 2/2 默认不需要登录的情况(黑名单策略) ---------------------------
   },
 }
 

+ 0 - 1
src/store/index.ts

@@ -16,6 +16,5 @@ setActivePinia(store)
 export default store
 
 // 模块统一导出
-export * from './theme'
 export * from './token'
 export * from './user'

+ 0 - 42
src/store/theme.ts

@@ -1,42 +0,0 @@
-import type { ConfigProviderThemeVars } from 'wot-design-uni'
-
-import { defineStore } from 'pinia'
-
-export const useThemeStore = defineStore(
-  'theme-store',
-  () => {
-    /** 主题 */
-    const theme = ref<'light' | 'dark'>('light')
-
-    /** 主题变量 */
-    const themeVars = ref<ConfigProviderThemeVars>({
-      // colorTheme: 'red',
-      // buttonPrimaryBgColor: '#07c160',
-      // buttonPrimaryColor: '#07c160',
-    })
-
-    /** 设置主题变量 */
-    const setThemeVars = (partialVars: Partial<ConfigProviderThemeVars>) => {
-      themeVars.value = { ...themeVars.value, ...partialVars }
-    }
-
-    /** 切换主题 */
-    const toggleTheme = () => {
-      theme.value = theme.value === 'light' ? 'dark' : 'light'
-    }
-
-    return {
-      /** 设置主题变量 */
-      setThemeVars,
-      /** 切换主题 */
-      toggleTheme,
-      /** 主题变量 */
-      themeVars,
-      /** 主题 */
-      theme,
-    }
-  },
-  {
-    persist: true,
-  },
-)

+ 1 - 1
src/tabbar/index.vue

@@ -108,7 +108,7 @@ function getImageByIndex(index: number, item: CustomTabBarItem) {
               <!-- 如:<wd-icon name="home" /> (https://wot-design-uni.cn/component/icon.html) -->
               <!-- 如:<uv-icon name="home" /> (https://www.uvui.cn/components/icon.html) -->
               <!-- 如:<sar-icon name="image" /> (https://sard.wzt.zone/sard-uniapp-docs/components/icon)(sar没有home图标^_^) -->
-              <wd-icon :name="item.icon" size="20" />
+              <!-- <wd-icon :name="item.icon" size="20" /> -->
             </template>
             <template v-if="item.iconType === 'unocss' || item.iconType === 'iconfont'">
               <view :class="item.icon" class="text-20px" />

+ 2 - 10
src/tabbar/store.ts

@@ -1,9 +1,6 @@
 import type { CustomTabBarItem, CustomTabBarItemBadge } from './types'
 import { reactive } from 'vue'
 
-import { isNeedLoginMode } from '@/router/config'
-import { FG_LOG_ENABLE, judgeIsExcludePath } from '@/router/interceptor'
-import { useTokenStore } from '@/store/token'
 import { tabbarList as _tabbarList, customTabbarEnable, selectedTabbarStrategy, TABBAR_STRATEGY_MAP } from './config'
 
 // TODO 1/2: 中间的鼓包tabbarItem的开关
@@ -41,12 +38,8 @@ const tabbarStore = reactive({
   curIdx: uni.getStorageSync('app-tabbar-index') || 0,
   prevIdx: uni.getStorageSync('app-tabbar-index') || 0,
   setCurIdx(idx: number) {
-    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)
-    }
+    this.curIdx = idx
+    uni.setStorageSync('app-tabbar-index', idx)
   },
   setTabbarItemBadge(idx: number, badge: CustomTabBarItemBadge) {
     if (tabbarList[idx]) {
@@ -60,7 +53,6 @@ const tabbarStore = reactive({
       return
     }
     const index = tabbarList.findIndex(item => item.pagePath === path)
-    FG_LOG_ENABLE && console.log('index:', index, path)
     // console.log('tabbarList:', tabbarList)
     if (index === -1) {
       const pagesPathList = getCurrentPages().map(item => item.route.startsWith('/') ? item.route : `/${item.route}`)

+ 3 - 1
src/utils/toLoginPage.ts

@@ -1,4 +1,3 @@
-import { LOGIN_PAGE } from '@/router/config'
 import { getLastPage } from '@/utils'
 import { debounce } from '@/utils/debounce'
 
@@ -15,6 +14,9 @@ interface ToLoginPageOptions {
   queryString?: string
 }
 
+// TODO: 自己增加登录页
+const LOGIN_PAGE = '/pages/login/index'
+
 /**
  * 跳转到登录页, 带防抖处理
  *

+ 0 - 1
tsconfig.json

@@ -15,7 +15,6 @@
       "@uni-helper/uni-types",
       "@uni-helper/vite-plugin-uni-pages",
       "miniprogram-api-typings",
-      "wot-design-uni/global.d.ts",
       "z-paging/types",
       "./src/types/async-component.d.ts",
       "./src/types/async-import.d.ts",

+ 1 - 6
vite.config.ts

@@ -2,7 +2,6 @@ import path from 'node:path'
 import process from 'node:process'
 import Uni from '@uni-helper/plugin-uni'
 import Components from '@uni-helper/vite-plugin-uni-components'
-import { WotResolver } from '@uni-helper/vite-plugin-uni-components/resolvers'
 // @see https://uni-helper.js.org/vite-plugin-uni-layouts
 import UniLayouts from '@uni-helper/vite-plugin-uni-layouts'
 // @see https://github.com/uni-helper/vite-plugin-uni-manifest
@@ -72,10 +71,7 @@ export default defineConfig(({ command, mode }) => {
         exclude: ['**/components/**/**.*'],
         // pages 目录为 src/pages,分包目录不能配置在pages目录下!!
         // 是个数组,可以配置多个,但是不能为pages里面的目录!!
-        subPackages: [
-          'src/pages-fg', // 这个是相对必要的路由,尽量留着(登录页、注册页、404页等)
-          'src/pages-sub', // 这个多为示例代码,参考用的,开发完后注释掉即可(或者直接删除)
-        ],
+        subPackages: [],
         dts: 'src/types/uni-pages.d.ts',
       }),
       // Optimization 插件需要 page.json 文件,故应在 UniPages 插件之后执行
@@ -144,7 +140,6 @@ export default defineConfig(({ command, mode }) => {
       ),
       syncManifestPlugin(),
       Components({
-        resolvers: [WotResolver()],
         extensions: ['vue'],
         deep: true, // 是否递归扫描子目录,
         directoryAsNamespace: false, // 是否把目录名作为命名空间前缀,true 时组件名为 目录名+组件名,