| | |
| | | <script setup> |
| | | import { RouterView } from 'vue-router' |
| | | import { ElConfigProvider } from 'element-plus' |
| | | import zhCn from 'element-plus/es/locale/lang/zh-cn' |
| | | </script> |
| | | |
| | | <template> |
| | | <RouterView /> |
| | | <el-config-provider :locale="zhCn"> <RouterView /></el-config-provider> |
| | | </template> |
| | | |
| | | <style scoped> |
| | |
| | | </span> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item icon="el-icon-user" command="gotoPersonalCenter" |
| | | <el-dropdown-item :icon="Avatar" command="gotoPersonalCenter" |
| | | >个人中心</el-dropdown-item |
| | | > |
| | | <el-dropdown-item icon="el-icon-switch-button" command="logout" |
| | | <el-dropdown-item :icon="SwitchButton" command="logout" |
| | | >退出登录</el-dropdown-item |
| | | > |
| | | </el-dropdown-menu> |
| | |
| | | <script setup lang="ts"> |
| | | import login from './login.vue' |
| | | import { onMounted, provide, ref } from 'vue' |
| | | import { Search } from '@element-plus/icons-vue' |
| | | import { Search, Avatar, SwitchButton } from '@element-plus/icons-vue' |
| | | import { useUserStore } from '@/store' |
| | | import { useRouter } from 'vue-router' |
| | | const userStore = useUserStore() |
| | |
| | | import MG from '@/assets/js/middleGround/WebMiddleGroundApi.js' |
| | | import toolClass from '@/assets/js/toolClass.js' |
| | | import config from '@/assets/js/config.js' |
| | | // import zhCn from 'element-plus/dist/locale/zh-cn.mjs' |
| | | import locale from 'element-plus/es/locale/lang/zh-cn' |
| | | |
| | | const app = createApp(App) |
| | | |
| | |
| | | app.use(ElementPlus) |
| | | app.use(createPinia()) |
| | | app.use(router) |
| | | // app.use(ElementPlus, { |
| | | // locale: zhCn, |
| | | // }) |
| | | app.use(ElementPlus, { locale }) |
| | | app.mount('#app') |
| | |
| | | pages.loading = false |
| | | pages.count = res.totalSize |
| | | courseList.value = res.datas.map((item: any) => { |
| | | if (item.icon) { |
| | | item.icon = getPublicImage(item.icon, 80) |
| | | } else if (item.linkProduct?.icon) { |
| | | item.icon = getPublicImage(item.linkProduct.icon, 80) |
| | | } else { |
| | | item.icon = defaultImg |
| | | } |
| | | return { |
| | | ...item, |
| | | name: item.name, |
| | | id: item.id, |
| | | icon: item.icon != 'default' ? getPublicImage(item.icon, 80) : defaultImg, |
| | | icon: item.icon, |
| | | introduction: item.description, |
| | | reason: item.applyReturnMsg ? JSON.parse(item.applyReturnMsg).reason : '', |
| | | } |