mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-04-27 13:33:31 +08:00
个人中心,data挪目录
This commit is contained in:
parent
2c77cd057a
commit
d60ef3f8ef
@ -5,16 +5,16 @@
|
|||||||
"groupId" : "1952f25c81084e24b55b11385767dc38",
|
"groupId" : "1952f25c81084e24b55b11385767dc38",
|
||||||
"name" : "登录",
|
"name" : "登录",
|
||||||
"createTime" : null,
|
"createTime" : null,
|
||||||
"updateTime" : 1642773955109,
|
"updateTime" : 1643710774934,
|
||||||
"lock" : "0",
|
"lock" : "0",
|
||||||
"method" : "POST",
|
"method" : "POST",
|
||||||
"path" : "/login",
|
"path" : "/login",
|
||||||
"parameters" : [ ],
|
"parameters" : [ ],
|
||||||
"option" : "[{\"name\":\"require_login\",\"value\":\"false\",\"description\":\"该接口需要登录才允许访问\"}]",
|
"option" : "[{\"name\":\"require_login\",\"value\":\"false\",\"description\":\"该接口需要登录才允许访问\"}]",
|
||||||
"requestBody" : "{\r\n \"username\": \"admin\",\r\n \"password\": \"1\"\r\n}",
|
"requestBody" : "{\r\n \"username\": \"admin\",\r\n \"password\": \"123456\"\r\n}",
|
||||||
"headers" : [ ],
|
"headers" : [ ],
|
||||||
"paths" : [ ],
|
"paths" : [ ],
|
||||||
"responseBody" : "{\n \"code\": 0,\n \"message\": \"用户名或密码错误\",\n \"data\": null,\n \"timestamp\": 1642321857211,\n \"executeTime\": 3\n}",
|
"responseBody" : "{\n \"code\": 0,\n \"message\": \"用户名或密码错误\",\n \"data\": null,\n \"timestamp\": 1643710761990,\n \"executeTime\": 6\n}",
|
||||||
"description" : null,
|
"description" : null,
|
||||||
"requestBodyDefinition" : {
|
"requestBodyDefinition" : {
|
||||||
"name" : "",
|
"name" : "",
|
||||||
@ -41,7 +41,7 @@
|
|||||||
"children" : [ ]
|
"children" : [ ]
|
||||||
}, {
|
}, {
|
||||||
"name" : "password",
|
"name" : "password",
|
||||||
"value" : "1",
|
"value" : "123456",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"required" : false,
|
"required" : false,
|
||||||
"dataType" : "String",
|
"dataType" : "String",
|
||||||
@ -102,7 +102,7 @@
|
|||||||
"children" : [ ]
|
"children" : [ ]
|
||||||
}, {
|
}, {
|
||||||
"name" : "timestamp",
|
"name" : "timestamp",
|
||||||
"value" : "1642321857211",
|
"value" : "1643710761990",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"required" : false,
|
"required" : false,
|
||||||
"dataType" : "Long",
|
"dataType" : "Long",
|
||||||
@ -114,7 +114,7 @@
|
|||||||
"children" : [ ]
|
"children" : [ ]
|
||||||
}, {
|
}, {
|
||||||
"name" : "executeTime",
|
"name" : "executeTime",
|
||||||
"value" : "3",
|
"value" : "6",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"required" : false,
|
"required" : false,
|
||||||
"dataType" : "Integer",
|
"dataType" : "Integer",
|
@ -5,7 +5,7 @@
|
|||||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||||
"name" : "上传",
|
"name" : "上传",
|
||||||
"createTime" : null,
|
"createTime" : null,
|
||||||
"updateTime" : 1635075982440,
|
"updateTime" : 1643706737853,
|
||||||
"lock" : "0",
|
"lock" : "0",
|
||||||
"method" : "POST",
|
"method" : "POST",
|
||||||
"path" : "/upload",
|
"path" : "/upload",
|
||||||
@ -21,7 +21,7 @@
|
|||||||
"optionMap" : { }
|
"optionMap" : { }
|
||||||
}
|
}
|
||||||
================================
|
================================
|
||||||
import 'org.ssssssss.magicboot.utils.FileUtils'
|
import org.ssssssss.magicboot.utils.FileUtils
|
||||||
import request;
|
import request;
|
||||||
|
|
||||||
var map = FileUtils.saveFile(request.getFile('file'));
|
var map = FileUtils.saveFile(request.getFile('file'));
|
@ -5,7 +5,7 @@
|
|||||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||||
"name" : "删除",
|
"name" : "删除",
|
||||||
"createTime" : null,
|
"createTime" : null,
|
||||||
"updateTime" : 1635075573670,
|
"updateTime" : 1643706734133,
|
||||||
"lock" : "0",
|
"lock" : "0",
|
||||||
"method" : "GET",
|
"method" : "GET",
|
||||||
"path" : "/delete",
|
"path" : "/delete",
|
||||||
@ -21,9 +21,10 @@
|
|||||||
"optionMap" : { }
|
"optionMap" : { }
|
||||||
}
|
}
|
||||||
================================
|
================================
|
||||||
import 'java.net.URLDecoder'
|
import java.net.URLDecoder
|
||||||
import 'org.ssssssss.magicboot.model.Global'
|
import org.ssssssss.magicboot.model.Global
|
||||||
import 'org.ssssssss.magicboot.utils.FileUtils'
|
import org.ssssssss.magicboot.utils.FileUtils
|
||||||
|
import cn.hutool.core.io.FileUtil;
|
||||||
|
|
||||||
url = URLDecoder.decode(url, "UTF-8");
|
url = URLDecoder.decode(url, "UTF-8");
|
||||||
|
|
@ -4,8 +4,8 @@
|
|||||||
"script" : null,
|
"script" : null,
|
||||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||||
"name" : "排序",
|
"name" : "排序",
|
||||||
"createTime" : 1635074732708,
|
"createTime" : null,
|
||||||
"updateTime" : 1635074732708,
|
"updateTime" : 1643706726137,
|
||||||
"lock" : "0",
|
"lock" : "0",
|
||||||
"method" : "GET",
|
"method" : "GET",
|
||||||
"path" : "/resort",
|
"path" : "/resort",
|
||||||
@ -21,7 +21,7 @@
|
|||||||
"optionMap" : { }
|
"optionMap" : { }
|
||||||
}
|
}
|
||||||
================================
|
================================
|
||||||
import 'java.net.URLDecoder'
|
import java.net.URLDecoder
|
||||||
|
|
||||||
for(index,url in urls.split(',')){
|
for(index,url in urls.split(',')){
|
||||||
url = URLDecoder.decode(url, "UTF-8")
|
url = URLDecoder.decode(url, "UTF-8")
|
@ -5,7 +5,7 @@
|
|||||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||||
"name" : "裁剪",
|
"name" : "裁剪",
|
||||||
"createTime" : null,
|
"createTime" : null,
|
||||||
"updateTime" : 1635075977442,
|
"updateTime" : 1643706719537,
|
||||||
"lock" : "0",
|
"lock" : "0",
|
||||||
"method" : "POST",
|
"method" : "POST",
|
||||||
"path" : "/cropper",
|
"path" : "/cropper",
|
||||||
@ -21,8 +21,11 @@
|
|||||||
"optionMap" : { }
|
"optionMap" : { }
|
||||||
}
|
}
|
||||||
================================
|
================================
|
||||||
import 'org.ssssssss.magicboot.model.Global'
|
import org.ssssssss.magicboot.model.Global
|
||||||
import 'org.ssssssss.magicboot.utils.FileUtils'
|
import org.ssssssss.magicboot.utils.FileUtils
|
||||||
|
import cn.hutool.core.io.FileUtil;
|
||||||
|
import java.net.URLDecoder
|
||||||
|
import request;
|
||||||
|
|
||||||
url = URLDecoder.decode(url, "UTF-8");
|
url = URLDecoder.decode(url, "UTF-8");
|
||||||
String realPath = Global.getUserFilesBaseDir() + "/" + url;
|
String realPath = Global.getUserFilesBaseDir() + "/" + url;
|
34
data/magic-api/api/后台/用户管理/个人信息修改.ms
Normal file
34
data/magic-api/api/后台/用户管理/个人信息修改.ms
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"properties" : { },
|
||||||
|
"id" : "ebe40a0cf4b84192b6bbe923a0ecbd9c",
|
||||||
|
"script" : null,
|
||||||
|
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||||
|
"name" : "个人信息修改",
|
||||||
|
"createTime" : null,
|
||||||
|
"updateTime" : 1643710989215,
|
||||||
|
"lock" : "0",
|
||||||
|
"method" : "POST",
|
||||||
|
"path" : "/center/update",
|
||||||
|
"parameters" : [ ],
|
||||||
|
"option" : "[]",
|
||||||
|
"requestBody" : "{\r\n\t\r\n}",
|
||||||
|
"headers" : [ ],
|
||||||
|
"paths" : [ ],
|
||||||
|
"responseBody" : null,
|
||||||
|
"description" : null,
|
||||||
|
"requestBodyDefinition" : null,
|
||||||
|
"responseBodyDefinition" : null,
|
||||||
|
"optionMap" : { }
|
||||||
|
}
|
||||||
|
================================
|
||||||
|
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||||
|
|
||||||
|
var data = {
|
||||||
|
id,
|
||||||
|
phone,
|
||||||
|
headPortrait
|
||||||
|
}
|
||||||
|
if(newPassword){
|
||||||
|
data.password = newPassword ? SaSecureUtil.sha256(newPassword) : ''
|
||||||
|
}
|
||||||
|
return db.table('sys_user').primary('id').update(data)
|
@ -5,7 +5,7 @@
|
|||||||
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||||
"name" : "保存",
|
"name" : "保存",
|
||||||
"createTime" : null,
|
"createTime" : null,
|
||||||
"updateTime" : 1642085497821,
|
"updateTime" : 1643710594405,
|
||||||
"lock" : "0",
|
"lock" : "0",
|
||||||
"method" : "POST",
|
"method" : "POST",
|
||||||
"path" : "/save",
|
"path" : "/save",
|
||||||
@ -21,7 +21,7 @@
|
|||||||
"optionMap" : { }
|
"optionMap" : { }
|
||||||
}
|
}
|
||||||
================================
|
================================
|
||||||
import 'cn.dev33.satoken.secure.SaSecureUtil';
|
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||||
import org.ssssssss.magicapi.cache.SqlCache
|
import org.ssssssss.magicapi.cache.SqlCache
|
||||||
|
|
||||||
password = password ? SaSecureUtil.sha256(password) : ''
|
password = password ? SaSecureUtil.sha256(password) : ''
|
@ -4,8 +4,8 @@
|
|||||||
"script" : null,
|
"script" : null,
|
||||||
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||||
"name" : "获取用户信息",
|
"name" : "获取用户信息",
|
||||||
"createTime" : 1634724871155,
|
"createTime" : null,
|
||||||
"updateTime" : 1634724871155,
|
"updateTime" : 1643710783720,
|
||||||
"lock" : "0",
|
"lock" : "0",
|
||||||
"method" : "GET",
|
"method" : "GET",
|
||||||
"path" : "/info",
|
"path" : "/info",
|
||||||
@ -14,7 +14,7 @@
|
|||||||
"requestBody" : "{}",
|
"requestBody" : "{}",
|
||||||
"headers" : [ ],
|
"headers" : [ ],
|
||||||
"paths" : [ ],
|
"paths" : [ ],
|
||||||
"responseBody" : "{\n \"code\": 402,\n \"message\": \"凭证已过期\",\n \"data\": null,\n \"timestamp\": 1634093332235,\n \"executeTime\": null\n}",
|
"responseBody" : "{\n \"code\": 402,\n \"message\": \"凭证已过期\",\n \"data\": null,\n \"timestamp\": 1643710751531,\n \"executeTime\": null\n}",
|
||||||
"description" : null,
|
"description" : null,
|
||||||
"requestBodyDefinition" : null,
|
"requestBodyDefinition" : null,
|
||||||
"responseBodyDefinition" : {
|
"responseBodyDefinition" : {
|
||||||
@ -66,7 +66,7 @@
|
|||||||
"children" : [ ]
|
"children" : [ ]
|
||||||
}, {
|
}, {
|
||||||
"name" : "timestamp",
|
"name" : "timestamp",
|
||||||
"value" : "1634093332235",
|
"value" : "1643710751531",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"required" : false,
|
"required" : false,
|
||||||
"dataType" : "Long",
|
"dataType" : "Long",
|
@ -51,7 +51,7 @@
|
|||||||
</i>
|
</i>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</vuedraggable>
|
</vuedraggable>
|
||||||
<mb-dialog :visible.sync="cropperDialogVisible" @confirm-click="cropper">
|
<mb-dialog ref="cropperDialog" @confirm-click="cropper">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="cropper-content">
|
<div class="cropper-content">
|
||||||
<div class="cropper" style="text-align:center">
|
<div class="cropper" style="text-align:center">
|
||||||
@ -128,7 +128,6 @@ export default {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
isUploading: false,
|
isUploading: false,
|
||||||
cropperOption: {},
|
cropperOption: {},
|
||||||
cropperDialogVisible: false,
|
|
||||||
urls: [],
|
urls: [],
|
||||||
fileList: []
|
fileList: []
|
||||||
}
|
}
|
||||||
@ -221,7 +220,7 @@ export default {
|
|||||||
beforeCropper(url) {
|
beforeCropper(url) {
|
||||||
this.cropperOption.img = this.$filePrefix + url
|
this.cropperOption.img = this.$filePrefix + url
|
||||||
this.cropperOption.relativeImg = url
|
this.cropperOption.relativeImg = url
|
||||||
this.cropperDialogVisible = true
|
this.$refs.cropperDialog.show()
|
||||||
},
|
},
|
||||||
cropper() {
|
cropper() {
|
||||||
this.$refs.cropper.getCropBlob((data) => {
|
this.$refs.cropper.getCropBlob((data) => {
|
||||||
@ -237,7 +236,7 @@ export default {
|
|||||||
this.urls.forEach((it, i) => {
|
this.urls.forEach((it, i) => {
|
||||||
if (this.cropperOption.img.indexOf(it) !== -1) {
|
if (this.cropperOption.img.indexOf(it) !== -1) {
|
||||||
this.$set(this.urls, i, res.data.url)
|
this.$set(this.urls, i, res.data.url)
|
||||||
this.cropperDialogVisible = false
|
this.$refs.cropperDialog.hide()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
<router-link to="/">
|
<router-link to="/">
|
||||||
<el-dropdown-item>首页</el-dropdown-item>
|
<el-dropdown-item>首页</el-dropdown-item>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
<router-link to="/user-center">
|
||||||
|
<el-dropdown-item>个人中心</el-dropdown-item>
|
||||||
|
</router-link>
|
||||||
<el-dropdown-item divided @click.native="logout">
|
<el-dropdown-item divided @click.native="logout">
|
||||||
<span style="display:block;">退出</span>
|
<span style="display:block;">退出</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
@ -18,6 +18,7 @@ export const constantRoutes = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
@ -30,6 +31,19 @@ export const constantRoutes = [
|
|||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: '/user-center',
|
||||||
|
redirect: '/system/user/user-center',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
children: [{
|
||||||
|
path: '/system/user/user-center',
|
||||||
|
name: '个人中心',
|
||||||
|
component: () => import('@/views/system/user/user-center'),
|
||||||
|
meta: { title: '个人中心' }
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
component: () => import('@/views/login/index'),
|
component: () => import('@/views/login/index'),
|
||||||
|
@ -124,11 +124,13 @@ common.uuid = () => {
|
|||||||
return uuidv4().replace(/-/g, '')
|
return uuidv4().replace(/-/g, '')
|
||||||
}
|
}
|
||||||
|
|
||||||
common.objAssign = (obj1, obj2) => {
|
common.objAssign = (obj1, obj2, exclude) => {
|
||||||
for (var o1 in obj1) {
|
for (var o1 in obj1) {
|
||||||
for (var o2 in obj2) {
|
for (var o2 in obj2) {
|
||||||
if (o1 === o2) {
|
if (o1 === o2) {
|
||||||
obj1[o1] = obj2[o2]
|
if(exclude.indexOf(o1) == -1){
|
||||||
|
obj1[o1] = obj2[o2]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ const getters = {
|
|||||||
avatar: state => state.user.avatar,
|
avatar: state => state.user.avatar,
|
||||||
name: state => state.user.name,
|
name: state => state.user.name,
|
||||||
username: state => state.user.username,
|
username: state => state.user.username,
|
||||||
|
userInfo: state => state.user.info,
|
||||||
roles: state => state.user.roles,
|
roles: state => state.user.roles,
|
||||||
permission_routes: state => state.permission.routes,
|
permission_routes: state => state.permission.routes,
|
||||||
errorLogs: state => state.errorLog.logs
|
errorLogs: state => state.errorLog.logs
|
||||||
|
@ -25,6 +25,9 @@ const mutations = {
|
|||||||
},
|
},
|
||||||
SET_USERNAME: (state, username) => {
|
SET_USERNAME: (state, username) => {
|
||||||
state.username = username
|
state.username = username
|
||||||
|
},
|
||||||
|
SET_INFO: (state, info) => {
|
||||||
|
state.info = info
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,6 +60,7 @@ const actions = {
|
|||||||
authorities_.push(data.authorities[i])
|
authorities_.push(data.authorities[i])
|
||||||
}
|
}
|
||||||
Vue.prototype.$authorities = authorities_
|
Vue.prototype.$authorities = authorities_
|
||||||
|
commit('SET_INFO', data)
|
||||||
commit('SET_NAME', data.name)
|
commit('SET_NAME', data.name)
|
||||||
commit('SET_USERNAME', data.username)
|
commit('SET_USERNAME', data.username)
|
||||||
resolve()
|
resolve()
|
||||||
|
100
magic-boot-ui/src/views/system/user/user-center.vue
Normal file
100
magic-boot-ui/src/views/system/user/user-center.vue
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form ref="dataForm" :rules="rules" :model="temp" label-position="right" label-width="80px" style="width: 800px">
|
||||||
|
<el-form-item label="头像" prop="headPortrait">
|
||||||
|
<mb-upload-image v-model="temp.headPortrait" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="姓名/昵称" prop="name">
|
||||||
|
<el-input v-model="temp.name" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="手机号" prop="phone">
|
||||||
|
<el-input v-model.integer="temp.phone" maxlength="11" autocomplete="new-password" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="原密码" prop="password">
|
||||||
|
<el-input v-model="temp.password" type="password" autocomplete="new-password" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="新密码" prop="newPassword">
|
||||||
|
<el-input v-model="temp.newPassword" type="password" autocomplete="new-password" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="确认密码" prop="confirmPassword">
|
||||||
|
<el-input v-model="temp.confirmPassword" type="password" autocomplete="new-password" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button class="filter-item" type="primary" @click="save">
|
||||||
|
提交
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'UserCenter',
|
||||||
|
data() {
|
||||||
|
var validatePass2 = (rule, value, callback) => {
|
||||||
|
if(this.temp.newPassword){
|
||||||
|
if (value === '') {
|
||||||
|
callback(new Error('请再次输入密码'));
|
||||||
|
} else if (value !== this.temp.newPassword) {
|
||||||
|
callback(new Error('两次输入密码不一致!'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
rules: {
|
||||||
|
password: [{ required: true, message: '请输入原密码', trigger: 'change' }, { min: 6, message: '密码不少于6位' }],
|
||||||
|
phone: [{ min: 11, message: '请输入11位手机号', trigger: 'change' }],
|
||||||
|
newPassword: [{ min: 6, message: '密码不少于6位' }],
|
||||||
|
confirmPassword: [{ min: 6, message: '密码不少于6位' }, { validator: validatePass2 }],
|
||||||
|
},
|
||||||
|
temp: this.getTemp()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$common.objAssign(this.temp, this.$store.getters.userInfo, ['password'])
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getTemp() {
|
||||||
|
return {
|
||||||
|
id: '',
|
||||||
|
name: '',
|
||||||
|
password: '',
|
||||||
|
phone: '',
|
||||||
|
headPortrait: '',
|
||||||
|
newPassword: '',
|
||||||
|
confirmPassword: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
resetTemp() {
|
||||||
|
this.temp = this.getTemp()
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
save() {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$request({
|
||||||
|
url: 'user/center/update',
|
||||||
|
method: 'post',
|
||||||
|
params: this.temp
|
||||||
|
}).then((response) => {
|
||||||
|
this.$notify({
|
||||||
|
title: '成功',
|
||||||
|
message: '修改成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -44,7 +44,7 @@ magic-api:
|
|||||||
enable: true #开启缓存,默认是不开启的
|
enable: true #开启缓存,默认是不开启的
|
||||||
ttl: 3600000 #有效期1小时,默认-1 即永不过期
|
ttl: 3600000 #有效期1小时,默认-1 即永不过期
|
||||||
resource:
|
resource:
|
||||||
location: classpath:data/magic-api
|
location: data/magic-api
|
||||||
response-code-config:
|
response-code-config:
|
||||||
success: 200 #执行成功的code值
|
success: 200 #执行成功的code值
|
||||||
invalid: 400 #参数验证未通过的code值
|
invalid: 400 #参数验证未通过的code值
|
||||||
|
Loading…
x
Reference in New Issue
Block a user