|
|
|
@ -1,6 +1,6 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import useUserStore from '@/store/user' |
|
|
|
import { list as listApi, type dateListtype, update as updateApi } from '@/api/user' |
|
|
|
import { list as listApi, type dateListtype, update as updateApi, getMember_mobile} from '@/api/user' |
|
|
|
import { getAdminPhone } from '@/api/login' |
|
|
|
|
|
|
|
const userStore = useUserStore() |
|
|
|
@ -17,23 +17,6 @@ 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(() => { |
|
|
|
@ -42,13 +25,13 @@ const getList = uni.$util.throttle(() => { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
uni.showLoading({ mask: true, title: '加载中...' }) |
|
|
|
// uni.showLoading({ mask: true, title: '加载中...' }) |
|
|
|
|
|
|
|
listApi({ name: keyword.value }) |
|
|
|
listApi({ name: keyword.value, meetId: userStore.meetId }) |
|
|
|
.then((res) => { |
|
|
|
const { data } = res as { data: dateListtype[] } |
|
|
|
list.value = data || [] |
|
|
|
uni.hideLoading() |
|
|
|
// uni.hideLoading() |
|
|
|
}) |
|
|
|
.catch(() => uni.hideLoading()) |
|
|
|
}) |
|
|
|
@ -56,8 +39,9 @@ const getList = uni.$util.throttle(() => { |
|
|
|
const updateUserInfo = () => { |
|
|
|
userStore.bindUser(list.value[activeKey.value].id as number).then(() => { |
|
|
|
reset() |
|
|
|
uni.showToast({ title: '提交成功,等待投票!', icon: 'none' }) |
|
|
|
userStore.getUserInfo() |
|
|
|
uni.showToast({ title: '签到成功,等待投票!', icon: 'none' }) |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
@ -102,6 +86,7 @@ onShow(() => { |
|
|
|
getAdminPhone().then((res) => { |
|
|
|
const { data } = res as { data: string } |
|
|
|
amdinPhone.value = data || '' |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
@ -142,7 +127,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', meetidparam">新建信息</view> |
|
|
|
<view class="bts" @click="navto('pages/mine/add')">新建信息</view> |
|
|
|
</view> |
|
|
|
</block> |
|
|
|
|
|
|
|
|