<template>
  <view class="tishi">
    <img src="@/assets/tishi.png" alt="" class="w-120px h-120px mt-100px" />
    <!-- <view class="mt-20px">未配置</view> -->
    <view class="mt-10px c-666">{{ msg }}</view>
  </view>
</template>

<script setup>
import { computed, onMounted, ref } from "vue";

const msg = computed(() => {
  if (!sessionStorage.getItem("NEWCODE")) return "应用不支持在外部浏览器打开, 请在企业微信内部打开";
  const { roleIds, memberInfo, corpInfo } = memberStore();
  const { package: packAge } = corpInfo.value;
  if (roleIds.value.length === 0) return "应用管理员未给您配置角色,请联系应用管理员配置角色";
  if (!packAge || (packAge && (packAge.packageStatus === "expire" || packAge.packageStatus === "closed"))) return "账号已到期，请联系平台客服升级套餐";
  if (memberInfo.value.accountState === "disable") return "您已被禁用,如有疑问请联系机构管理员";
  if (!memberInfo.value.teamId || memberInfo.value.teamId.length === 0) return "应用管理员未给您配置团队,请联系应用管理员配置角色";
  return "";
});
</script>

<style scoped>
.tishi {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.c-666 {
  color: #666;
}
</style>
