Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yma16
myblogVue_django
提交
9c47af20
M
myblogVue_django
项目概览
yma16
/
myblogVue_django
通知
5
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
myblogVue_django
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
9c47af20
编写于
7月 09, 2022
作者:
yma16
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:反馈邮件功能
上级
85d0cec1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
50 addition
and
38 deletion
+50
-38
src/App.vue
src/App.vue
+2
-2
src/components/Article.vue
src/components/Article.vue
+1
-1
src/components/email/Email.vue
src/components/email/Email.vue
+47
-35
未找到文件。
src/App.vue
浏览文件 @
9c47af20
...
@@ -179,9 +179,9 @@ export default {
...
@@ -179,9 +179,9 @@ export default {
const
that
=
this
;
const
that
=
this
;
let
clientIp
=
"
未知
"
;
let
clientIp
=
"
未知
"
;
try
{
try
{
console
.
log
(
"
ip待定
"
);
console
.
warn
(
"
ip待定
"
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
warn
(
e
);
}
}
that
.
$axios
that
.
$axios
.
post
(
this
.
baseUrl
+
"
count/add/
"
,
{
.
post
(
this
.
baseUrl
+
"
count/add/
"
,
{
...
...
src/components/Article.vue
浏览文件 @
9c47af20
...
@@ -207,7 +207,7 @@
...
@@ -207,7 +207,7 @@
</div>
</div>
</div>
</div>
<template>
<template>
<Email
v-if=
"drawObj.show"
:drawObj=
"drawObj"
></Email>
<Email
:drawObj=
"drawObj"
></Email>
</
template
>
</
template
>
</div>
</div>
</template>
</template>
...
...
src/components/email/Email.vue
浏览文件 @
9c47af20
...
@@ -62,7 +62,7 @@ export default {
...
@@ -62,7 +62,7 @@ export default {
msgDrawTitle
:
"
~邮件沟通~
"
,
msgDrawTitle
:
"
~邮件沟通~
"
,
direction
:
"
rtl
"
,
direction
:
"
rtl
"
,
msgDraw
:
false
,
msgDraw
:
false
,
baseUrl
:
"
http://localhost:8006
/
"
,
baseUrl
:
"
/api
/
"
,
basePath
:
"
send-email/
"
,
basePath
:
"
send-email/
"
,
loading
:
false
,
loading
:
false
,
emailForm
:
{
emailForm
:
{
...
@@ -93,10 +93,10 @@ export default {
...
@@ -93,10 +93,10 @@ export default {
/^
([
0-9a-zA-Z_
\.\-\]
)+
\@
([0-9a-zA-Z_
\.\-\]
)+
\.
([a-zA-Z
]
+
)
$/
;
/^
([
0-9a-zA-Z_
\.\-\]
)+
\@
([0-9a-zA-Z_
\.\-\]
)+
\.
([a-zA-Z
]
+
)
$/
;
let
testEmail
=
patter
.
test
(
value
);
let
testEmail
=
patter
.
test
(
value
);
if
(
!
testEmail
)
{
if
(
!
testEmail
)
{
return
Promise
.
reject
(
"
请输入正确的邮箱格式
"
);
return
Promise
.
reject
(
"
邮箱格式有误
"
);
}
}
}
}
return
Promise
.
resolve
();
return
Promise
.
resolve
(
""
);
},
},
trigger
:
"
blur
"
,
trigger
:
"
blur
"
,
},
},
...
@@ -115,46 +115,58 @@ export default {
...
@@ -115,46 +115,58 @@ export default {
},
},
methods
:
{
methods
:
{
//关闭抽屉
//关闭抽屉
handleDrawClose
(
done
)
{
handleDrawClose
()
{
const
that
=
this
;
const
that
=
this
;
that
.
drawObj
.
show
=
false
;
that
.
drawObj
.
show
=
false
;
},
},
// 发送消息
// 发送消息
sendEmail
(
formName
)
{
sendEmail
(
formName
)
{
// 发送email内容
// 发送email内容
const
that
=
this
;
try
{
that
.
loading
=
true
;
const
that
=
this
;
that
.
$refs
[
formName
].
validate
((
valid
)
=>
{
that
.
loading
=
true
;
if
(
valid
)
{
that
.
$refs
[
formName
].
validate
((
valid
)
=>
{
const
params
=
{
if
(
valid
)
{
title
:
that
.
emailForm
.
title
,
const
params
=
{
email
:
that
.
emailForm
.
email
,
title
:
that
.
emailForm
.
title
,
content
:
that
.
emailForm
.
content
,
email
:
that
.
emailForm
.
email
,
};
content
:
that
.
emailForm
.
content
,
try
{
};
axios
.
post
(
that
.
baseUrl
+
that
.
basePath
,
params
).
then
((
res
)
=>
{
try
{
if
(
res
&&
res
.
code
&&
res
.
code
===
20000
)
{
axios
.
post
(
that
.
baseUrl
+
that
.
basePath
,
params
).
then
((
res
)
=>
{
that
.
loading
=
false
;
console
.
log
(
res
);
that
.
$message
({
if
(
message
:
"
邮件发送成功!
"
,
res
&&
type
:
"
success
"
,
res
.
data
&&
});
res
.
data
.
code
&&
that
.
drawObj
.
show
=
false
;
res
.
data
.
code
===
20000
}
else
{
)
{
that
.
$message
({
that
.
loading
=
false
;
message
:
"
邮件发送失败!
"
,
that
.
$message
({
type
:
"
warning
"
,
message
:
"
邮件发送成功!
"
,
});
type
:
"
success
"
,
}
});
});
that
.
drawObj
.
show
=
false
;
}
catch
(
r
)
{
}
else
{
that
.
loading
=
false
;
that
.
$message
({
message
:
"
邮件发送失败!
"
,
type
:
"
warning
"
,
});
}
});
}
catch
(
r
)
{
that
.
loading
=
false
;
throw
Error
(
r
);
}
}
else
{
that
.
loading
=
false
;
that
.
loading
=
false
;
throw
Error
(
r
);
}
}
}
else
{
});
that
.
loading
=
false
;
}
catch
(
r
)
{
}
that
.
loading
=
false
;
});
throw
Error
(
r
);
}
},
},
},
},
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录