From 062c360161d672485a854104932298cd3eb4fea6 Mon Sep 17 00:00:00 2001 From: yuepenglong <1547476325@qq.com> Date: Fri, 11 Apr 2025 10:53:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user.ts | 4 ++-- src/api/votingElection.ts | 2 +- src/pages/mine/add.vue | 16 +++++++++++++++- src/pages/mine/index.vue | 22 +++++++++++++++++++++- src/pages/votingElection/index.vue | 2 +- 5 files changed, 40 insertions(+), 6 deletions(-) diff --git a/src/api/user.ts b/src/api/user.ts index 8f64218..5c4a200 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -14,9 +14,9 @@ export interface dateListtype extends listType { id: number } -export function infoForOpenid(data: { openid: string; mobile: string }) { +export function infoForOpenid(data: { openid: string; mobile: string; meetId: string }) { return request.http({ - url: '/api/member_mobile', + url: '/api/member_mobile_get', method: 'GET', data }) diff --git a/src/api/votingElection.ts b/src/api/votingElection.ts index 9fb86e6..c6668f6 100644 --- a/src/api/votingElection.ts +++ b/src/api/votingElection.ts @@ -28,7 +28,7 @@ export function getMyvote(data: any) { // 手机号获取用户信息 export function getMember_mobile(data: any) { return request.http({ - url: '/api/member_mobile', + url: '/api/member_mobile_get', method: 'GET', data }) diff --git a/src/pages/mine/add.vue b/src/pages/mine/add.vue index 05b98ec..f17eb72 100644 --- a/src/pages/mine/add.vue +++ b/src/pages/mine/add.vue @@ -3,6 +3,20 @@ import useUserStore from '@/store/user' import { add as addAPi, type listType } from '@/api/user' const userStore = useUserStore() +const meetid = ref('') + +onLoad((options: any) => { + if(options.meetId){ + meetid.value = options.meetId + // let params = { + // mobile: userStore.mobile, + // openid: userStore.openId, + // meetId: options.meetId + // } + // getMember_mobile(params) + } + +}) interface formListType extends listType { openid: string @@ -33,7 +47,7 @@ const onSubmit = uni.$util.debounce(() => { uni.hideLoading() uni.showToast({ title: '签到成功,等待投票!', icon: 'none' }) - setTimeout(() => uni.switchTab({ url: '/pages/mine/index' }), 1000) + setTimeout(() => uni.switchTab({ url: '/pages/mine/index?meetId='+meetid.value }), 1000) }) } }) diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue index e5fe59c..a991d9a 100644 --- a/src/pages/mine/index.vue +++ b/src/pages/mine/index.vue @@ -17,6 +17,25 @@ const amdinPhone = ref('') const navto = (url: string, params = {}) => uni.$util.goToPage({ url, params }) +const meetid = ref('') +const meetidparam = ref({}) + +onLoad((options: any) => { + console.log('扫码2:', options); + if(options.meetId){ + meetid.value = options.meetId + meetidparam.value = {meetId: options.meetId} + // let params = { + // mobile: userStore.mobile, + // openid: userStore.openId, + // meetId: options.meetId + // } + // getMember_mobile(params) + } + +}) + + const getList = uni.$util.throttle(() => { if (keyword.value === '') { uni.showToast({ title: '请输入姓名', icon: 'none' }) @@ -77,6 +96,7 @@ const save = () => { }) } + onShow(() => { reset() getAdminPhone().then((res) => { @@ -122,7 +142,7 @@ onPullDownRefresh(() => userStore.getUserInfo()) 确认信息 - 新建信息 + 新建信息 diff --git a/src/pages/votingElection/index.vue b/src/pages/votingElection/index.vue index 21186c8..90d1d36 100644 --- a/src/pages/votingElection/index.vue +++ b/src/pages/votingElection/index.vue @@ -140,7 +140,7 @@ const submit = () => { } } -const onConfirm = () => uni.reLaunch({ url: '/pages/mine/index' }) +const onConfirm = () => uni.reLaunch({ url: '/pages/mine/index?meetId='+ meetid.value }) onShow(() => { nextTick(() => {