Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
0fd4a57a
Commit
0fd4a57a
authored
Jun 11, 2019
by
lvwj
Browse files
修复默认皮肤
parent
ac0c46a9
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/api/ms.people.min.js
0 → 100644
View file @
0fd4a57a
This diff is collapsed.
Click to expand it.
src/main/webapp/templets/1/default/footer.htm
View file @
0fd4a57a
...
@@ -31,7 +31,6 @@ $(function(){
...
@@ -31,7 +31,6 @@ $(function(){
$
(
"
.head-menu-list-li
"
).
hover
(
function
(){
$
(
"
.head-menu-list-li
"
).
hover
(
function
(){
$
(
this
).
find
(
"
.head-menu-son-list
"
).
fadeToggle
();
$
(
this
).
find
(
"
.head-menu-son-list
"
).
fadeToggle
();
});
});
$
(
'
.ms-footer-right-img-weixin
'
).
hover
(
function
(){
$
(
'
.ms-footer-right-img-weixin
'
).
hover
(
function
(){
$
(
'
.ms-footer-right-weixin
'
).
toggle
();
$
(
'
.ms-footer-right-weixin
'
).
toggle
();
});
});
...
...
src/main/webapp/templets/1/default/head-file.htm
View file @
0fd4a57a
...
@@ -13,14 +13,23 @@
...
@@ -13,14 +13,23 @@
<script
src=
"{ms:global.host/}/{ms:global.style/}/js/slider.js"
></script>
<script
src=
"{ms:global.host/}/{ms:global.style/}/js/slider.js"
></script>
<script
src=
"{ms:global.host/}/static/plugins/less/3.9.0/less.min.js"
></script>
<script
src=
"{ms:global.host/}/static/plugins/less/3.9.0/less.min.js"
></script>
<!--vue-懒加载-表单验证-->
<!--vue-懒加载-表单验证-->
<script
src=
"{ms:global.host/}/plugins/vue/2.3.3/vue.min.js"
></script>
<script
src=
"{ms:global.host/}/plugins/vue/2.6.9/vue.min.js"
></script>
<script
src=
"{ms:global.host/}/plugins/validator/5.5.0/validator.min.js"
></script>
<script
src=
"{ms:global.host/}/plugins/validator/10.8.0/validator.min.js"
></script>
<!-- Element -->
<link
rel=
"stylesheet"
href=
"{ms:global.host/}/plugins/element-ui/2.8.2/index.css"
>
<script
src=
"{ms:global.host/}/plugins/element-ui/2.8.2/index.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{ms:global.host/}/{ms:global.style/}/css/animate.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{ms:global.host/}/{ms:global.style/}/css/animate.css"
>
<script
src=
"{ms:global.host/}/static/plugins/axios/0.18.0/axios.min.js"
></script>
<script
src=
"{ms:global.host/}/static/plugins/axios/0.18.0/axios.min.js"
></script>
<script
src=
"{ms:global.host/}/static/plugins/ms/1.0.0/ms.js"
></script>
<script
src=
"{ms:global.host/}/static/plugins/ms/1.0.0/ms.js"
></script>
<script
src=
"{ms:global.host/}/static/plugins/ms/1.0.0/ms.http.js"
></script>
<script
src=
"{ms:global.host/}/static/plugins/ms/1.0.0/ms.http.js"
></script>
<script
src=
"{ms:global.host/}/static/plugins/ms/1.0.0/ms.util.js"
></script>
<script
src=
"{ms:global.host/}/static/plugins/ms/1.0.0/ms.util.js"
></script>
<script
type=
"text/javascript"
>
<script
src=
"{ms:global.host/}/api/ms.people.min.js"
></script>
<script
src=
"{ms:global.host/}/static/plugins/plupload/plupload.full.min.js"
></script>
<script
src=
"{ms:global.host/}/static/plugins/qs/6.6.0/qs.min.js"
></script>
<script
src=
"{ms:global.host/}/static/plugins/ms/1.0.0/ms.upload.js"
></script>
<script>
window
.
http
=
ms
.
http
;
window
.
http
=
ms
.
http
;
</script>
ms
.
base
=
"
{ms:global.host/}
"
;
ms
.
login
=
'
{ms:global.host/}
'
;
</script>
\ No newline at end of file
src/main/webapp/templets/1/default/head.htm
View file @
0fd4a57a
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
</span>
</span>
<div
class=
"topbar-info J_userInfo loginSuccess hide-default"
v-show=
"isLogin"
style=
"display: none;"
>
<div
class=
"topbar-info J_userInfo loginSuccess hide-default"
v-show=
"isLogin"
style=
"display: none;"
>
<a
class=
"user-name"
href=
"{ms:global.host/}/people/center.do"
>
<a
class=
"user-name"
href=
"{ms:global.host/}/people/center.do"
>
<img
:src=
"'{ms:global.host/}'+
peopleInfo.puIcon"
class=
"loginImg user_icon"
onerror=
"this.src='http://cdn.mingsoft.net/global/images/msheader.png'"
>
<img
:src=
"'{ms:global.host/}
/
'+peopleInfo.puIcon"
class=
"loginImg user_icon"
onerror=
"this.src='http://cdn.mingsoft.net/global/images/msheader.png'"
>
<b
class=
"userName ms-userName"
v-text=
"peopleInfo.puNickname"
></b>
<b
class=
"userName ms-userName"
v-text=
"peopleInfo.puNickname"
></b>
</a>
</a>
<a
href=
"javascript:;"
class=
"quitLogin"
@
click=
"quitLogin"
>
退出
</a>
<a
href=
"javascript:;"
class=
"quitLogin"
@
click=
"quitLogin"
>
退出
</a>
...
@@ -83,7 +83,9 @@
...
@@ -83,7 +83,9 @@
data
:
{
data
:
{
isLogin
:
""
,
//登录状态
isLogin
:
""
,
//登录状态
peopleInfo
:
""
,
//个人信息
peopleInfo
:
""
,
//个人信息
imgUrl
:
""
,
},
},
mounted
:
function
()
{
mounted
:
function
()
{
//获取个人信息
//获取个人信息
var
target
=
this
;
var
target
=
this
;
...
@@ -91,13 +93,13 @@
...
@@ -91,13 +93,13 @@
type
:
"
POST
"
,
type
:
"
POST
"
,
url
:
"
{ms:global.host/}/checkLoginStatus.do
"
,
url
:
"
{ms:global.host/}/checkLoginStatus.do
"
,
success
:
function
(
msg
)
{
success
:
function
(
msg
)
{
target
.
isLogin
=
msg
.
result
;
target
.
isLogin
=
msg
.
result
;
//判断用户是否登录,如登录,则target.isLogin===true
if
(
msg
.
result
)
{
if
(
msg
.
result
)
{
$
.
ajax
({
$
.
ajax
({
type
:
"
GET
"
,
type
:
"
GET
"
,
url
:
"
{ms:global.host/}/people/user/info.do
"
,
url
:
"
{ms:global.host/}/people/user/info.do
"
,
success
:
function
(
msg
)
{
success
:
function
(
msg
)
{
target
.
peopleInfo
=
msg
;
target
.
peopleInfo
=
msg
;
//target.peopleInfo为当前登录用户的基本信息
}
}
})
})
}
}
...
...
src/main/webapp/templets/1/default/people/center.htm
View file @
0fd4a57a
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<
#include
"/
head-file.htm
"
/>
<
#include
"/
head-file.htm
"
/>
<script
src=
"{ms:global.host/}/static/plugins/plupload/plupload.full.min.js"
></script
>
</head
>
<script
src=
"{ms:global.host/}/static/plugins/axios/0.18.0/axios.min.js"
></script>
<script
src=
"{ms:global.host/}/static/plugins/validator/10.8.0/validator.min.js"
></script
>
<body
>
<
script
src=
"{ms:global.host/}/static/plugins/ms/1.0.0/ms.js"
></script
>
<
#include
"/
head.htm
"
/
>
<
script
src
=
"
{
ms
:global.host/}/static/plugins/ms/1.0.0/ms.http.js"
></script
>
<
div
class
=
"ms
-content"
id=
"center-vue"
>
<
script
src
=
"
{
ms
:global.host/}/static/plugins/ms/1.0.0/ms.util.js"
></script
>
<
div
class
=
"ms
-content-main"
>
<script
src
=
"
{
ms
:global.host/}/static/plugins/ms/1.0.0/ms.upload.js"
></script
>
<div
class
=
"ms
-content-left"
>
<
script
src
=
"
{
ms
:global.host/}/api/ms.people.min.js"
></script
>
<
div
class
=
"ms
-content-left-info"
>
<script>
<el-upload
class=
"avatar-uploader"
action=
"{ms:global.host/}/file/upload.do"
:show-file-list=
"false"
ms
.
base
=
"
{ms:global.host/}
"
;
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
>
ms
.
login
=
'
{ms:global.host/}
'
;
</el-upload>
</script>
<img
:src=
"'{ms:global.host/}/'+peopleInfo.puIcon"
</head
>
onerror=
'this.src="http://cdn.mingsoft.net/global/images/msheader.png"'
>
<body>
<
#include
"/
head.htm
"
/>
<div
style=
"display: none;"
v-show=
"peopleInfo.puNickname!='' && peopleInfo.puNickname != undefined"
<div
class=
"ms-content"
id=
"center-vue"
>
v-if=
"peopleInfo.puNickname!='' && peopleInfo.puNickname != undefined"
<div
class=
"ms-content-main"
>
v-text=
"peopleInfo.puNickname"
></div
>
<div
class=
"ms-content-left"
>
<div
v-else
v-text=
"'暂无昵称'"
></div
>
<div
class=
"ms-content-left-info"
>
</div
>
<img
:src=
"'{ms:global.host/}/'+peopleInfo.puIcon"
onerror=
'this.src="http://cdn.mingsoft.net/global/images/msheader.png"'
>
<div
class=
"ms-content-left-list"
>
<div
style=
"display: none;"
v-show=
"puNickname!='' && puNickname != undefined"
v-if=
"puNickname!='' && puNickname != undefined"
v-text=
"puNickname"
></div
>
<div
class=
"ms-content-left-list-info"
>
<
div
v-else
v-text=
"'暂无昵称'"
></div
>
<
a
class=
'active'
href=
"{ms:global.host/}/people/center.do"
>
基本资料
</a
>
</div>
</div>
<div
class=
"ms-content-left-list"
>
<div
class=
"ms-content-left-list-pass"
>
<div
class=
"ms-content-left-list-info"
>
<a
href=
"{ms:global.host/}/people/password-change.do"
>
修改密码
</a>
<a
class=
'active'
href=
"{ms:global.host/}/people/center.do"
>
基本资料
</a>
</div>
<div
class=
"ms-content-left-list-pass"
>
<a
href=
"{ms:global.host/}/people/password-change.do"
>
修改密码
</a>
</div>
</div>
</div>
</div>
</div>
<div
class=
"ms-content-right"
>
</div>
<div
class=
"ms-content-right-title"
>
基本资料
</div>
<div
class=
"ms-content-right"
>
<div
class=
"ms-content-right-form"
>
<div
class=
"ms-content-right-title"
>
基本资料
</div>
<form
id=
"ms-center-form"
>
<div
id=
"form"
style=
"padding-top: 30px;width: 60%;"
>
<div
class=
"ms-content-data"
>
<el-form
:model=
"peopleInfo"
:rules=
"rules"
ref=
"peopleInfo"
label-width=
"100px"
<span
class=
"ms-content-nickname span"
>
手机号
</span>
class=
"demo-peopleInfo"
status-icon
>
<input
@
keyup=
"chanageBackgroundColor"
type=
"text"
name=
"peoplePhone"
v-model=
"peopleInfo.peoplePhone"
>
<el-form-item
label=
"手机号"
prop=
"peoplePhone"
>
<img
class=
"ms-error-hide"
src=
"{ms:global.host/}/{ms:global.style/}/images/error.png"
:class=
"{'ms-error-show':errorText[0] != ''}"
/>
<el-input
v-model=
"peopleInfo.peoplePhone"
placeholder=
"请输入 11 位手机号码"
@
blur=
"validate"
></el-input>
<span
class=
"ms-error-hide"
v-text=
"errorText[0]"
:class=
"{'ms-error-show':errorText[0] != ''}"
></span>
</el-form-item>
</div>
<el-form-item
label=
"昵称"
prop=
"puNickname"
>
<div
class=
"ms-content-data"
>
<el-input
v-model=
"peopleInfo.puNickname"
placeholder=
"输入昵称,3~5位字符"
@
blur=
"validate"
></el-input>
<span
class=
"ms-content-nickname span"
>
昵称
</span>
</el-form-item>
<input
@
keyup=
"chanageBackgroundColor"
type=
"text"
name=
"puNickname"
v-model=
"peopleInfo.puNickname"
>
<el-form-item
label=
"邮箱"
prop=
"peopleMail"
>
<img
class=
"ms-error-hide"
src=
"{ms:global.host/}/{ms:global.style/}/images/error.png"
:class=
"{'ms-error-show':errorText[0] != ''}"
/>
<el-input
v-model=
"peopleInfo.peopleMail"
placeholder=
"输入昵称,3~请输入您的邮箱"
@
blur=
"validate"
></el-input>
<span
class=
"ms-error-hide"
v-text=
"errorText[0]"
:class=
"{'ms-error-show':errorText[0] != ''}"
></span>
</el-form-item>
</div>
<el-button
style=
"margin-left: 100px;"
type=
"primary"
@
click=
"updateInfo('peopleInfo')"
:disabled=
"flag"
v-text=
"submit"
>
<div
class=
"ms-content-data"
>
</el-button>
<span
class=
"ms-content-mailbox span"
>
邮箱
</span>
</el-form>
<input
@
keyup=
"chanageBackgroundColor"
type=
"text"
name=
"peopleMail"
v-model=
"peopleInfo.peopleMail"
>
<img
class=
"ms-error-hide"
src=
"{ms:global.host/}/{ms:global.style/}/images/error.png"
:class=
"{'ms-error-show':errorText[1] != ''}"
/>
<span
class=
"ms-error-hide"
v-text=
"errorText[1]"
:class=
"{'ms-error-show':errorText[1] != ''}"
></span>
</div>
</form>
<div
class=
"ms-content-click"
:disabled=
"butState != '确认'"
:class=
"{'ms-but-disabled':butState != '确认'}"
v-text=
"butState"
@
click=
"updateInfo"
>
确认
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<
#include
"/
footer.htm
"
/>
</div>
</body>
</div>
<
#include
"/
footer.htm
"
/>
</body>
</html>
</html>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
centerVue
=
new
Vue
({
new
Vue
({
el
:
"
#center-vue
"
,
el
:
'
#center-vue
'
,
data
:
{
data
:
{
peopleInfo
:
""
,
//个人信息
peopleInfo
:
""
,
puNickname
:
""
,
//昵称
submit
:
"
确认
"
,
peoplePhone
:
""
,
//手机号
flag
:
true
,
butState
:
"
确认
"
,
//按钮文字
rules
:
{
errorText
:
[
''
,
''
],
//错误信息
peoplePhone
:
[{
required
:
true
,
message
:
'
请输入手机号码
'
,
trigger
:
'
blur
'
},
{
pattern
:
/^1
[
34578
]\d{9}
$/
,
message
:
'
请输入正确的手机号码
'
,
trigger
:
'
blur
'
}
],
puNickname
:
[{
required
:
true
,
message
:
'
请输入昵称
'
,
trigger
:
'
blur
'
},
{
min
:
3
,
max
:
5
,
message
:
'
长度在 3 到 5 个字符
'
,
trigger
:
'
blur
'
}
],
peopleMail
:
[{
required
:
true
,
message
:
'
请输入邮箱
'
,
trigger
:
'
blur
'
},
{
pattern
:
/^
[
A-Za-z
\d]
+
([
-_.
][
A-Za-z
\d]
+
)
*@
([
A-Za-z
\d]
+
[
-.
])
+
[
A-Za-z
\d]{2,4}
$/
,
message
:
'
请输入正确的邮箱
'
,
trigger
:
'
blur
'
}
],
},
},
methods
:
{
},
//修改信息
updateInfo
:
function
()
{
methods
:
{
var
target
=
this
;
updateInfo
:
function
(
formName
)
{
this
.
butState
=
'
提交中...
'
;
this
.
submit
=
"
提交中...
"
;
ms
.
people
.
user
.
update
(
target
.
data
,
function
(
returnJson
)
{
//更新用户信息
var
params
=
{
if
(
returnJson
.
result
)
{
peoplePhone
:
this
.
peopleInfo
.
peoplePhone
,
alert
(
"
修改成功
"
);
puNickname
:
this
.
peopleInfo
.
puNickname
,
location
.
reload
();
peopleMail
:
this
.
peopleInfo
.
peopleMail
,
//target.getPeopleInfo();
puIcon
:
this
.
peopleInfo
.
puIcon
}
else
{
}
alert
(
returnJson
.
resultMsg
);
ms
.
people
.
user
.
update
(
params
,
function
(
returnJson
)
{
}
//更新用户信息
target
.
butState
=
'
确认
'
;
if
(
returnJson
.
result
)
{
});
alert
(
"
修改成功
"
);
},
location
.
reload
();
//获取个人信息
getPeopleInfo
:
function
()
{
var
target
=
this
;
ms
.
people
.
user
.
info
(
function
(
returnJson
)
{
target
.
peopleInfo
=
returnJson
;
target
.
puNickname
=
returnJson
.
puNickname
;
})
},
//显示提示
showPrompt
:
function
(
text
,
date
,
type
)
{
var
target
=
this
;
this
.
errorText
[
type
]
=
text
;
this
.
errorText
=
[
this
.
errorText
[
0
],
this
.
errorText
[
1
]];
setTimeout
(
function
()
{
target
.
errorText
[
type
]
=
''
;
target
.
errorText
=
[
target
.
errorText
[
0
],
target
.
errorText
[
1
]];
},
date
)
},
chanageBackgroundColor
:
function
()
{
if
(
$
(
'
input[name="puNickname"]
'
).
val
().
length
>
0
&&
$
(
'
input[name="peopleMail"]
'
).
val
().
length
>
0
)
{
$
(
'
.ms-content-click
'
).
css
(
"
background-color
"
,
"
#009aff
"
);
$
(
'
.ms-content-click
'
).
css
(
"
pointer-events
"
,
'
visible
'
);
$
(
'
.ms-content-click
'
).
css
(
"
color
"
,
"
#fff
"
);
}
else
{
}
else
{
$
(
'
.ms-content-click
'
).
css
(
"
background-color
"
,
"
#fafafa
"
);
alert
(
returnJson
.
resultMsg
);
$
(
'
.ms-content-click
'
).
css
(
'
pointer-events
'
,
"
none
"
);
this
.
flag
=
true
;
$
(
'
.ms-content-click
'
).
css
(
"
color
"
,
"
#ddd
"
);
}
}
},
});
},
},
mounted
:
function
()
{
validate
()
{
this
.
getPeopleInfo
();
this
.
$refs
.
peopleInfo
.
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
flag
=
false
;
}
else
{
this
.
flag
=
true
;
}
});
},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
!
valid
)
{
console
.
log
(
'
error submit!!
'
);
die
;
}
});
},
resetForm
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
();
},
//获取个人信息
getPeopleInfo
:
function
()
{
var
target
=
this
;
var
target
=
this
;
ms
.
people
.
user
.
info
(
function
(
returnJson
)
{
target
.
peopleInfo
=
returnJson
;
})
},
},
})
//上传头像成功后,更新用户信息
</script>
handleAvatarSuccess
(
res
,
file
)
{
\ No newline at end of file
this
.
peopleInfo
.
puIcon
=
file
.
response
;
var
params
=
{
peopleMail
:
this
.
peopleInfo
.
peopleMail
,
puIcon
:
this
.
peopleInfo
.
puIcon
}
ms
.
people
.
user
.
update
(
params
,
function
(
returnJson
)
{
//更新用户信息
if
(
returnJson
.
result
)
{
alert
(
"
头像修改成功
"
);
location
.
reload
();
}
else
{
alert
(
returnJson
.
resultMsg
);
}
});
},
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
'
image/jpeg
'
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'
上传头像图片只能是 JPG 格式!
'
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'
上传头像图片大小不能超过 2MB!
'
);
}
return
isJPG
&&
isLt2M
;
}
},
mounted
:
function
()
{
this
.
getPeopleInfo
();
var
target
=
this
;
}
})
</script>
<style
type=
"text/css"
>
.avatar-uploader
.el-upload
{
border
:
none
!important
;
cursor
:
pointer
;
position
:
absolute
;
z-index
:
100
;
width
:
100px
;
height
:
100px
;
padding
:
0
!important
;
left
:
29%
;
top
:
calc
(
50%
-
10px
);
transform
:
translateY
(
-50%
);
}
.ms-content-left-info
{
position
:
relative
;
}
</style>
\ No newline at end of file
src/main/webapp/templets/1/default/people/login.htm
View file @
0fd4a57a
This diff is collapsed.
Click to expand it.
src/main/webapp/templets/1/default/people/password-change.htm
View file @
0fd4a57a
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<
#include
"/
head-file.htm
"
/>
<head>
</head>
<
#include
"/
head-file.htm
"
/>
<body>
</head>
<
#include
"/
head.htm
"
/>
<div
class=
"ms-content"
id=
"pa-change-vue"
>
<body>
<div
class=
"ms-content-main"
>
<
#include
"/
head.htm
"
/>
<div
class=
"ms-content-left"
>
<div
class=
"ms-content"
id=
"pa-change-vue"
>
<div
class=
"ms-content-left-info"
>
<div
class=
"ms-content-main"
>
<img
:src=
"'{ms:global.host/}/'+peopleInfo.puIcon"
onerror=
'this.src="http://cdn.mingsoft.net/global/images/msheader.png"'
>
<div
class=
"ms-content-left"
>
<div
style=
"display: none;"
v-show=
"peopleInfo.puNickname!='' && peopleInfo.puNickname != undefined"
v-if=
"peopleInfo.puNickname!='' && peopleInfo.puNickname != undefined"
v-text=
"peopleInfo.puNickname"
></div>
<div
class=
"ms-content-left-info"
>
<div
v-else
v-text=
"'暂无昵称'"
></div>
<el-upload
class=
"avatar-uploader"
action=
"{ms:global.host/}/file/upload.do"
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
>
</el-upload>
<img
:src=
"'{ms:global.host/}/'+peopleInfo.puIcon"
onerror=
'this.src="http://cdn.mingsoft.net/global/images/msheader.png"'
>
<div
style=
"display: none;"
v-show=
"peopleInfo.puNickname!='' && peopleInfo.puNickname != undefined"
v-if=
"peopleInfo.puNickname!='' && peopleInfo.puNickname != undefined"
v-text=
"peopleInfo.puNickname"
></div>
<div
v-else
v-text=
"'暂无昵称'"
></div>
</div>
<div
class=
"ms-content-left-list"
>
<div
class=
"ms-content-left-list-info"
>
<a
href=
"{ms:global.host/}/people/center.do"
>
基本资料
</a>
</div>
</div>
<div
class=
"ms-content-left-list"
>
<div
class=
"ms-content-left-list-pass"
>
<div
class=
"ms-content-left-list-info"
>
<a
class=
'active'
href=
"{ms:global.host/}/people/password-change.do"
>
修改密码
</a>
<a
href=
"{ms:global.host/}/people/center.do"
>
基本资料
</a>
</div>
<div
class=
"ms-content-left-list-pass"
>
<a
class=
'active'
href=
"{ms:global.host/}/people/password-change.do"
>
修改密码
</a>
</div>
</div>
</div>
</div>
</div>
<div
class=
"ms-content-right"
>
</div>
<div
class=
"ms-content-right-title"
>
修改密码
</div>
<div
class=
"ms-content-right"
>
<div
class=
"ms-content-right-form"
>
<div
class=
"ms-content-right-title"
>
修改密码
</div>
<form>
<div
class=
"ms-content-right-form"
style=
"width: 60%;padding-top: 30px;"
>
<div
class=
"ms-content-old-password"
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
label-width=
"100px"
<span
class=
"ms-content-old-password span"
>
当前密码
</span>
class=
"demo-form"
status-icon
style=
"margin-left: 15px;"
>
<input
@
keyup=
"chanageBackgroundColor"
type=
"password"
v-model=
"peopleOldPassword"
name=
"peopleOldPassword"
placeholder=
"必填,请填写旧密码"
>
<el-form-item
label=
"当前密码"
prop=
"peopleOldPassword"
>
<img
class=
"ms-error-hide"
src=
"{ms:global.host/}/{ms:global.style/}/images/error.png"
:class=
"{'ms-error-show':errorText[0] != ''}"
/>
<el-input
v-model=
"form.peopleOldPassword"
placeholder=
"必填,6~20位字符"
@
blur=
"validate"
>
<span
class=
"ms-error-hide"
v-text=
"errorText[0]"
:class=
"{'ms-error-show':errorText[0] != ''}"
></span>
</el-input>
</div>
</el-form-item>
<div
class=
"ms-content-old-password"
>
<el-form-item
label=
"新密码"
prop=
"peoplePassword"
>
<span
class=
"ms-content-new-password span"
>
新密码
</span>
<el-input
v-model=
"form.peoplePassword"
placeholder=
"必填,6~20位字符"
@
blur=
"validate"
>
<input
@
keyup=
"chanageBackgroundColor"
type=
"password"
v-model=
"peoplePassword"
name=
"peoplePassword"
placeholder=
"必填,6-20位,不能与旧密码相同"
>
</el-input>
<img
class=
"ms-error-hide"
src=
"{ms:global.host/}/{ms:global.style/}/images/error.png"
:class=
"{'ms-error-show':errorText[1] != ''}"
/>
</el-form-item>
<span
class=
"ms-error-hide"
v-text=
"errorText[1]"
:class=
"{'ms-error-show':errorText[1] != ''}"
></span>
<el-form-item
label=
"确认密码"
prop=
"rePeoplePassword"
>
</div>
<el-input
v-model=
"form.rePeoplePassword"
placeholder=
"请再次输入新密码"
@
blur=
"validate"
>
<div
class=
"ms-content-old-password"
>
</el-input>
<span
class=
"ms-content-old-password span"
>
确认密码
</span>
</el-form-item>
<input
@
keyup=
"chanageBackgroundColor"
type=
"password"
v-model=
"rePeoplePassword"
name=
"rePeoplePassword"
placeholder=
"必填,6-20位,与新密码一致"
>
<el-form-item
label=
"验证码"
prop=
"rand_code"
style=
"position: relative;"
>
<img
class=
"ms-error-hide"
src=
"{ms:global.host/}/{ms:global.style/}/images/error.png"
:class=
"{'ms-error-show':errorText[2] != ''}"
/>
<el-input
v-model=
"form.rand_code"
placeholder=
"必填,4位字符"
@
blur=
"validate"
></el-input>
<span
class=
"ms-error-hide"
v-text=
"errorText[2]"
:class=
"{'ms-error-show':errorText[2] != ''}"
></span>
<div
id=
"code"
>
<img
:src=
"codeSrc"
class=
"login-code-img"
@
click=
"code"
/>
<div>
<span>
看不清?
</span>
<span
class=
"img-code"
@
click=
"code"
ref=
"imgCode"
>
换一张
</span>
</div>
</div>
</div>
</form>
</el-form-item>
<div
class=
"ms-content-click ms-content-click-password"
:disabled=
"butText != '确认'"
:class=
"{'ms-but-disabled':butText != '确认'}"
@
click=
"changePassword"
>
确认
</div>
<el-button
style=
"margin-left: 100px;"
type=
"primary"
@
click=
"changePassword('form')"
</div>
:disabled=
"flag"
v-text=
"submit"
>
</el-button>
</el-form>
</div>
</div>
</div>
</div>
</div>
</div>
<
#include
"/
footer.htm
"
/>
</div>
</body>
<
#include
"/
footer.htm
"
/>
</body>
</html>
</html>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
// $(function() {
var
validatePass2
=
(
rule
,
value
,
callback
)
=>
{
// $(".head-menu-list-li").hover(function() {
if
(
value
===
''
)
{
// $(this).find(".head-menu-son-list").fadeToggle();
callback
(
new
Error
(
'
请再次输入密码
'
));
// });
}
else
if
(
value
!==
V
.
form
.
peoplePassword
)
{
// });
callback
(
new
Error
(
'
两次输入密码不一致!
'
));
ms
.
load
([
"
ms
"
,
"
ms.people
"
,
"
ms.upload
"
],
function
(
ms
,
mpeople
,
upload
)
{
}
else
{
var
paChangeVue
=
new
Vue
({
callback
();
el
:
"
#pa-change-vue
"
,
}
data
:
{
};
peopleInfo
:
{},
//用户信息
var
V
=
new
Vue
({
el
:
"
#pa-change-vue
"
,
data
:
{
// 用户信息
peopleInfo
:
""
,
//提交信息
form
:
{
peopleOldPassword
:
""
,
//用户旧密码
peopleOldPassword
:
""
,
//用户旧密码
peoplePassword
:
""
,
//用户密码
peoplePassword
:
""
,
//用户密码
rePeoplePassword
:
""
,
//确认密码
rePeoplePassword
:
""
,
//确认密码
butText
:
"
确认
"
,
//按钮文字
rand_code
:
""
errorText
:
[
''
,
''
,
''
],
//错误信息
},
},
methods
:
{
flag
:
true
,
//修改密码
submit
:
"
确认
"
,
changePassword
:
function
()
{
codeSrc
:
"
{ms:global.host/}/code
"
,
var
target
=
this
;
rules
:
{
if
(
!
validator
.
isLength
(
this
.
peopleOldPassword
,
{
peopleOldPassword
:
[{
min
:
6
,
required
:
true
,
max
:
20
message
:
'
请输入旧密码
'
,
}))
{
trigger
:
'
blur
'
this
.
showPrompt
(
"
旧密码必须6-20位字符
"
,
1000
,
0
);
},
return
;
{
min
:
6
,
max
:
20
,
message
:
'
密码长度在 6 到 20 个字符
'
,
trigger
:
'
blur
'
}
}
if
(
this
.
peopleOldPassword
.
indexOf
(
"
"
)
>=
0
)
{
],
this
.
showPrompt
(
"
旧密码不能包含空格
"
,
1000
,
0
);
peoplePassword
:
[{
return
;
required
:
true
,
message
:
'
请输入新密码
'
,
trigger
:
'
blur
'
},
{
min
:
6
,
max
:
20
,
message
:
'
密码长度在 6 到 20 个字符
'
,
trigger
:
'
blur
'
}
}
if
(
!
validator
.
isLength
(
this
.
peoplePassword
,
{
],
min
:
6
,
rePeoplePassword
:
[{
max
:
20
required
:
true
,
}))
{
message
:
'
请输入新密码
'
,
this
.
showPrompt
(
"
新密码必须6-20位字符
"
,
1000
,
1
);
trigger
:
'
blur
'
return
;
},
{
validator
:
validatePass2
,
trigger
:
'
blur
'
}
}
if
(
this
.
peoplePassword
.
indexOf
(
"
"
)
>=
0
)
{
],
this
.
showPrompt
(
"
新密码不能包含空格
"
,
1000
,
1
);
rand_code
:
[{
return
;
required
:
true
,
message
:
'
请输入验证码
'
,
trigger
:
'
blur
'
},
{
min
:
4
,
max
:
4
,
message
:
'
输入验证码位数错误
'
,
trigger
:
'
blur
'
}
}
if
(
!
validator
.
isLength
(
this
.
rePeoplePassword
,
{
]
min
:
6
,
},
max
:
20
},
}))
{
methods
:
{
this
.
showPrompt
(
"
确认密码必须6-20位字符
"
,
1000
,
2
);
test
:
function
()
{
return
;
alert
(
1
);
}
},
if
(
this
.
rePeoplePassword
.
indexOf
(
"
"
)
>=
0
)
{
//更改验证码
this
.
showPrompt
(
"
确认密码不能包含空格
"
,
1000
,
2
);
code
:
function
()
{
return
;
this
.
codeSrc
=
"
{ms:global.host/}/code?t=
"
+
(
new
Date
).
getTime
();
},
//修改密码
changePassword
:
function
(
formName
)
{
this
.
submitForm
(
formName
);
var
target
=
this
;
var
params
=
{
peopleOldPassword
:
this
.
form
.
peopleOldPassword
,
peoplePassword
:
this
.
form
.
peoplePassword
,
rePeoplePassword
:
this
.
form
.
rePeoplePassword
,
rand_code
:
this
.
form
.
rand_code
}
ms
.
people
.
changePassword
(
params
,
function
(
returnJson
)
{
if
(
returnJson
.
result
)
{
target
.
submit
=
"
提交中...
"
setTimeout
(
function
()
{
alert
(
"
密码修改成功,请重新登录
"
)
http
.
post
(
"
{ms:global.host/}/people/quit.do
"
)
location
.
href
=
"
{ms:global.host/}/mcms/login.do
"
;
},
500
)
}
else
if
(
returnJson
.
resultMsg
==
"
密码错误!
"
)
{
alert
(
'
原密码错误!
'
);
this
.
flag
=
true
;
}
else
if
(
returnJson
.
resultMsg
==
"
验证码错误!
"
)
{
alert
(
"
验证码错误!
"
);
target
.
$refs
.
imgCode
.
click
();
target
.
form
.
rand_code
=
""
,
this
.
flag
=
true
;
}
}
if
(
this
.
peoplePassword
!=
this
.
rePeoplePassword
)
{
})
this
.
showPrompt
(
"
确认密码与密码不一致
"
,
1000
,
2
);
},
return
;
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
!
valid
)
{
console
.
log
(
'
error submit!!
'
);
die
;
}
}
if
(
this
.
peopleOldPassword
==
this
.
peoplePassword
)
{
});
this
.
showPrompt
(
"
新密码与旧密码输入一致
"
,
1000
,
1
);
},
validate
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
flag
=
false
;
}
else
{
}
else
{
target
.
butText
=
"
提交中...
"
this
.
flag
=
true
;
ms
.
people
.
changePassword
(
$
(
"
form
"
).
serialize
(),
function
(
returnJson
)
{
if
(
returnJson
.
result
)
{
alert
(
"
密码修改成功,请重新登录
"
)
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
{ms:global.host/}/people/quit.do
"
,
success
:
function
(
msg
)
{
}
})
location
.
href
=
"
{ms:global.host/}/login.do
"
;
}
else
{
target
.
showPrompt
(
"
旧密码错误
"
,
1000
,
0
);
target
.
butText
=
"
确认
"
};
target
.
butText
=
"
确认
"
})
}
}
},
});
//显示提示
},
showPrompt
:
function
(
text
,
date
,
type
)
{
handleAvatarSuccess
(
res
,
file
)
{
var
target
=
this
;
this
.
peopleInfo
.
puIcon
=
file
.
response
;
this
.
errorText
[
type
]
=
text
;
var
params
=
{
this
.
errorText
=
[
this
.
errorText
[
0
],
this
.
errorText
[
1
],
this
.
errorText
[
2
]];
peopleMail
:
this
.
peopleInfo
.
peopleMail
,
setTimeout
(
puIcon
:
this
.
peopleInfo
.
puIcon
,
function
()
{
}
target
.
errorText
[
type
]
=
''
;
ms
.
people
.
user
.
update
(
params
,
function
(
returnJson
)
{
target
.
errorText
=
[
target
.
errorText
[
0
],
target
.
errorText
[
1
],
this
.
errorText
[
2
]];
//更新用户信息
},
date
if
(
returnJson
.
result
)
{
)
alert
(
"
头像修改成功
"
);
},
location
.
reload
();
chanageBackgroundColor
:
function
(){
}
else
{
if
(
$
(
'
input[name="peopleOldPassword"]
'
).
val
().
length
>=
6
&&
$
(
'
input[name="peoplePassword"]
'
).
val
().
length
>=
6
&&
$
(
'
input[name="rePeoplePassword"]
'
).
val
().
length
>=
6
){
alert
(
returnJson
.
resultMsg
);
$
(
'
.ms-content-click-password
'
).
css
(
"
background-color
"
,
"
#009aff
"
);
$
(
'
.ms-content-click-password
'
).
css
(
"
pointer-events
"
,
'
visible
'
);
$
(
'
.ms-content-click-password
'
).
css
(
"
color
"
,
"
#fff
"
);
}
else
{
$
(
'
.ms-content-click-password
'
).
css
(
"
background-color
"
,
"
#fafafa
"
);
$
(
'
.ms-content-click-password
'
).
css
(
'
pointer-events
'
,
"
none
"
);
$
(
'
.ms-content-click-password
'
).
css
(
"
color
"
,
"
#ddd
"
);
}
}
},
});
},
},
mounted
:
function
()
{
beforeAvatarUpload
(
file
)
{
//获取个人信息
const
isJPG
=
file
.
type
===
'
image/jpeg
'
;
var
target
=
this
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
ms
.
people
.
user
.
info
(
function
(
returnJson
)
{
target
.
peopleInfo
=
returnJson
;
if
(
!
isJPG
)
{
})
this
.
$message
.
error
(
'
上传头像图片只能是 JPG 格式!
'
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'
上传头像图片大小不能超过 2MB!
'
);
}
return
isJPG
&&
isLt2M
;
}
}
})
},
mounted
:
function
()
{
//获取个人信息
var
target
=
this
;
ms
.
people
.
user
.
info
(
function
(
returnJson
)
{
target
.
peopleInfo
=
returnJson
;
})
}
})
})
</script>
</script>
\ No newline at end of file
<style
type=
"text/css"
>
#code
{
position
:
absolute
;
right
:
-150px
;
top
:
0
;
height
:
40px
;
}
#code
>
.login-code-img
{
height
:
40px
;
}
#code
>
div
{
font-size
:
15px
;
display
:
inline-block
;
vertical-align
:
top
;
}
#code
>
div
>
span
{
display
:
block
;
line-height
:
1.4
;
}
#code
>
div
>
.img-code
{
cursor
:
pointer
;
color
:
#00A5FF
;
}
.avatar-uploader
.el-upload
{
border
:
none
!important
;
cursor
:
pointer
;
position
:
absolute
;
z-index
:
100
;
width
:
100px
;
height
:
100px
;
padding
:
0
!important
;
left
:
29%
;
top
:
calc
(
50%
-
10px
);
transform
:
translateY
(
-50%
);
}
.ms-content-left-info
{
position
:
relative
;
}
</style>
\ No newline at end of file
src/main/webapp/templets/1/default/search.htm
View file @
0fd4a57a
...
@@ -27,10 +27,10 @@
...
@@ -27,10 +27,10 @@
</ul>
</ul>
</div>
</div>
<div
class=
"ms-content-main-page"
>
<div
class=
"ms-content-main-page"
>
<a
class=
"ms-content-main-page-first"
href=
"{ms:page.index/}"
>
首页
</a>
<a
class=
"ms-content-main-page-first"
href=
"{ms:
global.url/}{ms:
page.index/}"
>
首页
</a>
<a
class=
"ms-content-main-page-upper"
href=
"{ms:page.pre/}"
>
上一页
</a>
<a
class=
"ms-content-main-page-upper"
href=
"{ms:
global.url/}{ms:
page.pre/}"
>
上一页
</a>
<a
class=
"ms-content-main-page-next"
href=
"{ms:page.next/}"
>
下一页
</a>
<a
class=
"ms-content-main-page-next"
href=
"{ms:
global.url/}{ms:
page.next/}"
>
下一页
</a>
<a
class=
"ms-content-main-page-last"
href=
"{ms:page.last/}"
>
末页
</a>
<a
class=
"ms-content-main-page-last"
href=
"{ms:
global.url/}{ms:
page.last/}"
>
末页
</a>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment