Skip to content

Commit

Permalink
feat: - 密码逻辑更新
Browse files Browse the repository at this point in the history
  • Loading branch information
唐道勇 authored and 唐道勇 committed Dec 6, 2021
1 parent 456ced7 commit d002a55
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 38 deletions.
8 changes: 5 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
* @Author: your name
* @Date: 2021-10-18 17:15:20
* @LastEditTime: 2021-10-28 11:37:10
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-12-06 10:53:56
* @LastEditors: matiastang
* @Description: In User Settings Edit
* @FilePath: /vue-scaffold/.eslintrc.js
* @FilePath: /datumwealth-openalpha-front/.eslintrc.js
*/
module.exports = {
root: true,
Expand All @@ -31,6 +31,8 @@ module.exports = {
// 规则
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
// 去除ts类型检测,消除ts函数设置默认值提示错误
'@typescript-eslint/no-inferrable-types': 'off',
'no-unused-variable': 'off',
// prettier样式规则,需要和配置文件的统一
'prettier/prettier': [
Expand Down
Binary file modified public/favicon.ico
Binary file not shown.
13 changes: 10 additions & 3 deletions src/common/utils/check/userInfoCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: matiastang
* @Date: 2021-11-12 09:49:44
* @LastEditors: matiastang
* @LastEditTime: 2021-12-01 16:41:29
* @LastEditTime: 2021-12-06 11:25:39
* @FilePath: /datumwealth-openalpha-front/src/common/utils/check/userInfoCheck.ts
* @Description: 用户信息校验
*/
Expand Down Expand Up @@ -64,11 +64,18 @@ function code_check(code: string): string | null {
* @param password 密码
* @returns 结果
*/
function password_check(password: string): string | null {
function password_check(password: string, isChange: boolean = false): string | null {
if (password.trim() == '') {
return '请输入密码'
}
const reg = /^[A-Za-z\d]{6,20}$/
const loginReg = /^[A-Za-z\d]{6,20}$/
if (!loginReg.test(password)) {
return '密码为6-20位数字或字母'
}
if (!isChange) {
return null
}
const reg = /^(?=.*[0-9])(?=.*[a-zA-Z])[A-Za-z\d]{6,30}$/
if (!reg.test(password)) {
return '密码格式为6-20位数字与字母组合'
}
Expand Down
12 changes: 6 additions & 6 deletions src/components/changePasswordModel/ChangePasswordModel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: matiastang
* @Date: 2021-11-15 16:31:59
* @LastEditors: matiastang
* @LastEditTime: 2021-12-01 16:36:26
* @LastEditTime: 2021-12-06 11:19:37
* @FilePath: /datumwealth-openalpha-front/src/components/changePasswordModel/ChangePasswordModel.vue
* @Description: 修改密码弹窗
-->
Expand Down Expand Up @@ -75,17 +75,17 @@ export default defineComponent({
if (oldPasswordError) {
ElMessage({
message: oldPasswordError,
type: 'warning',
type: 'error',
})
return
}
// 密码校验
let newPassword = newInputPassword.value
let newPasswordError = password_check(newPassword)
let newPasswordError = password_check(newPassword, true)
if (newPasswordError) {
ElMessage({
message: newPasswordError,
type: 'warning',
type: 'error',
})
return
}
Expand All @@ -94,7 +94,7 @@ export default defineComponent({
if (affirmNewPassword !== newPassword) {
ElMessage({
message: '两次密码不一致',
type: 'warning',
type: 'error',
})
return
}
Expand All @@ -103,7 +103,7 @@ export default defineComponent({
if (!userId) {
ElMessage({
message: '用户信息错误',
type: 'warning',
type: 'error',
})
return
}
Expand Down
6 changes: 5 additions & 1 deletion src/components/codeInput/CodeInput.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-11-03 15:54:19
* @LastEditTime: 2021-11-30 19:49:17
* @LastEditTime: 2021-12-06 10:31:03
* @LastEditors: matiastang
* @Description: In User Settings Edit
* @FilePath: /datumwealth-openalpha-front/src/components/codeInput/CodeInput.vue
Expand Down Expand Up @@ -64,6 +64,10 @@ export default defineComponent({
* 获取验证码
*/
const getCode = () => {
if (codeText.value !== '获取验证码') {
console.warn('倒计时中')
return
}
content.emit('CodeInputGetCode')
}
// 倒计时
Expand Down
8 changes: 7 additions & 1 deletion src/components/emailInput/EmailInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: matiastang
* @Date: 2021-11-16 15:35:33
* @LastEditors: matiastang
* @LastEditTime: 2021-11-16 15:36:47
* @LastEditTime: 2021-12-06 10:33:21
* @FilePath: /datumwealth-openalpha-front/src/components/emailInput/EmailInput.vue
* @Description: 邮箱输入框
-->
Expand Down Expand Up @@ -34,5 +34,11 @@ export default defineComponent({
width: 100%;
height: 56px;
justify-content: flex-start;
:deep(.el-input__inner) {
height: 54px;
}
:deep(.el-input__suffix) {
padding-right: 10px !important;
}
}
</style>
18 changes: 9 additions & 9 deletions src/views/user/dataCenter/discountInfo/DiscountInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: matiastang
* @Date: 2021-11-15 14:59:37
* @LastEditors: matiastang
* @LastEditTime: 2021-11-25 18:51:21
* @LastEditTime: 2021-12-06 11:17:20
* @FilePath: /datumwealth-openalpha-front/src/views/user/dataCenter/discountInfo/DiscountInfo.vue
* @Description: 优惠套餐详情
-->
Expand Down Expand Up @@ -31,42 +31,42 @@
<el-table class="discount-info-table" :data="tableData.list" style="width: 100%">
<el-table-column prop="apiInfoId" label="接口ID" min-width="80">
<template #default="scope">
{{ scope.row.apiInfoId || '-' }}
{{ scope.row.apiInfoId !== null ? scope.row.apiInfoId : '-' }}
</template>
</el-table-column>
<el-table-column prop="apiName" label="接口名称" min-width="80">
<template #default="scope">
{{ scope.row.apiName || '-' }}
{{ scope.row.apiName !== null ? scope.row.apiName : '-' }}
</template>
</el-table-column>
<el-table-column prop="apiPrice" label="单价(元/次)" min-width="110">
<template #default="scope">
{{ scope.row.apiPrice || '-' }}
{{ scope.row.apiPrice !== null ? scope.row.apiPrice : '-' }}
</template>
</el-table-column>
<el-table-column prop="apiVersion" label="接口最新版本" min-width="105">
<template #default="scope">
{{ scope.row.apiVersion || '-' }}
{{ scope.row.apiVersion !== null ? scope.row.apiVersion : '-' }}
</template>
</el-table-column>
<el-table-column prop="costPrice" label="消费金额" min-width="80">
<template #default="scope">
{{ scope.row.costPrice || '-' }}
{{ scope.row.costPrice !== null ? scope.row.costPrice : '-' }}
</template>
</el-table-column>
<el-table-column prop="costTimes" label="计费次数" min-width="80">
<template #default="scope">
{{ scope.row.costTimes || '-' }}
{{ scope.row.costTimes !== null ? scope.row.costTimes : '-' }}
</template>
</el-table-column>
<el-table-column prop="countSum" label="总调用量" min-width="80">
<template #default="scope">
{{ scope.row.countSum || '-' }}
{{ scope.row.countSum !== null ? scope.row.countSum : '-' }}
</template>
</el-table-column>
<el-table-column prop="validSum" label="有效调用量" min-width="90">
<template #default="scope">
{{ scope.row.validSum || '-' }}
{{ scope.row.validSum !== null ? scope.row.validSum : '-' }}
</template>
</el-table-column>
</el-table>
Expand Down
18 changes: 9 additions & 9 deletions src/views/user/dataCenter/rechargeInfo/RechargeInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: matiastang
* @Date: 2021-11-15 15:30:33
* @LastEditors: matiastang
* @LastEditTime: 2021-11-25 18:50:37
* @LastEditTime: 2021-12-06 11:14:52
* @FilePath: /datumwealth-openalpha-front/src/views/user/dataCenter/rechargeInfo/RechargeInfo.vue
* @Description: 充值订单详情
-->
Expand Down Expand Up @@ -31,42 +31,42 @@
<el-table class="recharge-info-table" :data="tableData.list" style="width: 100%">
<el-table-column prop="apiInfoId" label="接口ID" min-width="80">
<template #default="scope">
{{ scope.row.apiInfoId || '-' }}
{{ scope.row.apiInfoId !== null ? scope.row.apiInfoId : '-' }}
</template>
</el-table-column>
<el-table-column prop="apiName" label="接口名称" min-width="80">
<template #default="scope">
{{ scope.row.apiName || '-' }}
{{ scope.row.apiName !== null ? scope.row.apiName : '-' }}
</template>
</el-table-column>
<el-table-column prop="apiPrice" label="单价(元/次)" min-width="100">
<template #default="scope">
{{ scope.row.apiPrice || '-' }}
{{ scope.row.apiPrice !== null ? scope.row.apiPrice : '-' }}
</template>
</el-table-column>
<el-table-column prop="apiVersion" label="接口最新版本" min-width="105">
<template #default="scope">
{{ scope.row.apiVersion || '-' }}
{{ scope.row.apiVersion !== null ? scope.row.apiVersion : '-' }}
</template>
</el-table-column>
<el-table-column prop="costPrice" label="消费金额" min-width="80">
<template #default="scope">
{{ scope.row.costPrice || '-' }}
{{ scope.row.costPrice !== null ? scope.row.costPrice : '-' }}
</template>
</el-table-column>
<el-table-column prop="costTimes" label="计费次数" min-width="80">
<template #default="scope">
{{ scope.row.costTimes || '-' }}
{{ scope.row.costTimes !== null ? scope.row.costTimes : '-' }}
</template>
</el-table-column>
<el-table-column prop="countSum" label="总调用量" min-width="80">
<template #default="scope">
{{ scope.row.countSum || '-' }}
{{ scope.row.countSum !== null ? scope.row.countSum : '-' }}
</template>
</el-table-column>
<el-table-column prop="validSum" label="有效调用量" min-width="105">
<template #default="scope">
{{ scope.row.validSum || '-' }}
{{ scope.row.validSum !== null ? scope.row.validSum : '-' }}
</template>
</el-table-column>
</el-table>
Expand Down
4 changes: 2 additions & 2 deletions src/views/user/helpCenter/loginRegister/LoginRegister.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: matiastang
* @Date: 2021-11-18 10:13:15
* @LastEditors: matiastang
* @LastEditTime: 2021-12-03 16:43:36
* @LastEditTime: 2021-12-06 10:11:10
* @FilePath: /datumwealth-openalpha-front/src/views/user/helpCenter/loginRegister/LoginRegister.vue
* @Description: 帮组中心-登录注册
-->
Expand Down Expand Up @@ -107,7 +107,7 @@ export default defineComponent({
.login-register-item-img {
width: calc(100% - 24px);
// height: 362px;
background: $themeColor;
// background: $themeColor;
margin-bottom: 12px;
margin-left: 24px;
}
Expand Down
4 changes: 2 additions & 2 deletions src/views/user/helpCenter/pay/Pay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: matiastang
* @Date: 2021-11-18 10:15:02
* @LastEditors: matiastang
* @LastEditTime: 2021-12-03 16:43:42
* @LastEditTime: 2021-12-06 10:11:15
* @FilePath: /datumwealth-openalpha-front/src/views/user/helpCenter/pay/Pay.vue
* @Description: 帮助中心-支付方式
-->
Expand Down Expand Up @@ -79,7 +79,7 @@ export default defineComponent({
.pay-item-img {
width: calc(100% - 24px);
// height: 362px;
background: $themeColor;
// background: $themeColor;
margin-bottom: 12px;
margin-left: 24px;
}
Expand Down
4 changes: 2 additions & 2 deletions src/views/web/about/feedback/Feedback.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: matiastang
* @Date: 2021-11-26 13:37:30
* @LastEditors: matiastang
* @LastEditTime: 2021-12-06 09:52:36
* @LastEditTime: 2021-12-06 10:25:12
* @FilePath: /datumwealth-openalpha-front/src/views/web/about/feedback/Feedback.vue
* @Description: 意见反馈
-->
Expand Down Expand Up @@ -30,7 +30,7 @@
placeholder="以便我们及时反馈您"
/>
</div>
<div class="feedback-ok cursorP defaultFont" @click="backAction">意见反馈</div>
<div class="feedback-ok cursorP defaultFont" @click="backAction">提交反馈</div>
</div>
</template>

Expand Down

0 comments on commit d002a55

Please sign in to comment.