Browse Source

修改bug

dev
岳鹏龙 1 year ago
parent
commit
bc1a63d4df
  1. 15
      src/api/votingElection.ts
  2. 19
      src/pages/votingElection/index.vue

15
src/api/votingElection.ts

@ -0,0 +1,15 @@
import { request } from '@/utils/http'
// 获取投票选举(正在进行)
export function getCategoryData() {
return request.http({
url: '/api/vote_progress'
})
}
export function feedback(data: any) {
return request.http({
url: '/api/t.feedback/add',
data
})
}

19
src/pages/votingElection/index.vue

@ -1,44 +1,47 @@
<script setup lang="ts"> <script setup lang="ts">
import { getCategoryData } from '../../api/votingElection'
const doSearch = (_formData: { page: number; limit: number }, onSuccess: Function) => { const doSearch = (_formData: { page: number; limit: number }, onSuccess: Function) => {
// const submitData = { ...formData } // const submitData = { ...formData }
// listApi(submitData, userStore.useType).then((res) => { // listApi(submitData, userStore.useType).then((res) => {
// const { data } = res as { data: { data: any; total: number } } // const { data } = res as { data: { data: any; total: number } }
// onSuccess({ data }) // onSuccess({ data })
// }) // })
onSuccess({ onSuccess({
data: { data: {
data: [ data: [
{ {
id: 1, id: 1,
img: '/static/img/grxx.png', img: '',
name: '陈志远', name: '陈志远',
class: '现任财务总监', class: '现任财务总监',
yijian: '' yijian: ''
}, },
{ {
id: 2, id: 2,
img: '/static/img/grxx.png', img: '',
name: '陈志远', name: '陈志远',
class: '现任财务总监', class: '现任财务总监',
yijian: '' yijian: ''
}, },
{ {
id: 3, id: 3,
img: '/static/img/grxx.png', img: '',
name: '陈志远', name: '陈志远',
class: '现任财务总监', class: '现任财务总监',
yijian: '' yijian: ''
}, },
{ {
id: 4, id: 4,
img: '/static/img/grxx.png', img: '',
name: '陈志远', name: '陈志远',
class: '现任财务总监', class: '现任财务总监',
yijian: '' yijian: ''
}, },
{ {
id: 5, id: 5,
img: '/static/img/grxx.png', img: '',
name: '陈志远', name: '陈志远',
class: '现任财务总监', class: '现任财务总监',
yijian: '' yijian: ''
@ -80,6 +83,12 @@ const selectBut = (data: any, cardid: any, type: string, butname: string) => {
} }
}) })
} }
onShow(()=> {
getCategoryData().then((res)=> {
console.log(res,55555555555)
})
})
</script> </script>
<template> <template>

Loading…
Cancel
Save