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,6 +5,8 @@ | ||
5 | <meta charset="UTF-8" /> | 5 | <meta charset="UTF-8" /> |
6 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | 6 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
7 | <meta name="renderer" content="webkit" /> | 7 | <meta name="renderer" content="webkit" /> |
8 | + <meta name="keywords" content="Thingskit 物联网平台" /> | ||
9 | + <meta name="description" content="Thingskit 物联网平台" /> | ||
8 | <meta http-equiv="Expires" content="0" /> | 10 | <meta http-equiv="Expires" content="0" /> |
9 | <meta http-equiv="Cache-control" content="no-cache" /> | 11 | <meta http-equiv="Cache-control" content="no-cache" /> |
10 | <meta http-equiv="Cache" content="no-cache" /> | 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,6 +37,7 @@ | ||
37 | :text="t('layout.header.dropdownItemChangePassword')" | 37 | :text="t('layout.header.dropdownItemChangePassword')" |
38 | icon="ant-design:unlock-twotone" | 38 | icon="ant-design:unlock-twotone" |
39 | /> | 39 | /> |
40 | + <MenuItem key="aboutSoftware" text="关于软件" icon="ant-design:message-outline" /> | ||
40 | <MenuItem | 41 | <MenuItem |
41 | v-if="getUseLockPage" | 42 | v-if="getUseLockPage" |
42 | key="lock" | 43 | key="lock" |
@@ -57,6 +58,7 @@ | @@ -57,6 +58,7 @@ | ||
57 | ref="personalRef" | 58 | ref="personalRef" |
58 | @register="registerPersonal" | 59 | @register="registerPersonal" |
59 | /> | 60 | /> |
61 | + <AboutSoftwareModal @register="registerModal" /> | ||
60 | </template> | 62 | </template> |
61 | <script lang="ts"> | 63 | <script lang="ts"> |
62 | // components | 64 | // components |
@@ -74,8 +76,9 @@ | @@ -74,8 +76,9 @@ | ||
74 | import { getAuthCache } from '/@/utils/auth'; | 76 | import { getAuthCache } from '/@/utils/auth'; |
75 | import { useRouter } from 'vue-router'; | 77 | import { useRouter } from 'vue-router'; |
76 | import { usePermission } from '/@/hooks/web/usePermission'; | 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 | export default defineComponent({ | 83 | export default defineComponent({ |
81 | name: 'UserDropdown', | 84 | name: 'UserDropdown', |
@@ -85,6 +88,7 @@ | @@ -85,6 +88,7 @@ | ||
85 | MenuItem: createAsyncComponent(() => import('./DropMenuItem.vue')), | 88 | MenuItem: createAsyncComponent(() => import('./DropMenuItem.vue')), |
86 | LockAction: createAsyncComponent(() => import('../lock/LockModal.vue')), | 89 | LockAction: createAsyncComponent(() => import('../lock/LockModal.vue')), |
87 | PersonalChild: createAsyncComponent(() => import('../personal/index.vue')), | 90 | PersonalChild: createAsyncComponent(() => import('../personal/index.vue')), |
91 | + AboutSoftwareModal, | ||
88 | }, | 92 | }, |
89 | props: { | 93 | props: { |
90 | theme: propTypes.oneOf(['dark', 'light']), | 94 | theme: propTypes.oneOf(['dark', 'light']), |
@@ -120,6 +124,11 @@ | @@ -120,6 +124,11 @@ | ||
120 | openModal(true); | 124 | openModal(true); |
121 | } | 125 | } |
122 | 126 | ||
127 | + const [registerModal, { openModal: openAboutSoftwareModal }] = useModal(); | ||
128 | + function handleOpenAboutSoftwareModal() { | ||
129 | + openAboutSoftwareModal(); | ||
130 | + } | ||
131 | + | ||
123 | // login out | 132 | // login out |
124 | function handleLoginOut() { | 133 | function handleLoginOut() { |
125 | userStore.confirmLoginOut(); | 134 | userStore.confirmLoginOut(); |
@@ -138,6 +147,8 @@ | @@ -138,6 +147,8 @@ | ||
138 | case 'changePassword': | 147 | case 'changePassword': |
139 | changePassword(); | 148 | changePassword(); |
140 | break; | 149 | break; |
150 | + case 'aboutSoftware': | ||
151 | + handleOpenAboutSoftwareModal(); | ||
141 | } | 152 | } |
142 | } | 153 | } |
143 | 154 | ||
@@ -180,6 +191,7 @@ | @@ -180,6 +191,7 @@ | ||
180 | register, | 191 | register, |
181 | getUseLockPage, | 192 | getUseLockPage, |
182 | hasPermission, | 193 | hasPermission, |
194 | + registerModal, | ||
183 | }; | 195 | }; |
184 | }, | 196 | }, |
185 | }); | 197 | }); |
@@ -39,6 +39,8 @@ | @@ -39,6 +39,8 @@ | ||
39 | 39 | ||
40 | <Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`" /> | 40 | <Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`" /> |
41 | 41 | ||
42 | + <HelpDoc /> | ||
43 | + | ||
42 | <FullScreen v-if="getShowFullScreen" :class="`${prefixCls}-action__item fullscreen-item`" /> | 44 | <FullScreen v-if="getShowFullScreen" :class="`${prefixCls}-action__item fullscreen-item`" /> |
43 | 45 | ||
44 | <AppLocalePicker | 46 | <AppLocalePicker |
@@ -75,6 +77,7 @@ | @@ -75,6 +77,7 @@ | ||
75 | 77 | ||
76 | import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; | 78 | import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; |
77 | import { useLocale } from '/@/locales/useLocale'; | 79 | import { useLocale } from '/@/locales/useLocale'; |
80 | + import HelpDoc from './components/HelpDoc.vue'; | ||
78 | 81 | ||
79 | export default defineComponent({ | 82 | export default defineComponent({ |
80 | name: 'LayoutHeader', | 83 | name: 'LayoutHeader', |
@@ -92,6 +95,7 @@ | @@ -92,6 +95,7 @@ | ||
92 | SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue'), { | 95 | SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue'), { |
93 | loading: true, | 96 | loading: true, |
94 | }), | 97 | }), |
98 | + HelpDoc, | ||
95 | }, | 99 | }, |
96 | props: { | 100 | props: { |
97 | fixed: propTypes.bool, | 101 | fixed: propTypes.bool, |
@@ -80,6 +80,7 @@ | @@ -80,6 +80,7 @@ | ||
80 | // import { useUserStore } from '/@/store/modules/user'; | 80 | // import { useUserStore } from '/@/store/modules/user'; |
81 | import { getPlatForm } from '/@/api/oem/index'; | 81 | import { getPlatForm } from '/@/api/oem/index'; |
82 | import defaultShowLogoImg from '/@/assets/svg/login-bg.svg'; | 82 | import defaultShowLogoImg from '/@/assets/svg/login-bg.svg'; |
83 | + import { useTitle } from '@vueuse/core'; | ||
83 | 84 | ||
84 | defineProps({ | 85 | defineProps({ |
85 | sessionTimeout: { | 86 | sessionTimeout: { |
@@ -136,6 +137,10 @@ | @@ -136,6 +137,10 @@ | ||
136 | const localeStore = useLocaleStore(); | 137 | const localeStore = useLocaleStore(); |
137 | const showLocale = localeStore.getShowPicker; | 138 | const showLocale = localeStore.getShowPicker; |
138 | // const title = computed(() => globSetting?.title ?? ''); | 139 | // const title = computed(() => globSetting?.title ?? ''); |
140 | + | ||
141 | + onMounted(() => { | ||
142 | + useTitle('ThingsKit 物联网平台'); | ||
143 | + }); | ||
139 | </script> | 144 | </script> |
140 | <style lang="less"> | 145 | <style lang="less"> |
141 | @prefix-cls: ~'@{namespace}-login'; | 146 | @prefix-cls: ~'@{namespace}-login'; |
@@ -195,7 +200,7 @@ | @@ -195,7 +200,7 @@ | ||
195 | width: 100%; | 200 | width: 100%; |
196 | height: 100%; | 201 | height: 100%; |
197 | margin-left: -48%; | 202 | margin-left: -48%; |
198 | - background-image: v-bind(logoUrl); | 203 | + background-image: v-bind(logourl); |
199 | // background-image: url(/@/assets/svg/login-bg.svg); | 204 | // background-image: url(/@/assets/svg/login-bg.svg); |
200 | background-position: 100%; | 205 | background-position: 100%; |
201 | background-repeat: no-repeat; | 206 | background-repeat: no-repeat; |