This commit is contained in:
parent
246411c839
commit
16787ae39f
|
|
@ -31,7 +31,7 @@
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label-position="left" >
|
label-position="left" >
|
||||||
<div class="test">
|
<div class="test">
|
||||||
<el-button>测试</el-button>
|
<el-button @click="sendTestMail()">测试</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
|
|
@ -39,10 +39,11 @@
|
||||||
label="系统默认发送邮件">
|
label="系统默认发送邮件">
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button>刷新</el-button>
|
<el-button @click="getMailConfig()">刷新</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="medium"
|
size="medium"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@click="saveMailConfig"
|
||||||
>保存更改</el-button>
|
>保存更改</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -75,10 +76,49 @@ export default {
|
||||||
methods:{
|
methods:{
|
||||||
getMailConfig(){
|
getMailConfig(){
|
||||||
getMailInfo().then(res=>{
|
getMailInfo().then(res=>{
|
||||||
console.log(res)
|
let data = res.data
|
||||||
|
if (data.success) {
|
||||||
this.mailForm = res.data.data
|
this.mailForm = res.data.data
|
||||||
|
}else{
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
message: data.msg
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
saveMailConfig(){
|
||||||
|
editMailInfo(this.mailForm).then(res=>{
|
||||||
|
let data = res.data
|
||||||
|
if (data.success) {
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '修改成功!'
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
message: data.msg
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
sendTestMail(){
|
||||||
|
testMailInfo().then(res=>{
|
||||||
|
let data = res.data
|
||||||
|
if (data.success) {
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '发送成功!'
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
message: data.msg
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue