af-mobile-client-vue3 1.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +38 -0
- package/.env +7 -0
- package/.env.development +4 -0
- package/.env.envoiceShow +7 -0
- package/.env.production +7 -0
- package/.husky/commit-msg +1 -0
- package/.husky/pre-commit +1 -0
- package/.vscode/extensions.json +7 -0
- package/.vscode/settings.json +61 -0
- package/LICENSE +21 -0
- package/README.md +181 -0
- package/af-example-mobile-vue-web.iml +9 -0
- package/build/vite/index.ts +91 -0
- package/build/vite/vconsole.ts +44 -0
- package/eslint.config.js +7 -0
- package/index.html +17 -0
- package/mock/data.ts +20 -0
- package/mock/index.ts +5 -0
- package/mock/modules/prose.mock.ts +16 -0
- package/mock/modules/user.mock.ts +152 -0
- package/netlify.toml +12 -0
- package/package.json +107 -0
- package/public/favicon-dark.svg +4 -0
- package/public/favicon.ico +0 -0
- package/public/favicon.svg +4 -0
- package/public/pwa-192x192.png +0 -0
- package/public/pwa-512x512.png +0 -0
- package/public/safari-pinned-tab.svg +32 -0
- package/scripts/verifyCommit.js +19 -0
- package/src/App.vue +43 -0
- package/src/api/mock/index.ts +30 -0
- package/src/api/user/index.ts +40 -0
- package/src/assets/common/default-user-profile.png +0 -0
- package/src/assets/img/apps/apply-web.png +0 -0
- package/src/assets/img/apps/example-web.png +0 -0
- package/src/assets/img/apps/iot-web.png +0 -0
- package/src/assets/img/apps/linepatrol-web.png +0 -0
- package/src/assets/img/apps/monitor-web.png +0 -0
- package/src/assets/img/apps/oa-web.png +0 -0
- package/src/assets/img/apps/revenue-web.png +0 -0
- package/src/assets/img/apps/safe-check-web.png +0 -0
- package/src/assets/img/component/logo.png +0 -0
- package/src/assets/img/home/banner1.png +0 -0
- package/src/assets/img/home/banner2.png +0 -0
- package/src/assets/img/home/banner3.png +0 -0
- package/src/assets/img/home/banner4.png +0 -0
- package/src/assets/img/home/notice/icon.png +0 -0
- package/src/assets/img/user/login/background-shadow-1.svg +20 -0
- package/src/assets/img/user/login/logo-background.svg +20 -0
- package/src/assets/img/user/login/logo.png +0 -0
- package/src/assets/img/user/my/exit-login.png +0 -0
- package/src/assets/img/user/my/setting-arrow.png +0 -0
- package/src/assets/img/user/my/setting.png +0 -0
- package/src/bootstrap.ts +32 -0
- package/src/components/core/App/MicroAppView.vue +59 -0
- package/src/components/core/BeautifulLoading/index.vue +47 -0
- package/src/components/core/NavBar/index.vue +12 -0
- package/src/components/core/SvgIcon/index.vue +61 -0
- package/src/components/core/Tabbar/index.vue +38 -0
- package/src/components/core/Uploader/index.vue +104 -0
- package/src/components/core/XMultiSelect/index.vue +196 -0
- package/src/components/core/XSelect/index.vue +130 -0
- package/src/components/data/XBadge/index.vue +85 -0
- package/src/components/data/XCellDetail/index.vue +106 -0
- package/src/components/data/XCellList/index.vue +358 -0
- package/src/components/data/XCellListFilter/index.vue +392 -0
- package/src/components/data/XForm/index.vue +127 -0
- package/src/components/data/XFormItem/index.vue +472 -0
- package/src/components/data/XReportForm/XReportFormJsonRender.vue +220 -0
- package/src/components/data/XReportForm/index.vue +1058 -0
- package/src/components/layout/NormalDataLayout/index.vue +70 -0
- package/src/components/layout/TabBarLayout/index.vue +40 -0
- package/src/components.d.ts +53 -0
- package/src/enums/requestEnum.ts +25 -0
- package/src/env.d.ts +16 -0
- package/src/font-style/PingFangSC-Regular.woff2 +0 -0
- package/src/font-style/font.css +4 -0
- package/src/hooks/useCommon.ts +9 -0
- package/src/hooks/useLogin.ts +97 -0
- package/src/icons/svg/bird.svg +1 -0
- package/src/icons/svg/check-in.svg +33 -0
- package/src/icons/svg/dark.svg +5 -0
- package/src/icons/svg/github.svg +5 -0
- package/src/icons/svg/light.svg +5 -0
- package/src/icons/svg/link.svg +5 -0
- package/src/icons/svg/loadError.svg +1 -0
- package/src/icons/svg/notFound.svg +1 -0
- package/src/icons/svgo.yml +22 -0
- package/src/layout/PageLayout.vue +51 -0
- package/src/layout/SingleLayout.vue +35 -0
- package/src/locales/en-US.json +25 -0
- package/src/locales/zh-CN.json +25 -0
- package/src/main.ts +48 -0
- package/src/plugins/AppData.ts +38 -0
- package/src/plugins/GetLoginInfoService.ts +10 -0
- package/src/plugins/index.ts +11 -0
- package/src/router/README.md +8 -0
- package/src/router/guards.ts +60 -0
- package/src/router/index.ts +60 -0
- package/src/router/invoiceRoutes.ts +33 -0
- package/src/router/routes.ts +84 -0
- package/src/services/api/Login.ts +6 -0
- package/src/services/api/common.ts +98 -0
- package/src/services/api/index.ts +7 -0
- package/src/services/api/manage.ts +8 -0
- package/src/services/restTools.ts +37 -0
- package/src/settings.ts +1 -0
- package/src/stores/index.ts +7 -0
- package/src/stores/modules/cachedView.ts +31 -0
- package/src/stores/modules/counter.ts +19 -0
- package/src/stores/modules/routeTransitionName.ts +26 -0
- package/src/stores/modules/setting.ts +28 -0
- package/src/stores/modules/user.ts +180 -0
- package/src/stores/mutation-type.ts +7 -0
- package/src/styles/app.less +67 -0
- package/src/styles/login.less +81 -0
- package/src/typing.ts +3 -0
- package/src/utils/Storage.ts +124 -0
- package/src/utils/authority-utils.ts +87 -0
- package/src/utils/common.ts +41 -0
- package/src/utils/crypto.ts +39 -0
- package/src/utils/dataUtil.ts +42 -0
- package/src/utils/dictUtil.ts +51 -0
- package/src/utils/http/index.ts +158 -0
- package/src/utils/i18n.ts +41 -0
- package/src/utils/indexedDB.ts +180 -0
- package/src/utils/local-storage.ts +9 -0
- package/src/utils/mobileUtil.ts +26 -0
- package/src/utils/progress.ts +19 -0
- package/src/utils/routerUtil.ts +271 -0
- package/src/utils/set-page-title.ts +7 -0
- package/src/utils/validate.ts +6 -0
- package/src/views/chat/index.vue +153 -0
- package/src/views/common/LoadError.vue +64 -0
- package/src/views/common/NotFound.vue +68 -0
- package/src/views/component/EvaluateRecordView/index.vue +40 -0
- package/src/views/component/XCellDetailView/index.vue +216 -0
- package/src/views/component/XCellListView/index.vue +36 -0
- package/src/views/component/XFormView/index.vue +478 -0
- package/src/views/component/XReportFormIframeView/index.vue +45 -0
- package/src/views/component/XReportFormView/index.vue +295 -0
- package/src/views/component/index.vue +111 -0
- package/src/views/component/menu.vue +117 -0
- package/src/views/component/notice.vue +46 -0
- package/src/views/component/topNav.vue +36 -0
- package/src/views/invoiceShow/index.vue +62 -0
- package/src/views/user/login/ForgetPasswordForm.vue +93 -0
- package/src/views/user/login/LoginForm.vue +145 -0
- package/src/views/user/login/LoginTitle.vue +68 -0
- package/src/views/user/login/LoginWave.vue +109 -0
- package/src/views/user/login/index.vue +22 -0
- package/src/views/user/my/index.vue +230 -0
- package/src/vue-router.d.ts +9 -0
- package/tsconfig.json +43 -0
- package/uno.config.ts +32 -0
- package/vite.config.ts +110 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, reactive, ref, unref } from 'vue'
|
|
3
|
+
import {
|
|
4
|
+
type FormInstance,
|
|
5
|
+
Button as VanButton,
|
|
6
|
+
Field as VanField,
|
|
7
|
+
Form as VanForm,
|
|
8
|
+
showFailToast,
|
|
9
|
+
} from 'vant'
|
|
10
|
+
import { LoginStateEnum, useFormRules, useLoginState } from '@af-mobile-client-vue3/hooks/useLogin'
|
|
11
|
+
|
|
12
|
+
const { handleBackLogin, getLoginState } = useLoginState()
|
|
13
|
+
const { getFormRules } = useFormRules()
|
|
14
|
+
const getShow = computed(() => unref(getLoginState) === LoginStateEnum.RESET_PASSWORD)
|
|
15
|
+
|
|
16
|
+
const loading = ref(false)
|
|
17
|
+
const formRef = ref<FormInstance>()
|
|
18
|
+
const formData = reactive({
|
|
19
|
+
username: '',
|
|
20
|
+
mobile: '',
|
|
21
|
+
sms: '',
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
function handleReset() {
|
|
25
|
+
formRef.value
|
|
26
|
+
?.validate()
|
|
27
|
+
.then(async () => {
|
|
28
|
+
try {
|
|
29
|
+
loading.value = true
|
|
30
|
+
// do something
|
|
31
|
+
}
|
|
32
|
+
finally {
|
|
33
|
+
loading.value = false
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
.catch((e) => {
|
|
37
|
+
showFailToast('验证失败')
|
|
38
|
+
console.error(e)
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<div v-if="getShow" class="form forget_password_form">
|
|
45
|
+
<VanForm ref="formRef" @submit="handleReset">
|
|
46
|
+
<VanField
|
|
47
|
+
v-model="formData.username"
|
|
48
|
+
class="form_field"
|
|
49
|
+
name="username"
|
|
50
|
+
label="账号"
|
|
51
|
+
placeholder="请输入账号"
|
|
52
|
+
label-align="top"
|
|
53
|
+
:rules="getFormRules.username"
|
|
54
|
+
/>
|
|
55
|
+
<VanField
|
|
56
|
+
v-model="formData.mobile"
|
|
57
|
+
class="form_field"
|
|
58
|
+
name="password"
|
|
59
|
+
label="手机号码"
|
|
60
|
+
placeholder="请输入手机号码"
|
|
61
|
+
label-align="top"
|
|
62
|
+
:rules="getFormRules.mobile"
|
|
63
|
+
/>
|
|
64
|
+
|
|
65
|
+
<VanField
|
|
66
|
+
v-model="formData.sms"
|
|
67
|
+
class="form_field"
|
|
68
|
+
center
|
|
69
|
+
clearable
|
|
70
|
+
label-align="top"
|
|
71
|
+
label="短信验证码"
|
|
72
|
+
placeholder="请输入短信验证码"
|
|
73
|
+
:rules="getFormRules.sms"
|
|
74
|
+
>
|
|
75
|
+
<template #button>
|
|
76
|
+
<VanButton size="small" type="primary">
|
|
77
|
+
发送验证码
|
|
78
|
+
</VanButton>
|
|
79
|
+
</template>
|
|
80
|
+
</VanField>
|
|
81
|
+
<VanButton class="reset_btn btn" type="primary" block native-type="submit" :loading="loading">
|
|
82
|
+
重 置
|
|
83
|
+
</VanButton>
|
|
84
|
+
<VanButton class="back_btn btn" plain type="primary" block @click="handleBackLogin">
|
|
85
|
+
返 回
|
|
86
|
+
</VanButton>
|
|
87
|
+
</VanForm>
|
|
88
|
+
</div>
|
|
89
|
+
</template>
|
|
90
|
+
|
|
91
|
+
<style scoped lang="less">
|
|
92
|
+
@import "@af-mobile-client-vue3/styles/login.less";
|
|
93
|
+
</style>
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, inject, onMounted, reactive, ref, unref } from 'vue'
|
|
3
|
+
import { Switch, Button as VanButton, Col as VanCol, Field as VanField, Form as VanForm, Icon as VanIcon, Row as VanRow, closeToast, showFailToast } from 'vant'
|
|
4
|
+
import type { FormInstance } from 'vant'
|
|
5
|
+
import 'vant/lib/switch/index.css'
|
|
6
|
+
import { useRoute, useRouter } from 'vue-router'
|
|
7
|
+
import { LoginStateEnum, useFormRules, useLoginState } from '@af-mobile-client-vue3/hooks/useLogin'
|
|
8
|
+
import { useSettingStore } from '@af-mobile-client-vue3/stores/modules/setting'
|
|
9
|
+
import { type UserInfo, useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
|
|
10
|
+
import GetAppDataService from '@af-mobile-client-vue3/plugins/AppData'
|
|
11
|
+
import { indexedDB } from '@af-mobile-client-vue3/utils/indexedDB'
|
|
12
|
+
import { funcToRouter, loadRoutes } from '@af-mobile-client-vue3/utils/routerUtil'
|
|
13
|
+
|
|
14
|
+
const { setLoginState, getLoginState } = useLoginState()
|
|
15
|
+
const { getFormRules } = useFormRules()
|
|
16
|
+
const userState = useUserStore()
|
|
17
|
+
const router = useRouter()
|
|
18
|
+
|
|
19
|
+
const formRef = ref<FormInstance>()
|
|
20
|
+
const loading = ref(false)
|
|
21
|
+
const rememberMe = ref(false)
|
|
22
|
+
const switchPassType = ref(true)
|
|
23
|
+
const formData = reactive({
|
|
24
|
+
username: '',
|
|
25
|
+
password: '',
|
|
26
|
+
})
|
|
27
|
+
const route = useRoute()
|
|
28
|
+
const setting = useSettingStore()
|
|
29
|
+
|
|
30
|
+
const getShow = computed(() => unref(getLoginState) === LoginStateEnum.LOGIN)
|
|
31
|
+
|
|
32
|
+
const login: any = inject('$login')
|
|
33
|
+
|
|
34
|
+
function handleSubmit() {
|
|
35
|
+
formRef.value
|
|
36
|
+
?.validate()
|
|
37
|
+
.then(async () => {
|
|
38
|
+
try {
|
|
39
|
+
loading.value = true
|
|
40
|
+
const data: any = await userState.Login({
|
|
41
|
+
username: formData.username,
|
|
42
|
+
password: formData.password,
|
|
43
|
+
resourceName: setting.getSetting()?.routerName || '智慧手机',
|
|
44
|
+
})
|
|
45
|
+
login.f = data
|
|
46
|
+
await Promise.all([GetAppDataService.load()])
|
|
47
|
+
const loginInfo = {
|
|
48
|
+
f: login.f,
|
|
49
|
+
jwt: login.f.id,
|
|
50
|
+
r: login.r,
|
|
51
|
+
}
|
|
52
|
+
userState.setLogin(loginInfo)
|
|
53
|
+
const compatible = import.meta.env.VITE_APP_COMPATIBLE
|
|
54
|
+
if (compatible === 'OA')
|
|
55
|
+
afterGeneral(data)
|
|
56
|
+
else
|
|
57
|
+
afterGeneral(data.resources.data)
|
|
58
|
+
|
|
59
|
+
const toPath = decodeURIComponent((route.query?.redirect || '/') as string)
|
|
60
|
+
closeToast()
|
|
61
|
+
if (route.name === '/login')
|
|
62
|
+
await router.replace('/')
|
|
63
|
+
else await router.replace(toPath)
|
|
64
|
+
}
|
|
65
|
+
finally {
|
|
66
|
+
loading.value = false
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
.catch((e) => {
|
|
70
|
+
console.error(e)
|
|
71
|
+
showFailToast('用户名或密码错误')
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function afterGeneral(result) {
|
|
76
|
+
const user: UserInfo = {
|
|
77
|
+
id: result.id,
|
|
78
|
+
username: result.ename,
|
|
79
|
+
password: formData.password,
|
|
80
|
+
name: result.name,
|
|
81
|
+
avatar: result.avatar ? result.avatar : setting.getSetting().defaultAvatarUrl,
|
|
82
|
+
functions: result.functions,
|
|
83
|
+
}
|
|
84
|
+
userState.setUserInfo(user)
|
|
85
|
+
userState.setPermissions([{ id: 'queryForm', operation: ['add', 'edit'] }])
|
|
86
|
+
userState.setRoles([{ id: 'admin', operation: ['add', 'edit', 'delete'] }])
|
|
87
|
+
// 加载路由
|
|
88
|
+
loadRoutes(funcToRouter(user.functions))
|
|
89
|
+
// 每次重新登录时,清除indexedDB缓存
|
|
90
|
+
indexedDB.clear()
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
onMounted(() => {})
|
|
94
|
+
</script>
|
|
95
|
+
|
|
96
|
+
<template>
|
|
97
|
+
<div v-if="getShow" class="form login_form">
|
|
98
|
+
<VanForm ref="formRef" @submit="handleSubmit">
|
|
99
|
+
<VanField
|
|
100
|
+
v-model="formData.username"
|
|
101
|
+
class="form_field"
|
|
102
|
+
name="username"
|
|
103
|
+
label="账号"
|
|
104
|
+
placeholder="请输入账号"
|
|
105
|
+
label-align="top"
|
|
106
|
+
:rules="getFormRules.username"
|
|
107
|
+
/>
|
|
108
|
+
<VanField
|
|
109
|
+
v-model="formData.password"
|
|
110
|
+
class="form_field"
|
|
111
|
+
:type="switchPassType ? 'password' : 'text'"
|
|
112
|
+
name="password"
|
|
113
|
+
label="密码"
|
|
114
|
+
placeholder="请输入密码"
|
|
115
|
+
label-align="top"
|
|
116
|
+
:rules="getFormRules.password"
|
|
117
|
+
@click-right-icon="switchPassType = !switchPassType"
|
|
118
|
+
>
|
|
119
|
+
<template #right-icon>
|
|
120
|
+
<VanIcon v-if="switchPassType" name="closed-eye" color="rgb(56, 149, 250)" />
|
|
121
|
+
<VanIcon v-else name="eye-o" color="rgb(56, 149, 250)" />
|
|
122
|
+
</template>
|
|
123
|
+
</VanField>
|
|
124
|
+
|
|
125
|
+
<VanRow justify="space-between" class="extra_setting">
|
|
126
|
+
<VanCol>
|
|
127
|
+
<div class="extra_setting_for_remember_password">
|
|
128
|
+
<Switch v-model="rememberMe" size="12px" />
|
|
129
|
+
<span>记住密码</span>
|
|
130
|
+
</div>
|
|
131
|
+
</VanCol>
|
|
132
|
+
<VanCol>
|
|
133
|
+
<a class="extra_setting_for_reset_password" @click="setLoginState(LoginStateEnum.RESET_PASSWORD)">忘记密码?</a>
|
|
134
|
+
</VanCol>
|
|
135
|
+
</VanRow>
|
|
136
|
+
<VanButton class="login_btn btn" type="primary" block native-type="submit" :loading="loading">
|
|
137
|
+
登 录
|
|
138
|
+
</VanButton>
|
|
139
|
+
</VanForm>
|
|
140
|
+
</div>
|
|
141
|
+
</template>
|
|
142
|
+
|
|
143
|
+
<style scoped lang="less">
|
|
144
|
+
@import "@af-mobile-client-vue3/styles/login.less";
|
|
145
|
+
</style>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { createStorage } from '@af-mobile-client-vue3/utils/Storage'
|
|
3
|
+
import { APP_WEB_CONFIG_KEY } from '@af-mobile-client-vue3/stores/mutation-type'
|
|
4
|
+
|
|
5
|
+
const Storage = createStorage({ storage: localStorage })
|
|
6
|
+
const webConfig = Storage.get(APP_WEB_CONFIG_KEY)
|
|
7
|
+
|
|
8
|
+
// 动态获取图片
|
|
9
|
+
function getAssetsImages(logo) {
|
|
10
|
+
return new URL(`/src/assets/img/user/login/${logo}`, import.meta.url).href
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="login_title">
|
|
16
|
+
<div class="login_logo">
|
|
17
|
+
<img :src="getAssetsImages(webConfig?.setting?.systemLogo ?? 'logo.png')" alt="logo">
|
|
18
|
+
</div>
|
|
19
|
+
<div class="title_content">
|
|
20
|
+
<div class="login_title_value">
|
|
21
|
+
{{ webConfig?.setting?.systemName ?? '智慧燃气' }}
|
|
22
|
+
</div>
|
|
23
|
+
<div class="login_description">
|
|
24
|
+
欢迎使用
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<style scoped lang="less">
|
|
31
|
+
.login_title {
|
|
32
|
+
width: 100%;
|
|
33
|
+
background-image: url('@af-mobile-client-vue3/assets/img/user/login/background-shadow-1.svg');
|
|
34
|
+
background-repeat: no-repeat;
|
|
35
|
+
background-size: cover;
|
|
36
|
+
background-position: center center;
|
|
37
|
+
text-align: center;
|
|
38
|
+
.login_logo {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
width: 100px;
|
|
43
|
+
height: 100px;
|
|
44
|
+
margin: 0 auto 62px auto;
|
|
45
|
+
border-radius: 23.04px;
|
|
46
|
+
box-shadow: 0 16px 32px 0 rgba(0, 0, 0, 0.09);
|
|
47
|
+
background: var(--van-background-2);
|
|
48
|
+
text-align: center;
|
|
49
|
+
img {
|
|
50
|
+
width: 82px;
|
|
51
|
+
height: 82px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
.title_content {
|
|
55
|
+
color: rgb(83, 88, 110);
|
|
56
|
+
font-size: 26px;
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
line-height: 26px;
|
|
59
|
+
.login_description {
|
|
60
|
+
margin-top: 13px;
|
|
61
|
+
color: var(--van-text-color-3);
|
|
62
|
+
font-size: 16px;
|
|
63
|
+
font-weight: 400;
|
|
64
|
+
line-height: 16px;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
</style>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { hexToRgba } from '@af-mobile-client-vue3/utils/common'
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div class="wave">
|
|
7
|
+
<div class="enter-y wave-wrapper fixed bottom-0 w-full !-z-5">
|
|
8
|
+
<svg
|
|
9
|
+
class="ignore-waves"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
12
|
+
viewBox="0 24 150 28"
|
|
13
|
+
preserveAspectRatio="none"
|
|
14
|
+
shape-rendering="auto"
|
|
15
|
+
>
|
|
16
|
+
<defs>
|
|
17
|
+
<path
|
|
18
|
+
id="gentle-wave"
|
|
19
|
+
d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"
|
|
20
|
+
/>
|
|
21
|
+
</defs>
|
|
22
|
+
<g class="parallax">
|
|
23
|
+
<use
|
|
24
|
+
xlink:href="#gentle-wave"
|
|
25
|
+
x="48"
|
|
26
|
+
y="0"
|
|
27
|
+
:fill="hexToRgba('#3895fa', 0.4)"
|
|
28
|
+
/>
|
|
29
|
+
<use
|
|
30
|
+
xlink:href="#gentle-wave"
|
|
31
|
+
x="48"
|
|
32
|
+
y="3"
|
|
33
|
+
:fill="hexToRgba('#3895fa', 0.5)"
|
|
34
|
+
/>
|
|
35
|
+
<use
|
|
36
|
+
xlink:href="#gentle-wave"
|
|
37
|
+
x="48"
|
|
38
|
+
y="5"
|
|
39
|
+
:fill="hexToRgba('#3895fa', 0.6)"
|
|
40
|
+
/>
|
|
41
|
+
<use
|
|
42
|
+
xlink:href="#gentle-wave"
|
|
43
|
+
x="48"
|
|
44
|
+
y="7"
|
|
45
|
+
:fill="hexToRgba('#3895fa', 0.7)"
|
|
46
|
+
/>
|
|
47
|
+
</g>
|
|
48
|
+
</svg>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<style scoped lang="less">
|
|
54
|
+
.wave {
|
|
55
|
+
position: relative;
|
|
56
|
+
height: 80px;
|
|
57
|
+
z-index: 9999;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.wave-wrapper {
|
|
61
|
+
position: fixed;
|
|
62
|
+
width: 100%;
|
|
63
|
+
left: 0;
|
|
64
|
+
bottom: 0;
|
|
65
|
+
}
|
|
66
|
+
.ignore-waves {
|
|
67
|
+
position: relative;
|
|
68
|
+
display: block;
|
|
69
|
+
width: 100%;
|
|
70
|
+
height: 50px;
|
|
71
|
+
min-height: 40px;
|
|
72
|
+
max-height: 80px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Animation */
|
|
76
|
+
.parallax > use {
|
|
77
|
+
animation: move-forever 12s linear infinite;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.parallax > use:nth-child(1) {
|
|
81
|
+
animation-delay: -2s;
|
|
82
|
+
animation-duration: 7s;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.parallax > use:nth-child(2) {
|
|
86
|
+
animation-delay: -3s;
|
|
87
|
+
animation-duration: 10s;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.parallax > use:nth-child(3) {
|
|
91
|
+
animation-delay: -4s;
|
|
92
|
+
animation-duration: 13s;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.parallax > use:nth-child(4) {
|
|
96
|
+
animation-delay: -5s;
|
|
97
|
+
animation-duration: 16s;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@keyframes move-forever {
|
|
101
|
+
0% {
|
|
102
|
+
transform: translate3d(-90px, 0, 0);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
100% {
|
|
106
|
+
transform: translate3d(85px, 0, 0);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import LoginTitle from './LoginTitle.vue'
|
|
3
|
+
import LoginForm from './LoginForm.vue'
|
|
4
|
+
import ForgetPasswordForm from './ForgetPasswordForm.vue'
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="login_container">
|
|
9
|
+
<LoginTitle />
|
|
10
|
+
<LoginForm />
|
|
11
|
+
<ForgetPasswordForm />
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<style scoped lang="less">
|
|
16
|
+
.login_container {
|
|
17
|
+
height: 100vh;
|
|
18
|
+
padding-top: 10px;
|
|
19
|
+
background: var(--van-background-2);
|
|
20
|
+
position: relative;
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
|
|
3
|
+
import {
|
|
4
|
+
Col as VanCol,
|
|
5
|
+
Row as VanRow,
|
|
6
|
+
} from 'vant/es'
|
|
7
|
+
|
|
8
|
+
const username = useUserStore().getUserInfo().name
|
|
9
|
+
const fullnames = useUserStore().getLogin().f.resources.data.fullnames
|
|
10
|
+
|
|
11
|
+
async function exit_login() {
|
|
12
|
+
await useUserStore().logout()
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<main class="my_main h-full w-full">
|
|
18
|
+
<div class="header">
|
|
19
|
+
<div class="style_back">
|
|
20
|
+
<div class="circle circle1" />
|
|
21
|
+
<div class="circle circle2" />
|
|
22
|
+
</div>
|
|
23
|
+
<div class="header_main">
|
|
24
|
+
<div class="user_nav">
|
|
25
|
+
<img alt="setting_icon" class="user_setting_icon" src="../../../assets/img/user/my/setting.png">
|
|
26
|
+
</div>
|
|
27
|
+
<div class="user_content">
|
|
28
|
+
<VanRow :gutter="18">
|
|
29
|
+
<VanCol>
|
|
30
|
+
<img alt="default-user-profile" class="default_user_profile" src="../../../assets/common/default-user-profile.png">
|
|
31
|
+
</VanCol>
|
|
32
|
+
<VanCol class="user_info_col">
|
|
33
|
+
<p class="user_nickname">
|
|
34
|
+
{{ username }}
|
|
35
|
+
</p>
|
|
36
|
+
<p class="user_remark">
|
|
37
|
+
{{ fullnames }}
|
|
38
|
+
</p>
|
|
39
|
+
</VanCol>
|
|
40
|
+
</VanRow>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="content">
|
|
45
|
+
<div class="core">
|
|
46
|
+
<VanRow class="core_row">
|
|
47
|
+
<VanCol>
|
|
48
|
+
<p class="core_value">
|
|
49
|
+
24
|
|
50
|
+
</p>
|
|
51
|
+
<p class="core_title">
|
|
52
|
+
待办任务
|
|
53
|
+
</p>
|
|
54
|
+
</VanCol>
|
|
55
|
+
<VanCol>
|
|
56
|
+
<p class="core_value">
|
|
57
|
+
2
|
|
58
|
+
</p>
|
|
59
|
+
<p class="core_title">
|
|
60
|
+
待办流程
|
|
61
|
+
</p>
|
|
62
|
+
</VanCol>
|
|
63
|
+
<VanCol>
|
|
64
|
+
<p class="core_value">
|
|
65
|
+
7
|
|
66
|
+
</p>
|
|
67
|
+
<p class="core_title">
|
|
68
|
+
新消息
|
|
69
|
+
</p>
|
|
70
|
+
</VanCol>
|
|
71
|
+
</VanRow>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="setting">
|
|
74
|
+
<van-list>
|
|
75
|
+
<van-cell is-link @click="exit_login">
|
|
76
|
+
<template #title>
|
|
77
|
+
<VanRow :gutter="12" class="setting_row">
|
|
78
|
+
<VanCol>
|
|
79
|
+
<img alt="exit_login_icon" class="setting_icon" src="../../../assets/img/user/my/exit-login.png">
|
|
80
|
+
</VanCol>
|
|
81
|
+
<VanCol class="setting_name_col">
|
|
82
|
+
<span class="setting_name_text">退出登录</span>
|
|
83
|
+
</VanCol>
|
|
84
|
+
</VanRow>
|
|
85
|
+
</template>
|
|
86
|
+
<template #right-icon>
|
|
87
|
+
<img alt="setting_arrow_icon" class="setting_arrow_icon" src="../../../assets/img/user/my/setting-arrow.png">
|
|
88
|
+
</template>
|
|
89
|
+
</van-cell>
|
|
90
|
+
</van-list>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</main>
|
|
94
|
+
</template>
|
|
95
|
+
|
|
96
|
+
<style scoped lang="less">
|
|
97
|
+
.my_main {
|
|
98
|
+
.header {
|
|
99
|
+
position: relative;
|
|
100
|
+
height: 200px;
|
|
101
|
+
background-color: #336BF1;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
.style_back {
|
|
104
|
+
.circle {
|
|
105
|
+
position: absolute;
|
|
106
|
+
border-radius: 50%;
|
|
107
|
+
}
|
|
108
|
+
.circle1 {
|
|
109
|
+
background-color: #3F7AFA;
|
|
110
|
+
width: 265px;
|
|
111
|
+
height: 265px;
|
|
112
|
+
top: -80px;
|
|
113
|
+
left: -50px;
|
|
114
|
+
z-index: 3;
|
|
115
|
+
}
|
|
116
|
+
.circle2 {
|
|
117
|
+
background-color: #3C75F9;
|
|
118
|
+
width: 300px;
|
|
119
|
+
height: 300px;
|
|
120
|
+
top: -80px;
|
|
121
|
+
left: 10px;
|
|
122
|
+
z-index: 2;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
.header_main {
|
|
126
|
+
padding: var(--base-interval-1);
|
|
127
|
+
.user_nav {
|
|
128
|
+
padding: 0 var(--base-interval-0);
|
|
129
|
+
color: #fff;
|
|
130
|
+
position: relative;
|
|
131
|
+
z-index: 4;
|
|
132
|
+
font-size: 26px;
|
|
133
|
+
text-align: right;
|
|
134
|
+
.user_setting_icon {
|
|
135
|
+
width: 26px;
|
|
136
|
+
height: 26px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
.user_content {
|
|
140
|
+
padding: 0 35px 0 35px;
|
|
141
|
+
color: #fff;
|
|
142
|
+
position: relative;
|
|
143
|
+
z-index: 4;
|
|
144
|
+
.default_user_profile {
|
|
145
|
+
border-radius: 50%;
|
|
146
|
+
width: 76px;
|
|
147
|
+
height: 76px;
|
|
148
|
+
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05),
|
|
149
|
+
0 6px 6px rgba(0, 0, 0, 0.05);
|
|
150
|
+
}
|
|
151
|
+
.van-row {
|
|
152
|
+
flex-wrap: nowrap;
|
|
153
|
+
align-items: center;
|
|
154
|
+
.user_info_col {
|
|
155
|
+
flex-grow: 1;
|
|
156
|
+
p {
|
|
157
|
+
margin: 0;
|
|
158
|
+
}
|
|
159
|
+
.user_nickname {
|
|
160
|
+
font-size: 24px;
|
|
161
|
+
font-weight: bold;
|
|
162
|
+
margin-bottom: 4px;
|
|
163
|
+
}
|
|
164
|
+
.user_remark {
|
|
165
|
+
font-size: 14px;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
}
|
|
173
|
+
.content {
|
|
174
|
+
padding: var(--base-interval-1);
|
|
175
|
+
.core {
|
|
176
|
+
position: relative;
|
|
177
|
+
bottom: 50px;
|
|
178
|
+
padding: 16px 0;
|
|
179
|
+
background-color: #fff;
|
|
180
|
+
z-index: 4;
|
|
181
|
+
margin: 0 16px;
|
|
182
|
+
border-radius: 4px;
|
|
183
|
+
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05),
|
|
184
|
+
0 6px 6px rgba(0, 0, 0, 0.05);
|
|
185
|
+
.core_row {
|
|
186
|
+
text-align: center;
|
|
187
|
+
.van-col {
|
|
188
|
+
flex-grow: 1;
|
|
189
|
+
p {
|
|
190
|
+
margin: 8px 0;
|
|
191
|
+
}
|
|
192
|
+
.core_value {
|
|
193
|
+
font-size: 20px;
|
|
194
|
+
font-weight: bold;
|
|
195
|
+
}
|
|
196
|
+
.core_title {
|
|
197
|
+
font-size: 14px;
|
|
198
|
+
color: #999;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
.setting {
|
|
204
|
+
.setting_row {
|
|
205
|
+
align-items: center;
|
|
206
|
+
.setting_icon {
|
|
207
|
+
width: 28px;
|
|
208
|
+
height: 28px;
|
|
209
|
+
vertical-align: middle;
|
|
210
|
+
}
|
|
211
|
+
.setting_name_col {
|
|
212
|
+
flex-grow: 1;
|
|
213
|
+
.setting_name_text {
|
|
214
|
+
font-size: 16px;
|
|
215
|
+
font-weight: bold;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
.van-cell {
|
|
220
|
+
align-items: center;
|
|
221
|
+
.setting_arrow_icon {
|
|
222
|
+
width: 12px;
|
|
223
|
+
height: 12px;
|
|
224
|
+
vertical-align: middle;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
</style>
|