diff --git a/src/pages/myElection/index.vue b/src/pages/myElection/index.vue index 093d79c..d85fd15 100644 --- a/src/pages/myElection/index.vue +++ b/src/pages/myElection/index.vue @@ -4,40 +4,40 @@ - {{ item.title }} + {{ item.vote_title }} - {{ item.type }} + {{ item.vote_title==1?'未开始':(item.vote_title==2?'进行中':'已结束') }} - + - + {{ candidate.name }} - {{ candidate.college }} + {{ candidate.position }} - + 我的选择: - - {{ choiceText(candidate.choice) }} + + {{ choiceText(candidate.vote_result) }} @@ -84,9 +84,9 @@ const choiceClass = (choice) => { switch (choice) { case 1: return 'agree' - case 0: - return 'oppose' case 2: + return 'oppose' + case 3: return 'abstain' default: return '' @@ -97,8 +97,8 @@ const choiceText = (choice) => { return ( { 1: '同意', - 0: '反对', - 2: '弃权' + 2: '反对', + 3: '弃权' }[choice] || '' ) } @@ -114,16 +114,14 @@ const getList = async () => { limit: pageSize.value } // 模拟接口请求(替换为你的真实接口) - const mockData = await getMyvote(param).then((res)=> { - console.log(res,66666666666); - }) + const mockData = await getMyvote(param) // 处理数据 - // electionList.value = [...electionList.value, ...mockData] - electionList.value.push(mockData) + electionList.value = [...electionList.value, ...mockData.data.data] + // electionList.value.push(mockData) // 判断是否还有数据 - // noMoreData.value = mockData.length < pageSize.value + noMoreData.value = mockData.data.data.length < pageSize.value } finally { loading.value = false } @@ -173,7 +171,7 @@ onShow(() => { .title { font-family: Roboto; font-size: 32rpx; - font-weight: 500; + font-weight: 800; letter-spacing: normal; color: #000000; } diff --git a/src/pages/votingElection/index.vue b/src/pages/votingElection/index.vue index cdf351c..6b5b39f 100644 --- a/src/pages/votingElection/index.vue +++ b/src/pages/votingElection/index.vue @@ -66,7 +66,7 @@ xjList.value.data?.forEach((ele : { vote_result : number }) => { ele.vote_result = 1 }) - params.value = xjList.value.data + params.value = xjList.value.candidate submit() } else if (res.cancel) { console.log('用户点击取消')