diff --git a/pages.config.ts b/pages.config.ts index 18f7698..af8c6ed 100644 --- a/pages.config.ts +++ b/pages.config.ts @@ -11,7 +11,6 @@ export default defineUniPages({ easycom: { autoscan: true, custom: { - '^fly-(.*)': '@/components/fly-$1/fly-$1.vue', '^uni-(.*)': '@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue', }, }, diff --git a/src/components/fly-header/fly-header.vue b/src/components/fly-header/fly-header.vue deleted file mode 100644 index 9e34a4b..0000000 --- a/src/components/fly-header/fly-header.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/src/components/fly-login/README.md b/src/components/fly-login/README.md deleted file mode 100644 index c931549..0000000 --- a/src/components/fly-login/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# fly-login - -点击“点击显示微信头像”按钮后,出现的半屏登录弹窗,可以在任意页面引入。 - -仿“掘金小册”小程序。 - -![掘金小册登录](screenshot.png) diff --git a/src/components/fly-login/defaultAvatar.png b/src/components/fly-login/defaultAvatar.png deleted file mode 100644 index e69596a..0000000 Binary files a/src/components/fly-login/defaultAvatar.png and /dev/null differ diff --git a/src/components/fly-login/fly-login.vue b/src/components/fly-login/fly-login.vue deleted file mode 100644 index 8bf99bd..0000000 --- a/src/components/fly-login/fly-login.vue +++ /dev/null @@ -1,120 +0,0 @@ - - - - diff --git a/src/components/fly-login/screenshot.png b/src/components/fly-login/screenshot.png deleted file mode 100644 index 7ca7a26..0000000 Binary files a/src/components/fly-login/screenshot.png and /dev/null differ diff --git a/src/components/fly-navbar/README.md b/src/components/fly-navbar/README.md deleted file mode 100644 index cd5cf97..0000000 --- a/src/components/fly-navbar/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# fly-navbar - -建议本导航栏组件在设置 `"navigationStyle": "custom"` 的页面使用,目前支持微信小程序的页面滚动动画。 diff --git a/src/components/fly-navbar/fly-navbar.vue b/src/components/fly-navbar/fly-navbar.vue deleted file mode 100644 index 5636cb4..0000000 --- a/src/components/fly-navbar/fly-navbar.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - - - diff --git a/src/hooks/.gitkeep b/src/hooks/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/hooks/useNavbarWeixin.ts b/src/hooks/useNavbarWeixin.ts deleted file mode 100644 index e8f7aff..0000000 --- a/src/hooks/useNavbarWeixin.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { onReady } from '@dcloudio/uni-app' -import { getIsTabbar } from '@/utils/index' - -export default () => { - // 获取页面栈 - const pages = getCurrentPages() - const isTabbar = getIsTabbar() - - // 页面滚动到底部时的操作,通常用于加载更多数据 - const onScrollToLower = () => {} - // 获取屏幕边界到安全区域距离 - const { safeAreaInsets } = uni.getSystemInfoSync() - - // #ifdef MP-WEIXIN - // 基于小程序的 Page 类型扩展 uni-app 的 Page - type PageInstance = Page.PageInstance & WechatMiniprogram.Page.InstanceMethods - // 获取当前页面实例,数组最后一项 - const pageInstance = getCurrentPages().at(-1) as PageInstance - - // 页面渲染完毕,绑定动画效果 - onReady(() => { - // 动画效果,导航栏背景色 - pageInstance.animate( - '.fly-navbar', - [{ backgroundColor: 'transparent' }, { backgroundColor: '#f8f8f8' }], - 1000, - { - scrollSource: '#scroller', - timeRange: 1000, - startScrollOffset: 0, - endScrollOffset: 50, - }, - ) - // 动画效果,导航栏标题 - pageInstance.animate( - '.fly-navbar .title', - [{ color: 'transparent' }, { color: '#000' }], - 1000, - { - scrollSource: '#scroller', - timeRange: 1000, - startScrollOffset: 0, - endScrollOffset: 50, - }, - ) - // 动画效果,导航栏返回按钮 - pageInstance.animate('.fly-navbar .left-icon', [{ color: '#fff' }, { color: '#000' }], 1000, { - scrollSource: '#scroller', - timeRange: 1000, - startScrollOffset: 0, - endScrollOffset: 50, - }) - }) - // #endif - - return { - pages, - isTabbar, - onScrollToLower, - safeAreaInsets, - } -} diff --git a/src/hooks/useWeixinShare.ts b/src/hooks/useWeixinShare.ts deleted file mode 100644 index 47880c2..0000000 --- a/src/hooks/useWeixinShare.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app' - -export default () => { - return { - /** 激活“分享给好友” */ - onShareAppMessage: onShareAppMessage( - (options: Page.ShareAppMessageOption): Page.CustomShareContent => { - console.log('options:', options) - return { - title: '自定义分享标题', - path: '/pages/index/index?id=xxx', - imageUrl: - 'https://cip-shopping-page-0eysug01066a9e-1302818703.tcloudbaseapp.com/pretty-girl.png', - } - }, - ), - /** 激活“分享到朋友圈”, 注意:需要先激活“分享给好友” */ - onShareTimeline: onShareTimeline((): Page.ShareTimelineContent => { - return { - title: '自定义分享标题', - query: 'a=1&b=2', - } - }), - } -} diff --git a/src/pages-sub/.gitkeep b/src/pages-sub/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/pages-sub/niubi/index.vue b/src/pages-sub/niubi/index.vue deleted file mode 100644 index 9cd3762..0000000 --- a/src/pages-sub/niubi/index.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/src/static/tabbar/example.png b/src/static/tabbar/example.png deleted file mode 100644 index fd1e942..0000000 Binary files a/src/static/tabbar/example.png and /dev/null differ diff --git a/src/static/tabbar/exampleHL.png b/src/static/tabbar/exampleHL.png deleted file mode 100644 index 7501011..0000000 Binary files a/src/static/tabbar/exampleHL.png and /dev/null differ diff --git a/src/static/tabbar/home.png b/src/static/tabbar/home.png deleted file mode 100644 index 8f82e21..0000000 Binary files a/src/static/tabbar/home.png and /dev/null differ diff --git a/src/static/tabbar/homeHL.png b/src/static/tabbar/homeHL.png deleted file mode 100644 index 26d3761..0000000 Binary files a/src/static/tabbar/homeHL.png and /dev/null differ diff --git a/src/static/tabbar/personal.png b/src/static/tabbar/personal.png deleted file mode 100644 index 0a569a2..0000000 Binary files a/src/static/tabbar/personal.png and /dev/null differ diff --git a/src/static/tabbar/personalHL.png b/src/static/tabbar/personalHL.png deleted file mode 100644 index 8c3e66e..0000000 Binary files a/src/static/tabbar/personalHL.png and /dev/null differ diff --git a/src/store/count.ts b/src/store/count.ts deleted file mode 100644 index 946ccd7..0000000 --- a/src/store/count.ts +++ /dev/null @@ -1,28 +0,0 @@ -// src/store/useCountStore.ts -import { defineStore } from 'pinia' -import { ref } from 'vue' - -export const useCountStore = defineStore( - 'count', - () => { - const count = ref(0) - const increment = () => { - count.value++ - } - const decrement = () => { - count.value-- - } - const reset = () => { - count.value = 0 - } - return { - count, - decrement, - increment, - reset, - } - }, - { - persist: true, - }, -) diff --git a/src/store/index.ts b/src/store/index.ts index 74cb584..e5f6675 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -16,4 +16,3 @@ export default store // 模块统一导出 export * from './user' -export * from './count' diff --git a/src/test/import-sort.ts b/src/test/import-sort.ts deleted file mode 100644 index bd2c94f..0000000 --- a/src/test/import-sort.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function fun() { - console.log('import sort') -} diff --git a/src/test/index.ts b/src/test/index.ts deleted file mode 100644 index b2acff6..0000000 --- a/src/test/index.ts +++ /dev/null @@ -1 +0,0 @@ -import './trailing-comma' diff --git a/src/test/trailing-comma.ts b/src/test/trailing-comma.ts deleted file mode 100644 index 1517e9b..0000000 --- a/src/test/trailing-comma.ts +++ /dev/null @@ -1,6 +0,0 @@ -// 发现配置了 trailingcomma: "all" 也不会有函数的尾逗号, -// 与prettier官网描述的不一致。 @see https://prettier.io/docs/en/options#trailing-commas -export function fn(a: number, b: number) { - console.log(a, b) -} -fn(12, 2) diff --git a/src/utils/index.ts b/src/utils/index.ts index 156116f..e69de29 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,13 +0,0 @@ -import pagesJson from '@/pages.json' - -console.log(pagesJson) - -/** 判断当前页面是否是tabbar页 */ -export const getIsTabbar = () => { - if (!pagesJson.tabBar) { - return false - } - const pages = getCurrentPages() - const currPath = pages.at(-1).route - return !!pagesJson.tabBar.list.find((e) => e.pagePath === currPath) -}