├── .eslintignore
├── .eslintrc-auto-import.json
├── .eslintrc.js
├── .github
└── workflows
│ └── deploy.yml
├── .gitignore
├── LICENSE
├── README.md
├── auto-imports.d.ts
├── components.d.ts
├── index.html
├── package.json
├── pnpm-lock.yaml
├── postcss.config.js
├── src
├── App.vue
├── api
│ ├── album.ts
│ ├── albumList.ts
│ ├── artist.ts
│ ├── home.ts
│ ├── interface
│ │ ├── Album.ts
│ │ ├── AlbumList.ts
│ │ ├── Artist.ts
│ │ ├── ArtistAlbums.ts
│ │ ├── ArtistSongs.ts
│ │ ├── Banner.ts
│ │ ├── LoginStatus.ts
│ │ ├── Lyric.ts
│ │ ├── MVDetail.ts
│ │ ├── MVurl.ts
│ │ ├── NewAlbum.ts
│ │ ├── NewMV.ts
│ │ ├── NewSong.ts
│ │ ├── Playlist.ts
│ │ ├── Recommend.ts
│ │ ├── RecommendSongs.ts
│ │ ├── SearchAlbum.ts
│ │ ├── SearchArtist.ts
│ │ ├── SearchSong.ts
│ │ ├── SearchSuggest.ts
│ │ ├── SimiSongs.ts
│ │ ├── Song.ts
│ │ ├── SongUrl.ts
│ │ ├── Songlist.ts
│ │ ├── TopArtists.ts
│ │ ├── TopSearch.ts
│ │ ├── UserPlaylist.ts
│ │ └── UserSubcount.ts
│ ├── login.ts
│ ├── mv.ts
│ ├── neteasePlaylist.ts
│ ├── play.ts
│ ├── playlist.ts
│ ├── profile.ts
│ ├── search.ts
│ └── songlist.ts
├── components
│ ├── Album
│ │ └── Album.vue
│ ├── Artist
│ │ └── Artist.vue
│ ├── Countdown
│ │ └── Countdown.vue
│ ├── H5BackTransition
│ │ └── H5BackTransition.vue
│ ├── JIcon
│ │ └── JIcon.vue
│ ├── JImage
│ │ └── JImage.vue
│ ├── JSearch
│ │ └── JSearch.vue
│ ├── MV
│ │ └── MV.vue
│ ├── Navbar
│ │ └── Navbar.vue
│ ├── PlayController
│ │ ├── PlayController.vue
│ │ └── components
│ │ │ └── PlaylistPopup
│ │ │ └── PlaylistPopup.vue
│ ├── PlayQueue
│ │ └── PlayQueue.vue
│ ├── Song
│ │ └── Song.vue
│ ├── Songlist
│ │ └── Songlist.vue
│ ├── Subtitle
│ │ └── Subtitle.vue
│ └── VirtualSwiper
│ │ └── VirtualSwiper.vue
├── env.d.ts
├── hooks
│ ├── useCache.ts
│ ├── useLazyData.ts
│ ├── useNavigateTo.ts
│ └── useStatusBarHeight.ts
├── main.ts
├── manifest.json
├── pages.json
├── pages
│ └── index
│ │ ├── albumList
│ │ └── albumList.vue
│ │ ├── collectAlbums
│ │ └── collectAlbums.vue
│ │ ├── collectArtists
│ │ └── collectArtists.vue
│ │ ├── collectPlaylist
│ │ └── collectPlaylist.vue
│ │ ├── collectSongs
│ │ └── collectSongs.vue
│ │ ├── components
│ │ ├── Home
│ │ │ ├── Home.vue
│ │ │ └── components
│ │ │ │ ├── Carousel
│ │ │ │ └── Carousel.vue
│ │ │ │ ├── NewAlbum
│ │ │ │ └── NewAlbum.vue
│ │ │ │ ├── NewSong
│ │ │ │ └── NewSong.vue
│ │ │ │ ├── NewSonglist
│ │ │ │ └── NewSonglist.vue
│ │ │ │ ├── Recommend
│ │ │ │ └── Recommend.vue
│ │ │ │ └── SearchTags
│ │ │ │ └── SearchTags.vue
│ │ ├── NavTitle
│ │ │ └── NavTitle.vue
│ │ ├── NewMV
│ │ │ └── NewMV.vue
│ │ ├── Profile
│ │ │ ├── Profile.vue
│ │ │ └── components
│ │ │ │ └── Shelf
│ │ │ │ └── Shelf.vue
│ │ └── Search
│ │ │ └── Search.vue
│ │ ├── historyPlays
│ │ └── historyPlays.vue
│ │ ├── index.vue
│ │ ├── neteasePlaylist
│ │ └── neteasePlaylist.vue
│ │ └── songlist
│ │ └── songlist.vue
├── sharedPages
│ ├── album
│ │ ├── album.vue
│ │ └── components
│ │ │ └── AlbumInfo
│ │ │ └── AlbumInfo.vue
│ ├── artist
│ │ ├── artist.vue
│ │ └── components
│ │ │ ├── ArtistAlbums
│ │ │ └── ArtistAlbums.vue
│ │ │ ├── ArtistInfo
│ │ │ └── ArtistInfo.vue
│ │ │ └── ArtistSongs
│ │ │ └── ArtistSongs.vue
│ ├── login
│ │ └── login.vue
│ ├── play
│ │ ├── components
│ │ │ ├── Lyric
│ │ │ │ └── Lyric.vue
│ │ │ ├── NavBack
│ │ │ │ └── NavBack.vue
│ │ │ ├── PlayProgress
│ │ │ │ └── PlayProgress.vue
│ │ │ ├── PlaylistPopup
│ │ │ │ └── PlaylistPopup.vue
│ │ │ └── SongInfo
│ │ │ │ └── SongInfo.vue
│ │ └── play.vue
│ ├── playlist
│ │ ├── components
│ │ │ ├── Cover
│ │ │ │ └── Cover.vue
│ │ │ └── Creator
│ │ │ │ └── Creator.vue
│ │ └── playlist.vue
│ ├── search
│ │ ├── components
│ │ │ ├── SearchHistory
│ │ │ │ └── SearchHistory.vue
│ │ │ ├── SearchResult
│ │ │ │ └── SearchResult.vue
│ │ │ ├── TopArtists
│ │ │ │ └── TopArtists.vue
│ │ │ └── TopSearch
│ │ │ │ └── TopSearch.vue
│ │ └── search.vue
│ ├── searchAlbums
│ │ └── searchAlbums.vue
│ └── searchSongs
│ │ └── searchSongs.vue
├── shime-uni.d.ts
├── static
│ ├── MOO.jpg
│ ├── cd.png
│ ├── favicon copy.png
│ ├── favicon.png
│ ├── home.png
│ ├── moo.mobileconfig
│ ├── play.gif
│ ├── play.png
│ ├── playlist.png
│ └── record.png
├── store
│ ├── audio.ts
│ ├── cache.ts
│ └── user.ts
├── styles
│ ├── iconfont
│ │ ├── iconfont.css
│ │ ├── iconfont.ttf
│ │ └── iconfont2.ttf
│ └── index.css
├── uni_modules
│ ├── uni-badge
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-badge
│ │ │ │ └── uni-badge.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-calendar
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-calendar
│ │ │ │ ├── calendar.js
│ │ │ │ ├── i18n
│ │ │ │ ├── en.json
│ │ │ │ ├── index.js
│ │ │ │ ├── zh-Hans.json
│ │ │ │ └── zh-Hant.json
│ │ │ │ ├── uni-calendar-item.vue
│ │ │ │ ├── uni-calendar.vue
│ │ │ │ └── util.js
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-card
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-card
│ │ │ │ └── uni-card.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-collapse
│ │ ├── changelog.md
│ │ ├── components
│ │ │ ├── uni-collapse-item
│ │ │ │ └── uni-collapse-item.vue
│ │ │ └── uni-collapse
│ │ │ │ └── uni-collapse.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-combox
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-combox
│ │ │ │ └── uni-combox.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-countdown
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-countdown
│ │ │ │ ├── i18n
│ │ │ │ ├── en.json
│ │ │ │ ├── index.js
│ │ │ │ ├── zh-Hans.json
│ │ │ │ └── zh-Hant.json
│ │ │ │ └── uni-countdown.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-data-checkbox
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-data-checkbox
│ │ │ │ └── uni-data-checkbox.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-data-picker
│ │ ├── changelog.md
│ │ ├── components
│ │ │ ├── uni-data-picker
│ │ │ │ ├── keypress.js
│ │ │ │ └── uni-data-picker.vue
│ │ │ └── uni-data-pickerview
│ │ │ │ ├── uni-data-picker.js
│ │ │ │ └── uni-data-pickerview.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-data-select
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-data-select
│ │ │ │ └── uni-data-select.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-dateformat
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-dateformat
│ │ │ │ ├── date-format.js
│ │ │ │ └── uni-dateformat.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-datetime-picker
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-datetime-picker
│ │ │ │ ├── calendar-item.vue
│ │ │ │ ├── calendar.vue
│ │ │ │ ├── i18n
│ │ │ │ ├── en.json
│ │ │ │ ├── index.js
│ │ │ │ ├── zh-Hans.json
│ │ │ │ └── zh-Hant.json
│ │ │ │ ├── time-picker.vue
│ │ │ │ ├── uni-datetime-picker.vue
│ │ │ │ └── util.js
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-drawer
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-drawer
│ │ │ │ ├── keypress.js
│ │ │ │ └── uni-drawer.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-easyinput
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-easyinput
│ │ │ │ ├── common.js
│ │ │ │ └── uni-easyinput.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-fab
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-fab
│ │ │ │ └── uni-fab.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-fav
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-fav
│ │ │ │ ├── i18n
│ │ │ │ ├── en.json
│ │ │ │ ├── index.js
│ │ │ │ ├── zh-Hans.json
│ │ │ │ └── zh-Hant.json
│ │ │ │ └── uni-fav.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-file-picker
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-file-picker
│ │ │ │ ├── choose-and-upload-file.js
│ │ │ │ ├── uni-file-picker.vue
│ │ │ │ ├── upload-file.vue
│ │ │ │ ├── upload-image.vue
│ │ │ │ └── utils.js
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-forms
│ │ ├── changelog.md
│ │ ├── components
│ │ │ ├── uni-forms-item
│ │ │ │ └── uni-forms-item.vue
│ │ │ └── uni-forms
│ │ │ │ ├── uni-forms.vue
│ │ │ │ ├── utils.js
│ │ │ │ └── validate.js
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-goods-nav
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-goods-nav
│ │ │ │ ├── i18n
│ │ │ │ ├── en.json
│ │ │ │ ├── index.js
│ │ │ │ ├── zh-Hans.json
│ │ │ │ └── zh-Hant.json
│ │ │ │ └── uni-goods-nav.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-grid
│ │ ├── changelog.md
│ │ ├── components
│ │ │ ├── uni-grid-item
│ │ │ │ └── uni-grid-item.vue
│ │ │ └── uni-grid
│ │ │ │ └── uni-grid.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-group
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-group
│ │ │ │ └── uni-group.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-icons
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-icons
│ │ │ │ ├── icons.js
│ │ │ │ ├── uni-icons.vue
│ │ │ │ ├── uniicons.css
│ │ │ │ └── uniicons.ttf
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-indexed-list
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-indexed-list
│ │ │ │ ├── uni-indexed-list-item.vue
│ │ │ │ └── uni-indexed-list.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-link
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-link
│ │ │ │ └── uni-link.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-list
│ │ ├── changelog.md
│ │ ├── components
│ │ │ ├── uni-list-ad
│ │ │ │ └── uni-list-ad.vue
│ │ │ ├── uni-list-chat
│ │ │ │ ├── uni-list-chat.scss
│ │ │ │ └── uni-list-chat.vue
│ │ │ ├── uni-list-item
│ │ │ │ └── uni-list-item.vue
│ │ │ └── uni-list
│ │ │ │ ├── uni-list.vue
│ │ │ │ ├── uni-refresh.vue
│ │ │ │ └── uni-refresh.wxs
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-load-more
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-load-more
│ │ │ │ ├── i18n
│ │ │ │ ├── en.json
│ │ │ │ ├── index.js
│ │ │ │ ├── zh-Hans.json
│ │ │ │ └── zh-Hant.json
│ │ │ │ └── uni-load-more.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-nav-bar
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-nav-bar
│ │ │ │ ├── uni-nav-bar.vue
│ │ │ │ └── uni-status-bar.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-notice-bar
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-notice-bar
│ │ │ │ └── uni-notice-bar.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-number-box
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-number-box
│ │ │ │ └── uni-number-box.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-pagination
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-pagination
│ │ │ │ ├── i18n
│ │ │ │ ├── en.json
│ │ │ │ ├── es.json
│ │ │ │ ├── fr.json
│ │ │ │ ├── index.js
│ │ │ │ ├── zh-Hans.json
│ │ │ │ └── zh-Hant.json
│ │ │ │ └── uni-pagination.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-popup
│ │ ├── changelog.md
│ │ ├── components
│ │ │ ├── uni-popup-dialog
│ │ │ │ ├── keypress.js
│ │ │ │ └── uni-popup-dialog.vue
│ │ │ ├── uni-popup-message
│ │ │ │ └── uni-popup-message.vue
│ │ │ ├── uni-popup-share
│ │ │ │ └── uni-popup-share.vue
│ │ │ └── uni-popup
│ │ │ │ ├── i18n
│ │ │ │ ├── en.json
│ │ │ │ ├── index.js
│ │ │ │ ├── zh-Hans.json
│ │ │ │ └── zh-Hant.json
│ │ │ │ ├── keypress.js
│ │ │ │ ├── popup.js
│ │ │ │ └── uni-popup.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-rate
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-rate
│ │ │ │ └── uni-rate.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-row
│ │ ├── changelog.md
│ │ ├── components
│ │ │ ├── uni-col
│ │ │ │ └── uni-col.vue
│ │ │ └── uni-row
│ │ │ │ └── uni-row.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-scss
│ │ ├── changelog.md
│ │ ├── index.scss
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── styles
│ │ │ ├── index.scss
│ │ │ ├── setting
│ │ │ │ ├── _border.scss
│ │ │ │ ├── _color.scss
│ │ │ │ ├── _radius.scss
│ │ │ │ ├── _space.scss
│ │ │ │ ├── _styles.scss
│ │ │ │ ├── _text.scss
│ │ │ │ └── _variables.scss
│ │ │ └── tools
│ │ │ │ └── functions.scss
│ │ ├── theme.scss
│ │ └── variables.scss
│ ├── uni-search-bar
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-search-bar
│ │ │ │ ├── i18n
│ │ │ │ ├── en.json
│ │ │ │ ├── index.js
│ │ │ │ ├── zh-Hans.json
│ │ │ │ └── zh-Hant.json
│ │ │ │ └── uni-search-bar.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-section
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-section
│ │ │ │ └── uni-section.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-segmented-control
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-segmented-control
│ │ │ │ └── uni-segmented-control.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-steps
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-steps
│ │ │ │ └── uni-steps.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-swipe-action
│ │ ├── changelog.md
│ │ ├── components
│ │ │ ├── uni-swipe-action-item
│ │ │ │ ├── bindingx.js
│ │ │ │ ├── isPC.js
│ │ │ │ ├── mpalipay.js
│ │ │ │ ├── mpother.js
│ │ │ │ ├── mpwxs.js
│ │ │ │ ├── render.js
│ │ │ │ ├── uni-swipe-action-item.vue
│ │ │ │ └── wx.wxs
│ │ │ └── uni-swipe-action
│ │ │ │ └── uni-swipe-action.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-swiper-dot
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-swiper-dot
│ │ │ │ └── uni-swiper-dot.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-table
│ │ ├── changelog.md
│ │ ├── components
│ │ │ ├── uni-table
│ │ │ │ └── uni-table.vue
│ │ │ ├── uni-tbody
│ │ │ │ └── uni-tbody.vue
│ │ │ ├── uni-td
│ │ │ │ └── uni-td.vue
│ │ │ ├── uni-th
│ │ │ │ ├── filter-dropdown.vue
│ │ │ │ └── uni-th.vue
│ │ │ ├── uni-thead
│ │ │ │ └── uni-thead.vue
│ │ │ └── uni-tr
│ │ │ │ ├── table-checkbox.vue
│ │ │ │ └── uni-tr.vue
│ │ ├── i18n
│ │ │ ├── en.json
│ │ │ ├── es.json
│ │ │ ├── fr.json
│ │ │ ├── index.js
│ │ │ ├── zh-Hans.json
│ │ │ └── zh-Hant.json
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-tag
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-tag
│ │ │ │ └── uni-tag.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-title
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-title
│ │ │ │ └── uni-title.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-tooltip
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-tooltip
│ │ │ │ └── uni-tooltip.vue
│ │ ├── package.json
│ │ └── readme.md
│ ├── uni-transition
│ │ ├── changelog.md
│ │ ├── components
│ │ │ └── uni-transition
│ │ │ │ ├── createAnimation.js
│ │ │ │ └── uni-transition.vue
│ │ ├── package.json
│ │ └── readme.md
│ └── uni-ui
│ │ ├── changelog.md
│ │ ├── components
│ │ └── uni-ui
│ │ │ └── uni-ui.vue
│ │ ├── package.json
│ │ └── readme.md
└── utils
│ ├── request.ts
│ ├── simpleAxios
│ ├── index.ts
│ ├── types.ts
│ └── utils.ts
│ ├── toast.ts
│ └── util.ts
├── tailwind.config.js
├── tsconfig.json
└── vite.config.ts
/.eslintignore:
--------------------------------------------------------------------------------
1 | build/*.js
2 | src/assets
3 | src/uni_modules
4 | public
5 | dist
6 | dist_prod
7 | dist_test
8 | node_modules
9 |
--------------------------------------------------------------------------------
/.github/workflows/deploy.yml:
--------------------------------------------------------------------------------
1 | name: Deploy
2 | on:
3 | push:
4 | branches: main
5 | pull_request:
6 | branches: main
7 |
8 | jobs:
9 | deploy:
10 | name: Deploy
11 | runs-on: ubuntu-latest
12 |
13 | permissions:
14 | id-token: write # Needed for auth with Deno Deploy
15 | contents: read # Needed to clone the repository
16 |
17 | steps:
18 | - name: Clone repository
19 | uses: actions/checkout@v4
20 |
21 | - name: Install Deno
22 | uses: denoland/setup-deno@v1
23 | with:
24 | deno-version: v1.x
25 |
26 | - name: Install Node.js
27 | uses: actions/setup-node@v4
28 | with:
29 | node-version: lts/*
30 |
31 | - name: Install step
32 | run: "npm install"
33 |
34 | - name: Build step
35 | run: "npm run build:h5"
36 |
37 | - name: Upload to Deno Deploy
38 | uses: denoland/deployctl@v1
39 | with:
40 | project: "moo"
41 | entrypoint: "https://deno.land/std@0.217.0/http/file_server.ts"
42 | root: "dist/build/h5"
43 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | .DS_Store
12 | dist
13 | *.local
14 | unpackage
15 |
16 | # Editor directories and files
17 | .hbuilderx
18 | .idea
19 | .vscode
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Jaye。
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 🎵 MOO音乐
2 |
3 | >使用uni-app、vue3、pinia、typescript、tailwindcss开发的可多端(支持移动端web网页、微信小程序、android、ios端等,**小程序端和ios端需自行打包**)运行的音乐播放器
4 | - API数据来源[NeteaseCloudMusicApi](https://github.com/Binaryify/NeteaseCloudMusicApi)
5 | - **[web端体验MOO](https://moo.deno.dev/)**
6 | - **[安卓APP下载](https://github.com/lei1248276/MOO-music/releases)**
7 | - **[ios书签版](https://moo.deno.dev/static/moo.mobileconfig)(书签描述文件请使用手机浏览器打开安装,APP版需自行打包)**
8 | - **微信小程序线上版(因资质问题,已下架)**
9 |
10 | ### 技术栈
11 | - 🚀 UI组件是自定义的 + uni-ui
12 | - 🚀 vue3
13 | - 🚀 pinia
14 | - 🚀 tailwindcss + sass
15 | - 🚀 vite
16 | - 🚀 typescript、eslint
17 | - 🚀 auto-imports
18 |
19 | ### 功能与页面
20 | - 🎵 登录网易云音乐账号
21 | - 🎵 获取网易云音乐收藏歌单
22 | - 🎵 个人歌单、歌曲推荐
23 | - 🎵 歌曲联想功能
24 | - 🎵 banner歌单、歌曲展示
25 | - 🎵 随机推荐歌单、歌曲
26 | - 🎵 在线搜索歌单、歌曲、歌手
27 | - 🎵 独立播放页面轮博展示
28 | - 🎵 播放控制器
29 | - 🎵 歌曲收藏
30 | - 🎵 歌单收藏
31 | - 🎵 专辑收藏
32 | - 🎵 歌手收藏
33 | - 🎵 历史播放记录
34 | - 🎵 历史搜索记录
35 | - 🎵 本地缓存歌单、音乐、歌手、专辑、历史记录
36 |
37 | ### 安装和使用
38 | - install
39 | ```shell
40 | pnpm install
41 | ```
42 | - dev(app请使用HBuilderX)
43 | ```shell
44 | pnpm dev:h5
45 | ```
46 | ```shell
47 | pnpm dev:mp-weixin
48 | ```
49 | - build(app请使用HBuilderX)
50 | ```shell
51 | pnpm build:h5
52 | ```
53 | ```shell
54 | pnpm build:mp-weixin
55 | ```
56 |
57 |
58 | ### 看图吧
59 |
65 |
--------------------------------------------------------------------------------
/components.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | /* prettier-ignore */
3 | // @ts-nocheck
4 | // Generated by unplugin-vue-components
5 | // Read more: https://github.com/vuejs/core/pull/3399
6 | export {}
7 |
8 | declare module 'vue' {
9 | export interface GlobalComponents {
10 | Album: typeof import('./src/components/Album/Album.vue')['default']
11 | Artist: typeof import('./src/components/Artist/Artist.vue')['default']
12 | Countdown: typeof import('./src/components/Countdown/Countdown.vue')['default']
13 | H5BackTransition: typeof import('./src/components/H5BackTransition/H5BackTransition.vue')['default']
14 | JIcon: typeof import('./src/components/JIcon/JIcon.vue')['default']
15 | JImage: typeof import('./src/components/JImage/JImage.vue')['default']
16 | JSearch: typeof import('./src/components/JSearch/JSearch.vue')['default']
17 | MV: typeof import('./src/components/MV/MV.vue')['default']
18 | Navbar: typeof import('./src/components/Navbar/Navbar.vue')['default']
19 | PlayController: typeof import('./src/components/PlayController/PlayController.vue')['default']
20 | PlaylistPopup: typeof import('./src/components/PlayController/components/PlaylistPopup/PlaylistPopup.vue')['default']
21 | PlayQueue: typeof import('./src/components/PlayQueue/PlayQueue.vue')['default']
22 | RouterLink: typeof import('vue-router')['RouterLink']
23 | RouterView: typeof import('vue-router')['RouterView']
24 | Song: typeof import('./src/components/Song/Song.vue')['default']
25 | Songlist: typeof import('./src/components/Songlist/Songlist.vue')['default']
26 | Subtitle: typeof import('./src/components/Subtitle/Subtitle.vue')['default']
27 | VirtualSwiper: typeof import('./src/components/VirtualSwiper/VirtualSwiper.vue')['default']
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
16 | 🎵 MOO
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: [
3 | require('autoprefixer'),
4 | require('tailwindcss'),
5 | require('postcss-rem-to-responsive-pixel')({
6 | rootValue: 32,
7 | propList: ['*'],
8 | transformUnit: 'rpx'
9 | })
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
8 |
9 |
12 |
--------------------------------------------------------------------------------
/src/api/album.ts:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 | import type { AlbumResponse } from '@/api/interface/Album'
3 |
4 | // * 获取专辑内容
5 | export function getAlbumDetail(id: number) {
6 | return request.get(`/album?id=${id}`)
7 | }
8 |
--------------------------------------------------------------------------------
/src/api/albumList.ts:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 | import type { AlbumListResponse } from '@/api/interface/AlbumList'
3 |
4 | /**
5 | * @description 获取所有专辑
6 | * @param area : ALL:全部,ZH:华语,EA:欧美,KR:韩国,JP:日本
7 | * @param offset : 偏移数量,用于分页 , 如 :( 页数 -1)*30, 其中 30 为 limit 的值 , 默认为 0
8 | * @param limit : 返回数量 , 默认为 30
9 | */
10 | export function getAlbumList(area: 'ALL' | 'ZH' | 'EA' | 'KR' | 'JP' = 'ALL', offset = 0, limit = 20) {
11 | return request.get(`/album/new?area=${area}&offset=${offset}&limit=${limit}`)
12 | }
13 |
--------------------------------------------------------------------------------
/src/api/artist.ts:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 | import type { ArtistResponse } from './interface/Artist'
3 | import type { ArtistSongsResponse } from './interface/ArtistSongs'
4 | import type { ArtistAlbumsResponse } from './interface/ArtistAlbums'
5 |
6 | /**
7 | * @description 获取歌手详情
8 | * @param id 歌手ID
9 | */
10 | export function getArtistDetail(id: number) {
11 | return request.get(`/artist/detail?id=${id}`)
12 | }
13 |
14 | /**
15 | * @description 获取歌手歌曲
16 | * @param id 歌手ID
17 | */
18 | export function getArtistSongs(id: number) {
19 | return request.get(`/artists?id=${id}`)
20 | }
21 |
22 | /**
23 | * @description 获取歌手专辑
24 | * @param id 歌手ID
25 | */
26 | export function getArtistAlbums(id: number) {
27 | return request.get(`/artist/album?id=${id}`)
28 | }
29 |
--------------------------------------------------------------------------------
/src/api/interface/AlbumList.ts:
--------------------------------------------------------------------------------
1 | export interface AlbumListResponse {
2 | total: number
3 | albums: Album[]
4 | code: number
5 | }
6 |
7 | export interface Album {
8 | songs: any[]
9 | paid: boolean
10 | onSale: boolean
11 | mark: number
12 | awardTags: any
13 | companyId: number
14 | blurPicUrl: string
15 | publishTime: number
16 | company: string
17 | alias: any[]
18 | artists: Artist[]
19 | copyrightId: number
20 | picId: number
21 | artist: Artist2
22 | pic: number
23 | briefDesc: string
24 | picUrl: string
25 | commentThreadId: string
26 | tags: string
27 | description: string
28 | status: number
29 | subType: string
30 | name: string
31 | id: number
32 | type: string
33 | size: number
34 | picId_str: string
35 | }
36 |
37 | export interface Artist {
38 | img1v1Id: number
39 | topicPerson: number
40 | followed: boolean
41 | alias: any[]
42 | picId: number
43 | musicSize: number
44 | albumSize: number
45 | briefDesc: string
46 | picUrl: string
47 | img1v1Url: string
48 | trans: string
49 | name: string
50 | id: number
51 | img1v1Id_str: string
52 | }
53 |
54 | export interface Artist2 {
55 | img1v1Id: number
56 | topicPerson: number
57 | followed: boolean
58 | alias: string[]
59 | picId: number
60 | musicSize: number
61 | albumSize: number
62 | briefDesc: string
63 | picUrl: string
64 | img1v1Url: string
65 | trans: string
66 | name: string
67 | id: number
68 | picId_str: string
69 | img1v1Id_str: string
70 | transNames?: string[]
71 | }
72 |
--------------------------------------------------------------------------------
/src/api/interface/ArtistAlbums.ts:
--------------------------------------------------------------------------------
1 | export interface ArtistAlbumsResponse {
2 | artist: Artist
3 | hotAlbums: HotAlbum[]
4 | more: boolean
5 | code: number
6 | }
7 |
8 | export interface Artist {
9 | img1v1Id: number
10 | topicPerson: number
11 | alias: any[]
12 | picId: number
13 | trans: string
14 | briefDesc: string
15 | musicSize: number
16 | albumSize: number
17 | picUrl: string
18 | img1v1Url: string
19 | followed: boolean
20 | name: string
21 | id: number
22 | picId_str: string
23 | img1v1Id_str: string
24 | }
25 |
26 | export interface HotAlbum {
27 | songs: any[]
28 | paid: boolean
29 | onSale: boolean
30 | mark: number
31 | awardTags: any
32 | companyId: number
33 | blurPicUrl: string
34 | alias: string[]
35 | artists: Artist2[]
36 | copyrightId: number
37 | picId: number
38 | artist: Artist3
39 | publishTime: number
40 | company: string
41 | briefDesc: string
42 | picUrl: string
43 | commentThreadId: string
44 | pic: number
45 | description: string
46 | tags: string
47 | status: number
48 | subType: string
49 | name: string
50 | id: number
51 | type: string
52 | size: number
53 | picId_str: string
54 | isSub: boolean
55 | transNames?: string[]
56 | }
57 |
58 | export interface Artist2 {
59 | img1v1Id: number
60 | topicPerson: number
61 | alias: any[]
62 | picId: number
63 | trans: string
64 | briefDesc: string
65 | musicSize: number
66 | albumSize: number
67 | picUrl: string
68 | img1v1Url: string
69 | followed: boolean
70 | name: string
71 | id: number
72 | img1v1Id_str: string
73 | }
74 |
75 | export interface Artist3 {
76 | img1v1Id: number
77 | topicPerson: number
78 | alias: string[]
79 | picId: number
80 | trans: string
81 | briefDesc: string
82 | musicSize: number
83 | albumSize: number
84 | picUrl: string
85 | img1v1Url: string
86 | followed: boolean
87 | name: string
88 | id: number
89 | picId_str: string
90 | img1v1Id_str: string
91 | }
92 |
--------------------------------------------------------------------------------
/src/api/interface/LoginStatus.ts:
--------------------------------------------------------------------------------
1 | export interface LoginStatusResponse {
2 | data: Data
3 | }
4 |
5 | export interface Data {
6 | code: number
7 | account: Account
8 | profile: Profile | null
9 | }
10 |
11 | export interface Account {
12 | id: number
13 | userName: string
14 | type: number
15 | status: number
16 | whitelistAuthority: number
17 | createTime: number
18 | tokenVersion: number
19 | ban: number
20 | baoyueVersion: number
21 | donateVersion: number
22 | vipType: number
23 | anonimousUser: boolean
24 | paidFee: boolean
25 | }
26 |
27 | export interface Profile {
28 | userId: number
29 | userType: number
30 | nickname: string
31 | avatarImgId: number
32 | avatarUrl: string
33 | backgroundImgId: number
34 | backgroundUrl: string
35 | signature: any
36 | createTime: number
37 | userName: string
38 | accountType: number
39 | shortUserName: string
40 | birthday: number
41 | authority: number
42 | gender: number
43 | accountStatus: number
44 | province: number
45 | city: number
46 | authStatus: number
47 | description: any
48 | detailDescription: any
49 | defaultAvatar: boolean
50 | expertTags: any
51 | experts: any
52 | djStatus: number
53 | locationStatus: number
54 | vipType: number
55 | followed: boolean
56 | mutual: boolean
57 | authenticated: boolean
58 | lastLoginTime: number
59 | lastLoginIP: string
60 | remarkName: any
61 | viptypeVersion: number
62 | authenticationTypes: number
63 | avatarDetail: any
64 | anchor: boolean
65 | }
66 |
--------------------------------------------------------------------------------
/src/api/interface/Lyric.ts:
--------------------------------------------------------------------------------
1 | export interface LyricResponse {
2 | sgc: boolean
3 | sfy: boolean
4 | qfy: boolean
5 | transUser: TransUser
6 | lyricUser: LyricUser
7 | needDesc?: boolean
8 | lrc: Lrc
9 | klyric?: Klyric
10 | tlyric?: Tlyric
11 | romalrc?: Romalrc
12 | code: number
13 | }
14 |
15 | export interface TransUser {
16 | id: number
17 | status: number
18 | demand: number
19 | userid: number
20 | nickname: string
21 | uptime: number
22 | }
23 |
24 | export interface LyricUser {
25 | id: number
26 | status: number
27 | demand: number
28 | userid: number
29 | nickname: string
30 | uptime: number
31 | }
32 |
33 | export interface Lrc {
34 | version: number
35 | lyric: string
36 | }
37 |
38 | export interface Klyric {
39 | version: number
40 | lyric: string
41 | }
42 |
43 | export interface Tlyric {
44 | version: number
45 | lyric: string
46 | }
47 |
48 | export interface Romalrc {
49 | version: number
50 | lyric: string
51 | }
52 |
--------------------------------------------------------------------------------
/src/api/interface/MVDetail.ts:
--------------------------------------------------------------------------------
1 | export interface MVDetailResponse {
2 | loadingPic: string
3 | bufferPic: string
4 | loadingPicFS: string
5 | bufferPicFS: string
6 | subed: boolean
7 | mp: {
8 | id: number
9 | fee: number
10 | mvFee: number
11 | payed: number
12 | pl: number
13 | dl: number
14 | cp: number
15 | sid: number
16 | st: number
17 | normal: boolean
18 | unauthorized: boolean
19 | msg: any
20 | }
21 | data: {
22 | id: number
23 | name: string
24 | artistId: number
25 | artistName: string
26 | briefDesc: string
27 | desc: string
28 | cover: string
29 | coverId_str: string
30 | coverId: number
31 | playCount: number
32 | subCount: number
33 | shareCount: number
34 | commentCount: number
35 | duration: number
36 | nType: number
37 | publishTime: string
38 | price: any
39 | brs: Array<{
40 | size: number
41 | br: number
42 | point: number
43 | }>
44 | artists: Array<{
45 | id: number
46 | name: string
47 | img1v1Url: string
48 | followed: boolean
49 | }>
50 | commentThreadId: string
51 | videoGroup: Array
52 | }
53 | code: number
54 | }
55 |
--------------------------------------------------------------------------------
/src/api/interface/MVurl.ts:
--------------------------------------------------------------------------------
1 | export interface MVurlResponse {
2 | code: number
3 | data: {
4 | id: number
5 | url: string
6 | r: number
7 | size: number
8 | md5: string
9 | code: number
10 | expi: number
11 | fee: number
12 | mvFee: number
13 | st: number
14 | promotionVo: any
15 | msg: string
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/api/interface/NewAlbum.ts:
--------------------------------------------------------------------------------
1 | export interface NewAlbumResponse {
2 | code: number
3 | albums: Album[]
4 | }
5 |
6 | export interface Album {
7 | name: string
8 | id: number
9 | type: string
10 | size: number
11 | picId: number
12 | blurPicUrl: string
13 | companyId: number
14 | pic: number
15 | picUrl: string
16 | publishTime: number
17 | description: string
18 | tags: string
19 | company: string
20 | briefDesc: string
21 | artist: Artist
22 | songs: any
23 | alias: string[]
24 | status: number
25 | copyrightId: number
26 | commentThreadId: string
27 | artists: Artist2[]
28 | paid: boolean
29 | onSale: boolean
30 | picId_str: string
31 | transNames?: string[]
32 | }
33 |
34 | export interface Artist {
35 | name: string
36 | id: number
37 | picId: number
38 | img1v1Id: number
39 | briefDesc: string
40 | picUrl: string
41 | img1v1Url: string
42 | albumSize: number
43 | alias: string[]
44 | trans: string
45 | musicSize: number
46 | topicPerson: number
47 | picId_str?: string
48 | transNames?: string[]
49 | img1v1Id_str: string
50 | }
51 |
52 | export interface Artist2 {
53 | name: string
54 | id: number
55 | picId: number
56 | img1v1Id: number
57 | briefDesc: string
58 | picUrl: string
59 | img1v1Url: string
60 | albumSize: number
61 | alias: any[]
62 | trans: string
63 | musicSize: number
64 | topicPerson: number
65 | img1v1Id_str: string
66 | }
67 |
--------------------------------------------------------------------------------
/src/api/interface/NewMV.ts:
--------------------------------------------------------------------------------
1 | export interface NewMVResponse {
2 | data: Array<{
3 | id: number
4 | cover: string
5 | name: string
6 | playCount: number
7 | briefDesc: any
8 | desc: any
9 | artistName: string
10 | artistId: number
11 | duration: number
12 | mark: number
13 | subed: boolean
14 | artists: Array<{
15 | id: number
16 | name: string
17 | }>
18 | alias?: Array
19 | transNames?: Array
20 | }>
21 | code: number
22 | }
23 |
--------------------------------------------------------------------------------
/src/api/interface/Recommend.ts:
--------------------------------------------------------------------------------
1 | export interface RecommendResponse {
2 | hasTaste: boolean
3 | code: number
4 | category: number
5 | result?: Recommend[]
6 | recommend?: Recommend[]
7 | }
8 |
9 | export interface Recommend {
10 | id: number
11 | type: number
12 | name: string
13 | copywriter: string
14 | picUrl: string
15 | canDislike: boolean
16 | trackNumberUpdateTime: number
17 | playCount: number
18 | trackCount: number
19 | highQuality: boolean
20 | alg: string
21 | }
22 |
--------------------------------------------------------------------------------
/src/api/interface/SearchAlbum.ts:
--------------------------------------------------------------------------------
1 | export interface SearchAlbumResponse {
2 | result: AlbumResult
3 | code: number
4 | }
5 |
6 | export interface AlbumResult {
7 | albums: Album[]
8 | albumCount: number
9 | }
10 |
11 | export interface Album {
12 | name: string
13 | id: number
14 | idStr: string
15 | type: string
16 | size: number
17 | picId: number
18 | blurPicUrl: string
19 | companyId: number
20 | pic: number
21 | picUrl: string
22 | publishTime: number
23 | description: string
24 | tags: string
25 | company: string
26 | briefDesc: string
27 | artist: Artist
28 | songs: any[]
29 | alias: any[]
30 | status: number
31 | copyrightId: number
32 | commentThreadId: string
33 | artists: Artist2[]
34 | picId_str: string
35 | isSub: boolean
36 | }
37 |
38 | export interface Artist {
39 | name: string
40 | id: number
41 | picId: number
42 | img1v1Id: number
43 | briefDesc: string
44 | picUrl: string
45 | img1v1Url: string
46 | albumSize: number
47 | alias: any[]
48 | trans: string
49 | musicSize: number
50 | picId_str: string
51 | }
52 |
53 | export interface Artist2 {
54 | name: string
55 | id: number
56 | picId: number
57 | img1v1Id: number
58 | briefDesc: string
59 | picUrl: string
60 | img1v1Url: string
61 | albumSize: number
62 | alias: any[]
63 | trans: string
64 | musicSize: number
65 | }
66 |
--------------------------------------------------------------------------------
/src/api/interface/SearchArtist.ts:
--------------------------------------------------------------------------------
1 | export interface SearchArtistResponse {
2 | result: ArtistResult
3 | code: number
4 | }
5 |
6 | export interface ArtistResult {
7 | artistCount: number
8 | artists: Artist[]
9 | searchQcReminder: any
10 | }
11 |
12 | export interface Artist {
13 | id: number
14 | name: string
15 | picUrl: string
16 | alias: string[]
17 | albumSize: number
18 | picId: number
19 | fansGroup: any
20 | img1v1Url: string
21 | img1v1: number
22 | mvSize: number
23 | followed: boolean
24 | trans?: string
25 | accountId?: number
26 | transNames?: string[]
27 | alia?: string[]
28 | }
29 |
--------------------------------------------------------------------------------
/src/api/interface/SearchSuggest.ts:
--------------------------------------------------------------------------------
1 | export interface SearchSuggestResponse {
2 | result: Result
3 | code: number
4 | }
5 |
6 | export interface Result {
7 | allMatch: Suggests[]
8 | }
9 |
10 | export interface Suggests {
11 | keyword: string
12 | type: number
13 | alg: string
14 | lastKeyword: string
15 | feature: string
16 | }
17 |
--------------------------------------------------------------------------------
/src/api/interface/SongUrl.ts:
--------------------------------------------------------------------------------
1 | export interface SongURLResponse {
2 | data: SongURL[]
3 | code: number
4 | }
5 |
6 | export interface SongURL {
7 | id: number
8 | url: string
9 | br: number
10 | size: number
11 | md5: string
12 | code: number
13 | expi: number
14 | type: string
15 | gain: number
16 | peak: number
17 | fee: number
18 | uf: any
19 | payed: number
20 | flag: number
21 | canExtend: boolean
22 | freeTrialInfo: any
23 | level: string
24 | encodeType: string
25 | freeTrialPrivilege: FreeTrialPrivilege
26 | freeTimeTrialPrivilege: FreeTimeTrialPrivilege
27 | urlSource: number
28 | rightSource: number
29 | podcastCtrp: any
30 | effectTypes: any
31 | time: number
32 | }
33 |
34 | export interface FreeTrialPrivilege {
35 | resConsumable: boolean
36 | userConsumable: boolean
37 | listenType: any
38 | cannotListenReason: any
39 | }
40 |
41 | export interface FreeTimeTrialPrivilege {
42 | resConsumable: boolean
43 | userConsumable: boolean
44 | type: number
45 | remainTime: number
46 | }
47 |
--------------------------------------------------------------------------------
/src/api/interface/TopArtists.ts:
--------------------------------------------------------------------------------
1 | export interface TopArtistsResponse {
2 | code: number
3 | more: boolean
4 | artists: Artist[]
5 | }
6 |
7 | export interface Artist {
8 | name: string
9 | id: number
10 | picId: number
11 | img1v1Id: number
12 | briefDesc: string
13 | picUrl: string
14 | img1v1Url: string
15 | albumSize: number
16 | alias: string[]
17 | trans: string
18 | musicSize: number
19 | topicPerson: number
20 | showPrivateMsg: any
21 | isSubed: any
22 | accountId?: number
23 | picId_str: string
24 | img1v1Id_str: string
25 | transNames: any
26 | followed: boolean
27 | mvSize: any
28 | publishTime: any
29 | identifyTag: any
30 | alg: any
31 | fansCount: number
32 | }
33 |
--------------------------------------------------------------------------------
/src/api/interface/TopSearch.ts:
--------------------------------------------------------------------------------
1 | export interface TopSearchResponse {
2 | code: number
3 | result: Result
4 | }
5 |
6 | export interface Result {
7 | hots: TopSearch[]
8 | }
9 |
10 | export interface TopSearch {
11 | first: string
12 | second: number
13 | third: any
14 | iconType: number
15 | }
16 |
--------------------------------------------------------------------------------
/src/api/interface/UserSubcount.ts:
--------------------------------------------------------------------------------
1 | export interface UserSubcountResponse {
2 | 'programCount': number,
3 | 'djRadioCount': number,
4 | 'mvCount': number,
5 | 'artistCount': number,
6 | 'newProgramCount': number,
7 | 'createDjRadioCount': number,
8 | 'createdPlaylistCount': number,
9 | 'subPlaylistCount': number,
10 | 'code': number
11 | }
12 |
--------------------------------------------------------------------------------
/src/api/login.ts:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 | import { MOO_API } from '@/utils/request'
3 | import type { LoginStatusResponse } from '@/api/interface/LoginStatus'
4 |
5 | interface Response {
6 | code: number
7 | data: T
8 | }
9 |
10 | export function createQRKey() {
11 | return request.get<
12 | any,
13 | Response<{unikey: string}>
14 | >(`/login/qr/key?timestamp=${Date.now()}`)
15 | }
16 |
17 | export function createQRImg(key:string) {
18 | return request.get<
19 | any,
20 | Response<{qrimg: string, qrurl: string}>
21 | >(`/login/qr/create?key=${key}&qrimg=true×tamp=${Date.now()}`)
22 | }
23 |
24 | export function checkQRStatus(key: string) {
25 | return request.get<
26 | any,
27 | {code: 800 | 801 | 802 | 803, cookie: string, message: string}
28 | >(`${MOO_API}/login/qr/check?key=${key}×tamp=${Date.now()}`)
29 | }
30 |
31 | export function getLoginStatus(cookie: string) {
32 | return request.post(`/login/status?timestamp=${Date.now()}`, { cookie })
33 | }
34 |
35 | export function logout() {
36 | return request.get(`${MOO_API}/logout`)
37 | }
38 |
--------------------------------------------------------------------------------
/src/api/mv.ts:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 | import type { NewMVResponse } from './interface/NewMV'
3 | import type { MVDetailResponse } from './interface/MVDetail'
4 | import type { MVurlResponse } from './interface/MVurl'
5 |
6 | /**
7 | * @description 获取最新 MV
8 | */
9 | export function getNewMV(limit: number = 30) {
10 | return request.get(`/mv/first?limit=${limit}`)
11 | }
12 |
13 | /**
14 | * @description 获取 MV 详情
15 | */
16 | export function getMVDetail(id: number) {
17 | return request.get(`/mv/detail?mvid=${id}`)
18 | }
19 |
20 | /**
21 | * @description 获取 MV url
22 | */
23 | export function getMVurl(id: number) {
24 | return request.get(`/mv/url?id=${id}`)
25 | }
26 |
--------------------------------------------------------------------------------
/src/api/neteasePlaylist.ts:
--------------------------------------------------------------------------------
1 | export { getUserPlaylist } from './profile'
2 |
--------------------------------------------------------------------------------
/src/api/play.ts:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 | import { MOO_API } from '@/utils/request'
3 | import type { SongURLResponse } from './interface/SongURL'
4 | import type { LyricResponse } from './interface/Lyric'
5 | import type { SimiSongsResponse } from './interface/SimiSongs'
6 |
7 | /**
8 | * @description 获取歌曲url
9 | * @param id 音乐id
10 | * @param level 播放音质等级, 分为 standard => 标准,higher => 较高, exhigh=>极高, lossless=>无损, hires=>Hi-Res, jyeffect => 高清环绕声, sky => 沉浸环绕声, jymaster => 超清母带
11 | */
12 | export function getSongURL(id: number, level: 'standard' | 'higher' | 'exhigh' | 'lossless' | 'hires' | 'jyeffect' | 'sky' | 'jymaster' = 'standard') {
13 | return request.get(`${MOO_API}/song/url/v1?id=${id}&level=${level}`,
14 | {
15 | // #ifdef MP-WEIXIN
16 | header: { cookie: uni.getStorageSync('cookie') || '' }
17 | // #endif
18 | })
19 | }
20 |
21 | /**
22 | * @description 获取歌曲歌词
23 | * @param id 歌曲id
24 | */
25 | export function getLyric(id: number) {
26 | return request.get(`/lyric?id=${id}`)
27 | }
28 |
29 | /**
30 | * @description 获取相似歌曲
31 | * @param id 歌曲id
32 | */
33 | export async function getSimiSongs(id: number) {
34 | const { songs } = await request.get(`/simi/song?id=${id}`)
35 | console.log('🚀 ~ file: play.ts:36 ~ getSimiSongs ~ songs:', songs)
36 |
37 | return songs.map(item => ({
38 | id: item.id,
39 | name: item.name,
40 | ar: item.artists,
41 | al: item.album
42 | }))
43 | }
44 |
--------------------------------------------------------------------------------
/src/api/playlist.ts:
--------------------------------------------------------------------------------
1 | // * 获取歌曲(可以是多首)详情数据
2 | import request from '@/utils/request'
3 | import type { PlaylistResponse } from '@/api/interface/Playlist'
4 | import type { SongResponse } from '@/api/interface/Song'
5 |
6 | // * 获取指定歌单歌曲列表
7 | export function getPlaylist(id: number) {
8 | return request.get(`/playlist/detail?id=${id}`)
9 | }
10 |
11 | // * 查询歌曲信息(可以是多首以 "," 分割)
12 | export function getSongs(ids: string | number) {
13 | return request.get(`/song/detail?ids=${ids}`)
14 | }
15 |
--------------------------------------------------------------------------------
/src/api/profile.ts:
--------------------------------------------------------------------------------
1 | import { MOO_API } from './../utils/request'
2 | import request from '@/utils/request'
3 | import type { UserPlaylistResponse } from './interface/UserPlaylist'
4 | import type { UserSubcountResponse } from './interface/UserSubcount'
5 |
6 | // * 获取用户歌单列表
7 | export function getUserPlaylist(uid: number, offset = 0, limit = 30) {
8 | return request.get(`/user/playlist?uid=${uid}&offset=${offset}&limit=${limit}`)
9 | }
10 |
11 | /**
12 | * @description 获取用户信息 , 歌单,收藏,mv, dj 数量 (需要先登录)
13 | */
14 |
15 | export function getUserSubcount() {
16 | return request.get(`${MOO_API}/user/subcount?timestamp=${Date.now()}`,
17 | {
18 | // #ifdef MP-WEIXIN
19 | header: { cookie: uni.getStorageSync('cookie') || '' }
20 | // #endif
21 | })
22 | }
23 |
--------------------------------------------------------------------------------
/src/api/search.ts:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 | import type { TopArtistsResponse } from './interface/TopArtists'
3 | import type { TopSearchResponse } from './interface/TopSearch'
4 | import type { SearchSuggestResponse } from './interface/SearchSuggest'
5 |
6 | export { getSimiSongs } from './play'
7 |
8 | // * 获取热门歌手数据
9 | export function getTopArtists(offset = 0, limit = 30) {
10 | return request.get(`/top/artists?offset=${offset}&limit=${limit}`)
11 | }
12 |
13 | // * 获取热门搜索列表
14 | export function getTopSearch() {
15 | return request.get(`/search/hot`)
16 | }
17 |
18 | // * 获取搜索结果
19 | /**
20 | * @param type 搜索类型;默认为 1 即单曲 , 取值意义 : 1: 单曲, 10: 专辑, 100: 歌手, 1000: 歌单, 1002: 用户, 1004: MV, 1006: 歌词, 1009: 电台, 1014: 视频, 1018:综合, 2000:声音(搜索声音返回字段格式会不一样)
21 | */
22 | export function getSearch(keywords: string, type = 1, offset = 0, limit = 30) {
23 | return request.get(`/cloudsearch?keywords=${keywords}&offset=${offset}&limit=${limit}&type=${type}`)
24 | }
25 |
26 | // * 获取搜索建议
27 | /**
28 | * @description 说明 : 调用此接口 , 传入搜索关键词可获得搜索建议 , 搜索结果同时包含单曲 , 歌手 , 歌单信息
29 | */
30 | export function getSearchSuggest(keywords: string, config?: Parameters[1]) {
31 | return request.get(`/search/suggest?keywords=${keywords}&type=mobile`, config)
32 | }
33 |
--------------------------------------------------------------------------------
/src/api/songlist.ts:
--------------------------------------------------------------------------------
1 | export { getNewSonglist as getSonglist } from '@/api/home'
2 |
--------------------------------------------------------------------------------
/src/components/Album/Album.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
20 |
21 |
22 |
23 | {{ album.name }}
24 |
28 | {{ album.artist.name }}
29 |
30 |
31 | Hot
32 |
33 |
34 |
35 |
36 |
37 | // #ifdef MP-WEIXIN
38 |
45 | // #endif
46 |
47 |
67 |
--------------------------------------------------------------------------------
/src/components/Artist/Artist.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
13 |
14 | {{ artist.name }}
15 |
16 |
17 | 歌曲:{{ artist.musicSize }}
18 |
19 |
20 | 专辑:{{ artist.albumSize }}
21 |
22 |
23 | 视频:{{ artist.mvSize }}
24 |
25 |
26 |
27 |
28 |
29 |
30 | // #ifdef MP-WEIXIN
31 |
38 | // #endif
39 |
40 |
59 |
--------------------------------------------------------------------------------
/src/components/Countdown/Countdown.vue:
--------------------------------------------------------------------------------
1 |
2 | {{ transTime(audioStore.duration, audioStore.currentTime) }}
3 |
4 |
5 | // #ifdef MP-WEIXIN
6 |
13 | // #endif
14 |
15 |
30 |
--------------------------------------------------------------------------------
/src/components/H5BackTransition/H5BackTransition.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
36 |
--------------------------------------------------------------------------------
/src/components/JIcon/JIcon.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 | // #ifdef MP-WEIXIN
12 |
19 | // #endif
20 |
21 |
34 |
--------------------------------------------------------------------------------
/src/components/Navbar/Navbar.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 | // #ifdef MP-WEIXIN
18 |
25 | // #endif
26 |
27 |
46 |
--------------------------------------------------------------------------------
/src/components/Songlist/Songlist.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
16 |
17 | {{ item.name }}
18 |
19 |
20 |
21 |
22 | // #ifdef MP-WEIXIN
23 |
30 | // #endif
31 |
32 |
43 |
--------------------------------------------------------------------------------
/src/components/Subtitle/Subtitle.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 | {{ title }}
11 |
12 |
13 |
14 |
15 |
20 |
21 |
22 |
23 |
24 | // #ifdef MP-WEIXIN
25 |
32 | // #endif
33 |
34 |
60 |
--------------------------------------------------------------------------------
/src/env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | declare module '*.vue' {
4 | import { DefineComponent } from 'vue'
5 | // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
6 | const component: DefineComponent<{}, {}, any>
7 | export default component
8 | }
9 |
--------------------------------------------------------------------------------
/src/hooks/useCache.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @description 异步获取缓存数据
3 | * @param key 缓存key
4 | * @param fallback 初始值,获取到缓存后会更新初始值
5 | */
6 | export default function useCache<
7 | T extends ReturnType | ReturnType | ReturnType | ReturnType
8 | >(key: string, fallback: T) {
9 | uni.getStorage({
10 | key,
11 | success({ data }) {
12 | if (!data) return
13 |
14 | if (isRef(fallback)) {
15 | fallback.value = data
16 | return
17 | }
18 |
19 | if (isReactive(fallback)) {
20 | Array.isArray(data) && Array.isArray(fallback)
21 | ? data.forEach((v, i) => { fallback[i] = v })
22 | : Object.assign(fallback, data)
23 | return
24 | }
25 | },
26 | fail(err) {
27 | console.error(err)
28 | },
29 | complete() {
30 | watch(fallback, (value) => {
31 | uni.setStorage({
32 | key,
33 | data: value,
34 | fail(err) { console.error(err) }
35 | })
36 | })
37 | }
38 | })
39 |
40 | return fallback
41 | }
42 |
--------------------------------------------------------------------------------
/src/hooks/useLazyData.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @description 懒加载执行函数
3 | */
4 | export default function useLazyData ReturnType>(fn: T): { value: ReturnType } {
5 | return {
6 | get value() {
7 | // @ts-ignore
8 | delete this.value
9 | // @ts-ignore
10 | return (this.value = fn())
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/hooks/useNavigateTo.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-redeclare */
2 |
3 | /**
4 | * @description 跳转时会判断前后页面是否相同,current === to 取消跳转
5 | * @param url 跳转URL
6 | */
7 | export default function useNavigateTo(url: string): void
8 |
9 | /**
10 | * @description 跳转时会判断前后页面是否相同,current === to 取消跳转
11 | * @param options uni.navigateTo相同参数
12 | */
13 | export default function useNavigateTo(options: Parameters[0]): void
14 |
15 | export default function useNavigateTo(url: string | Parameters[0]) {
16 | const pages = getCurrentPages()
17 | // @ts-ignore // * 跳转同一页面无操作
18 | if (pages.length && pages.pop().$page.fullPath === (url.url || url)) return
19 |
20 | // @ts-ignore // * fromRoute === toRoute 直接返回
21 | // if (pages.length && pages.pop().$page.fullPath === (url.url || url)) return uni.navigateBack()
22 |
23 | uni.navigateTo(typeof url === 'string'
24 | ? { url, fail: (err) => { console.error(err) } }
25 | : url
26 | )
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/src/hooks/useStatusBarHeight.ts:
--------------------------------------------------------------------------------
1 | export default function useStatusBarHeight() {
2 | const height = ref(0)
3 |
4 | uni.getSystemInfo({
5 | success({ statusBarHeight }) {
6 | height.value = statusBarHeight || 0
7 | }
8 | })
9 |
10 | return height
11 | }
12 |
--------------------------------------------------------------------------------
/src/main.ts:
--------------------------------------------------------------------------------
1 | import { createSSRApp } from 'vue'
2 | import { createPinia } from 'pinia'
3 |
4 | import App from './App.vue'
5 |
6 | export function createApp() {
7 | const app = createSSRApp(App)
8 | const pinia = createPinia()
9 |
10 | app.use(pinia)
11 |
12 | return {
13 | app,
14 | pinia
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/pages/index/albumList/albumList.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
16 |
17 | 更新于 {{ parseTime(album.publishTime, '{y}-{m}-{d}') }}
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
54 |
--------------------------------------------------------------------------------
/src/pages/index/components/Home/Home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
25 |
--------------------------------------------------------------------------------
/src/pages/index/components/Home/components/NewAlbum/NewAlbum.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
16 |
32 |
--------------------------------------------------------------------------------
/src/pages/index/components/Home/components/NewSong/NewSong.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
19 |
46 |
--------------------------------------------------------------------------------
/src/pages/index/components/Home/components/NewSonglist/NewSonglist.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 | {useNavigateTo(`/sharedPages/playlist/playlist?id=${songlist.id}`)}"
11 | />
12 |
13 |
14 |
46 |
--------------------------------------------------------------------------------
/src/pages/index/components/Home/components/SearchTags/SearchTags.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
19 |
23 |
--------------------------------------------------------------------------------
/src/pages/index/components/NavTitle/NavTitle.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ isHome ? 'DISCOVER' : 'PROFILE' }}
5 |
6 |
12 |
20 |
21 |
26 |
27 |
28 |
29 |
35 |
36 |
37 |
38 |
39 |
49 |
--------------------------------------------------------------------------------
/src/pages/index/components/Search/Search.vue:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
29 |
--------------------------------------------------------------------------------
/src/pages/index/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
13 |
14 |
15 | currentPage = pages[current]"
21 | >
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
62 |
--------------------------------------------------------------------------------
/src/pages/index/songlist/songlist.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 | { useNavigateTo(`/sharedPages/playlist/playlist?id=${songlist.id}`)}"
15 | />
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
46 |
--------------------------------------------------------------------------------
/src/sharedPages/artist/components/ArtistInfo/ArtistInfo.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 | {{ artist.name }}
10 |
11 | {{ artist.briefDesc }}
12 |
13 |
19 |
20 |
21 |
22 |
45 |
--------------------------------------------------------------------------------
/src/sharedPages/play/components/NavBack/NavBack.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
12 |
13 |
14 |
25 |
--------------------------------------------------------------------------------
/src/sharedPages/playlist/components/Cover/Cover.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
15 | {{ description }}
16 |
17 |
18 |
25 |
26 |
27 |
28 |
29 |
55 |
--------------------------------------------------------------------------------
/src/sharedPages/playlist/components/Creator/Creator.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 | {{ userinfo.nickname }}
11 |
12 | {{ userinfo.signature }}
13 |
14 |
15 |
16 |
23 |
--------------------------------------------------------------------------------
/src/sharedPages/search/components/SearchHistory/SearchHistory.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 历史搜索
4 |
13 |
14 |
15 |
16 |
23 |
--------------------------------------------------------------------------------
/src/sharedPages/search/components/TopArtists/TopArtists.vue:
--------------------------------------------------------------------------------
1 |
2 | 热门歌手
3 |
4 |
10 |
17 | {{ artist.name }}
18 |
19 |
20 |
21 |
22 |
39 |
--------------------------------------------------------------------------------
/src/sharedPages/search/components/TopSearch/TopSearch.vue:
--------------------------------------------------------------------------------
1 |
2 | 热门搜索
3 |
12 |
13 |
14 |
31 |
--------------------------------------------------------------------------------
/src/shime-uni.d.ts:
--------------------------------------------------------------------------------
1 | export {}
2 |
3 | declare module "vue" {
4 | type Hooks = App.AppInstance & Page.PageInstance;
5 | interface ComponentCustomOptions extends Hooks {}
6 | }
--------------------------------------------------------------------------------
/src/static/MOO.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lei1248276/MOO-music/1d520a62e092a72c6105e69824e261f358da5d9e/src/static/MOO.jpg
--------------------------------------------------------------------------------
/src/static/cd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lei1248276/MOO-music/1d520a62e092a72c6105e69824e261f358da5d9e/src/static/cd.png
--------------------------------------------------------------------------------
/src/static/favicon copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lei1248276/MOO-music/1d520a62e092a72c6105e69824e261f358da5d9e/src/static/favicon copy.png
--------------------------------------------------------------------------------
/src/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lei1248276/MOO-music/1d520a62e092a72c6105e69824e261f358da5d9e/src/static/favicon.png
--------------------------------------------------------------------------------
/src/static/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lei1248276/MOO-music/1d520a62e092a72c6105e69824e261f358da5d9e/src/static/home.png
--------------------------------------------------------------------------------
/src/static/play.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lei1248276/MOO-music/1d520a62e092a72c6105e69824e261f358da5d9e/src/static/play.gif
--------------------------------------------------------------------------------
/src/static/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lei1248276/MOO-music/1d520a62e092a72c6105e69824e261f358da5d9e/src/static/play.png
--------------------------------------------------------------------------------
/src/static/playlist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lei1248276/MOO-music/1d520a62e092a72c6105e69824e261f358da5d9e/src/static/playlist.png
--------------------------------------------------------------------------------
/src/static/record.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lei1248276/MOO-music/1d520a62e092a72c6105e69824e261f358da5d9e/src/static/record.png
--------------------------------------------------------------------------------
/src/store/cache.ts:
--------------------------------------------------------------------------------
1 | import type { Song } from '@/components/Song/Song.vue'
2 | import type { Playlist } from '@/api/interface/Playlist'
3 | import type { Album } from '@/components/Album/Album.vue'
4 | import type { Artist } from '@/components/Artist/Artist.vue'
5 |
6 | export const useCacheStore = defineStore('cache', () => {
7 | const audioStore = useAudioStore()
8 |
9 | const historySearch = useCache('historySearch', shallowReactive([]))
10 | const historyPlays = useCache('historyPlays', shallowReactive([]))
11 | const collectSongs = useCache('collectSongs', shallowReactive([]))
12 | const collectPlaylist = useCache('collectPlaylist', shallowReactive([]))
13 | const collectAlbums = useCache('collectAlbums', shallowReactive([]))
14 | const collectArtists = useCache('collectArtists', shallowReactive([]))
15 |
16 | function addHistorySearch(keyword: string) {
17 | const index = historySearch.findIndex(v => v === keyword)
18 | index === -1
19 | ? historySearch.unshift(keyword)
20 | : historySearch.unshift(...historySearch.splice(index, 1))
21 |
22 | // * 超过10个就丢弃
23 | if (historySearch.length > 10) historySearch.length = 10
24 | }
25 |
26 | // * 添加历史播放歌曲
27 | watch(() => audioStore.currentSongInfo, songInfo => {
28 | console.log('🚀 ~ file: cache.ts:51 ~ watch ~ songInfo:', '添加历史播放歌曲')
29 | if (!songInfo) return
30 |
31 | const { song } = songInfo
32 | const index = historyPlays.findIndex(v => v.id === song.id)
33 | index === -1
34 | ? historyPlays.unshift(song)
35 | : historyPlays.unshift(...historyPlays.splice(index, 1))
36 |
37 | // * 超过50个就丢弃
38 | if (historyPlays.length > 50) historyPlays.length = 50
39 | })
40 |
41 | return {
42 | historySearch,
43 | historyPlays,
44 | collectSongs,
45 | collectPlaylist,
46 | collectAlbums,
47 | collectArtists,
48 | addHistorySearch
49 | }
50 | })
51 |
--------------------------------------------------------------------------------
/src/store/user.ts:
--------------------------------------------------------------------------------
1 | import type { Profile } from '@/api/interface/LoginStatus'
2 | import type { UserSubcountResponse } from '@/api/interface/UserSubcount'
3 | import { getUserSubcount } from '@/api/profile'
4 | import { getLoginStatus, logout as userLogout } from '@/api/login'
5 |
6 | export const useUserStore = defineStore('user', () => {
7 | const profile = ref()
8 | const subcount = ref()
9 |
10 | async function login(cookie: string) {
11 | const { data } = await getLoginStatus(cookie)
12 | console.log('🚀 ~ file: user.ts:15 ~ getLoginStatus ~ data:', data)
13 | profile.value = data.profile
14 | }
15 |
16 | async function logout() {
17 | const res = await userLogout()
18 | console.log('🚀 ~ file: user.ts:15 ~ logout ~ res:', res)
19 |
20 | if (res.code === 200) {
21 | profile.value = null
22 | subcount.value = undefined
23 | uni.removeStorage({ key: 'cookie' })
24 | uni.reLaunch({ url: '/pages/index/index' })
25 | }
26 | }
27 |
28 | return {
29 | profile,
30 | subcount,
31 | login,
32 | logout
33 | }
34 | })
35 |
36 | export async function setupLogin(cookie = uni.getStorageSync('cookie')) {
37 | if (!cookie) return
38 |
39 | const userStore = useUserStore()
40 | await userStore.login(cookie)
41 |
42 | // * 存入用户订阅信息到仓库
43 | const res = await getUserSubcount()
44 | console.log('🚀 ~ file: user.ts:41 ~ getUserSubcount ~ res:', res)
45 | userStore.subcount = res
46 | }
47 |
--------------------------------------------------------------------------------
/src/styles/iconfont/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lei1248276/MOO-music/1d520a62e092a72c6105e69824e261f358da5d9e/src/styles/iconfont/iconfont.ttf
--------------------------------------------------------------------------------
/src/styles/iconfont/iconfont2.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lei1248276/MOO-music/1d520a62e092a72c6105e69824e261f358da5d9e/src/styles/iconfont/iconfont2.ttf
--------------------------------------------------------------------------------
/src/uni_modules/uni-badge/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.2.2(2023-01-28)
2 | - 修复 运行/打包 控制台警告问题
3 | ## 1.2.1(2022-09-05)
4 | - 修复 当 text 超过 max-num 时,badge 的宽度计算是根据 text 的长度计算,更改为 css 计算实际展示宽度,详见:[https://ask.dcloud.net.cn/question/150473](https://ask.dcloud.net.cn/question/150473)
5 | ## 1.2.0(2021-11-19)
6 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
7 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-badge](https://uniapp.dcloud.io/component/uniui/uni-badge)
8 | ## 1.1.7(2021-11-08)
9 | - 优化 升级ui
10 | - 修改 size 属性默认值调整为 small
11 | - 修改 type 属性,默认值调整为 error,info 替换 default
12 | ## 1.1.6(2021-09-22)
13 | - 修复 在字节小程序上样式不生效的 bug
14 | ## 1.1.5(2021-07-30)
15 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
16 | ## 1.1.4(2021-07-29)
17 | - 修复 去掉 nvue 不支持css 的 align-self 属性,nvue 下不暂支持 absolute 属性
18 | ## 1.1.3(2021-06-24)
19 | - 优化 示例项目
20 | ## 1.1.1(2021-05-12)
21 | - 新增 组件示例地址
22 | ## 1.1.0(2021-05-12)
23 | - 新增 uni-badge 的 absolute 属性,支持定位
24 | - 新增 uni-badge 的 offset 属性,支持定位偏移
25 | - 新增 uni-badge 的 is-dot 属性,支持仅显示有一个小点
26 | - 新增 uni-badge 的 max-num 属性,支持自定义封顶的数字值,超过 99 显示99+
27 | - 优化 uni-badge 属性 custom-style, 支持以对象形式自定义样式
28 | ## 1.0.7(2021-05-07)
29 | - 修复 uni-badge 在 App 端,数字小于10时不是圆形的bug
30 | - 修复 uni-badge 在父元素不是 flex 布局时,宽度缩小的bug
31 | - 新增 uni-badge 属性 custom-style, 支持自定义样式
32 | ## 1.0.6(2021-02-04)
33 | - 调整为uni_modules目录规范
34 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-badge/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-badge",
3 | "displayName": "uni-badge 数字角标",
4 | "version": "1.2.2",
5 | "description": "数字角标(徽章)组件,在元素周围展示消息提醒,一般用于列表、九宫格、按钮等地方。",
6 | "keywords": [
7 | "",
8 | "badge",
9 | "uni-ui",
10 | "uniui",
11 | "数字角标",
12 | "徽章"
13 | ],
14 | "repository": "https://github.com/dcloudio/uni-ui",
15 | "engines": {
16 | "HBuilderX": ""
17 | },
18 | "directories": {
19 | "example": "../../temps/example_temps"
20 | },
21 | "dcloudext": {
22 | "sale": {
23 | "regular": {
24 | "price": "0.00"
25 | },
26 | "sourcecode": {
27 | "price": "0.00"
28 | }
29 | },
30 | "contact": {
31 | "qq": ""
32 | },
33 | "declaration": {
34 | "ads": "无",
35 | "data": "无",
36 | "permissions": "无"
37 | },
38 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
39 | "type": "component-vue"
40 | },
41 | "uni_modules": {
42 | "dependencies": ["uni-scss"],
43 | "encrypt": [],
44 | "platforms": {
45 | "cloud": {
46 | "tcb": "y",
47 | "aliyun": "y"
48 | },
49 | "client": {
50 | "App": {
51 | "app-vue": "y",
52 | "app-nvue": "y"
53 | },
54 | "H5-mobile": {
55 | "Safari": "y",
56 | "Android Browser": "y",
57 | "微信浏览器(Android)": "y",
58 | "QQ浏览器(Android)": "y"
59 | },
60 | "H5-pc": {
61 | "Chrome": "y",
62 | "IE": "y",
63 | "Edge": "y",
64 | "Firefox": "y",
65 | "Safari": "y"
66 | },
67 | "小程序": {
68 | "微信": "y",
69 | "阿里": "y",
70 | "百度": "y",
71 | "字节跳动": "y",
72 | "QQ": "y"
73 | },
74 | "快应用": {
75 | "华为": "y",
76 | "联盟": "y"
77 | },
78 | "Vue": {
79 | "vue2": "y",
80 | "vue3": "y"
81 | }
82 | }
83 | }
84 | }
85 | }
--------------------------------------------------------------------------------
/src/uni_modules/uni-badge/readme.md:
--------------------------------------------------------------------------------
1 | ## Badge 数字角标
2 | > **组件名:uni-badge**
3 | > 代码块: `uBadge`
4 |
5 | 数字角标一般和其它控件(列表、9宫格等)配合使用,用于进行数量提示,默认为实心灰色背景,
6 |
7 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-badge)
8 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-calendar/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.4.10(2023-04-10)
2 | - 修复 某些情况 monthSwitch 未触发的Bug
3 | ## 1.4.9(2023-02-02)
4 | - 修复 某些情况切换月份错误的Bug
5 | ## 1.4.8(2023-01-30)
6 | - 修复 某些情况切换月份错误的Bug [详情](https://ask.dcloud.net.cn/question/161964)
7 | ## 1.4.7(2022-09-16)
8 | - 优化 支持使用 uni-scss 控制主题色
9 | ## 1.4.6(2022-09-08)
10 | - 修复 表头年月切换,导致改变当前日期为选择月1号,且未触发change事件的Bug
11 | ## 1.4.5(2022-02-25)
12 | - 修复 条件编译 nvue 不支持的 css 样式的Bug
13 | ## 1.4.4(2022-02-25)
14 | - 修复 条件编译 nvue 不支持的 css 样式的Bug
15 | ## 1.4.3(2021-09-22)
16 | - 修复 startDate、 endDate 属性失效的Bug
17 | ## 1.4.2(2021-08-24)
18 | - 新增 支持国际化
19 | ## 1.4.1(2021-08-05)
20 | - 修复 弹出层被 tabbar 遮盖的Bug
21 | ## 1.4.0(2021-07-30)
22 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
23 | ## 1.3.16(2021-05-12)
24 | - 新增 组件示例地址
25 | ## 1.3.15(2021-02-04)
26 | - 调整为uni_modules目录规范
27 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-calendar/components/uni-calendar/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-calender.ok": "ok",
3 | "uni-calender.cancel": "cancel",
4 | "uni-calender.today": "today",
5 | "uni-calender.MON": "MON",
6 | "uni-calender.TUE": "TUE",
7 | "uni-calender.WED": "WED",
8 | "uni-calender.THU": "THU",
9 | "uni-calender.FRI": "FRI",
10 | "uni-calender.SAT": "SAT",
11 | "uni-calender.SUN": "SUN"
12 | }
13 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-calendar/components/uni-calendar/i18n/index.js:
--------------------------------------------------------------------------------
1 | import en from './en.json'
2 | import zhHans from './zh-Hans.json'
3 | import zhHant from './zh-Hant.json'
4 | export default {
5 | en,
6 | 'zh-Hans': zhHans,
7 | 'zh-Hant': zhHant
8 | }
9 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-calendar/components/uni-calendar/i18n/zh-Hans.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-calender.ok": "确定",
3 | "uni-calender.cancel": "取消",
4 | "uni-calender.today": "今日",
5 | "uni-calender.SUN": "日",
6 | "uni-calender.MON": "一",
7 | "uni-calender.TUE": "二",
8 | "uni-calender.WED": "三",
9 | "uni-calender.THU": "四",
10 | "uni-calender.FRI": "五",
11 | "uni-calender.SAT": "六"
12 | }
13 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-calendar/components/uni-calendar/i18n/zh-Hant.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-calender.ok": "確定",
3 | "uni-calender.cancel": "取消",
4 | "uni-calender.today": "今日",
5 | "uni-calender.SUN": "日",
6 | "uni-calender.MON": "一",
7 | "uni-calender.TUE": "二",
8 | "uni-calender.WED": "三",
9 | "uni-calender.THU": "四",
10 | "uni-calender.FRI": "五",
11 | "uni-calender.SAT": "六"
12 | }
13 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-calendar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-calendar",
3 | "displayName": "uni-calendar 日历",
4 | "version": "1.4.10",
5 | "description": "日历组件",
6 | "keywords": [
7 | "uni-ui",
8 | "uniui",
9 | "日历",
10 | "",
11 | "打卡",
12 | "日历选择"
13 | ],
14 | "repository": "https://github.com/dcloudio/uni-ui",
15 | "engines": {
16 | "HBuilderX": ""
17 | },
18 | "directories": {
19 | "example": "../../temps/example_temps"
20 | },
21 | "dcloudext": {
22 | "sale": {
23 | "regular": {
24 | "price": "0.00"
25 | },
26 | "sourcecode": {
27 | "price": "0.00"
28 | }
29 | },
30 | "contact": {
31 | "qq": ""
32 | },
33 | "declaration": {
34 | "ads": "无",
35 | "data": "无",
36 | "permissions": "无"
37 | },
38 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
39 | "type": "component-vue"
40 | },
41 | "uni_modules": {
42 | "dependencies": [],
43 | "encrypt": [],
44 | "platforms": {
45 | "cloud": {
46 | "tcb": "y",
47 | "aliyun": "y"
48 | },
49 | "client": {
50 | "App": {
51 | "app-vue": "y",
52 | "app-nvue": "y"
53 | },
54 | "H5-mobile": {
55 | "Safari": "y",
56 | "Android Browser": "y",
57 | "微信浏览器(Android)": "y",
58 | "QQ浏览器(Android)": "y"
59 | },
60 | "H5-pc": {
61 | "Chrome": "y",
62 | "IE": "y",
63 | "Edge": "y",
64 | "Firefox": "y",
65 | "Safari": "y"
66 | },
67 | "小程序": {
68 | "微信": "y",
69 | "阿里": "y",
70 | "百度": "y",
71 | "字节跳动": "y",
72 | "QQ": "y"
73 | },
74 | "快应用": {
75 | "华为": "u",
76 | "联盟": "u"
77 | },
78 | "Vue": {
79 | "vue2": "y",
80 | "vue3": "y"
81 | }
82 | }
83 | }
84 | }
85 | }
--------------------------------------------------------------------------------
/src/uni_modules/uni-card/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.3.1(2021-12-20)
2 | - 修复 在vue页面下略缩图显示不正常的bug
3 | ## 1.3.0(2021-11-19)
4 | - 重构插槽的用法 ,header 替换为 title
5 | - 新增 actions 插槽
6 | - 新增 cover 封面图属性和插槽
7 | - 新增 padding 内容默认内边距离
8 | - 新增 margin 卡片默认外边距离
9 | - 新增 spacing 卡片默认内边距
10 | - 新增 shadow 卡片阴影属性
11 | - 取消 mode 属性,可使用组合插槽代替
12 | - 取消 note 属性 ,使用actions插槽代替
13 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
14 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-card](https://uniapp.dcloud.io/component/uniui/uni-card)
15 | ## 1.2.1(2021-07-30)
16 | - 优化 vue3下事件警告的问题
17 | ## 1.2.0(2021-07-13)
18 | - 组件兼容 vue3,如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
19 | ## 1.1.8(2021-07-01)
20 | - 优化 图文卡片无图片加载时,提供占位图标
21 | - 新增 header 插槽,自定义卡片头部( 图文卡片 mode="style" 时,不支持)
22 | - 修复 thumbnail 不存在仍然占位的 bug
23 | ## 1.1.7(2021-05-12)
24 | - 新增 组件示例地址
25 | ## 1.1.6(2021-02-04)
26 | - 调整为uni_modules目录规范
27 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-card/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Card 卡片
4 | > **组件名:uni-card**
5 | > 代码块: `uCard`
6 |
7 | 卡片视图组件。
8 |
9 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-card)
10 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-collapse/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.4.3(2022-01-25)
2 | - 修复 初始化的时候 ,open 属性失效的bug
3 | ## 1.4.2(2022-01-21)
4 | - 修复 微信小程序resize后组件收起的bug
5 | ## 1.4.1(2021-11-22)
6 | - 修复 vue3中个别scss变量无法找到的问题
7 | ## 1.4.0(2021-11-19)
8 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
9 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-collapse](https://uniapp.dcloud.io/component/uniui/uni-collapse)
10 | ## 1.3.3(2021-08-17)
11 | - 优化 show-arrow 属性默认为true
12 | ## 1.3.2(2021-08-17)
13 | - 新增 show-arrow 属性,控制是否显示右侧箭头
14 | ## 1.3.1(2021-07-30)
15 | - 优化 vue3下小程序事件警告的问题
16 | ## 1.3.0(2021-07-30)
17 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
18 | ## 1.2.2(2021-07-21)
19 | - 修复 由1.2.0版本引起的 change 事件返回 undefined 的Bug
20 | ## 1.2.1(2021-07-21)
21 | - 优化 组件示例
22 | ## 1.2.0(2021-07-21)
23 | - 新增 组件折叠动画
24 | - 新增 value\v-model 属性 ,动态修改面板折叠状态
25 | - 新增 title 插槽 ,可定义面板标题
26 | - 新增 border 属性 ,显示隐藏面板内容分隔线
27 | - 新增 title-border 属性 ,显示隐藏面板标题分隔线
28 | - 修复 resize 方法失效的Bug
29 | - 修复 change 事件返回参数不正确的Bug
30 | - 优化 H5、App 平台自动更具内容更新高度,无需调用 reszie() 方法
31 | ## 1.1.7(2021-05-12)
32 | - 新增 组件示例地址
33 | ## 1.1.6(2021-02-05)
34 | - 优化 组件引用关系,通过uni_modules引用组件
35 | ## 1.1.5(2021-02-05)
36 | - 调整为uni_modules目录规范
--------------------------------------------------------------------------------
/src/uni_modules/uni-collapse/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Collapse 折叠面板
4 | > **组件名:uni-collapse**
5 | > 代码块: `uCollapse`
6 | > 关联组件:`uni-collapse-item`、`uni-icons`。
7 |
8 |
9 | 折叠面板用来折叠/显示过长的内容或者是列表。通常是在多内容分类项使用,折叠不重要的内容,显示重要内容。点击可以展开折叠部分。
10 |
11 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-collapse)
12 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/src/uni_modules/uni-combox/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.0.1(2021-11-23)
2 | - 优化 label、label-width 属性
3 | ## 1.0.0(2021-11-19)
4 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
5 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-combox](https://uniapp.dcloud.io/component/uniui/uni-combox)
6 | ## 0.1.0(2021-07-30)
7 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
8 | ## 0.0.6(2021-05-12)
9 | - 新增 组件示例地址
10 | ## 0.0.5(2021-04-21)
11 | - 优化 添加依赖 uni-icons, 导入后自动下载依赖
12 | ## 0.0.4(2021-02-05)
13 | - 优化 组件引用关系,通过uni_modules引用组件
14 | ## 0.0.3(2021-02-04)
15 | - 调整为uni_modules目录规范
16 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-combox/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Combox 组合框
4 | > **组件名:uni-combox**
5 | > 代码块: `uCombox`
6 |
7 |
8 | 组合框组件。
9 |
10 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-combox)
11 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/src/uni_modules/uni-countdown/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.2.2(2022-01-19)
2 | - 修复 在微信小程序中样式不生效的bug
3 | ## 1.2.1(2022-01-18)
4 | - 新增 update 方法 ,在动态更新时间后,刷新组件
5 | ## 1.2.0(2021-11-19)
6 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
7 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-countdown](https://uniapp.dcloud.io/component/uniui/uni-countdown)
8 | ## 1.1.3(2021-10-18)
9 | - 重构
10 | - 新增 font-size 支持自定义字体大小
11 | ## 1.1.2(2021-08-24)
12 | - 新增 支持国际化
13 | ## 1.1.1(2021-07-30)
14 | - 优化 vue3下小程序事件警告的问题
15 | ## 1.1.0(2021-07-30)
16 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
17 | ## 1.0.5(2021-06-18)
18 | - 修复 uni-countdown 重复赋值跳两秒的 bug
19 | ## 1.0.4(2021-05-12)
20 | - 新增 组件示例地址
21 | ## 1.0.3(2021-05-08)
22 | - 修复 uni-countdown 不能控制倒计时的 bug
23 | ## 1.0.2(2021-02-04)
24 | - 调整为uni_modules目录规范
25 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-countdown/components/uni-countdown/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-countdown.day": "day",
3 | "uni-countdown.h": "h",
4 | "uni-countdown.m": "m",
5 | "uni-countdown.s": "s"
6 | }
7 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-countdown/components/uni-countdown/i18n/index.js:
--------------------------------------------------------------------------------
1 | import en from './en.json'
2 | import zhHans from './zh-Hans.json'
3 | import zhHant from './zh-Hant.json'
4 | export default {
5 | en,
6 | 'zh-Hans': zhHans,
7 | 'zh-Hant': zhHant
8 | }
9 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-countdown/components/uni-countdown/i18n/zh-Hans.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-countdown.day": "天",
3 | "uni-countdown.h": "时",
4 | "uni-countdown.m": "分",
5 | "uni-countdown.s": "秒"
6 | }
7 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-countdown/components/uni-countdown/i18n/zh-Hant.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-countdown.day": "天",
3 | "uni-countdown.h": "時",
4 | "uni-countdown.m": "分",
5 | "uni-countdown.s": "秒"
6 | }
7 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-countdown/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-countdown",
3 | "displayName": "uni-countdown 倒计时",
4 | "version": "1.2.2",
5 | "description": "CountDown 倒计时组件",
6 | "keywords": [
7 | "uni-ui",
8 | "uniui",
9 | "countdown",
10 | "倒计时"
11 | ],
12 | "repository": "https://github.com/dcloudio/uni-ui",
13 | "engines": {
14 | "HBuilderX": ""
15 | },
16 | "directories": {
17 | "example": "../../temps/example_temps"
18 | },
19 | "dcloudext": {
20 | "category": [
21 | "前端组件",
22 | "通用组件"
23 | ],
24 | "sale": {
25 | "regular": {
26 | "price": "0.00"
27 | },
28 | "sourcecode": {
29 | "price": "0.00"
30 | }
31 | },
32 | "contact": {
33 | "qq": ""
34 | },
35 | "declaration": {
36 | "ads": "无",
37 | "data": "无",
38 | "permissions": "无"
39 | },
40 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
41 | },
42 | "uni_modules": {
43 | "dependencies": ["uni-scss"],
44 | "encrypt": [],
45 | "platforms": {
46 | "cloud": {
47 | "tcb": "y",
48 | "aliyun": "y"
49 | },
50 | "client": {
51 | "App": {
52 | "app-vue": "y",
53 | "app-nvue": "y"
54 | },
55 | "H5-mobile": {
56 | "Safari": "y",
57 | "Android Browser": "y",
58 | "微信浏览器(Android)": "y",
59 | "QQ浏览器(Android)": "y"
60 | },
61 | "H5-pc": {
62 | "Chrome": "y",
63 | "IE": "y",
64 | "Edge": "y",
65 | "Firefox": "y",
66 | "Safari": "y"
67 | },
68 | "小程序": {
69 | "微信": "y",
70 | "阿里": "y",
71 | "百度": "y",
72 | "字节跳动": "y",
73 | "QQ": "y"
74 | },
75 | "快应用": {
76 | "华为": "u",
77 | "联盟": "u"
78 | },
79 | "Vue": {
80 | "vue2": "y",
81 | "vue3": "y"
82 | }
83 | }
84 | }
85 | }
86 | }
--------------------------------------------------------------------------------
/src/uni_modules/uni-countdown/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## CountDown 倒计时
4 | > **组件名:uni-countdown**
5 | > 代码块: `uCountDown`
6 |
7 | 倒计时组件。
8 |
9 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-countdown)
10 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/src/uni_modules/uni-data-checkbox/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.0.3(2022-09-16)
2 | - 可以使用 uni-scss 控制主题色
3 | ## 1.0.2(2022-06-30)
4 | - 优化 在 uni-forms 中的依赖注入方式
5 | ## 1.0.1(2022-02-07)
6 | - 修复 multiple 为 true 时,v-model 的值为 null 报错的 bug
7 | ## 1.0.0(2021-11-19)
8 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
9 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-data-checkbox](https://uniapp.dcloud.io/component/uniui/uni-data-checkbox)
10 | ## 0.2.5(2021-08-23)
11 | - 修复 在uni-forms中 modelValue 中不存在当前字段,当前字段必填写也不参与校验的问题
12 | ## 0.2.4(2021-08-17)
13 | - 修复 单选 list 模式下 ,icon 为 left 时,选中图标不显示的问题
14 | ## 0.2.3(2021-08-11)
15 | - 修复 在 uni-forms 中重置表单,错误信息无法清除的问题
16 | ## 0.2.2(2021-07-30)
17 | - 优化 在uni-forms组件,与label不对齐的问题
18 | ## 0.2.1(2021-07-27)
19 | - 修复 单选默认值为0不能选中的Bug
20 | ## 0.2.0(2021-07-13)
21 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
22 | ## 0.1.11(2021-07-06)
23 | - 优化 删除无用日志
24 | ## 0.1.10(2021-07-05)
25 | - 修复 由 0.1.9 引起的非 nvue 端图标不显示的问题
26 | ## 0.1.9(2021-07-05)
27 | - 修复 nvue 黑框样式问题
28 | ## 0.1.8(2021-06-28)
29 | - 修复 selectedTextColor 属性不生效的Bug
30 | ## 0.1.7(2021-06-02)
31 | - 新增 map 属性,可以方便映射text/value属性
32 | ## 0.1.6(2021-05-26)
33 | - 修复 不关联服务空间的情况下组件报错的Bug
34 | ## 0.1.5(2021-05-12)
35 | - 新增 组件示例地址
36 | ## 0.1.4(2021-04-09)
37 | - 修复 nvue 下无法选中的问题
38 | ## 0.1.3(2021-03-22)
39 | - 新增 disabled属性
40 | ## 0.1.2(2021-02-24)
41 | - 优化 默认颜色显示
42 | ## 0.1.1(2021-02-24)
43 | - 新增 支持nvue
44 | ## 0.1.0(2021-02-18)
45 | - “暂无数据”显示居中
46 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-data-checkbox/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## DataCheckbox 数据驱动的单选复选框
4 | > **组件名:uni-data-checkbox**
5 | > 代码块: `uDataCheckbox`
6 |
7 |
8 | 本组件是基于uni-app基础组件checkbox的封装。本组件要解决问题包括:
9 |
10 | 1. 数据绑定型组件:给本组件绑定一个data,会自动渲染一组候选内容。再以往,开发者需要编写不少代码实现类似功能
11 | 2. 自动的表单校验:组件绑定了data,且符合[uni-forms](https://ext.dcloud.net.cn/plugin?id=2773)组件的表单校验规范,搭配使用会自动实现表单校验
12 | 3. 本组件合并了单选多选
13 | 4. 本组件有若干风格选择,如普通的单选多选框、并列button风格、tag风格。开发者可以快速选择需要的风格。但作为一个封装组件,样式代码虽然不用自己写了,却会牺牲一定的样式自定义性
14 |
15 | 在uniCloud开发中,`DB Schema`中配置了enum枚举等类型后,在web控制台的[自动生成表单](https://uniapp.dcloud.io/uniCloud/schema?id=autocode)功能中,会自动生成``uni-data-checkbox``组件并绑定好data
16 |
17 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-checkbox)
18 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/src/uni_modules/uni-data-picker/components/uni-data-picker/keypress.js:
--------------------------------------------------------------------------------
1 | // #ifdef H5
2 | export default {
3 | name: 'Keypress',
4 | props: {
5 | disable: {
6 | type: Boolean,
7 | default: false
8 | }
9 | },
10 | mounted () {
11 | const keyNames = {
12 | esc: ['Esc', 'Escape'],
13 | tab: 'Tab',
14 | enter: 'Enter',
15 | space: [' ', 'Spacebar'],
16 | up: ['Up', 'ArrowUp'],
17 | left: ['Left', 'ArrowLeft'],
18 | right: ['Right', 'ArrowRight'],
19 | down: ['Down', 'ArrowDown'],
20 | delete: ['Backspace', 'Delete', 'Del']
21 | }
22 | const listener = ($event) => {
23 | if (this.disable) {
24 | return
25 | }
26 | const keyName = Object.keys(keyNames).find(key => {
27 | const keyName = $event.key
28 | const value = keyNames[key]
29 | return value === keyName || (Array.isArray(value) && value.includes(keyName))
30 | })
31 | if (keyName) {
32 | // 避免和其他按键事件冲突
33 | setTimeout(() => {
34 | this.$emit(keyName, {})
35 | }, 0)
36 | }
37 | }
38 | document.addEventListener('keyup', listener)
39 | this.$once('hook:beforeDestroy', () => {
40 | document.removeEventListener('keyup', listener)
41 | })
42 | },
43 | render: () => {}
44 | }
45 | // #endif
46 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-data-picker/readme.md:
--------------------------------------------------------------------------------
1 | ## DataPicker 级联选择
2 | > **组件名:uni-data-picker**
3 | > 代码块: `uDataPicker`
4 | > 关联组件:`uni-data-pickerview`、`uni-load-more`。
5 |
6 |
7 | `` 是一个选择类[datacom组件](https://uniapp.dcloud.net.cn/component/datacom)。
8 |
9 | 支持单列、和多列级联选择。列数没有限制,如果屏幕显示不全,顶部tab区域会左右滚动。
10 |
11 | 候选数据支持一次性加载完毕,也支持懒加载,比如示例图中,选择了“北京”后,动态加载北京的区县数据。
12 |
13 | `` 组件尤其适用于地址选择、分类选择等选择类。
14 |
15 | `` 支持本地数据、云端静态数据(json),uniCloud云数据库数据。
16 |
17 | `` 可以通过JQL直连uniCloud云数据库,配套[DB Schema](https://uniapp.dcloud.net.cn/uniCloud/schema),可在schema2code中自动生成前端页面,还支持服务器端校验。
18 |
19 | 在uniCloud数据表中新建表“uni-id-address”和“opendb-city-china”,这2个表的schema自带foreignKey关联。在“uni-id-address”表的表结构页面使用schema2code生成前端页面,会自动生成地址管理的维护页面,自动从“opendb-city-china”表包含的中国所有省市区信息里选择地址。
20 |
21 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-picker)
22 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/src/uni_modules/uni-data-select/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.0.6(2023-04-12)
2 | - 修复 微信小程序点击时会改变背景颜色的 bug
3 | ## 1.0.5(2023-02-03)
4 | - 修复 禁用时会显示清空按钮
5 | ## 1.0.4(2023-02-02)
6 | - 优化 查询条件短期内多次变更只查询最后一次变更后的结果
7 | - 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue
8 | ## 1.0.3(2023-01-16)
9 | - 修复 不关联服务空间报错的问题
10 | ## 1.0.2(2023-01-14)
11 | - 新增 属性 `format` 可用于格式化显示选项内容
12 | ## 1.0.1(2022-12-06)
13 | - 修复 当where变化时,数据不会自动更新的问题
14 | ## 0.1.9(2022-09-05)
15 | - 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框
16 | ## 0.1.8(2022-08-29)
17 | - 修复 点击的位置不准确
18 | ## 0.1.7(2022-08-12)
19 | - 新增 支持 disabled 属性
20 | ## 0.1.6(2022-07-06)
21 | - 修复 pc端宽度异常的bug
22 | ## 0.1.5
23 | - 修复 pc端宽度异常的bug
24 | ## 0.1.4(2022-07-05)
25 | - 优化 显示样式
26 | ## 0.1.3(2022-06-02)
27 | - 修复 localdata 赋值不生效的 bug
28 | - 新增 支持 uni.scss 修改颜色
29 | - 新增 支持选项禁用(数据选项设置 disabled: true 即禁用)
30 | ## 0.1.2(2022-05-08)
31 | - 修复 当 value 为 0 时选择不生效的 bug
32 | ## 0.1.1(2022-05-07)
33 | - 新增 记住上次的选项(仅 collection 存在时有效)
34 | ## 0.1.0(2022-04-22)
35 | - 初始化
36 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-data-select/readme.md:
--------------------------------------------------------------------------------
1 | ## DataSelect 下拉框选择器
2 | > **组件名:uni-data-select**
3 | > 代码块: `uDataSelect`
4 |
5 | 当选项过多时,使用下拉菜单展示并选择内容
6 |
7 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-select)
8 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
9 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-dateformat/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.0.0(2021-11-19)
2 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
3 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-dateformat](https://uniapp.dcloud.io/component/uniui/uni-dateformat)
4 | ## 0.0.5(2021-07-08)
5 | - 调整 默认时间不再是当前时间,而是显示'-'字符
6 | ## 0.0.4(2021-05-12)
7 | - 新增 组件示例地址
8 | ## 0.0.3(2021-02-04)
9 | - 调整为uni_modules目录规范
10 | - 修复 iOS 平台日期格式化出错的问题
11 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat.vue:
--------------------------------------------------------------------------------
1 |
2 | {{dateShow}}
3 |
4 |
5 |
85 |
86 |
89 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-dateformat/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ### DateFormat 日期格式化
4 | > **组件名:uni-dateformat**
5 | > 代码块: `uDateformat`
6 |
7 |
8 | 日期格式化组件。
9 |
10 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-dateformat)
11 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/src/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-datetime-picker.selectDate": "select date",
3 | "uni-datetime-picker.selectTime": "select time",
4 | "uni-datetime-picker.selectDateTime": "select date and time",
5 | "uni-datetime-picker.startDate": "start date",
6 | "uni-datetime-picker.endDate": "end date",
7 | "uni-datetime-picker.startTime": "start time",
8 | "uni-datetime-picker.endTime": "end time",
9 | "uni-datetime-picker.ok": "ok",
10 | "uni-datetime-picker.clear": "clear",
11 | "uni-datetime-picker.cancel": "cancel",
12 | "uni-datetime-picker.year": "-",
13 | "uni-datetime-picker.month": "",
14 | "uni-calender.MON": "MON",
15 | "uni-calender.TUE": "TUE",
16 | "uni-calender.WED": "WED",
17 | "uni-calender.THU": "THU",
18 | "uni-calender.FRI": "FRI",
19 | "uni-calender.SAT": "SAT",
20 | "uni-calender.SUN": "SUN",
21 | "uni-calender.confirm": "confirm"
22 | }
23 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js:
--------------------------------------------------------------------------------
1 | import en from './en.json'
2 | import zhHans from './zh-Hans.json'
3 | import zhHant from './zh-Hant.json'
4 | export default {
5 | en,
6 | 'zh-Hans': zhHans,
7 | 'zh-Hant': zhHant
8 | }
9 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-datetime-picker.selectDate": "选择日期",
3 | "uni-datetime-picker.selectTime": "选择时间",
4 | "uni-datetime-picker.selectDateTime": "选择日期时间",
5 | "uni-datetime-picker.startDate": "开始日期",
6 | "uni-datetime-picker.endDate": "结束日期",
7 | "uni-datetime-picker.startTime": "开始时间",
8 | "uni-datetime-picker.endTime": "结束时间",
9 | "uni-datetime-picker.ok": "确定",
10 | "uni-datetime-picker.clear": "清除",
11 | "uni-datetime-picker.cancel": "取消",
12 | "uni-datetime-picker.year": "年",
13 | "uni-datetime-picker.month": "月",
14 | "uni-calender.SUN": "日",
15 | "uni-calender.MON": "一",
16 | "uni-calender.TUE": "二",
17 | "uni-calender.WED": "三",
18 | "uni-calender.THU": "四",
19 | "uni-calender.FRI": "五",
20 | "uni-calender.SAT": "六",
21 | "uni-calender.confirm": "确认"
22 | }
--------------------------------------------------------------------------------
/src/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-datetime-picker.selectDate": "選擇日期",
3 | "uni-datetime-picker.selectTime": "選擇時間",
4 | "uni-datetime-picker.selectDateTime": "選擇日期時間",
5 | "uni-datetime-picker.startDate": "開始日期",
6 | "uni-datetime-picker.endDate": "結束日期",
7 | "uni-datetime-picker.startTime": "開始时间",
8 | "uni-datetime-picker.endTime": "結束时间",
9 | "uni-datetime-picker.ok": "確定",
10 | "uni-datetime-picker.clear": "清除",
11 | "uni-datetime-picker.cancel": "取消",
12 | "uni-datetime-picker.year": "年",
13 | "uni-datetime-picker.month": "月",
14 | "uni-calender.SUN": "日",
15 | "uni-calender.MON": "一",
16 | "uni-calender.TUE": "二",
17 | "uni-calender.WED": "三",
18 | "uni-calender.THU": "四",
19 | "uni-calender.FRI": "五",
20 | "uni-calender.SAT": "六",
21 | "uni-calender.confirm": "確認"
22 | }
--------------------------------------------------------------------------------
/src/uni_modules/uni-datetime-picker/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | > `重要通知:组件升级更新 2.0.0 后,支持日期+时间范围选择,组件 ui 将使用日历选择日期,ui 变化较大,同时支持 PC 和 移动端。此版本不向后兼容,不再支持单独的时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)。若仍需使用旧版本,可在插件市场下载*非uni_modules版本*,旧版本将不再维护`
4 |
5 | ## DatetimePicker 时间选择器
6 |
7 | > **组件名:uni-datetime-picker**
8 | > 代码块: `uDatetimePicker`
9 |
10 |
11 | 该组件的优势是,支持**时间戳**输入和输出(起始时间、终止时间也支持时间戳),可**同时选择**日期和时间。
12 |
13 | 若只是需要单独选择日期和时间,不需要时间戳输入和输出,可使用原生的 picker 组件。
14 |
15 | **_点击 picker 默认值规则:_**
16 |
17 | - 若设置初始值 value, 会显示在 picker 显示框中
18 | - 若无初始值 value,则初始值 value 为当前本地时间 Date.now(), 但不会显示在 picker 显示框中
19 |
20 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
21 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/src/uni_modules/uni-drawer/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.2.1(2021-11-22)
2 | - 修复 vue3中个别scss变量无法找到的问题
3 | ## 1.2.0(2021-11-19)
4 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
5 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-drawer](https://uniapp.dcloud.io/component/uniui/uni-drawer)
6 | ## 1.1.1(2021-07-30)
7 | - 优化 vue3下事件警告的问题
8 | ## 1.1.0(2021-07-13)
9 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
10 | ## 1.0.7(2021-05-12)
11 | - 新增 组件示例地址
12 | ## 1.0.6(2021-02-04)
13 | - 调整为uni_modules目录规范
14 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-drawer/components/uni-drawer/keypress.js:
--------------------------------------------------------------------------------
1 | // #ifdef H5
2 | export default {
3 | name: 'Keypress',
4 | props: {
5 | disable: {
6 | type: Boolean,
7 | default: false
8 | }
9 | },
10 | mounted () {
11 | const keyNames = {
12 | esc: ['Esc', 'Escape'],
13 | tab: 'Tab',
14 | enter: 'Enter',
15 | space: [' ', 'Spacebar'],
16 | up: ['Up', 'ArrowUp'],
17 | left: ['Left', 'ArrowLeft'],
18 | right: ['Right', 'ArrowRight'],
19 | down: ['Down', 'ArrowDown'],
20 | delete: ['Backspace', 'Delete', 'Del']
21 | }
22 | const listener = ($event) => {
23 | if (this.disable) {
24 | return
25 | }
26 | const keyName = Object.keys(keyNames).find(key => {
27 | const keyName = $event.key
28 | const value = keyNames[key]
29 | return value === keyName || (Array.isArray(value) && value.includes(keyName))
30 | })
31 | if (keyName) {
32 | // 避免和其他按键事件冲突
33 | setTimeout(() => {
34 | this.$emit(keyName, {})
35 | }, 0)
36 | }
37 | }
38 | document.addEventListener('keyup', listener)
39 | // this.$once('hook:beforeDestroy', () => {
40 | // document.removeEventListener('keyup', listener)
41 | // })
42 | },
43 | render: () => {}
44 | }
45 | // #endif
46 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-drawer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-drawer",
3 | "displayName": "uni-drawer 抽屉",
4 | "version": "1.2.1",
5 | "description": "抽屉式导航,用于展示侧滑菜单,侧滑导航。",
6 | "keywords": [
7 | "uni-ui",
8 | "uniui",
9 | "drawer",
10 | "抽屉",
11 | "侧滑导航"
12 | ],
13 | "repository": "https://github.com/dcloudio/uni-ui",
14 | "engines": {
15 | "HBuilderX": ""
16 | },
17 | "directories": {
18 | "example": "../../temps/example_temps"
19 | },
20 | "dcloudext": {
21 | "category": [
22 | "前端组件",
23 | "通用组件"
24 | ],
25 | "sale": {
26 | "regular": {
27 | "price": "0.00"
28 | },
29 | "sourcecode": {
30 | "price": "0.00"
31 | }
32 | },
33 | "contact": {
34 | "qq": ""
35 | },
36 | "declaration": {
37 | "ads": "无",
38 | "data": "无",
39 | "permissions": "无"
40 | },
41 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
42 | },
43 | "uni_modules": {
44 | "dependencies": ["uni-scss"],
45 | "encrypt": [],
46 | "platforms": {
47 | "cloud": {
48 | "tcb": "y",
49 | "aliyun": "y"
50 | },
51 | "client": {
52 | "App": {
53 | "app-vue": "y",
54 | "app-nvue": "y"
55 | },
56 | "H5-mobile": {
57 | "Safari": "y",
58 | "Android Browser": "y",
59 | "微信浏览器(Android)": "y",
60 | "QQ浏览器(Android)": "y"
61 | },
62 | "H5-pc": {
63 | "Chrome": "y",
64 | "IE": "y",
65 | "Edge": "y",
66 | "Firefox": "y",
67 | "Safari": "y"
68 | },
69 | "小程序": {
70 | "微信": "y",
71 | "阿里": "y",
72 | "百度": "y",
73 | "字节跳动": "y",
74 | "QQ": "y"
75 | },
76 | "快应用": {
77 | "华为": "u",
78 | "联盟": "u"
79 | },
80 | "Vue": {
81 | "vue2": "y",
82 | "vue3": "y"
83 | }
84 | }
85 | }
86 | }
87 | }
--------------------------------------------------------------------------------
/src/uni_modules/uni-drawer/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Drawer 抽屉
4 | > **组件名:uni-drawer**
5 | > 代码块: `uDrawer`
6 |
7 | 抽屉侧滑菜单。
8 |
9 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-drawer)
10 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/src/uni_modules/uni-easyinput/components/uni-easyinput/common.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @desc 函数防抖
3 | * @param func 目标函数
4 | * @param wait 延迟执行毫秒数
5 | * @param immediate true - 立即执行, false - 延迟执行
6 | */
7 | export const debounce = function(func, wait = 1000, immediate = true) {
8 | let timer;
9 | console.log(1);
10 | return function() {
11 | console.log(123);
12 | let context = this,
13 | args = arguments;
14 | if (timer) clearTimeout(timer);
15 | if (immediate) {
16 | let callNow = !timer;
17 | timer = setTimeout(() => {
18 | timer = null;
19 | }, wait);
20 | if (callNow) func.apply(context, args);
21 | } else {
22 | timer = setTimeout(() => {
23 | func.apply(context, args);
24 | }, wait)
25 | }
26 | }
27 | }
28 | /**
29 | * @desc 函数节流
30 | * @param func 函数
31 | * @param wait 延迟执行毫秒数
32 | * @param type 1 使用表时间戳,在时间段开始的时候触发 2 使用表定时器,在时间段结束的时候触发
33 | */
34 | export const throttle = (func, wait = 1000, type = 1) => {
35 | let previous = 0;
36 | let timeout;
37 | return function() {
38 | let context = this;
39 | let args = arguments;
40 | if (type === 1) {
41 | let now = Date.now();
42 |
43 | if (now - previous > wait) {
44 | func.apply(context, args);
45 | previous = now;
46 | }
47 | } else if (type === 2) {
48 | if (!timeout) {
49 | timeout = setTimeout(() => {
50 | timeout = null;
51 | func.apply(context, args)
52 | }, wait)
53 | }
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-easyinput/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ### Easyinput 增强输入框
4 | > **组件名:uni-easyinput**
5 | > 代码块: `uEasyinput`
6 |
7 |
8 | easyinput 组件是对原生input组件的增强 ,是专门为配合表单组件[uni-forms](https://ext.dcloud.net.cn/plugin?id=2773)而设计的,easyinput 内置了边框,图标等,同时包含 input 所有功能
9 |
10 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-easyinput)
11 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/src/uni_modules/uni-fab/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.2.5(2023-03-29)
2 | - 新增 pattern.icon 属性,可自定义图标
3 | ## 1.2.4(2022-09-07)
4 | 小程序端由于 style 使用了对象导致报错,[详情](https://ask.dcloud.net.cn/question/152790?item_id=211778&rf=false)
5 | ## 1.2.3(2022-09-05)
6 | - 修复 nvue 环境下,具有 tabBar 时,fab 组件下部位置无法正常获取 --window-bottom 的bug,详见:[https://ask.dcloud.net.cn/question/110638?notification_id=826310](https://ask.dcloud.net.cn/question/110638?notification_id=826310)
7 | ## 1.2.2(2021-12-29)
8 | - 更新 组件依赖
9 | ## 1.2.1(2021-11-19)
10 | - 修复 阴影颜色不正确的bug
11 | ## 1.2.0(2021-11-19)
12 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
13 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-fab](https://uniapp.dcloud.io/component/uniui/uni-fab)
14 | ## 1.1.1(2021-11-09)
15 | - 新增 提供组件设计资源,组件样式调整
16 | ## 1.1.0(2021-07-30)
17 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
18 | ## 1.0.7(2021-05-12)
19 | - 新增 组件示例地址
20 | ## 1.0.6(2021-02-05)
21 | - 调整为uni_modules目录规范
22 | - 优化 按钮背景色调整
23 | - 优化 兼容pc端
24 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-fab/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-fab",
3 | "displayName": "uni-fab 悬浮按钮",
4 | "version": "1.2.5",
5 | "description": "悬浮按钮 fab button ,点击可展开一个图标按钮菜单。",
6 | "keywords": [
7 | "uni-ui",
8 | "uniui",
9 | "按钮",
10 | "悬浮按钮",
11 | "fab"
12 | ],
13 | "repository": "https://github.com/dcloudio/uni-ui",
14 | "engines": {
15 | "HBuilderX": ""
16 | },
17 | "directories": {
18 | "example": "../../temps/example_temps"
19 | },
20 | "dcloudext": {
21 | "sale": {
22 | "regular": {
23 | "price": "0.00"
24 | },
25 | "sourcecode": {
26 | "price": "0.00"
27 | }
28 | },
29 | "contact": {
30 | "qq": ""
31 | },
32 | "declaration": {
33 | "ads": "无",
34 | "data": "无",
35 | "permissions": "无"
36 | },
37 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
38 | "type": "component-vue"
39 | },
40 | "uni_modules": {
41 | "dependencies": ["uni-scss","uni-icons"],
42 | "encrypt": [],
43 | "platforms": {
44 | "cloud": {
45 | "tcb": "y",
46 | "aliyun": "y"
47 | },
48 | "client": {
49 | "App": {
50 | "app-vue": "y",
51 | "app-nvue": "y"
52 | },
53 | "H5-mobile": {
54 | "Safari": "y",
55 | "Android Browser": "y",
56 | "微信浏览器(Android)": "y",
57 | "QQ浏览器(Android)": "y"
58 | },
59 | "H5-pc": {
60 | "Chrome": "y",
61 | "IE": "y",
62 | "Edge": "y",
63 | "Firefox": "y",
64 | "Safari": "y"
65 | },
66 | "小程序": {
67 | "微信": "y",
68 | "阿里": "y",
69 | "百度": "y",
70 | "字节跳动": "y",
71 | "QQ": "y"
72 | },
73 | "快应用": {
74 | "华为": "u",
75 | "联盟": "u"
76 | },
77 | "Vue": {
78 | "vue2": "y",
79 | "vue3": "y"
80 | }
81 | }
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-fab/readme.md:
--------------------------------------------------------------------------------
1 | ## Fab 悬浮按钮
2 | > **组件名:uni-fab**
3 | > 代码块: `uFab`
4 |
5 |
6 | 点击可展开一个图形按钮菜单
7 |
8 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-fab)
9 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/src/uni_modules/uni-fav/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.2.1(2022-05-30)
2 | - 新增 stat 属性 ,是否开启uni统计功能
3 | ## 1.2.0(2021-11-19)
4 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
5 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-fav](https://uniapp.dcloud.io/component/uniui/uni-fav)
6 | ## 1.1.1(2021-08-24)
7 | - 新增 支持国际化
8 | ## 1.1.0(2021-07-13)
9 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
10 | ## 1.0.6(2021-05-12)
11 | - 新增 组件示例地址
12 | ## 1.0.5(2021-04-21)
13 | - 优化 添加依赖 uni-icons, 导入后自动下载依赖
14 | ## 1.0.4(2021-02-05)
15 | - 优化 组件引用关系,通过uni_modules引用组件
16 | ## 1.0.3(2021-02-05)
17 | - 优化 组件引用关系,通过uni_modules引用组件
18 | ## 1.0.2(2021-02-05)
19 | - 调整为uni_modules目录规范
20 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-fav/components/uni-fav/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-fav.collect": "collect",
3 | "uni-fav.collected": "collected"
4 | }
5 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-fav/components/uni-fav/i18n/index.js:
--------------------------------------------------------------------------------
1 | import en from './en.json'
2 | import zhHans from './zh-Hans.json'
3 | import zhHant from './zh-Hant.json'
4 | export default {
5 | en,
6 | 'zh-Hans': zhHans,
7 | 'zh-Hant': zhHant
8 | }
9 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-fav/components/uni-fav/i18n/zh-Hans.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-fav.collect": "收藏",
3 | "uni-fav.collected": "已收藏"
4 | }
5 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-fav/components/uni-fav/i18n/zh-Hant.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-fav.collect": "收藏",
3 | "uni-fav.collected": "已收藏"
4 | }
5 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-fav/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Fav 收藏按钮
4 | > **组件名:uni-fav**
5 | > 代码块: `uFav`
6 |
7 | 用于收藏功能,可点击切换选中、不选中的状态。
8 |
9 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-fav)
10 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/src/uni_modules/uni-file-picker/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-file-picker",
3 | "displayName": "uni-file-picker 文件选择上传",
4 | "version": "1.0.4",
5 | "description": "文件选择上传组件,可以选择图片、视频等任意文件并上传到当前绑定的服务空间",
6 | "keywords": [
7 | "uni-ui",
8 | "uniui",
9 | "图片上传",
10 | "文件上传"
11 | ],
12 | "repository": "https://github.com/dcloudio/uni-ui",
13 | "engines": {
14 | "HBuilderX": ""
15 | },
16 | "directories": {
17 | "example": "../../temps/example_temps"
18 | },
19 | "dcloudext": {
20 | "sale": {
21 | "regular": {
22 | "price": "0.00"
23 | },
24 | "sourcecode": {
25 | "price": "0.00"
26 | }
27 | },
28 | "contact": {
29 | "qq": ""
30 | },
31 | "declaration": {
32 | "ads": "无",
33 | "data": "无",
34 | "permissions": "无"
35 | },
36 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
37 | "type": "component-vue"
38 | },
39 | "uni_modules": {
40 | "dependencies": ["uni-scss"],
41 | "encrypt": [],
42 | "platforms": {
43 | "cloud": {
44 | "tcb": "y",
45 | "aliyun": "y"
46 | },
47 | "client": {
48 | "App": {
49 | "app-vue": "y",
50 | "app-nvue": "n"
51 | },
52 | "H5-mobile": {
53 | "Safari": "y",
54 | "Android Browser": "y",
55 | "微信浏览器(Android)": "y",
56 | "QQ浏览器(Android)": "y"
57 | },
58 | "H5-pc": {
59 | "Chrome": "y",
60 | "IE": "y",
61 | "Edge": "y",
62 | "Firefox": "y",
63 | "Safari": "y"
64 | },
65 | "小程序": {
66 | "微信": "y",
67 | "阿里": "y",
68 | "百度": "y",
69 | "字节跳动": "y",
70 | "QQ": "y"
71 | },
72 | "快应用": {
73 | "华为": "u",
74 | "联盟": "u"
75 | },
76 | "Vue": {
77 | "vue2": "y",
78 | "vue3": "y"
79 | }
80 | }
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/src/uni_modules/uni-file-picker/readme.md:
--------------------------------------------------------------------------------
1 |
2 | ## FilePicker 文件选择上传
3 |
4 | > **组件名:uni-file-picker**
5 | > 代码块: `uFilePicker`
6 |
7 |
8 | 文件选择上传组件,可以选择图片、视频等任意文件并上传到当前绑定的服务空间
9 |
10 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-file-picker)
11 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/src/uni_modules/uni-forms/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Forms 表单
4 |
5 | > **组件名:uni-forms**
6 | > 代码块: `uForms`、`uni-forms-item`
7 | > 关联组件:`uni-forms-item`、`uni-easyinput`、`uni-data-checkbox`、`uni-group`。
8 |
9 |
10 | uni-app的内置组件已经有了 `