From d38f3d8c0642d5d58a3baeff5d80abafaa702f9f Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 13 一月 2025 13:43:11 +0800
Subject: [PATCH] ll
---
h5/pages/staff/index.vue | 61 +++++++++++++++++++-----------
1 files changed, 38 insertions(+), 23 deletions(-)
diff --git a/h5/pages/staff/index.vue b/h5/pages/staff/index.vue
index aa7dd2b..1be8797 100644
--- a/h5/pages/staff/index.vue
+++ b/h5/pages/staff/index.vue
@@ -1,10 +1,10 @@
<template>
<view class="main_app">
<view class="title_wrap">
- <view class="name" v-if="userInfo.realname">{{ userInfo.realname || "" }}锛屾杩庣櫥褰曪綖</view>
+ <view class="name" v-if="userInfo.realname">{{ userInfo.realname || userInfo.username || "" }}锛屾杩庣櫥褰曪綖</view>
<view class="name" v-else>璇峰厛鐧诲綍</view>
<view class="btn" @click="loginOut">{{
- userInfo.realname ? "閫�鍑虹櫥褰�" : "鍘荤櫥褰�"
+ userInfo.username ? "閫�鍑虹櫥褰�" : "鍘荤櫥褰�"
}}</view>
</view>
<view class="banner_wrap">
@@ -53,7 +53,8 @@
stagingHead,
wxAuthorize,
refreshToken,
- app_url
+ app_url,
+ delHkUserOpenid
} from '@/api'
export default {
data() {
@@ -130,23 +131,23 @@
onLoad() {
const ywinfo = uni.getStorageSync('ywinfo') || {}
if (ywinfo.ywid && ywinfo.type == 2) {
- setTimeout(() => {
- uni.removeStorageSync('ywinfo')
- }, 500)
+ uni.setStorageSync('ywinfo',{})
const yw = ywinfo.yw
- if (yw == 1 || yw == 6) {
- this.jump('/pages/staff/meetingDetail?id=' + ywinfo.ywid)
- } else if (yw == 2) {
- this.jump('/pages/staff/task/visitorApprove?id=' + ywinfo.ywid)
- } else if (yw == 3) {
- this.jump('/pages/staff/task/visitorReport?id=' + ywinfo.ywid)
- } else if (yw == 4) {
- this.jump('/pages/staff/task/vDangetAppr?id=' + ywinfo.ywid)
- } else if (yw == 7) {
- this.jump('/pages/staff/task/driver?id=' + ywinfo.ywid)
- } else if (yw == 5) {
- this.jump('/pages/staff/vehicle/index')
- }
+ setTimeout(() => {
+ if (yw == 1 || yw == 6) {
+ this.jump('/pages/staff/meetingDetail?id=' + ywinfo.ywid)
+ } else if (yw == 2) {
+ this.jump('/pages/staff/task/visitorApprove?id=' + ywinfo.ywid)
+ } else if (yw == 3) {
+ this.jump('/pages/staff/task/visitorReport?id=' + ywinfo.ywid)
+ } else if (yw == 4) {
+ this.jump('/pages/staff/task/vDangetAppr?id=' + ywinfo.ywid)
+ } else if (yw == 7) {
+ this.jump('/pages/staff/task/driver?id=' + ywinfo.ywid)
+ } else if (yw == 5) {
+ this.jump('/pages/staff/vehicle/sendACarDetail')
+ }
+ }, 100)
}
},
onShow() {
@@ -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 => {
+ const userInfo = uni.getStorageSync('userInfo')
+ const openId = uni.getStorageSync('openId')
this.$store.commit('empty')
- setTimeout(() => {
- window.location.href = app_url
- }, 300)
+ 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