Commit 85de98e7cadcb14cf86f5168bedc775fc431084b
1 parent
4402e90f
feat: add help doc && copyright info
Showing
6 changed files
with
105 additions
and
2 deletions
| ... | ... | @@ -5,6 +5,8 @@ | 
| 5 | 5 | <meta charset="UTF-8" /> | 
| 6 | 6 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | 
| 7 | 7 | <meta name="renderer" content="webkit" /> | 
| 8 | + <meta name="keywords" content="Thingskit 物联网平台" /> | |
| 9 | + <meta name="description" content="Thingskit 物联网平台" /> | |
| 8 | 10 | <meta http-equiv="Expires" content="0" /> | 
| 9 | 11 | <meta http-equiv="Cache-control" content="no-cache" /> | 
| 10 | 12 | <meta http-equiv="Cache" content="no-cache" /> | ... | ... | 
| 1 | +<script lang="ts" setup> | |
| 2 | + import { h } from 'vue'; | |
| 3 | + import { Description, useDescription } from '/@/components/Description'; | |
| 4 | + import { BasicModal, useModal } from '/@/components/Modal'; | |
| 5 | + | |
| 6 | + const [register] = useModal(); | |
| 7 | + | |
| 8 | + const [registerDes] = useDescription({ | |
| 9 | + bordered: false, | |
| 10 | + column: 1, | |
| 11 | + labelStyle: { | |
| 12 | + width: '100px', | |
| 13 | + textAlign: 'right', | |
| 14 | + justifyContent: 'right', | |
| 15 | + paddingRight: '20px', | |
| 16 | + }, | |
| 17 | + data: { | |
| 18 | + copyright: | |
| 19 | + 'ThingsKit物联网平台版权归成都云腾五洲科技有限公司所有,您可以任意商用,但请注意保留本版权声明', | |
| 20 | + website: 'www.thingskit.com', | |
| 21 | + authorization: '若不想保留本版权声明,请前往以下链接查看移出方法,', | |
| 22 | + }, | |
| 23 | + schema: [ | |
| 24 | + { | |
| 25 | + field: 'copyright', | |
| 26 | + label: '版权声明', | |
| 27 | + }, | |
| 28 | + { | |
| 29 | + field: 'website', | |
| 30 | + label: '官网', | |
| 31 | + render: (val: string) => { | |
| 32 | + return h( | |
| 33 | + 'span', | |
| 34 | + { class: 'text-blue-500 cursor-pointer', onClick: () => open(val) }, | |
| 35 | + val | |
| 36 | + ); | |
| 37 | + }, | |
| 38 | + }, | |
| 39 | + { | |
| 40 | + field: 'authorization', | |
| 41 | + label: '商业授权', | |
| 42 | + render: (val: string) => { | |
| 43 | + console.log(val); | |
| 44 | + // https://community.thingskit.com/question/20.html | |
| 45 | + return h('div', {}, [ | |
| 46 | + h('span', val), | |
| 47 | + h( | |
| 48 | + 'span', | |
| 49 | + { | |
| 50 | + class: 'text-blue-500 cursor-pointer', | |
| 51 | + onClick: () => open('https://community.thingskit.com/question/20.html'), | |
| 52 | + }, | |
| 53 | + '点击前往' | |
| 54 | + ), | |
| 55 | + ]); | |
| 56 | + }, | |
| 57 | + }, | |
| 58 | + ], | |
| 59 | + }); | |
| 60 | +</script> | |
| 61 | + | |
| 62 | +<template> | |
| 63 | + <BasicModal @register="register" title="关于我们" width="50%"> | |
| 64 | + <Description @register="registerDes" /> | |
| 65 | + </BasicModal> | |
| 66 | +</template> | ... | ... | 
| 1 | +<script lang="ts" setup> | |
| 2 | + import { FileWordOutlined } from '@ant-design/icons-vue'; | |
| 3 | + import { Tooltip } from 'ant-design-vue'; | |
| 4 | + | |
| 5 | + const handleJump = () => { | |
| 6 | + open('https://docs.thingskit.com'); | |
| 7 | + }; | |
| 8 | +</script> | |
| 9 | + | |
| 10 | +<template> | |
| 11 | + <Tooltip title="帮助文档"> | |
| 12 | + <FileWordOutlined class="text-base cursor-pointer" @click="handleJump" /> | |
| 13 | + </Tooltip> | |
| 14 | +</template> | ... | ... | 
| ... | ... | @@ -37,6 +37,7 @@ | 
| 37 | 37 | :text="t('layout.header.dropdownItemChangePassword')" | 
| 38 | 38 | icon="ant-design:unlock-twotone" | 
| 39 | 39 | /> | 
| 40 | + <MenuItem key="aboutSoftware" text="关于软件" icon="ant-design:message-outline" /> | |
| 40 | 41 | <MenuItem | 
| 41 | 42 | v-if="getUseLockPage" | 
| 42 | 43 | key="lock" | 
| ... | ... | @@ -57,6 +58,7 @@ | 
| 57 | 58 | ref="personalRef" | 
| 58 | 59 | @register="registerPersonal" | 
| 59 | 60 | /> | 
| 61 | + <AboutSoftwareModal @register="registerModal" /> | |
| 60 | 62 | </template> | 
| 61 | 63 | <script lang="ts"> | 
| 62 | 64 | // components | 
| ... | ... | @@ -74,8 +76,9 @@ | 
| 74 | 76 | import { getAuthCache } from '/@/utils/auth'; | 
| 75 | 77 | import { useRouter } from 'vue-router'; | 
| 76 | 78 | import { usePermission } from '/@/hooks/web/usePermission'; | 
| 79 | + import AboutSoftwareModal from '../AboutSoftwareModal.vue'; | |
| 77 | 80 | |
| 78 | - type MenuEvent = 'logout' | 'doc' | 'lock' | 'personal' | 'changePassword'; | |
| 81 | + type MenuEvent = 'logout' | 'doc' | 'lock' | 'personal' | 'changePassword' | 'aboutSoftware'; | |
| 79 | 82 | |
| 80 | 83 | export default defineComponent({ | 
| 81 | 84 | name: 'UserDropdown', | 
| ... | ... | @@ -85,6 +88,7 @@ | 
| 85 | 88 | MenuItem: createAsyncComponent(() => import('./DropMenuItem.vue')), | 
| 86 | 89 | LockAction: createAsyncComponent(() => import('../lock/LockModal.vue')), | 
| 87 | 90 | PersonalChild: createAsyncComponent(() => import('../personal/index.vue')), | 
| 91 | + AboutSoftwareModal, | |
| 88 | 92 | }, | 
| 89 | 93 | props: { | 
| 90 | 94 | theme: propTypes.oneOf(['dark', 'light']), | 
| ... | ... | @@ -120,6 +124,11 @@ | 
| 120 | 124 | openModal(true); | 
| 121 | 125 | } | 
| 122 | 126 | |
| 127 | + const [registerModal, { openModal: openAboutSoftwareModal }] = useModal(); | |
| 128 | + function handleOpenAboutSoftwareModal() { | |
| 129 | + openAboutSoftwareModal(); | |
| 130 | + } | |
| 131 | + | |
| 123 | 132 | // login out | 
| 124 | 133 | function handleLoginOut() { | 
| 125 | 134 | userStore.confirmLoginOut(); | 
| ... | ... | @@ -138,6 +147,8 @@ | 
| 138 | 147 | case 'changePassword': | 
| 139 | 148 | changePassword(); | 
| 140 | 149 | break; | 
| 150 | + case 'aboutSoftware': | |
| 151 | + handleOpenAboutSoftwareModal(); | |
| 141 | 152 | } | 
| 142 | 153 | } | 
| 143 | 154 | |
| ... | ... | @@ -180,6 +191,7 @@ | 
| 180 | 191 | register, | 
| 181 | 192 | getUseLockPage, | 
| 182 | 193 | hasPermission, | 
| 194 | + registerModal, | |
| 183 | 195 | }; | 
| 184 | 196 | }, | 
| 185 | 197 | }); | ... | ... | 
| ... | ... | @@ -39,6 +39,8 @@ | 
| 39 | 39 | |
| 40 | 40 | <Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`" /> | 
| 41 | 41 | |
| 42 | + <HelpDoc /> | |
| 43 | + | |
| 42 | 44 | <FullScreen v-if="getShowFullScreen" :class="`${prefixCls}-action__item fullscreen-item`" /> | 
| 43 | 45 | |
| 44 | 46 | <AppLocalePicker | 
| ... | ... | @@ -75,6 +77,7 @@ | 
| 75 | 77 | |
| 76 | 78 | import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; | 
| 77 | 79 | import { useLocale } from '/@/locales/useLocale'; | 
| 80 | + import HelpDoc from './components/HelpDoc.vue'; | |
| 78 | 81 | |
| 79 | 82 | export default defineComponent({ | 
| 80 | 83 | name: 'LayoutHeader', | 
| ... | ... | @@ -92,6 +95,7 @@ | 
| 92 | 95 | SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue'), { | 
| 93 | 96 | loading: true, | 
| 94 | 97 | }), | 
| 98 | + HelpDoc, | |
| 95 | 99 | }, | 
| 96 | 100 | props: { | 
| 97 | 101 | fixed: propTypes.bool, | ... | ... | 
| ... | ... | @@ -80,6 +80,7 @@ | 
| 80 | 80 | // import { useUserStore } from '/@/store/modules/user'; | 
| 81 | 81 | import { getPlatForm } from '/@/api/oem/index'; | 
| 82 | 82 | import defaultShowLogoImg from '/@/assets/svg/login-bg.svg'; | 
| 83 | + import { useTitle } from '@vueuse/core'; | |
| 83 | 84 | |
| 84 | 85 | defineProps({ | 
| 85 | 86 | sessionTimeout: { | 
| ... | ... | @@ -136,6 +137,10 @@ | 
| 136 | 137 | const localeStore = useLocaleStore(); | 
| 137 | 138 | const showLocale = localeStore.getShowPicker; | 
| 138 | 139 | // const title = computed(() => globSetting?.title ?? ''); | 
| 140 | + | |
| 141 | + onMounted(() => { | |
| 142 | + useTitle('ThingsKit 物联网平台'); | |
| 143 | + }); | |
| 139 | 144 | </script> | 
| 140 | 145 | <style lang="less"> | 
| 141 | 146 | @prefix-cls: ~'@{namespace}-login'; | 
| ... | ... | @@ -195,7 +200,7 @@ | 
| 195 | 200 | width: 100%; | 
| 196 | 201 | height: 100%; | 
| 197 | 202 | margin-left: -48%; | 
| 198 | - background-image: v-bind(logoUrl); | |
| 203 | + background-image: v-bind(logourl); | |
| 199 | 204 | // background-image: url(/@/assets/svg/login-bg.svg); | 
| 200 | 205 | background-position: 100%; | 
| 201 | 206 | background-repeat: no-repeat; | ... | ... |