diff --git a/Api/Ewide.Core/Ewide.Core.xml b/Api/Ewide.Core/Ewide.Core.xml
index 3cbc0f1..7c48c82 100644
--- a/Api/Ewide.Core/Ewide.Core.xml
+++ b/Api/Ewide.Core/Ewide.Core.xml
@@ -2801,6 +2801,71 @@
+
+
+ 系统字典值种子数据
+
+
+
+
+ 种子数据
+
+
+
+
+
+
+
+ 系统字典类型种子数据
+
+
+
+
+ 种子数据
+
+
+
+
+
+
+
+ 系统菜单表种子数据
+
+
+
+
+ 种子数据
+
+
+
+
+
+
+
+ 系统任务调度表种子数据
+
+
+
+
+ 种子数据
+
+
+
+
+
+
+
+ 系统用户表种子数据
+
+
+
+
+ 种子数据
+
+
+
+
+
系统应用参数
@@ -6604,11 +6669,6 @@
用户Id
-
-
- 用户Id
-
-
密码
diff --git a/Api/Ewide.Core/Service/Auth/AuthService.cs b/Api/Ewide.Core/Service/Auth/AuthService.cs
index beb77f9..0ff2a2c 100644
--- a/Api/Ewide.Core/Service/Auth/AuthService.cs
+++ b/Api/Ewide.Core/Service/Auth/AuthService.cs
@@ -115,6 +115,15 @@ namespace Ewide.Core.Service
var httpContext = App.GetService().HttpContext;
var loginOutput = user.Adapt();
+ // 隐藏手机号/邮箱中间几位
+ loginOutput.Phone = String.IsNullOrEmpty(loginOutput.Phone) ? loginOutput.Phone
+ : loginOutput.Phone.Substring(0, 3) + "****" + loginOutput.Phone.Substring(7, 4);
+ loginOutput.Email = String.IsNullOrEmpty(loginOutput.Email) ? loginOutput.Email
+ : String.Join("@", loginOutput.Email.Split('@').Select((p, i) =>
+ {
+ return i == 0 ? (p.Length > 3 ? p.Substring(0, 3).PadRight(p.Length, '*') : "".PadRight(3, '*')) : p;
+ }));
+
loginOutput.LastLoginTime = user.LastLoginTime = DateTime.Now;
var ip = httpContext.Request.Headers["X-Real-IP"].FirstOrDefault();
loginOutput.LastLoginIp = user.LastLoginIp = string.IsNullOrEmpty(user.LastLoginIp) ? httpContext.GetRemoteIpAddressToIPv4() : ip;
@@ -153,18 +162,18 @@ namespace Ewide.Core.Service
}
// 增加登录日志
- await new SysLogVis
- {
- Name = "登录",
- Success = true,
- Message = "登录成功",
- Ip = loginOutput.LastLoginIp,
- Browser = loginOutput.LastLoginBrowser,
- Os = loginOutput.LastLoginOs,
- VisType = 1,
- VisTime = loginOutput.LastLoginTime,
- Account = loginOutput.Account
- }.InsertAsync();
+ //await new SysLogVis
+ //{
+ // Name = "登录",
+ // Success = true,
+ // Message = "登录成功",
+ // Ip = loginOutput.LastLoginIp,
+ // Browser = loginOutput.LastLoginBrowser,
+ // Os = loginOutput.LastLoginOs,
+ // VisType = 1,
+ // VisTime = loginOutput.LastLoginTime,
+ // Account = loginOutput.Account
+ //}.InsertAsync();
return loginOutput;
}
diff --git a/Api/Ewide.Core/Service/User/Dto/UserInput.cs b/Api/Ewide.Core/Service/User/Dto/UserInput.cs
index 13b0740..c31572b 100644
--- a/Api/Ewide.Core/Service/User/Dto/UserInput.cs
+++ b/Api/Ewide.Core/Service/User/Dto/UserInput.cs
@@ -46,11 +46,13 @@ namespace Ewide.Core.Service
///
/// 邮箱
///
+ [RegularExpression(@"^\w{3,}(\.\w+)*@[A-z0-9]+(\.[A-z]{2,5}){1,2}$", ErrorMessage = "邮箱格式不正确")]
public virtual string Email { get; set; }
///
/// 手机
///
+ [RegularExpression(@"^((13[0-9])|(14[5,7])|(15[^4,\\D])|(17[0,1,3,6-8])|(18[0-9])|(19[8,9])|(166))[0-9]{8}$", ErrorMessage = "手机号格式不正确")]
public virtual string Phone { get; set; }
///
@@ -120,12 +122,6 @@ namespace Ewide.Core.Service
public class ChangePasswordUserInput
{
- ///
- /// 用户Id
- ///
- [Required(ErrorMessage = "用户Id不能为空")]
- public string Id { get; set; }
-
///
/// 密码
///
diff --git a/Api/Ewide.Core/Service/User/SysUserService.cs b/Api/Ewide.Core/Service/User/SysUserService.cs
index bc45545..5e2d321 100644
--- a/Api/Ewide.Core/Service/User/SysUserService.cs
+++ b/Api/Ewide.Core/Service/User/SysUserService.cs
@@ -239,7 +239,7 @@ namespace Ewide.Core.Service
nameof(SysUser.Password),
nameof(SysUser.AdminType),
nameof(SysUser.Status),
- // 邮箱和手机号作为可能登录的方式,不能在此处直接进行修改
+ // 邮箱和手机号作为安全验证的方式,不能在此处直接进行修改
nameof(SysUser.Phone),
nameof(SysUser.Email)
}, true);
@@ -253,7 +253,7 @@ namespace Ewide.Core.Service
[HttpPost("/sysUser/updatePwd")]
public async Task UpdateUserPwd(ChangePasswordUserInput input)
{
- var user = await _sysUserRep.FirstOrDefaultAsync(u => u.Id == input.Id);
+ var user = await _sysUserRep.FirstOrDefaultAsync(u => u.Id == _userManager.UserId);
if (MD5Encryption.Encrypt(input.Password) != user.Password)
throw Oops.Oh(ErrorCode.D1004);
if (MD5Encryption.Encrypt(input.NewPassword).Equals(user.Password))
diff --git a/Api/Ewide.Web.Core/core.settings.json b/Api/Ewide.Web.Core/core.settings.json
index 41b6a0c..035a2a2 100644
--- a/Api/Ewide.Web.Core/core.settings.json
+++ b/Api/Ewide.Web.Core/core.settings.json
@@ -6,7 +6,8 @@
"sysFileInfo:upload",
"sysFileInfo:download",
"sysFileInfo:preview",
- "sysUser:updateInfo"
+ "sysUser:updateInfo",
+ "sysUser:updatePwd"
]
}
}
\ No newline at end of file
diff --git a/Web/src/assets/style/app.less b/Web/src/assets/style/app.less
index 6ceea2a..6eafc94 100644
--- a/Web/src/assets/style/app.less
+++ b/Web/src/assets/style/app.less
@@ -3,6 +3,7 @@
@import './lib/container.less';
@import './lib/align.less';
@import './lib/font-size.less';
+@import './lib/text-color.less';
@import './lib/margin.less';
@import './lib/width-height.less';
@import './lib/scrollbar.less';
@@ -15,6 +16,7 @@
.yo-nav-theme--light {
.light();
}
+@import './lib/button.less';
@import './lib/card.less';
@import './lib/table.less';
@import './lib/list.less';
diff --git a/Web/src/assets/style/lib/button.less b/Web/src/assets/style/lib/button.less
new file mode 100644
index 0000000..fbc571b
--- /dev/null
+++ b/Web/src/assets/style/lib/button.less
@@ -0,0 +1,5 @@
+@import (reference) '~@/assets/style/extend.less';
+@btn-default-border: @border-color-split;
+.ant-btn {
+ box-shadow: none;
+}
diff --git a/Web/src/assets/style/lib/form.less b/Web/src/assets/style/lib/form.less
index a4508aa..9f53965 100644
--- a/Web/src/assets/style/lib/form.less
+++ b/Web/src/assets/style/lib/form.less
@@ -4,25 +4,17 @@
width: 660px;
margin: 0 auto;
}
- h1,
.h1,
- h2,
.h2,
- h3,
.h3,
- h4,
.h4,
- h5,
.h5,
- h6,
.h6 {
color: darken(@white, 40%);
}
- h3,
.h3 {
font-size: 16px;
}
- h4,
.h4 {
font-size: 15px;
}
diff --git a/Web/src/assets/style/lib/list.less b/Web/src/assets/style/lib/list.less
index 3ab9fab..146034f 100644
--- a/Web/src/assets/style/lib/list.less
+++ b/Web/src/assets/style/lib/list.less
@@ -1,4 +1,8 @@
@import (reference) '~@/assets/style/extend.less';
+.ant-list-bordered {
+ border-color: @border-color-split;
+ background-color: @white;
+}
.yo-list {
&-content--h {
display: flex;
diff --git a/Web/src/assets/style/lib/text-color.less b/Web/src/assets/style/lib/text-color.less
new file mode 100644
index 0000000..b4e431f
--- /dev/null
+++ b/Web/src/assets/style/lib/text-color.less
@@ -0,0 +1,32 @@
+@import (reference) '~@/assets/style/extend.less';
+.text-primary {
+ color: @primary-color;
+}
+.text-info {
+ color: @info-color;
+}
+.text-success {
+ color: @success-color;
+}
+.text-processing {
+ color: @processing-color;
+}
+.text-error,
+.text-danger {
+ color: @error-color;
+}
+.text-highlight {
+ color: @highlight-color;
+}
+.text-warning {
+ color: @warning-color;
+}
+.text-normal {
+ color: @normal-color;
+}
+.text-white {
+ color: @white;
+}
+.text-black {
+ color: @black;
+}
diff --git a/Web/src/common/api/index.js b/Web/src/common/api/index.js
index 907d351..dbb9ed3 100644
--- a/Web/src/common/api/index.js
+++ b/Web/src/common/api/index.js
@@ -18,6 +18,7 @@ axios.defaults.baseURL = '/api'
* api.getItemGroupType(parmas).then(...)
*/
import urls from './requests'
+import { settings } from 'nprogress'
const initInstance = (options) => {
const instance = axios
@@ -45,10 +46,12 @@ const errorNotification = ({ code, message }) => {
switch (message.constructor) {
case Array:
message.map(p => {
- app.$notification.error({
- duration: 30,
- message: p.field,
- description: p.messages.join('/'),
+ setTimeout(() => {
+ app.$notification.error({
+ duration: 30,
+ message: p.field,
+ description: p.messages.join('/'),
+ })
})
})
break
diff --git a/Web/src/components/yoModalForm/index.js b/Web/src/components/yoModalForm/index.js
index c5f4a6b..f1a6cc8 100644
--- a/Web/src/components/yoModalForm/index.js
+++ b/Web/src/components/yoModalForm/index.js
@@ -13,6 +13,9 @@ export default {
},
action: {
type: Function
+ },
+ successMessage: {
+ type: String
}
},
@@ -124,7 +127,7 @@ export default {
&& this.action(data)
.then(({ success }) => {
if (success) {
- this.$message.success('保存成功');
+ this.$message.success(this.successMessage || '保存成功');
this.onClose();
this.$emit('ok');
}
diff --git a/Web/src/pages/account/index.vue b/Web/src/pages/system/account/index.vue
similarity index 60%
rename from Web/src/pages/account/index.vue
rename to Web/src/pages/system/account/index.vue
index 3009fac..d8f1ecf 100644
--- a/Web/src/pages/account/index.vue
+++ b/Web/src/pages/system/account/index.vue
@@ -1,10 +1,10 @@
-
-
+
+
\ No newline at end of file
diff --git a/Web/src/pages/system/account/setting/safety/password.vue b/Web/src/pages/system/account/setting/safety/password.vue
new file mode 100644
index 0000000..6e91b85
--- /dev/null
+++ b/Web/src/pages/system/account/setting/safety/password.vue
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Web/src/pages/system/doc/index.vue b/Web/src/pages/system/doc/index.vue
index a3fda6d..674f4db 100644
--- a/Web/src/pages/system/doc/index.vue
+++ b/Web/src/pages/system/doc/index.vue
@@ -79,6 +79,7 @@
:get-container="()=> $el.parentNode"
:offset-top="24"
:wrapper-style="{ backgroundColor: 'transparent' }"
+ @click.prevent
>
- 基本信息
+ 基本信息
- 员工信息
+ 员工信息
- 附加信息
+ 附加信息