diff --git a/src/api/user.ts b/src/api/user.ts
index 81ce8ce..4e67679 100644
--- a/src/api/user.ts
+++ b/src/api/user.ts
@@ -31,7 +31,7 @@ export function getMember_mobile(data: any) {
})
}
-export function list(data: { name: string, meetId: string }) {
+export function list(data: any) {
return request.http({
url: '/api/member_name',
method: 'GET',
diff --git a/src/pages.json b/src/pages.json
index af32e8a..a0eaa51 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -57,7 +57,7 @@
"path": "pages/mine/index",
"style": {
"navigationBarTitleText": "个人信息",
- "enablePullDownRefresh": true
+ "enablePullDownRefresh": false
}
},
{
diff --git a/src/pages/electionList/info.vue b/src/pages/electionList/info.vue
index bb9fa31..d3a0e54 100644
--- a/src/pages/electionList/info.vue
+++ b/src/pages/electionList/info.vue
@@ -60,16 +60,16 @@ onLoad((opt) => {
同意
- {{ v.agree_num }} 票({{ toFixed2(v.ageree_percent) }}%)
+ {{ v.agree_num }} 票({{ toFixed2(v.agree_percent) }}%)
-
+
反对
- {{ v.disagree_num }} 票({{ toFixed2(v.giveup_percent) }}%)
+ {{ v.disagree_num }} 票({{ toFixed2(v.disagree_percent) }}%)
-
+
diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue
index 10d291a..c2bdb39 100644
--- a/src/pages/mine/index.vue
+++ b/src/pages/mine/index.vue
@@ -8,6 +8,7 @@ const userStore = useUserStore()
const isHandleUserInfo = computed(() => Object.keys(userStore.userInfo).length === 0)
const keyword = ref('')
+const keyword2 = ref('')
const list = ref([])
@@ -19,35 +20,47 @@ const navto = (url: string, params = {}) => uni.$util.goToPage({ url, params })
-const getList = uni.$util.throttle(() => {
- if (keyword.value === '') {
- uni.showToast({ title: '请输入姓名', icon: 'none' })
- return
- }
-
- // uni.showLoading({ mask: true, title: '加载中...' })
-
- listApi({ name: keyword.value, meetId: userStore.meetId })
- .then((res) => {
- const { data } = res as { data: dateListtype[] }
- list.value = data || []
- // uni.hideLoading()
- })
- .catch(() => uni.hideLoading())
+const getList = uni.$util.throttle((type) => {
+ console.log(keyword.value,keyword2.value);
+ if(type === 1) {
+ if (keyword.value === '') {
+ uni.showToast({ title: type==1?'请输入姓名':'请输入单位', icon: 'none' })
+ return
+ }
+ listApi({ name: keyword.value, meetId: userStore.meetId })
+ .then((res) => {
+ const { data } = res as { data: dateListtype[] }
+ list.value = data || []
+ })
+ } else {
+ if (keyword2.value === '') {
+ uni.showToast({ title: type==1?'请输入姓名':'请输入单位', icon: 'none' })
+ return
+ }
+ listApi({ work_unit: keyword2.value, meetId: userStore.meetId })
+ .then((res) => {
+ const { data } = res as { data: dateListtype[] }
+ list.value = data || []
+ })
+ }
})
const updateUserInfo = () => {
+ getSign({ openid: userStore.openId, meetId: userStore.meetId })
userStore.bindUser(list.value[activeKey.value].id as number).then(() => {
reset()
uni.showToast({ title: '提交成功,等待投票!', icon: 'none' })
- userStore.getUserInfo()
})
- getSign({ openid: userStore.openId, meetId: userStore.meetId })
+ setTimeout(()=> {
+ userStore.getUserInfomobile()
+
+ },1000)
}
const reset = () => {
activeKey.value = 0
keyword.value = ''
+ keyword2.value = ''
list.value = []
}
@@ -99,8 +112,13 @@ onPullDownRefresh(() => userStore.getUserInfo())
姓名
- 搜索
+ 搜索
+
+ 单位
+
+ 搜索
+
userStore.getUserInfo())
确认信息
- 新建信息
+ 新建信息
@@ -174,13 +192,13 @@ onPullDownRefresh(() => userStore.getUserInfo())
-
+
* 姓名和电话信息需要管理员修改
@@ -264,6 +282,7 @@ onPullDownRefresh(() => userStore.getUserInfo())
}
&-bts {
+ padding: 0 20rpx;
color: #2563eb;
}
}
@@ -327,5 +346,21 @@ onPullDownRefresh(() => userStore.getUserInfo())
background-color: #eff6ff;
}
}
+ .bts1 {
+ color: #2563eb;
+ font-size: 28rpx;
+ line-height: 40rpx;
+ text-align: center;
+ border-radius: 8rpx;
+ padding: 24rpx 80rpx;
+ letter-spacing: 4rpx;
+ // border: 1rpx solid #2563eb;
+ // background-color: #2563eb;
+
+ &.plain {
+ color: #2563eb;
+ background-color: #eff6ff;
+ }
+ }
}
diff --git a/src/pages/votingElection/index.vue b/src/pages/votingElection/index.vue
index fa8bbfb..481b0ec 100644
--- a/src/pages/votingElection/index.vue
+++ b/src/pages/votingElection/index.vue
@@ -1,445 +1,442 @@
-
-
-
- {{ xjList.title }}
- 投票开始时间:{{ xjList.start_time }}
- 投票截止时间:{{ xjList.end_time }}
-
-
-
-
-
-
-
-
-
- {{ row.name }}
-
-
+
+
+
+ {{ xjList.title }}
+ 投票开始时间:{{ xjList.start_time }}
+ 投票截止时间:{{ xjList.end_time }}
+
+
+
+
+
+ {{row.num}}
+
+
+
+ {{ row.name }}
+
+
+
+
+
+
+ {{ item.butname }}
+
+
+
+
+
+ 全部同意
+ 提交投票
+
+
+
+
+
+ 暂时没有选举 请刷新重试
+
+
+ 请您签到之后再进行投票!
+ .box {
+ width: 100%;
+ background-color: #f9fafb;
+
+ .headpart {
+ width: 92%;
+ height: 194rpx;
+ border-radius: 24rpx;
+ background-color: #eff6ff;
+ margin: 32rpx auto;
+ padding: 20rpx 3%;
+
+ .title {
+ color: #2563eb;
+ font-size: 28rpx;
+ margin-top: 16rpx;
+ }
+
+ .time {
+ margin-top: 16rpx;
+ color: #4b5563;
+ font-size: 28rpx;
+ }
+ }
+
+ .tppart {
+ width: 100%;
+ max-height: calc(100vh - 400rpx);
+ overflow-y: auto;
+ display: grid;
+ justify-items: center;
+
+ .tpone {
+ width: 91%;
+ height: 264rpx;
+ padding: 20rpx 4%;
+ box-sizing: border-box;
+ border-radius: 24rpx;
+ background: linear-gradient(0deg, rgba(0, 0, 0, 0.001), rgba(0, 0, 0, 0.001)), #ffffff;
+ box-sizing: border-box;
+ border: 2rpx solid #f3f4f6;
+ box-shadow:
+ 0rpx 2rpx 4rpx -2rpx rgba(0, 0, 0, 0.1),
+ 0rpx 2rpx 6rpx 0rpx rgba(0, 0, 0, 0.1);
+ margin-top: 32rpx;
+ display: grid;
+
+ .topp {
+ display: flex;
+ align-items: center;
+
+ .number {
+ font-family: Roboto;
+ font-size: 28rpx;
+ font-weight: 500;
+ line-height: 42rpx;
+ letter-spacing: normal;
+ color: #000000;
+ }
+
+ .rightpart {
+ margin-left: 32rpx;
+ display: grid;
+ justify-items: left;
+ align-content: baseline;
+
+ .name {
+ font-family: Roboto;
+ font-size: 28rpx;
+ font-weight: 500;
+ line-height: 42rpx;
+ letter-spacing: normal;
+ color: #000000;
+ margin-top: 7rpx;
+ }
+
+ .class {
+ font-family: Roboto;
+ font-size: 28rpx;
+ font-weight: normal;
+ line-height: 40rpx;
+ letter-spacing: normal;
+ color: #6b7280;
+ margin-top: 7rpx;
+ }
+ }
+ }
+
+ .bottomp {
+ display: flex;
+ justify-content: space-between;
+ gap: 0rpx 20rpx;
+
+ .minbut {
+ flex: 1;
+ width: 190rpx;
+ height: 76rpx;
+ /* 自动布局 */
+ display: flex;
+ justify-content: center;
+ padding: 16rpx 32rpx;
+ flex-wrap: wrap;
+ align-content: flex-start;
+ border-radius: 8rpx;
+ background: #ffffff;
+ box-sizing: border-box;
+ border: 2rpx solid #d1d5db;
+ font-family: Roboto;
+ font-size: 28rpx;
+ font-weight: normal;
+ line-height: 40rpx;
+ text-align: center;
+ letter-spacing: normal;
+ color: #4b5563;
+ }
+
+ .minbut.active {
+ border: 2rpx solid #2563eb;
+ color: #2563eb;
+ }
+ }
+ }
+
+ .tpone:first-child {
+ margin-top: 0;
+ }
+ }
+
+ .bottbutton {
+ width: 100%;
+ height: 10vh;
+ display: flex;
+ padding: 24rpx 32rpx;
+ gap: 0rpx 24rpx;
+ flex-wrap: wrap;
+ align-content: flex-start;
+ background: #ffffff;
+ box-sizing: border-box;
+ border-width: 2rpx 0rpx 0rpx 0rpx;
+ border-style: solid;
+ border-color: #f3f4f6;
+ position: fixed;
+ bottom: 0;
+
+ .qbty {
+ width: 331rpx;
+ height: 90rpx;
+ /* 自动布局 */
+ display: flex;
+ box-sizing: border-box;
+ justify-content: center;
+ padding: 24rpx 0rpx;
+ gap: 0rpx 20rpx;
+ flex-wrap: wrap;
+ border-radius: 8rpx;
+ background: #eff6ff;
+ font-family: Roboto;
+ font-size: 28rpx;
+ font-weight: 500;
+ line-height: 42rpx;
+ text-align: center;
+ letter-spacing: normal;
+ color: #2563eb;
+ }
+
+ .tjtp {
+ width: 331rpx;
+ height: 90rpx;
+ /* 自动布局 */
+ display: flex;
+ box-sizing: border-box;
+ justify-content: center;
+ padding: 24rpx 0rpx;
+ gap: 0rpx 20rpx;
+ flex-wrap: wrap;
+ border-radius: 8rpx;
+ background: #2563eb;
+ font-family: Roboto;
+ font-size: 28rpx;
+ font-weight: 500;
+ line-height: 42rpx;
+ text-align: center;
+ letter-spacing: normal;
+ color: #ffffff;
+ }
+ }
+
+ .address-items {
+ padding: 20rpx 15rpx 32rpx 28rpx;
+ background-color: #fff;
+ border-bottom: 2rpx solid #f5f5f5;
+
+ .left {
+ flex: 1;
+ overflow: hidden;
+
+ .name {
+ font-size: 28rpx;
+ font-weight: 700;
+ color: #101010;
+ line-height: 40rpx;
+ margin-right: 16rpx;
+ }
+
+ .isdefault {
+ font-size: 20rpx;
+ font-weight: 400;
+ color: #fff;
+ padding: 4rpx 12rpx;
+ border-radius: 8rpx;
+ background: linear-gradient(90deg, #4778ff 0%, #4778ffb8 100%);
+ }
+
+ .info {
+ width: 100%;
+ color: #666;
+ font-size: 24rpx;
+ font-weight: 400;
+ margin-top: 12rpx;
+ }
+ }
+
+ .right {
+ width: 140rpx;
+ padding-left: 32rpx;
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #4979ff;
+ text-align: right;
+ }
+ }
+
+ .buts {
+ width: 100%;
+ height: 10vh;
+ background-color: F3F4F6;
+ position: fixed;
+ bottom: 0;
+ border-top: 2rpx solid #ebebec;
+ }
+ }
+
+ .nodata {
+ margin-top: 86rpx;
+ font-family: Source Han Sans;
+ font-size: 36rpx;
+ font-weight: 500;
+ letter-spacing: normal;
+ color: #34343f;
+ }
+
\ No newline at end of file
diff --git a/src/store/user.ts b/src/store/user.ts
index cafcc51..b2f4e36 100644
--- a/src/store/user.ts
+++ b/src/store/user.ts
@@ -2,7 +2,7 @@
import { defineStore } from 'pinia'
import { getPrefixName } from '@/config'
import { getOpenid } from '@/api/login'
-import { infoForOpenid, bind as bindApi } from '@/api/user'
+import { infoForOpenid,getMember_mobile, bind as bindApi } from '@/api/user'
interface userInfoStoreInt {
[n: string]: any
@@ -47,6 +47,21 @@ export default defineStore(
})
}
+ function getUserInfomobile() {
+ return new Promise( (resolve, reject) => {
+ getMember_mobile({ openid: openId.value})
+ .then((res) => {
+ const { data } = res as { data: userInfoStoreInt }
+ userInfo.value = data || {}
+ resolve({ code: 1, data, message: 'SUCCESS' })
+ })
+ .catch((err) => {
+ reject(err)
+ })
+
+ })
+ }
+
function bindUser(id: number) {
return new Promise((resolve, reject) => {
bindApi({ id, openid: openId.value })
@@ -82,7 +97,8 @@ export default defineStore(
getopenid,
bindUser,
getUserInfo,
- logOut
+ logOut,
+ getUserInfomobile
}
},
{