From c0d8cb2c3b9890fe493c384eedc592a1f2a5ffa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=8E=AB=E5=94=90=E5=B0=BC?= Date: Wed, 20 Aug 2025 21:56:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=8A=95=E7=A5=A8?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/vote-card/vote-card.vue | 330 +++++ pages.json | 26 + pages/index/index.vue | 205 +-- pages/tabbar/about/about.vue | 1117 ++++++++------- pages/tabbar/home/home.vue | 1270 +++++++++-------- pagesA/articles/articles.vue | 125 +- pagesA/vote-detail/vote-detail.vue | 680 +++++++++ pagesA/votes/votes.vue | 395 +++++ .../components/tm-checkbox/tm-checkbox.vue | 10 +- .../tm-groupcheckbox/tm-groupcheckbox.vue | 4 + tm-vuetify/components/tm-radio/tm-radio.vue | 9 +- utils/vote.js | 34 + 12 files changed, 2939 insertions(+), 1266 deletions(-) create mode 100644 components/vote-card/vote-card.vue create mode 100644 pagesA/vote-detail/vote-detail.vue create mode 100644 pagesA/votes/votes.vue create mode 100644 utils/vote.js diff --git a/components/vote-card/vote-card.vue b/components/vote-card/vote-card.vue new file mode 100644 index 0000000..e389731 --- /dev/null +++ b/components/vote-card/vote-card.vue @@ -0,0 +1,330 @@ + + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index b2d997a..31d493b 100644 --- a/pages.json +++ b/pages.json @@ -279,6 +279,32 @@ } } } + }, + { + "path": "votes/votes", + "style": { + "navigationBarTitleText": "投票列表", + "enablePullDownRefresh": true, + "app-plus": { + "pullToRefresh": { + "color": "#03a9f4", + "style": "circle" + } + } + } + }, + { + "path": "vote-detail/vote-detail", + "style": { + "navigationBarTitleText": "投票详情", + "enablePullDownRefresh": true, + "app-plus": { + "pullToRefresh": { + "color": "#03a9f4", + "style": "circle" + } + } + } } ] }, diff --git a/pages/index/index.vue b/pages/index/index.vue index 7d00a6f..6b99de3 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,93 +1,132 @@ + + \ No newline at end of file diff --git a/pages/tabbar/about/about.vue b/pages/tabbar/about/about.vue index 37d3dc1..cbb5dbd 100644 --- a/pages/tabbar/about/about.vue +++ b/pages/tabbar/about/about.vue @@ -1,593 +1,610 @@ + &::after { + border: none; + border-radius: 0; + transform: initial; + } + } + \ No newline at end of file diff --git a/pages/tabbar/home/home.vue b/pages/tabbar/home/home.vue index 24eb04e..cd3cd3a 100644 --- a/pages/tabbar/home/home.vue +++ b/pages/tabbar/home/home.vue @@ -1,617 +1,739 @@ + .ani-item { + width: 50%; + } + } + + .nav-box { + padding: 24rpx 8rpx; + background-color: #ffff; + overflow: hidden; + margin-bottom: 24rpx; + } + + .nav-list { + align-items: center; + // justify-content: space-between; + justify-content: space-around; + } + + .nav-item { + font-size: 26rpx; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 12rpx; + } + + .nav-item-icon { + padding: 24rpx; + // border-radius: 24rpx 32rpx 24rpx 32rpx; + border-radius: 24rpx; + // border: 2rpx solid #fff; + } + + .nav-item-text { + font-size: 24rpx; + } + \ No newline at end of file diff --git a/pagesA/articles/articles.vue b/pagesA/articles/articles.vue index 2332b53..ae35901 100644 --- a/pagesA/articles/articles.vue +++ b/pagesA/articles/articles.vue @@ -1,62 +1,70 @@ @@ -71,7 +79,10 @@ import MarkdownConfig from '@/common/markdown/markdown.config.js'; import mpHtml from '@/components/mp-html/components/mp-html/mp-html.vue'; + + import pluginAvailable from "@/common/mixins/pluginAvailable.js" export default { + mixins: [pluginAvailable], components: { tmSkeleton, tmSearch, @@ -92,7 +103,7 @@ }, queryParams: { keyword: "", - limit: 5, + limit: 50, highlightPreTag: "", highlightPostTag: "" }, @@ -111,17 +122,21 @@ return this.haloConfigs.auditConfig.auditModeEnabled }, }, - onLoad() { + async onLoad() { this.fnSetPageTitle('内容搜索'); - }, - created() { + // 检查插件 + this.setPluginId(this.NeedPluginIds.PluginSearchWidget) + this.setPluginError("阿偶,检测到当前插件没有安装或者启用,无法使用瞬间功能哦,请联系管理员") + if (!await this.checkPluginAvailable()) return if (!this.queryParams.keyword) { this.loading = 'success' } else { this.fnGetData(); } }, + onPullDownRefresh() { + if (!this.uniHaloPluginAvailable) return; this.fnResetSetAniWaitIndex(); this.fnGetData(); }, diff --git a/pagesA/vote-detail/vote-detail.vue b/pagesA/vote-detail/vote-detail.vue new file mode 100644 index 0000000..b261545 --- /dev/null +++ b/pagesA/vote-detail/vote-detail.vue @@ -0,0 +1,680 @@ + + + + + \ No newline at end of file diff --git a/pagesA/votes/votes.vue b/pagesA/votes/votes.vue new file mode 100644 index 0000000..4e3ce21 --- /dev/null +++ b/pagesA/votes/votes.vue @@ -0,0 +1,395 @@ + + + + + \ No newline at end of file diff --git a/tm-vuetify/components/tm-checkbox/tm-checkbox.vue b/tm-vuetify/components/tm-checkbox/tm-checkbox.vue index eb22cd3..99077af 100644 --- a/tm-vuetify/components/tm-checkbox/tm-checkbox.vue +++ b/tm-vuetify/components/tm-checkbox/tm-checkbox.vue @@ -2,7 +2,7 @@ - + ({}) } }, data() { diff --git a/tm-vuetify/components/tm-groupcheckbox/tm-groupcheckbox.vue b/tm-vuetify/components/tm-groupcheckbox/tm-groupcheckbox.vue index 46c8b03..56d79e4 100644 --- a/tm-vuetify/components/tm-groupcheckbox/tm-groupcheckbox.vue +++ b/tm-vuetify/components/tm-groupcheckbox/tm-groupcheckbox.vue @@ -17,6 +17,10 @@ * */ export default { + options: { + virtualHost: true, + styleIsolation: 'shared' + }, name:'tm-groupcheckbox', props:{ // 最大选择数量 diff --git a/tm-vuetify/components/tm-radio/tm-radio.vue b/tm-vuetify/components/tm-radio/tm-radio.vue index f2f365f..2b5342e 100644 --- a/tm-vuetify/components/tm-radio/tm-radio.vue +++ b/tm-vuetify/components/tm-radio/tm-radio.vue @@ -2,7 +2,7 @@ - +