From a89fe32c353040bbb95d7519cf7bafc4b5934f10 Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期三, 06 九月 2023 09:54:14 +0800
Subject: [PATCH] 小程序
---
h5_standard/src/views/tabPage/my.vue | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/h5_standard/src/views/tabPage/my.vue b/h5_standard/src/views/tabPage/my.vue
index 1bd4eb8..5df450e 100644
--- a/h5_standard/src/views/tabPage/my.vue
+++ b/h5_standard/src/views/tabPage/my.vue
@@ -21,7 +21,7 @@
</div>
</div>
</div>
-<!-- <div class="box_out"><span>閫�鍑虹櫥褰�</span></div>-->
+ <div class="box_out" v-if="store.state.env && (store.state.env == 'WX' || store.state.env == 'XCX')" @click="loginOut"><span>閫�鍑虹櫥褰�</span></div>
</div>
<van-popup v-model:show="show" position="bottom" round :style="{ height: '50%' }">
<van-picker
@@ -40,6 +40,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 +70,19 @@
})
};
+ // 閫�鍑虹櫥褰�
+ 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_url=https://www.mes.red/h5/redirect.html&response_type=code&scope=snsapi_base&state=#wechat_redirect'
+ window.open(href)
+ }
+ })
+ }
+
// 鍏抽棴缁勭粐寮规
const onCancel = (): void => {
show.value = false
--
Gitblit v1.9.3