From 63d248f2272f3f94142c4dbaf3911e22c78a3e68 Mon Sep 17 00:00:00 2001
From: yuepenglong <1547476325@qq.com>
Date: Fri, 28 Mar 2025 20:35:51 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/votingElection.ts | 12 +-
src/pages/myElection/index.vue | 18 +-
src/pages/votingElection/index.vue | 784 +++++++++++++++--------------
src/static/img/Group.png | Bin 0 -> 4474 bytes
4 files changed, 420 insertions(+), 394 deletions(-)
create mode 100644 src/static/img/Group.png
diff --git a/src/api/votingElection.ts b/src/api/votingElection.ts
index e8933b7..dc80f82 100644
--- a/src/api/votingElection.ts
+++ b/src/api/votingElection.ts
@@ -1,10 +1,12 @@
import { request } from '@/utils/http'
+
+
// 获取投票选举(正在进行)
export function getVoteprogress() {
return request.http({
url: '/api/vote_progress',
- method: 'GET'
+ method: "GET"
})
}
@@ -17,9 +19,11 @@ export function voteMember(data: any) {
}
// 获取我的选举
-export function getMyvote() {
+export function getMyvote(data:any) {
return request.http({
url: '/api/my_vote',
- method: 'GET'
+ method: "GET",
+ data
+
})
-}
+}
\ No newline at end of file
diff --git a/src/pages/myElection/index.vue b/src/pages/myElection/index.vue
index 4a81ddc..266a54c 100644
--- a/src/pages/myElection/index.vue
+++ b/src/pages/myElection/index.vue
@@ -55,6 +55,8 @@
-
-
-
-
-
- {{ xjList.title }}
- 投票开始时间:{{ xjList.start_time }}
- 投票截止时间:{{ xjList.end_time }}
-
-
-
-
-
-
-
-
-
- {{ row.name }}
-
-
- {{ row.position }}
-
-
-
-
-
- {{ item.butname }}
-
-
-
-
-
-
-
- 全部同意
- 提交投票
-
-
-
-
-
+
+
+
+
+
+
+ {{ xjList.title }}
+ 投票开始时间:{{ xjList.start_time }}
+ 投票截止时间:{{ xjList.end_time }}
+
+
+
+
+
+
+
+
+
+ {{ row.name }}
+
+
+ {{ row.position }}
+
+
+
+
+
+ {{ item.butname }}
+
+
+
+
+
+
+
+ 全部同意
+ 提交投票
+
+
+
+
+
+ 暂时没有选举 请刷新重试
+
+
+
+
+
\ No newline at end of file
diff --git a/src/static/img/Group.png b/src/static/img/Group.png
new file mode 100644
index 0000000000000000000000000000000000000000..848be8ca12b28e4bad1f8504daf33260d62a84d8
GIT binary patch
literal 4474
zcmV-=5ryuFP)Px#1am@3R0s$N2z&@+hyVZ)BuPX;RCt{2ozIUP$92cQueyhv)h?I2G*^xz#-?Cs
z1zjTZ5abrg|3K`6u7cw~zy^Fw;vZCUF%$&>0tAqe08!35*uKR;4nm?Z7a1`SClOXb
zNJ^9=k-OxQJIkHjovD{YS9RC)^!(_Vp6;&h_aSGyt7m$;dZxegUcGuUs$ELo>hem7R+>tFA}wg!A$K={EuTY1Q=*YK+FWzx?clcdD#H4P7<*t9UK_jFhDe
z01B0RBefFFz5T(rz)72i<3CcC@<{o50ACyxq!DqriAq;?Lx&a;?o#XI$03rgE6_2q+%UYfa$%?9_MWYT54!$m;5f)+l
zQU@111ZE9pLWCe3mpZmjm6xV8!GexaP>)twR1INhevT2?>%yya?`)d5nwFZZ$LieK%VS>fnrQ03WF?~d0G
zH>~FA=hKMx%Pg*Kw)5Eaf|Er98UcCl$MKTgD*)I82L|OFbFE{71Jb?$V1j7uh$o$9
z?HR2Q4iH7RB*G;WMJrr2p?=gS2VgNoI6@`VBQ~};A{?P~+_1D*96^{#J+lB7L4+fe
zNd0oo7Da?3ltjAohBCJKLu-#Ahm!rO}x(bCb>6?h7Y@DxL6|E4C
zP#-4Q7k5y@Jmsorg>Wu){Xfl(Zq=8{@{F}|oB?kZc~nU&+BjS51O}nkXD@>Tm%7UH
z_RR#`^Z~!_V{3-N
zNjM`_91e${lu#F;p`4u$lWFMdOS6&mLv7DR^?2xcX`&%_KBDt6*oH%;8
zx3~9`a;hUVkq3{S8jC|9a*aw3~%|7&v8#mtH-`{_$ylM$e;WrPC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_^|YoamW&mo6x{8(^&89?7VsF)~(liz1}ah)-4|;Oqj-CsPVXW
zieLWseSG@hDU?!BO2y)dJT`Zhocv2>s#G}Ba=imY!U|Il>?2m$O^@Z
z#(ClV+`(}8#_qN7oxb=7g@WJ}Ftz~RD)ab44jgOZiiA?n
zO@(m?;0_4CV#d#3{B8PK!L?kPyaFgyFhV2X*)I_UK@bE%5QM_`f0xzV9ESs7^8f$<
M07*qoM6N<$f
Date: Sat, 29 Mar 2025 11:11:39 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/myElection/index.vue | 12 ++++++------
src/pages/votingElection/index.vue | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/pages/myElection/index.vue b/src/pages/myElection/index.vue
index 266a54c..19054dc 100644
--- a/src/pages/myElection/index.vue
+++ b/src/pages/myElection/index.vue
@@ -56,7 +56,7 @@
import { ref, watch } from 'vue'
import { getMyvote } from '../../api/votingElection'
import useUserStore from '@/store/user'
- const userStore = useUserStore()
+const userStore = useUserStore()
const electionList = ref([])
const page = ref(1)
@@ -113,17 +113,17 @@ const getList = async () => {
page: page.value,
limit: pageSize.value
}
- console.log(param,5555555555);
// 模拟接口请求(替换为你的真实接口)
const mockData = await getMyvote(param).then((res)=> {
console.log(res,66666666666);
})
// 处理数据
- electionList.value = [...electionList.value, ...mockData]
+ // electionList.value = [...electionList.value, ...mockData]
+ electionList.value.push(mockData)
// 判断是否还有数据
- noMoreData.value = mockData.length < pageSize.value
+ // noMoreData.value = mockData.length < pageSize.value
} finally {
loading.value = false
}
@@ -136,12 +136,12 @@ const loadMore = () => {
getList()
}
-onMounted(() => {
+onShow(() => {
getList()
})
onShow(() => {
- if (userStore.mobile) {
+ if (!userStore.openId) {
uni.navigateTo({
url: '/pages/login/login'
})
diff --git a/src/pages/votingElection/index.vue b/src/pages/votingElection/index.vue
index d3cd582..198ab65 100644
--- a/src/pages/votingElection/index.vue
+++ b/src/pages/votingElection/index.vue
@@ -100,7 +100,7 @@
}
}
onShow(() => {
- if (userStore.mobile) {
+ if (!userStore.openId) {
uni.navigateTo({
url: '/pages/login/login'
})
From 7952e9bf8d25fb3aee68aafd02b4a5bff0925b86 Mon Sep 17 00:00:00 2001
From: yuepenglong <1547476325@qq.com>
Date: Sat, 29 Mar 2025 11:20:25 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/myElection/index.vue | 7 -------
src/pages/votingElection/index.vue | 2 +-
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/pages/myElection/index.vue b/src/pages/myElection/index.vue
index 19054dc..093d79c 100644
--- a/src/pages/myElection/index.vue
+++ b/src/pages/myElection/index.vue
@@ -140,13 +140,6 @@ onShow(() => {
getList()
})
-onShow(() => {
- if (!userStore.openId) {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
-})