|
|
@@ -140,7 +140,11 @@
|
|
|
<view class="common-grid-text">消息通知</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="common-grid-item common-grid-item-osais">
|
|
|
+ <view
|
|
|
+ class="common-grid-item common-grid-item-osais"
|
|
|
+ v-if="showOSAIS"
|
|
|
+ @click.stop="goOSAIS"
|
|
|
+ >
|
|
|
<image
|
|
|
class="common-grid-icon"
|
|
|
src="https://yy-cloud-oss-public.oss-cn-beijing.aliyuncs.com/image/osais-logo.png"
|
|
|
@@ -171,7 +175,10 @@ import { computed, ref } from 'vue'
|
|
|
|
|
|
import { onShow } from '@dcloudio/uni-app'
|
|
|
|
|
|
-import { getInternalMsgCountUnreadApi } from '@/services/modules/mine/common'
|
|
|
+import {
|
|
|
+ getInternalMsgCountUnreadApi,
|
|
|
+ taxLocationEntranceApi,
|
|
|
+} from '@/services/modules/mine/common'
|
|
|
|
|
|
import { useUserStore } from '@/stores/modules/user'
|
|
|
|
|
|
@@ -187,6 +194,11 @@ const isLoggedIn = computed(() => userStore.isLoggedIn)
|
|
|
const currentUserInfo = computed(() => userStore.currentUserInfo)
|
|
|
const isBlacklisted = computed(() => userStore.isBlacklisted)
|
|
|
|
|
|
+const showOSAIS = computed(() => {
|
|
|
+ const certList = currentUserInfo.value?.certList || []
|
|
|
+ return certList.some((item) => item.gigType === 'OSAIS' && item.commonCertStatus === 'CERT')
|
|
|
+})
|
|
|
+
|
|
|
const hasUnreadNotification = ref(false)
|
|
|
const companyList = ref<{ name: string; color: string }[]>([])
|
|
|
const handleCompanyShow = ref(false)
|
|
|
@@ -250,6 +262,25 @@ const navigateTo = (path?: string) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+const goOSAIS = async () => {
|
|
|
+ if (!checkBeforeNavigate()) return
|
|
|
+ const certList = currentUserInfo.value?.certList || []
|
|
|
+ const curr = certList.find((item) => item.gigType === 'OSAIS' && item.commonCertStatus === 'CERT')
|
|
|
+ if (!curr) return
|
|
|
+
|
|
|
+ const res = await taxLocationEntranceApi(curr.subjectLocation)
|
|
|
+ if (res.code === 0 && res.data) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages-common/web-view/index?url=${encodeURIComponent(res.data)}&title=奥塞斯`,
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '获取奥塞斯入口失败',
|
|
|
+ icon: 'none',
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
const getRolesName = (roles: number[]) => {
|
|
|
const role = roles?.[0] || 0
|
|
|
const roleItem = rolesList.find((item) => item.value === role)
|