@sugarat/easypicker2-client 2.4.1
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/.env +6 -0
- package/.env.production +3 -0
- package/.env.test +4 -0
- package/.eslintignore +0 -0
- package/.eslintrc.json +57 -0
- package/.github/workflows/main.yml +61 -0
- package/.prettierrc.js +9 -0
- package/LICENSE +21 -0
- package/README.md +86 -0
- package/auto-imports.d.ts +6 -0
- package/components.d.ts +56 -0
- package/docker/ep_backup/easypicker2.sql +214 -0
- package/docker/ep_backup/mongodb/easypicker2/action.bson +0 -0
- package/docker/ep_backup/mongodb/easypicker2/action.metadata.json +1 -0
- package/docker/ep_backup/mongodb/easypicker2/log.bson +0 -0
- package/docker/ep_backup/mongodb/easypicker2/log.metadata.json +1 -0
- package/docker/ep_backup/user-config.json +176 -0
- package/docs/.env +1 -0
- package/docs/.env.production +2 -0
- package/docs/.vitepress/config.ts +204 -0
- package/docs/.vitepress/theme/bg.png +0 -0
- package/docs/.vitepress/theme/index.scss +41 -0
- package/docs/.vitepress/theme/index.ts +5 -0
- package/docs/author.md +24 -0
- package/docs/auto-imports.d.ts +6 -0
- package/docs/components.d.ts +17 -0
- package/docs/deploy/design/api.md +3 -0
- package/docs/deploy/design/db.md +3 -0
- package/docs/deploy/design/index.md +3 -0
- package/docs/deploy/design/shell.md +9 -0
- package/docs/deploy/faq.md +86 -0
- package/docs/deploy/index.md +9 -0
- package/docs/deploy/local.md +275 -0
- package/docs/deploy/online-new.md +610 -0
- package/docs/deploy/online.md +683 -0
- package/docs/deploy/qiniu.md +183 -0
- package/docs/index.md +40 -0
- package/docs/introduction/about/code.md +26 -0
- package/docs/introduction/about/index.md +33 -0
- package/docs/introduction/feature/index.md +3 -0
- package/docs/plan/log.md +333 -0
- package/docs/plan/todo.md +127 -0
- package/docs/plan/wish.md +29 -0
- package/docs/praise/index.md +45 -0
- package/docs/public/favicon.ico +0 -0
- package/docs/public/logo.png +0 -0
- package/docs/public/robots.txt +2 -0
- package/docs/src/apis/ajax.ts +66 -0
- package/docs/src/apis/index.ts +1 -0
- package/docs/src/apis/modules/wish.ts +20 -0
- package/docs/src/components/Avatar.vue +60 -0
- package/docs/src/components/Home.vue +85 -0
- package/docs/src/components/Picture.vue +13 -0
- package/docs/src/components/Praise.vue +52 -0
- package/docs/src/components/WishBtn.vue +98 -0
- package/docs/src/components/WishPanel.vue +170 -0
- package/docs/src/components/callme/index.vue +72 -0
- package/docs/vite.config.ts +42 -0
- package/index.html +127 -0
- package/package.json +52 -0
- package/public/favicon.ico +0 -0
- package/public/logo.png +0 -0
- package/scripts/deploy/docs.mjs +24 -0
- package/scripts/deploy/prod.mjs +24 -0
- package/scripts/deploy/test.mjs +26 -0
- package/src/@types/ajax.d.ts +5 -0
- package/src/@types/api.d.ts +305 -0
- package/src/@types/lib.d.ts +26 -0
- package/src/@types/page.d.ts +18 -0
- package/src/App.vue +36 -0
- package/src/apis/ajax.ts +70 -0
- package/src/apis/index.ts +20 -0
- package/src/apis/modules/action.ts +17 -0
- package/src/apis/modules/category.ts +20 -0
- package/src/apis/modules/config.ts +19 -0
- package/src/apis/modules/file.ts +150 -0
- package/src/apis/modules/people.ts +81 -0
- package/src/apis/modules/public.ts +49 -0
- package/src/apis/modules/super/overview.ts +56 -0
- package/src/apis/modules/super/user.ts +62 -0
- package/src/apis/modules/task.ts +67 -0
- package/src/apis/modules/user.ts +56 -0
- package/src/apis/modules/wish.ts +31 -0
- package/src/assets/i/EasyPicker.png +0 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/styles/app.css +69 -0
- package/src/components/HomeFooter/index.vue +134 -0
- package/src/components/HomeHeader/index.vue +156 -0
- package/src/components/InfosForm/index.vue +73 -0
- package/src/components/MessageList/index.vue +155 -0
- package/src/components/MessagePanel/index.vue +42 -0
- package/src/components/Praise/index.vue +102 -0
- package/src/components/QrCode.vue +44 -0
- package/src/components/linkDialog.vue +104 -0
- package/src/components/loginPanel.vue +92 -0
- package/src/constants/index.ts +83 -0
- package/src/env.d.ts +8 -0
- package/src/main.ts +19 -0
- package/src/pages/404/index.vue +59 -0
- package/src/pages/about/index.vue +152 -0
- package/src/pages/callme/index.vue +155 -0
- package/src/pages/dashboard/config/index.vue +264 -0
- package/src/pages/dashboard/files/index.vue +1152 -0
- package/src/pages/dashboard/index.vue +335 -0
- package/src/pages/dashboard/manage/config/index.vue +97 -0
- package/src/pages/dashboard/manage/index.vue +105 -0
- package/src/pages/dashboard/manage/overview/index.vue +488 -0
- package/src/pages/dashboard/manage/user/index.vue +679 -0
- package/src/pages/dashboard/manage/wish/index.vue +257 -0
- package/src/pages/dashboard/tasks/components/CategoryPanel.vue +208 -0
- package/src/pages/dashboard/tasks/components/CreateTask.vue +93 -0
- package/src/pages/dashboard/tasks/components/TaskInfo.vue +129 -0
- package/src/pages/dashboard/tasks/components/infoPanel/ddl.vue +96 -0
- package/src/pages/dashboard/tasks/components/infoPanel/file.vue +175 -0
- package/src/pages/dashboard/tasks/components/infoPanel/info.vue +477 -0
- package/src/pages/dashboard/tasks/components/infoPanel/people.vue +567 -0
- package/src/pages/dashboard/tasks/components/infoPanel/template.vue +146 -0
- package/src/pages/dashboard/tasks/components/infoPanel/tip.vue +55 -0
- package/src/pages/dashboard/tasks/components/infoPanel/tipInfo.vue +196 -0
- package/src/pages/dashboard/tasks/index.vue +302 -0
- package/src/pages/dashboard/tasks/public.ts +32 -0
- package/src/pages/disabled/index.vue +47 -0
- package/src/pages/feedback/index.vue +5 -0
- package/src/pages/home/index.vue +72 -0
- package/src/pages/login/index.vue +270 -0
- package/src/pages/register/index.vue +211 -0
- package/src/pages/reset/index.vue +186 -0
- package/src/pages/task/index.vue +897 -0
- package/src/pages/wish/index.vue +152 -0
- package/src/router/Interceptor/index.ts +112 -0
- package/src/router/index.ts +13 -0
- package/src/router/routes/index.ts +197 -0
- package/src/shims-vue.d.ts +6 -0
- package/src/store/index.ts +17 -0
- package/src/store/modules/category.ts +44 -0
- package/src/store/modules/public.ts +27 -0
- package/src/store/modules/task.ts +55 -0
- package/src/store/modules/user.ts +57 -0
- package/src/utils/elementUI.ts +8 -0
- package/src/utils/networkUtil.ts +236 -0
- package/src/utils/other.ts +25 -0
- package/src/utils/regExp.ts +11 -0
- package/src/utils/stringUtil.ts +242 -0
- package/tsconfig.json +24 -0
- package/vite.config.ts +55 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="login">
|
|
3
|
+
<login-panel>
|
|
4
|
+
<!-- 表单输入区域 -->
|
|
5
|
+
<div class="inputArea">
|
|
6
|
+
<div>
|
|
7
|
+
<el-input
|
|
8
|
+
maxlength="11"
|
|
9
|
+
placeholder="手机号"
|
|
10
|
+
:prefix-icon="Phone"
|
|
11
|
+
v-model="account"
|
|
12
|
+
clearable
|
|
13
|
+
></el-input>
|
|
14
|
+
</div>
|
|
15
|
+
<div>
|
|
16
|
+
<el-input
|
|
17
|
+
maxlength="4"
|
|
18
|
+
type="number"
|
|
19
|
+
placeholder="请输入验证码"
|
|
20
|
+
:prefix-icon="ChatDotSquare"
|
|
21
|
+
v-model="code"
|
|
22
|
+
clearable
|
|
23
|
+
>
|
|
24
|
+
<template #append>
|
|
25
|
+
<!-- 获取验证码 -->
|
|
26
|
+
<el-button :disabled="time !== 0" @click="getCode">{{ codeText }}</el-button>
|
|
27
|
+
</template>
|
|
28
|
+
</el-input>
|
|
29
|
+
</div>
|
|
30
|
+
<div>
|
|
31
|
+
<el-input
|
|
32
|
+
maxlength="16"
|
|
33
|
+
minlength="6"
|
|
34
|
+
type="password"
|
|
35
|
+
placeholder="请输入新密码"
|
|
36
|
+
:prefix-icon="Lock"
|
|
37
|
+
v-model="pwd1"
|
|
38
|
+
show-password
|
|
39
|
+
clearable
|
|
40
|
+
></el-input>
|
|
41
|
+
</div>
|
|
42
|
+
<div>
|
|
43
|
+
<el-input
|
|
44
|
+
maxlength="16"
|
|
45
|
+
minlength="6"
|
|
46
|
+
type="password"
|
|
47
|
+
placeholder="请再次输入新密码"
|
|
48
|
+
:prefix-icon="Lock"
|
|
49
|
+
v-model="pwd2"
|
|
50
|
+
show-password
|
|
51
|
+
clearable
|
|
52
|
+
></el-input>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="tc">
|
|
55
|
+
<el-button @click="reset" type="primary" class="fw-w100">确认重置</el-button>
|
|
56
|
+
</div>
|
|
57
|
+
<el-divider></el-divider>
|
|
58
|
+
<div class="links">
|
|
59
|
+
<router-link to="/login">去登陆</router-link>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</login-panel>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
65
|
+
<script lang="ts" setup>
|
|
66
|
+
import { ElMessage } from 'element-plus'
|
|
67
|
+
import {
|
|
68
|
+
Lock, Phone, ChatDotSquare,
|
|
69
|
+
} from '@element-plus/icons-vue'
|
|
70
|
+
import {
|
|
71
|
+
ref,
|
|
72
|
+
} from 'vue'
|
|
73
|
+
import { useRouter } from 'vue-router'
|
|
74
|
+
import { useStore } from 'vuex'
|
|
75
|
+
import loginPanel from '@components/loginPanel.vue'
|
|
76
|
+
import { PublicApi, UserApi } from '@/apis'
|
|
77
|
+
import {
|
|
78
|
+
rMobilePhone, rPassword, rVerCode,
|
|
79
|
+
} from '@/utils/regExp'
|
|
80
|
+
import { formatDate } from '@/utils/stringUtil'
|
|
81
|
+
|
|
82
|
+
const account = ref('')
|
|
83
|
+
const code = ref('')
|
|
84
|
+
const pwd1 = ref('')
|
|
85
|
+
const pwd2 = ref('')
|
|
86
|
+
const $store = useStore()
|
|
87
|
+
const $router = useRouter()
|
|
88
|
+
const redirectDashBoard = () => {
|
|
89
|
+
$router.replace({
|
|
90
|
+
name: 'dashboard',
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
const checkForm = () => {
|
|
94
|
+
if (!rMobilePhone.test(account.value)) {
|
|
95
|
+
ElMessage.warning('手机号格式不正确')
|
|
96
|
+
return false
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (!rPassword.test(pwd1.value)) {
|
|
100
|
+
ElMessage.warning('密码格式不正确(6-16位 支持字母/数字/下划线)')
|
|
101
|
+
return false
|
|
102
|
+
}
|
|
103
|
+
if (pwd1.value !== pwd2.value) {
|
|
104
|
+
ElMessage.warning('两次输入的密码不一致')
|
|
105
|
+
return false
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (!rVerCode.test(code.value)) {
|
|
109
|
+
ElMessage.warning('验证码不正确(4位 数字)')
|
|
110
|
+
return false
|
|
111
|
+
}
|
|
112
|
+
return true
|
|
113
|
+
}
|
|
114
|
+
const codeText = ref('获取验证码')
|
|
115
|
+
const time = ref(0)
|
|
116
|
+
const refreshCodeText = () => {
|
|
117
|
+
if (time.value === 0) {
|
|
118
|
+
codeText.value = '获取验证码'
|
|
119
|
+
return
|
|
120
|
+
}
|
|
121
|
+
codeText.value = `${time.value}s`
|
|
122
|
+
time.value -= 1
|
|
123
|
+
setTimeout(refreshCodeText, 1000)
|
|
124
|
+
}
|
|
125
|
+
const getCode = () => {
|
|
126
|
+
if (!rMobilePhone.test(account.value)) {
|
|
127
|
+
ElMessage.warning('手机号格式不正确')
|
|
128
|
+
return
|
|
129
|
+
}
|
|
130
|
+
PublicApi.getCode(account.value).then(() => {
|
|
131
|
+
time.value = 120
|
|
132
|
+
refreshCodeText()
|
|
133
|
+
ElMessage.success('获取成功,请注意查看手机短信')
|
|
134
|
+
})
|
|
135
|
+
}
|
|
136
|
+
const reset = () => {
|
|
137
|
+
if (!checkForm()) {
|
|
138
|
+
return
|
|
139
|
+
}
|
|
140
|
+
UserApi
|
|
141
|
+
.resetPwd(account.value, code.value, pwd1.value)
|
|
142
|
+
.then((res) => {
|
|
143
|
+
ElMessage.success('密码重置成功')
|
|
144
|
+
const { token } = res.data
|
|
145
|
+
$store.commit('user/setToken', token)
|
|
146
|
+
redirectDashBoard()
|
|
147
|
+
})
|
|
148
|
+
.catch((err) => {
|
|
149
|
+
const { code: c, data } = err
|
|
150
|
+
const options: any = {
|
|
151
|
+
1008: '该手机号未绑定任何账号',
|
|
152
|
+
1003: '验证码不正确',
|
|
153
|
+
1004: '密码格式不正确',
|
|
154
|
+
1010: '账号已被封禁,有疑问请联系管理员',
|
|
155
|
+
1009: `账号已被冻结,解冻时间${data?.openTime && formatDate(new Date(data.openTime))}`,
|
|
156
|
+
}
|
|
157
|
+
ElMessage.error(options[c] || '重置失败,未知错误')
|
|
158
|
+
})
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
</script>
|
|
162
|
+
|
|
163
|
+
<style scoped lang="scss">
|
|
164
|
+
.login {
|
|
165
|
+
background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
|
|
166
|
+
min-height: 100vh;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.inputArea {
|
|
170
|
+
// padding: 1rem;
|
|
171
|
+
margin: 0 auto;
|
|
172
|
+
max-width: 320px;
|
|
173
|
+
div {
|
|
174
|
+
margin-top: 10px;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
// 登录按钮下方链接
|
|
178
|
+
.links {
|
|
179
|
+
display: flex;
|
|
180
|
+
justify-content: center;
|
|
181
|
+
a {
|
|
182
|
+
color: #409eff;
|
|
183
|
+
margin-left: 10px;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
</style>
|