Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xxx_phase2_web
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏敏伟
xxx_phase2_web
Commits
ffd0c18f
Commit
ffd0c18f
authored
Nov 16, 2023
by
以墨为白
🎧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户编辑的时候邮件问题
parent
03d4cd4e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
59 deletions
+55
-59
src/constant/user.js
src/constant/user.js
+4
-0
src/view/home.vue
src/view/home.vue
+1
-1
src/view/homepage.vue
src/view/homepage.vue
+1
-1
src/view/login.vue
src/view/login.vue
+1
-1
src/view/user/yhgl.vue
src/view/user/yhgl.vue
+48
-56
No files found.
src/constant/user.js
View file @
ffd0c18f
...
...
@@ -9,6 +9,10 @@ export const HTTP_STATUS = {message: "服务请求失败", code:9004};
/**
* 邮件系统
*/
// export const MAIL_ADDRESS = "http://6.1.22.93:8000";
// export const MAIL_MANAGER_ADDRESS = "http://6.1.22.93:8010";
// export const MAIL_DOMAIN = "zyyt.com"
export
const
MAIL_ADDRESS
=
"
http://192.168.168.100:8000
"
;
export
const
MAIL_MANAGER_ADDRESS
=
"
http://192.168.168.100:8010
"
;
export
const
MAIL_DOMAIN
=
"
zyyt.com
"
\ No newline at end of file
src/view/home.vue
View file @
ffd0c18f
...
...
@@ -13,7 +13,7 @@
v-text=
"item.name"
>
</div>
</div>
<h1><span>
业务辅助分析
系统
</span></h1>
<h1><span>
东部战区心理战训练
系统
</span></h1>
<div
class=
"home-date"
>
<span
class=
"date"
v-text=
"myDate.day"
></span>
  
<span
class=
"week"
v-text=
"myDate.week"
></span>
...
...
src/view/homepage.vue
View file @
ffd0c18f
<
template
>
<div
class=
"homepage"
>
<div
class=
"header"
>
<h1><span>
业务辅助分析
系统
</span></h1>
<h1><span>
东部战区心理战训练
系统
</span></h1>
<div>
<span
class=
"date"
v-text=
"myDate.day"
></span>
  
<span
class=
"week"
v-text=
"myDate.week"
></span>
...
...
src/view/login.vue
View file @
ffd0c18f
<
template
>
<div
class=
"login"
>
<div
class=
"login-head"
>
<h1><span>
业务辅助分析
系统
</span></h1>
<h1><span>
东部战区心理战训练
系统
</span></h1>
<div>
<span
class=
"date"
v-text=
"myDate.day"
></span>
  
<span
class=
"week"
v-text=
"myDate.week"
></span>
...
...
src/view/user/yhgl.vue
View file @
ffd0c18f
...
...
@@ -442,7 +442,8 @@ export default {
this
.
index
=
index
;
},
addNew
()
{
this
.
new_user
=
{};
//需要注意的是此处尽量不用直接赋值{},会导致watch里面属性的时候出现无法输入的情况
Object
.
keys
(
this
.
new_user
).
forEach
(
key
=>
this
.
new_user
[
key
]
=
null
);
this
.
type
=
"
add
"
;
this
.
centerDialogVisible
=
true
;
},
...
...
@@ -519,67 +520,58 @@ export default {
});
},
submit
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
startLoading
();
post
(
"
api/rest/system/user/register
"
,
this
.
new_user
)
.
then
(
res
=>
{
if
(
res
!=
1
)
{
return
Promise
.
reject
({
message
:
"
用户新增失败
"
});
}
else
if
(
this
.
new_user
.
mail
)
{
return
addUser
({
password
:
this
.
new_user
.
password
,
email
:
this
.
new_user
.
mail
,
uname
:
this
.
new_user
.
username
,
tel
:
this
.
new_user
.
telephone
});
}
else
{
//没有输入邮箱
return
Promise
.
resolve
();
}
})
.
then
((
data
)
=>
{
this
.
$message
.
success
(
"
新增成功!
"
);
this
.
centerDialogVisible
=
false
;
//再次查询用户名 重新赋值
this
.
queryUser
();
endLoading
();
})
.
catch
((
err
)
=>
{
this
.
$message
.
warning
(
err
.
message
);
endLoading
();
});
startLoading
();
this
.
$refs
[
formName
].
validate
().
then
(
res
=>
{
if
(
this
.
new_user
.
mail
)
{
return
addUser
({
password
:
this
.
new_user
.
password
,
email
:
this
.
new_user
.
mail
,
uname
:
this
.
new_user
.
username
,
tel
:
this
.
new_user
.
telephone
});
}
else
{
//没有输入邮箱
return
Promise
.
resolve
();
}
}).
then
(
res
=>
{
post
(
"
api/rest/system/user/register
"
,
this
.
new_user
)
}).
then
(
res
=>
{
this
.
$message
.
success
(
"
新增成功!
"
);
this
.
centerDialogVisible
=
false
;
//再次查询用户名 重新赋值
this
.
queryUser
();
endLoading
();
}).
catch
(
err
=>
{
endLoading
();
if
(
typeof
err
==
"
boolean
"
)
{
this
.
$message
.
warning
(
"
数据验证失败
"
);
}
else
{
return
false
;
this
.
$message
.
warning
(
err
.
message
)
;
}
});
},
submit_edit
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
post
(
"
api/rest/system/user/updateUser
"
,
this
.
edit_user
)
.
then
(
res
=>
{
if
(
res
!=
1
)
{
return
Promise
.
reject
({
message
:
"
用户新增失败
"
});
}
else
if
(
this
.
edit_user
.
mail
)
{
return
addUser
({
password
:
"
3z111111
"
,
email
:
this
.
edit_user
.
mail
,
uname
:
this
.
edit_user
.
username
,
tel
:
this
.
edit_user
.
telephone
});
}
else
{
return
Promise
.
resolve
();
}
})
.
then
((
data
)
=>
{
this
.
$message
.
success
(
"
修改成功!
"
);
(
this
.
centerDialogVisible
=
false
),
this
.
queryUser
();
})
.
catch
((
err
)
=>
{
this
.
$message
.
warning
(
err
.
message
);
});
this
.
$refs
[
formName
].
validate
().
then
(
res
=>
{
if
(
this
.
edit_user
.
mail
&&
!
this
.
edit_user
.
mailReadOnly
)
{
//本次编辑增加了邮箱(如果原本有邮箱则会设置只读)
return
addUser
({
password
:
"
3z111111
"
,
email
:
this
.
edit_user
.
mail
,
uname
:
this
.
edit_user
.
username
,
tel
:
this
.
edit_user
.
telephone
});
}
else
{
//没有或者没有修改
return
Promise
.
resolve
();
}
}).
then
(
res
=>
{
res
||
(
this
.
edit_user
.
mail
=
null
);
//没有注册邮箱此处设置为空
return
post
(
"
api/rest/system/user/updateUser
"
,
this
.
edit_user
);
}).
then
(
res
=>
{
this
.
$message
.
success
(
"
修改成功!
"
);
(
this
.
centerDialogVisible
=
false
),
this
.
queryUser
();
}).
catch
(
err
=>
{
if
(
typeof
err
==
"
boolean
"
)
{
this
.
$message
.
warning
(
"
数据验证失败
"
);
}
else
{
return
false
;
this
.
$message
.
warning
(
err
.
message
)
;
}
});
},
...
...
Write
Preview
Markdown
is supported
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