<template>
  <a-config-provider :locale="locale">
    <a-spin :spinning="userStore.globalLoading" style="max-height: 100vh">
      <div id="app">
        <router-view />
      </div>
    </a-spin>
  </a-config-provider>
</template>

<script setup lang="ts">
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
import { useUserStore } from '@/store/modules/user'
import { useOem } from '@/store/modules/oem'
const userStore = useUserStore()
let locale = zhCN
dayjs.locale('zh-cn')
// 切换主题色
const colorList = [
  { color: '#1965FF', title: '默认', name: 'theme-default' },
  { color: '#409EFF', title: '蓝色', name: 'theme-blue' },
  { color: '#67C23A', title: '绿色', name: 'theme-green' },
  { color: '#FF9326', title: '橙色', name: 'theme-orange' },
  { color: '#F56C6C', title: '红色', name: 'theme-red' },
  { color: '#A126FF', title: '紫色', name: 'theme-purple' },
  { color: '#6C6F91', title: '深夜', name: 'theme-black' }
]
const calcColor = () => {
  let color = '#1965FF'
  colorList.forEach((v) => {
    if (v.name == useOem().getSiteInfo().mch.sysPrimaryColor) {
      color = v.color
    }
  })
  return color
}
// 切换主题色
import { ConfigProvider } from 'ant-design-vue'
ConfigProvider.config({
  theme: {
    primaryColor: calcColor()
  }
})

function fwsLogin(){

}
</script>
<style>
.tooltip-box-name {
  max-width: 900px !important;
}
.fws-login-box-p{
  color: #1a53FF;
  text-align: right;
  width: 100%;
  margin-top: 10px;
  font-size: 14px;
  position:relative;
  top: 12px;
}
</style>
