mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
自定义路由
This commit is contained in:
@@ -8,7 +8,7 @@ import { getToken, removeToken } from './auth'
|
||||
// 创建axios实例
|
||||
const client = axios.create({
|
||||
baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url
|
||||
timeout: 5000 // 请求超时时间
|
||||
timeout: 10000 // 请求超时时间
|
||||
})
|
||||
|
||||
Object.assign(Vue.prototype, {
|
||||
@@ -94,6 +94,14 @@ Object.assign(Vue.prototype, {
|
||||
}
|
||||
}).catch(function() {})
|
||||
},
|
||||
/**
|
||||
* 重置表单
|
||||
* @param formName 表单元素的ref
|
||||
*/
|
||||
resetForm(formName) {
|
||||
const frm = this.$refs[formName]
|
||||
frm && frm.resetFields()
|
||||
},
|
||||
logout: function() {
|
||||
removeToken()
|
||||
const fullPath = this.$route.fullPath
|
||||
|
Reference in New Issue
Block a user