Browse Source

修改bug

dev
岳鹏龙 12 months ago
parent
commit
062c360161
  1. 4
      src/api/user.ts
  2. 2
      src/api/votingElection.ts
  3. 16
      src/pages/mine/add.vue
  4. 22
      src/pages/mine/index.vue
  5. 2
      src/pages/votingElection/index.vue

4
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
})

2
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
})

16
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)
})
}
})

22
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())
<ex-empty v-show="list.length <= 0" />
<view class="flex-center-evenly">
<view class="bts plain" v-if="list.length > 0" @click.stop="updateUserInfo">确认信息</view>
<view class="bts" @click="navto('pages/mine/add')">新建信息</view>
<view class="bts" @click="navto('pages/mine/add', meetidparam">新建信息</view>
</view>
</block>

2
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(() => {

Loading…
Cancel
Save