From a6f9e7d4faf7c1c536111e0db7f3317cbda9ddb1 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 30 十二月 2024 18:24:05 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit

---
 h5/pages/staff/index.vue |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/h5/pages/staff/index.vue b/h5/pages/staff/index.vue
index 489dbec..399f671 100644
--- a/h5/pages/staff/index.vue
+++ b/h5/pages/staff/index.vue
@@ -53,7 +53,8 @@
 		stagingHead,
 		wxAuthorize,
 		refreshToken,
-		app_url
+		app_url,
+		delHkUserOpenid
 	} from '@/api'
 	export default {
 		data() {
@@ -166,17 +167,31 @@
 
 			},
 			checkAuth(str) {
-				const permissions = this.userInfo.permissions
+				const permissions = this.userInfo.permissions || []
 				return permissions.indexOf(str) > -1
 			},
 			loginOut() {
 				logoutPost({
 					isH5: 1
-				}).then(res => {
-					this.$store.commit('empty')
-					setTimeout(() => {
-						window.location.href = app_url
-					}, 300)
+				}).then(res => {
+					const userInfo = uni.getStorageSync('userInfo')
+					const openId = uni.getStorageSync('openId')
+					this.$store.commit('empty')
+					if(openId){
+						delHkUserOpenid({
+							userName: userInfo.username,
+							openId
+						}).then(ress => {
+							setTimeout(() => {
+								window.location.href = app_url
+							}, 300)
+						})
+					}else{
+						setTimeout(() => {
+							window.location.href = app_url
+						}, 300)
+					}
+					
 				})
 			},
 			getTaskInfo() {

--
Gitblit v1.9.3