bug
jiangping
2023-12-06 1f4e7d0f73a73e7350cf5a1df279d5f30904c5d5
h5_standard/src/views/tabPage/my.vue
@@ -1,7 +1,8 @@
<template>
    <div class="box">
        <div class="box_info">
            <img :src="store.state.userInfo.avatar ? store.state.userInfo.avatar : avatar" alt="" />
            <!-- store.state.userInfo.avatar ? store.state.userInfo.avatar :  -->
            <img :src="avatar" alt="" />
            <div class="box_info_box">
                <span>{{store.state.userInfo.companyUser ? store.state.userInfo.companyUser.name : ''}}</span>
                <div class="box_info_box_x" @click="switchOrganization">
@@ -21,7 +22,7 @@
                </div>
            </div>
        </div>
<!--        <div class="box_out"><span>退出登录</span></div>-->
        <div class="box_out" @click="loginOut"><span>退出登录</span></div>
    </div>
    <van-popup v-model:show="show" position="bottom" round :style="{ height: '50%' }">
        <van-picker
@@ -40,6 +41,7 @@
    import { Dialog, Toast } from 'vant'
    const VanDialog = Dialog.Component;
    import { changeCom, getDepartmentListByConditon } from '@/apis/PersonalAPI'
    import { wxLoginOut } from '@/apis'
    const router = useRouter()
@@ -69,6 +71,23 @@
        })
    };
    // 退出登录
    const loginOut = () => {
        wxLoginOut({
            companyUserId: store.state.userInfo.companyUser.id
        }).then(res => {
            if (res.code === 200) {
                // window.parent.postMessage('阿康', '*')
                let href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx6ea339a336f26380&redirect_uri=https://www.mes.red/h5/redirect.html&response_type=code&scope=snsapi_base&state=#wechat_redirect'
                // let href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx6ea339a336f26380&redirect_uri=https://dmtest.ahapp.net/doumeeplant_h5/redirect.html&response_type=code&scope=snsapi_base&state=#wechat_redirect'
                // let href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx6ea339a336f26380&redirect_uri=https://lingyang.mes.show:1801/h5/redirect.html&response_type=code&scope=snsapi_base&state=#wechat_redirect'
                // let href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx6ea339a336f26380&redirect_uri=https://www.mes.red/lingyangh5/redirect.html&response_type=code&scope=snsapi_base&state=#wechat_redirect'
                window.open(href)
                // window.location.replace(href)
            }
        })
    }
    // 关闭组织弹框
    const onCancel = (): void => {
        show.value = false