|
|
@ -1,10 +1,14 @@ |
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import { getVoteprogress, voteMember } from '../../api/votingElection' |
|
|
import { getVoteprogress, voteMember } from '../../api/votingElection' |
|
|
import useUserStore from '@/store/user' |
|
|
import useUserStore from '@/store/user' |
|
|
|
|
|
import { isEmptyObject } from '@/utils/common' |
|
|
|
|
|
|
|
|
const userStore = useUserStore() |
|
|
const userStore = useUserStore() |
|
|
|
|
|
|
|
|
const showDialogRef = ref() |
|
|
const showDialogRef = ref() |
|
|
|
|
|
|
|
|
|
|
|
const reListRef = ref() |
|
|
|
|
|
|
|
|
const xjList = ref<any>({}) |
|
|
const xjList = ref<any>({}) |
|
|
|
|
|
|
|
|
const doSearch = (_formData: { page: number; limit: number }, onSuccess: Function) => { |
|
|
const doSearch = (_formData: { page: number; limit: number }, onSuccess: Function) => { |
|
|
@ -100,12 +104,6 @@ const submit = () => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const isEmptyObject = (obj: any) => { |
|
|
|
|
|
if (obj == null) return true |
|
|
|
|
|
if (typeof obj !== 'object' || Array.isArray(obj)) return true |
|
|
|
|
|
return Reflect.ownKeys(obj).length === 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const onConfirm = () => uni.reLaunch({ url: '/pages/mine/index' }) |
|
|
const onConfirm = () => uni.reLaunch({ url: '/pages/mine/index' }) |
|
|
|
|
|
|
|
|
onShow(() => { |
|
|
onShow(() => { |
|
|
@ -116,6 +114,15 @@ onShow(() => { |
|
|
}) |
|
|
}) |
|
|
} else if (isEmptyObject(userStore.userInfo)) { |
|
|
} else if (isEmptyObject(userStore.userInfo)) { |
|
|
showDialogRef.value.show = true |
|
|
showDialogRef.value.show = true |
|
|
|
|
|
} else { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '签到成功,等待投票!', |
|
|
|
|
|
icon: 'success', |
|
|
|
|
|
duration: 1000, |
|
|
|
|
|
complete: () => { |
|
|
|
|
|
setTimeout(() => reListRef.value.refreshFn(), 1100) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
@ -129,7 +136,7 @@ onShow(() => { |
|
|
<view class="time">投票开始时间:{{ xjList.start_time }}</view> |
|
|
<view class="time">投票开始时间:{{ xjList.start_time }}</view> |
|
|
<view class="time">投票截止时间:{{ xjList.end_time }}</view> |
|
|
<view class="time">投票截止时间:{{ xjList.end_time }}</view> |
|
|
</view> |
|
|
</view> |
|
|
<ex-list ref="reListRef" custom-list-type="custom" :on-form-search="doSearch"> |
|
|
<ex-list ref="reListRef" custom-list-type="custom" :on-form-search="doSearch" :is-perform-search="false"> |
|
|
<template v-slot="{ data }"> |
|
|
<template v-slot="{ data }"> |
|
|
<view class="tppart"> |
|
|
<view class="tppart"> |
|
|
<view class="tpone" v-for="(row, index) of data" :key="'tpone' + index"> |
|
|
<view class="tpone" v-for="(row, index) of data" :key="'tpone' + index"> |
|
|
|