邮箱配置
This commit is contained in:
parent
ff08e720bb
commit
2d5d7824dc
|
|
@ -9,7 +9,7 @@ export function login(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function login2(data) {
|
export function login2(data) {
|
||||||
//验证码登陆
|
//验证码登录
|
||||||
return request({
|
return request({
|
||||||
url: '/token2/',
|
url: '/token2/',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '国检集团检测能力查询平台',
|
title: '国检集团检测能力共享平台',
|
||||||
// logo: 'https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png'
|
// logo: 'https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png'
|
||||||
logo:'http://testsearch.ctc.ac.cn:8000/media/default/avatar.png'
|
logo:'http://testsearch.ctc.ac.cn:8000/media/default/avatar.png'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ const actions = {
|
||||||
const { data } = response
|
const { data } = response
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
reject('验证失败,重新登陆.')
|
reject('验证失败,重新登录.')
|
||||||
}
|
}
|
||||||
|
|
||||||
const { perms, name, avatar } = data
|
const { perms, name, avatar } = data
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import defaultSettings from '@/settings'
|
import defaultSettings from '@/settings'
|
||||||
|
|
||||||
const title = defaultSettings.title || '能力检索'
|
const title = defaultSettings.title || '能力共享'
|
||||||
|
|
||||||
export default function getPageTitle(pageTitle) {
|
export default function getPageTitle(pageTitle) {
|
||||||
if (pageTitle) {
|
if (pageTitle) {
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,8 @@ service.interceptors.response.use(
|
||||||
duration: 3 * 1000
|
duration: 3 * 1000
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
MessageBox.confirm('认证失败,请重新登陆.', '确认退出', {
|
MessageBox.confirm('认证失败,请重新登录.', '确认退出', {
|
||||||
confirmButtonText: '重新登陆',
|
confirmButtonText: '重新登录',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<div class="login-form">
|
<div class="login-form">
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<h3 class="title">国检集团检测能力查询平台</h3>
|
<h3 class="title">国检集团检测能力共享平台</h3>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs v-model="activeName" :stretch="true">
|
<el-tabs v-model="activeName" :stretch="true">
|
||||||
<el-tab-pane label="验证码登陆" name="msg">
|
<el-tab-pane label="验证码登录" name="msg">
|
||||||
<el-form
|
<el-form
|
||||||
ref="loginForm2"
|
ref="loginForm2"
|
||||||
:model="loginForm2"
|
:model="loginForm2"
|
||||||
|
|
@ -54,12 +54,12 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
style="width:100%;margin-bottom:30px;"
|
style="width:100%;margin-bottom:30px;"
|
||||||
@click.native.prevent="handleLogin2"
|
@click.native.prevent="handleLogin2"
|
||||||
>验证登陆</el-button>
|
>验证登录</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="密码登陆" name="pwd">
|
<el-tab-pane label="密码登录" name="pwd">
|
||||||
<el-form
|
<el-form
|
||||||
ref="loginForm"
|
ref="loginForm"
|
||||||
:model="loginForm"
|
:model="loginForm"
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
style="width:100%;margin-bottom:30px;"
|
style="width:100%;margin-bottom:30px;"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>登陆</el-button>
|
>登录</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ export default {
|
||||||
// TODO 提交表单
|
// TODO 提交表单
|
||||||
changePassword(this.formData).then(async(res)=>{
|
changePassword(this.formData).then(async(res)=>{
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '密码修改成功,请重新登陆',
|
message: '密码修改成功,请重新登录',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
await this.$store.dispatch('user/logout')
|
await this.$store.dispatch('user/logout')
|
||||||
|
|
|
||||||
|
|
@ -88,9 +88,9 @@ class sendMsg(APIView):
|
||||||
return Response('该账户不存在', status=status.HTTP_400_BAD_REQUEST)
|
return Response('该账户不存在', status=status.HTTP_400_BAD_REQUEST)
|
||||||
try:
|
try:
|
||||||
# 邮件内容
|
# 邮件内容
|
||||||
msg=MIMEText('您好,能力查询本次登陆验证码为' + str(code),'plain','utf-8')
|
msg=MIMEText('您好,共享平台本次登陆验证码为' + str(code),'plain','utf-8')
|
||||||
# 括号里的对应发件人邮箱昵称、发件人邮箱账号
|
# 括号里的对应发件人邮箱昵称、发件人邮箱账号
|
||||||
msg['From']=formataddr(["国检集团检测能力查询平台",my_sender])
|
msg['From']=formataddr(["国检集团检测能力共享平台",my_sender])
|
||||||
# 括号里的对应收件人邮箱昵称、收件人邮箱账号
|
# 括号里的对应收件人邮箱昵称、收件人邮箱账号
|
||||||
msg['To']=formataddr(["",my_user])
|
msg['To']=formataddr(["",my_user])
|
||||||
# 邮件的主题
|
# 邮件的主题
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue