个人中心-帐号安全

master
pan 4 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. 42
      components/center/security.vue
  5. 218
      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">
export default {
import Vue from 'vue'
export default Vue.extend({
name: 'register',
data(){
return {
@ -31,5 +33,5 @@
props:{
onRegister:Function
}
}
})
</script>

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

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

@ -1,9 +1,41 @@
<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>
<script>
export default {
name: 'security'
}
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
name: 'security',
data(){
return {
form:{}
}
},
methods:{
onSubmit(){
}
}
})
</script>

@ -85,111 +85,143 @@ export default {
vueI18n: {
fallbackLocale: 'zhCN',
messages: {
zhCN: {
app_name:'云笔记',
choose_lang:'选择语言',
menus:{
document:'文档',
note:'笔记列表',
center:'个人中心',
upload:'本地上传论文'
"zhCN": {
"account": {
"form": {
"confirmPwd": "确认密码",
"input_confirmPwd": "请确认{confirmPwd}",
"input_password": "请输入{password}",
"input_user": "请输入{user}",
"password": "密码",
"user": "帐号",
"valid_account": "帐号密码正确"
},
"login": "登录",
"register": "注册"
},
zhCN: '简体中文',
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}'
"app_name": "云笔记",
"center": {
"collect": {
"name": "我的收藏"
},
"myupload": {
"name": "我的上传"
},
"security": {
"confirmpwd": "确认新密码",
"input_confirmpwd": "请确认{newpwd}",
"input_newpwd": "请输入{newpwd}",
"input_oldpwd": "请输入{oldpwd}",
"name": "帐号安全",
"newpwd": "新密码",
"oldpwd": "原密码"
}
},
account:{
login:'登录',
register:'注册',
form:{
user:'帐号',
input_user:'请输入{user}',
password:'密码',
input_password:'请输入{password}',
confirmPwd:'确认密码',
input_confirmPwd:'请确认{confirmPwd}',
valid_account:'帐号密码正确'
"choose_lang": "选择语言",
"en": "英文",
"error_404": "页面不存在",
"error_500": "发生严重异常,请联系管理员",
"logout": "注销登录",
"menus": {
"center": "个人中心",
"document": "文档",
"note": "笔记列表",
"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": "学位年度"
}
},
logout:'注销登录',
error_404:'页面不存在',
error_500:'发生严重异常,请联系管理员',
unknown_error:'未知错误',
center:{
collect:{
name:'我的收藏'
"user": "帐号",
"zhCN": "简体中文"
},
"en": {
"account": {
"form": {
"confirmPwd": "确认密码",
"input_confirmPwd": "请确认{confirmPwd}",
"input_password": "请输入{password}",
"input_user": "请输入{user}",
"password": "密码",
"user": "帐号",
"valid_account": "帐号密码正确"
},
myupload:{
name:'我的上传'
"login": "登录",
"register": "注册"
},
"app_name": "cloudnote",
"center": {
"collect": {
"name": "我的收藏"
},
"myupload": {
"name": "我的上传"
},
security:{
name:'帐号安全'
"security": {
"confirmpwd": "",
"input_confirmpwd": "",
"input_newpwd": "",
"input_oldpwd": "",
"name": "帐号安全",
"newpwd": "",
"oldpwd": ""
}
},
submit:'提交'
},
en: {
app_name:'cloudnote',
choose_lang:'language',
menus:{
document:'document',
note:'note list',
center:'个人中心',
upload:'本地上传论文'
"choose_lang": "language",
"en": "english",
"error_404": "页面不存在",
"error_500": "发生严重异常,请联系管理员",
"logout": "注销登录",
"menus": {
"center": "个人中心",
"document": "document",
"note": "note list",
"upload": "本地上传论文"
},
zhCN: 'Simplified Chinese',
en: 'english',
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:'论文'
"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": "学位年度"
}
},
account:{
login:'登录',
register:'注册',
form:{
user:'帐号',
input_user:'请输入{user}',
password:'密码',
input_password:'请输入{password}',
confirmPwd:'确认密码',
input_confirmPwd:'请确认{confirmPwd}'
}
}
"user": "帐号",
"zhCN": "Simplified Chinese"
}
}
}

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

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

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

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

Loading…
Cancel
Save