| | |
| | | </ListItem> --> |
| | | <ListItem title="用户协议" @click="goMineUserPolicy"></ListItem> |
| | | <ListItem title="隐私政策" @click="goPrivacyPolicy"></ListItem> |
| | | <ListItem title="微信解绑" @click="handleUnbindWechat"></ListItem> |
| | | <ListItem title="退出登录" @click="handleLoginout"></ListItem> |
| | | </List> |
| | | </PageLayout> |
| | |
| | | import { useUserStore } from '@/stores/modules/user'; |
| | | import { useQueryClient } from '@tanstack/vue-query'; |
| | | import Taro from '@tarojs/taro'; |
| | | import * as authServices from '@12333/services/apiV2/auth'; |
| | | |
| | | defineOptions({ |
| | | name: 'setting', |
| | | }); |
| | | |
| | | const userStore = useUserStore(); |
| | | const { isBindWechat } = useUser(); |
| | | const queryClient = useQueryClient(); |
| | | |
| | | const userAccount = computed(() => { |
| | | return addStarForString(userStore?.userDetail?.userName, 4, 8); |
| | | return addStarForString(userStore?.userDetail?.name, 4, 8); |
| | | }); |
| | | |
| | | function goMineUserPolicy() { |
| | |
| | | queryClient.removeQueries(); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleUnbindWechat() { |
| | | try { |
| | | if (!isBindWechat) { |
| | | Message.error('您还没有绑定微信'); |
| | | return; |
| | | } |
| | | await Message.confirm({ message: '确定要解绑微信吗?' }); |
| | | let params: API.UnBindUserWxmpIdCommand = {}; |
| | | let res = await authServices.unBindUserWxmpId(params); |
| | | if (res) { |
| | | Message.success('解绑成功'); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |