沈明 1 year ago
parent
commit
58f3e5d8d1
  1. 12
      src/App.vue
  2. 16
      src/pages/electionList/index.vue
  3. 6
      src/pages/electionList/info.vue
  4. 16
      src/pages/electionResults/index.vue
  5. 64
      src/pages/votingElection/index.vue

12
src/App.vue

@ -8,13 +8,13 @@
onLaunch(() => {
// routingIntercept()
});
})
onShow(() => {
console.log("App Show");
});
console.log('App Show')
})
onHide(() => {
console.log("App Hide");
});
console.log('App Hide')
})
//
// provide('globalObj', <globalObjInt>{
// //
@ -25,5 +25,5 @@ onHide(() => {
<style lang="scss">
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
@import "uview-plus/index.scss";
@import 'uview-plus/index.scss';
</style>

16
src/pages/electionList/index.vue

@ -1,13 +1,13 @@
<script setup lang="ts">
const navto = (url: string, params = {}) => uni.$util.goToPage({ url, params });
const navto = (url: string, params = {}) => uni.$util.goToPage({ url, params })
const doSearch = (_formData: { page: number; limit: number }, onSuccess: Function) => {
onSuccess({
data: {
data: [{ name: "测试一" }, { name: "测试二" }],
total: 4,
},
});
};
data: [{ name: '测试一' }, { name: '测试二' }],
total: 4
}
})
}
</script>
<template>
@ -18,12 +18,12 @@ const doSearch = (_formData: { page: number; limit: number }, onSuccess: Functio
<view class="flex">
<view class="flex1">
<view class="flex-center-start">
<text class="text-ellipsis title">{{ "2024年度学生会主席选举" }}</text>
<text class="text-ellipsis title">{{ '2024年度学生会主席选举' }}</text>
<text class="status b">进行中</text>
<!-- <text class="status f">未开始</text> -->
<!-- <text class="status e">已结束</text> -->
</view>
<view class="time">{{ "投票时间:2024-03-01 至 2024-03-07" }}</view>
<view class="time">{{ '投票时间:2024-03-01 至 2024-03-07' }}</view>
</view>
<view :class="{ arrow: true, active: row.showInfo }" @click="row.showInfo = !row.showInfo">
<u-icon name="arrow-down" color="#9CA3AF" />

6
src/pages/electionList/info.vue

@ -11,15 +11,15 @@
</view>
<view class="countview flex-center-between">
<view class="flex column items">
<u-count-to :startVal="0" :endVal="20" bold fontSize="48rpx" color="#2563EB" />
<u-count-to :start-val="0" :end-val="20" bold font-size="48rpx" color="#2563EB" />
<view class="tip">参选人数</view>
</view>
<view class="flex column items">
<u-count-to :startVal="0" :endVal="20" bold fontSize="48rpx" color="#2563EB" />
<u-count-to :start-val="0" :end-val="20" bold font-size="48rpx" color="#2563EB" />
<view class="tip">候选人数</view>
</view>
<view class="flex column items">
<u-count-to :startVal="0" :endVal="20" bold fontSize="48rpx" color="#2563EB" />
<u-count-to :start-val="0" :end-val="20" bold font-size="48rpx" color="#2563EB" />
<view class="tip">当选人数</view>
</view>
</view>

16
src/pages/electionResults/index.vue

@ -1,13 +1,13 @@
<script setup lang="ts">
const navto = (url: string, params = {}) => uni.$util.goToPage({ url, params });
const navto = (url: string, params = {}) => uni.$util.goToPage({ url, params })
const doSearch = (_formData: { page: number; limit: number }, onSuccess: Function) => {
onSuccess({
data: {
data: [{ name: "测试一" }, { name: "测试二" }],
total: 4,
},
});
};
data: [{ name: '测试一' }, { name: '测试二' }],
total: 4
}
})
}
</script>
<template>
@ -18,12 +18,12 @@ const doSearch = (_formData: { page: number; limit: number }, onSuccess: Functio
<view class="flex">
<view class="flex1">
<view class="flex-center-start">
<text class="text-ellipsis title">{{ "2024年度学生会主席选举" }}</text>
<text class="text-ellipsis title">{{ '2024年度学生会主席选举' }}</text>
<!-- <text class="status b">进行中</text> -->
<!-- <text class="status f">未开始</text> -->
<text class="status e">已结束</text>
</view>
<view class="time">{{ "投票时间:2024-03-01 至 2024-03-07" }}</view>
<view class="time">{{ '投票时间:2024-03-01 至 2024-03-07' }}</view>
</view>
<view :class="{ arrow: true, active: row.showInfo }" @click="row.showInfo = !row.showInfo">
<u-icon name="arrow-down" color="#9CA3AF" />

64
src/pages/votingElection/index.vue

@ -9,52 +9,52 @@ const doSearch = (_formData: { page: number; limit: number }, onSuccess: Functio
data: {
data: [
{
img: "/static/img/grxx.png",
name: "陈志远",
class: "现任财务总监",
img: '/static/img/grxx.png',
name: '陈志远',
class: '现任财务总监'
},
{
img: "/static/img/grxx.png",
name: "陈志远",
class: "现任财务总监",
img: '/static/img/grxx.png',
name: '陈志远',
class: '现任财务总监'
},
{
img: "/static/img/grxx.png",
name: "陈志远",
class: "现任财务总监",
img: '/static/img/grxx.png',
name: '陈志远',
class: '现任财务总监'
},
{
img: "/static/img/grxx.png",
name: "陈志远",
class: "现任财务总监",
img: '/static/img/grxx.png',
name: '陈志远',
class: '现任财务总监'
},
{
img: "/static/img/grxx.png",
name: "陈志远",
class: "现任财务总监",
},
img: '/static/img/grxx.png',
name: '陈志远',
class: '现任财务总监'
}
],
total: 0,
},
});
};
total: 0
}
})
}
const selectIndex = ref(0);
const selectIndex = ref(0)
const buttlist = ref([
{
butname: "同意",
butname: '同意'
},
{
butname: "反对",
butname: '反对'
},
{
butname: "弃权",
},
]);
butname: '弃权'
}
])
const selectBut = (index: number) => {
selectIndex.value = index;
};
selectIndex.value = index
}
</script>
<template>
@ -81,7 +81,13 @@ const selectBut = (index: number) => {
</view>
</view>
<view class="bottomp">
<view class="minbut" v-for="(item, index) in buttlist" :key="'minbut' + index" @click="selectBut(index)" :class="{ active: selectIndex === index }">
<view
class="minbut"
v-for="(item, index) in buttlist"
:key="'minbut' + index"
@click="selectBut(index)"
:class="{ active: selectIndex === index }"
>
{{ item.butname }}
</view>
</view>

Loading…
Cancel
Save