|
|
@@ -1,24 +1,29 @@
|
|
|
<template>
|
|
|
<div class="tab">
|
|
|
- <h1 class="title">
|
|
|
- 个人信息设置
|
|
|
- <c-tag theme="blue">教师</c-tag>
|
|
|
- </h1>
|
|
|
- <c-button block theme="blue" class="mb-24" @click="handleToQuestions">题库设置</c-button>
|
|
|
- <div class="sub-title">修改姓名</div>
|
|
|
- <c-input :placeholder="'目前资料中的姓名:' + userInfo.name" class="mb-16" v-model="newName"></c-input>
|
|
|
- <c-button theme="orange" block class="mb-32" @click="handleModifyName">确认修改姓名</c-button>
|
|
|
- <div class="sub-title">修改密码</div>
|
|
|
- <div class="verified-code-wrapper">
|
|
|
- <c-input placeholder="邮箱验证码" type="number" v-model="this.code"></c-input>
|
|
|
- <c-button theme="blue" :no-click-warn="typeof this.emailButtonContent === typeof 0"
|
|
|
- @click="handleSendEmailCode">{{ emailButtonContent }}
|
|
|
- </c-button>
|
|
|
+ <div class="left">
|
|
|
+ <h1 class="title">
|
|
|
+ 个人信息设置
|
|
|
+ <c-tag theme="blue">教师</c-tag>
|
|
|
+ </h1>
|
|
|
+ <c-button block theme="blue" class="mb-24" @click="handleToQuestions">题库设置</c-button>
|
|
|
+ <div class="sub-title">修改姓名</div>
|
|
|
+ <c-input :placeholder="'目前资料中的姓名:' + userInfo.name" class="mb-16" v-model="newName"></c-input>
|
|
|
+ <c-button theme="orange" block class="mb-32" @click="handleModifyName">确认修改姓名</c-button>
|
|
|
+ <div class="sub-title">修改密码</div>
|
|
|
+ <div class="verified-code-wrapper">
|
|
|
+ <c-input placeholder="邮箱验证码" type="number" v-model="this.code"></c-input>
|
|
|
+ <c-button theme="blue" :no-click-warn="typeof this.emailButtonContent === typeof 0"
|
|
|
+ @click="handleSendEmailCode">{{ emailButtonContent }}
|
|
|
+ </c-button>
|
|
|
+ </div>
|
|
|
+ <c-input placeholder="新密码" type="password" class="mb-16" v-model="password"></c-input>
|
|
|
+ <c-input placeholder="确认新密码" type="password" class="mb-16" v-model="passwordEnsure"></c-input>
|
|
|
+ <c-button block theme="orange" class="mb-32" @click="handleModifyPassword">确认修改密码</c-button>
|
|
|
+ <c-button block theme="red" @click="handleLogout">登出</c-button>
|
|
|
</div>
|
|
|
- <c-input placeholder="新密码" type="password" class="mb-16" v-model="password"></c-input>
|
|
|
- <c-input placeholder="确认新密码" type="password" class="mb-16" v-model="passwordEnsure"></c-input>
|
|
|
- <c-button block theme="orange" class="mb-32" @click="handleModifyPassword">确认修改密码</c-button>
|
|
|
- <c-button block theme="red" @click="handleLogout">登出</c-button>
|
|
|
+ <slide-in-different-transition>
|
|
|
+ <router-view/>
|
|
|
+ </slide-in-different-transition>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -29,9 +34,10 @@ import { sendEmailCode } from '@/server/code'
|
|
|
import { logout, modifyUser, resetPasswordByEmail } from '@/server/user'
|
|
|
import { mapState } from 'vuex'
|
|
|
import CTag from '@/components/Basic/CTag'
|
|
|
+import SlideInDifferentTransition from '@/animations/SlideInDifferentTransition'
|
|
|
|
|
|
export default {
|
|
|
- components: { CTag, CInput, CButton },
|
|
|
+ components: { CTag, CInput, CButton, SlideInDifferentTransition },
|
|
|
data () {
|
|
|
return {
|
|
|
emailButtonContent: '发送验证码',
|