个人中心-帐号安全

master
pan 5 years ago
parent 8619804a87
commit 7aeb30bd07
  1. 6
      components/account/register.vue
  2. 2
      components/center/collect.vue
  3. 2
      components/center/myupload.vue
  4. 40
      components/center/security.vue
  5. 222
      nuxt.config.js
  6. 5
      pages/index/center.vue
  7. 6
      pages/index/document.vue
  8. 6
      pages/index/note.vue
  9. 23
      pages/index/upload.vue

@ -17,7 +17,9 @@
<script lang="ts"> <script lang="ts">
export default { import Vue from 'vue'
export default Vue.extend({
name: 'register', name: 'register',
data(){ data(){
return { return {
@ -31,5 +33,5 @@
props:{ props:{
onRegister:Function onRegister:Function
} }
} })
</script> </script>

@ -2,7 +2,7 @@
<h1>我的收藏</h1> <h1>我的收藏</h1>
</template> </template>
<script> <script lang="ts">
export default { export default {
name: 'collect' name: 'collect'
} }

@ -2,7 +2,7 @@
<h1>我的上传</h1> <h1>我的上传</h1>
</template> </template>
<script> <script lang="ts">
export default { export default {
name: 'myupload' name: 'myupload'
} }

@ -1,9 +1,41 @@
<template> <template>
<h1>帐号安全</h1> <el-form ref="form" :model="form" label-width="100px">
<el-form-item :label="$t('center.security.oldpwd')">
<el-col :span="4">
<el-input type="password" :placeholder="$t('center.security.input_oldpwd',{oldpwd:$t('center.security.oldpwd')})"/>
</el-col>
</el-form-item>
<el-form-item :label="$t('center.security.newpwd')">
<el-col :span="4">
<el-input type="password" :placeholder="$t('center.security.input_newpwd',{newpwd:$t('center.security.newpwd')})"/>
</el-col>
</el-form-item>
<el-form-item :label="$t('center.security.confirmpwd')">
<el-col :span="4">
<el-input type="password" :placeholder="$t('center.security.input_confirmpwd',{newpwd:$t('center.security.newpwd')})"/>
</el-col>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">{{$t('submit')}}</el-button>
</el-form-item>
</el-form>
</template> </template>
<script> <script lang="ts">
export default { import Vue from 'vue'
name: 'security'
export default Vue.extend({
name: 'security',
data(){
return {
form:{}
}
},
methods:{
onSubmit(){
}
} }
})
</script> </script>

@ -85,111 +85,143 @@ export default {
vueI18n: { vueI18n: {
fallbackLocale: 'zhCN', fallbackLocale: 'zhCN',
messages: { messages: {
zhCN: { "zhCN": {
app_name:'云笔记', "account": {
choose_lang:'选择语言', "form": {
menus:{ "confirmPwd": "确认密码",
document:'文档', "input_confirmPwd": "请确认{confirmPwd}",
note:'笔记列表', "input_password": "请输入{password}",
center:'个人中心', "input_user": "请输入{user}",
upload:'本地上传论文' "password": "密码",
}, "user": "帐号",
zhCN: '简体中文', "valid_account": "帐号密码正确"
en: '英文',
user: '帐号',
upload:{
form:{
type:'论文类型',
input_type:'请输入{type}',
author:'论文作者',
input_author:'请输入{author}',
profession:'学科专业',
input_profession:'请输入{profession}',
school:'学校',
input_school:'请输入{school}',
year:'学位年度',
input_year:'请输入{year}',
summary:'摘要',
input_summary:'请输入{summary}',
tag:'论文标签',
content:'论文',
upload:'点击上传',
upload_tip:'只能上传txt',
remove:'确定移除{file}'
}
}, },
account:{ "login": "登录",
login:'登录', "register": "注册"
register:'注册',
form:{
user:'帐号',
input_user:'请输入{user}',
password:'密码',
input_password:'请输入{password}',
confirmPwd:'确认密码',
input_confirmPwd:'请确认{confirmPwd}',
valid_account:'帐号密码正确'
}
}, },
logout:'注销登录', "app_name": "云笔记",
error_404:'页面不存在', "center": {
error_500:'发生严重异常,请联系管理员', "collect": {
unknown_error:'未知错误', "name": "我的收藏"
center:{
collect:{
name:'我的收藏'
}, },
myupload:{ "myupload": {
name:'我的上传' "name": "我的上传"
}, },
security:{ "security": {
name:'帐号安全' "confirmpwd": "确认新密码",
"input_confirmpwd": "请确认{newpwd}",
"input_newpwd": "请输入{newpwd}",
"input_oldpwd": "请输入{oldpwd}",
"name": "帐号安全",
"newpwd": "新密码",
"oldpwd": "原密码"
} }
}, },
submit:'提交' "choose_lang": "选择语言",
}, "en": "英文",
en: { "error_404": "页面不存在",
app_name:'cloudnote', "error_500": "发生严重异常,请联系管理员",
choose_lang:'language', "logout": "注销登录",
menus:{ "menus": {
document:'document', "center": "个人中心",
note:'note list', "document": "文档",
center:'个人中心', "note": "笔记列表",
upload:'本地上传论文' "upload": "本地上传论文"
}, },
zhCN: 'Simplified Chinese', "submit": "提交",
en: 'english', "unknown_error": "未知错误",
user: '帐号', "upload": {
upload:{ "form": {
form:{ "author": "论文作者",
type:'论文类型', "content": "论文",
input_type:'请输入{type}', "input_author": "请输入{author}",
author:'论文作者', "input_profession": "请输入{profession}",
input_author:'请输入{author}', "input_school": "请输入{school}",
profession:'学科专业', "input_summary": "请输入{summary}",
input_profession:'请输入{profession}', "input_type": "请输入{type}",
school:'学校', "input_year": "请输入{year}",
input_school:'请输入{school}', "profession": "学科专业",
year:'学位年度', "remove": "确定移除{file}",
input_year:'请输入{year}', "school": "学校",
summary:'摘要', "summary": "摘要",
input_summary:'请输入{summary}', "tag": "论文标签",
tag:'论文标签', "type": "论文类型",
content:'论文' "upload": "点击上传",
"upload_tip": "只能上传txt",
"year": "学位年度"
} }
}, },
account:{ "user": "帐号",
login:'登录', "zhCN": "简体中文"
register:'注册', },
form:{ "en": {
user:'帐号', "account": {
input_user:'请输入{user}', "form": {
password:'密码', "confirmPwd": "确认密码",
input_password:'请输入{password}', "input_confirmPwd": "请确认{confirmPwd}",
confirmPwd:'确认密码', "input_password": "请输入{password}",
input_confirmPwd:'请确认{confirmPwd}' "input_user": "请输入{user}",
"password": "密码",
"user": "帐号",
"valid_account": "帐号密码正确"
},
"login": "登录",
"register": "注册"
},
"app_name": "cloudnote",
"center": {
"collect": {
"name": "我的收藏"
},
"myupload": {
"name": "我的上传"
},
"security": {
"confirmpwd": "",
"input_confirmpwd": "",
"input_newpwd": "",
"input_oldpwd": "",
"name": "帐号安全",
"newpwd": "",
"oldpwd": ""
} }
},
"choose_lang": "language",
"en": "english",
"error_404": "页面不存在",
"error_500": "发生严重异常,请联系管理员",
"logout": "注销登录",
"menus": {
"center": "个人中心",
"document": "document",
"note": "note list",
"upload": "本地上传论文"
},
"submit": "提交",
"unknown_error": "未知错误",
"upload": {
"form": {
"author": "论文作者",
"content": "论文",
"input_author": "请输入{author}",
"input_profession": "请输入{profession}",
"input_school": "请输入{school}",
"input_summary": "请输入{summary}",
"input_type": "请输入{type}",
"input_year": "请输入{year}",
"profession": "学科专业",
"remove": "确定移除{file}",
"school": "学校",
"summary": "摘要",
"tag": "论文标签",
"type": "论文类型",
"upload": "点击上传",
"upload_tip": "只能上传txt",
"year": "学位年度"
} }
},
"user": "帐号",
"zhCN": "Simplified Chinese"
} }
} }
} }

@ -16,8 +16,9 @@
import Security from '~/components/center/security.vue' import Security from '~/components/center/security.vue'
import Collect from '~/components/center/collect.vue' import Collect from '~/components/center/collect.vue'
import Myupload from '~/components/center/myupload.vue' import Myupload from '~/components/center/myupload.vue'
import Vue from 'vue'
export default { export default Vue.extend({
name: 'center', name: 'center',
components: { Myupload, Collect, Security }, components: { Myupload, Collect, Security },
data(){ data(){
@ -25,6 +26,6 @@
activeName:'Security' activeName:'Security'
} }
} }
} })
</script> </script>

@ -3,7 +3,9 @@
</template> </template>
<script lang="ts"> <script lang="ts">
export default { import Vue from 'vue'
export default Vue.extend({
name: 'document' name: 'document'
} })
</script> </script>

@ -3,7 +3,9 @@
</template> </template>
<script lang="ts"> <script lang="ts">
export default { import Vue from 'vue'
export default Vue.extend({
name: 'note' name: 'note'
} })
</script> </script>

@ -77,8 +77,10 @@
</el-form> </el-form>
</template> </template>
<script> <script lang="ts">
export default { import Vue from 'vue'
export default Vue.extend({
name: 'upload', name: 'upload',
data() { data() {
return { return {
@ -107,14 +109,15 @@
}, },
methods: { methods: {
// //
handleClose(tag) { handleClose(tag:string) {
this.form.tag.dynamicTags.splice(this.form.tag.dynamicTags.indexOf(tag), 1) this.form.tag.dynamicTags.splice(this.form.tag.dynamicTags.indexOf(tag), 1)
}, },
// //
showInput() { showInput() {
this.form.tag.inputVisible = true this.form.tag.inputVisible = true
this.$nextTick(_ => { let that=this
this.$refs.saveTagInput.$refs.input.focus() this.$nextTick(() => {
that.$refs.saveTagInput.$refs.input.focus()
}) })
}, },
// //
@ -128,21 +131,21 @@
this.form.tag.inputValue = '' this.form.tag.inputValue = ''
}, },
// //
handleRemove(file, fileList) { handleRemove(file: any, fileList: any) {
console.log(file, fileList) console.log(file, fileList)
}, },
// //
handlePreview(file) { handlePreview(file: any) {
console.log(file) console.log(file)
}, },
// //
beforeRemove(file, fileList) { beforeRemove(file: { name: string }, fileList: any) {
return this.$confirm($t('upload.form.remove',{file:file.name})) return this.$confirm(this.$t('upload.form.remove',{file:file.name}))
}, },
// //
onSubmit(){ onSubmit(){
} }
} }
} })
</script> </script>

Loading…
Cancel
Save