-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c1bfd7
commit eacc03f
Showing
16 changed files
with
215 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
BASE_URL = '/myview' | ||
VUE_APP = 'MYVIEW_ADMIN' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Mock from './mock' | ||
|
||
export default Mock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import SysMenu from './types/SysMenu' | ||
const Mock = require('mockjs') | ||
|
||
Mock.mock('/api/data', 'get', (req, res) => { | ||
let sysMenu = new SysMenu() | ||
sysMenu.mid = '1213' | ||
return { | ||
success: true, | ||
data: sysMenu, | ||
msg: 'success' | ||
} | ||
}) | ||
|
||
Mock.mock('/api/login', 'post', (req, res) => { | ||
return { | ||
success: true, | ||
data: {}, | ||
msg: '登录成功' | ||
} | ||
}) | ||
|
||
export default Mock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export default class { | ||
|
||
constructor () { | ||
this.mid = '' | ||
this.mkey = '' | ||
this.mname = '' | ||
} | ||
|
||
private mid: String | ||
private mkey: String | ||
private mname: String | ||
|
||
setMid(mid:String): void { | ||
this.mid = mid | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
export default class { | ||
|
||
constructor () { | ||
this.userid = '' | ||
this.username = '' | ||
this.usersex = '' | ||
this.birthday = '' | ||
this.password = '' | ||
this.nickname = '' | ||
this.email = '' | ||
this.createdate = '' | ||
this.modifydate = '' | ||
this.isadmin = '' | ||
this.age = '' | ||
this.loginip = '' | ||
this.userstatus = '' | ||
this.error = '' | ||
this.islock = '' | ||
} | ||
private userid:String | ||
private username:String | ||
private usersex:String | ||
private birthday:String | ||
private password:String | ||
private nickname:String | ||
private email:String | ||
private createdate:String | ||
private modifydate:String | ||
private isadmin:String | ||
private age:String | ||
private loginip:String | ||
private userstatus:String | ||
private error:String | ||
private islock:String | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<template> | ||
<div class="copy-right"> | ||
|
||
<h1>Copy Right</h1> | ||
</div> | ||
</template> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
export default class { | ||
|
||
constructor () { | ||
this.userid = '' | ||
this.username = '' | ||
this.usersex = '' | ||
this.birthday = '' | ||
this.password = '' | ||
this.nickname = '' | ||
this.email = '' | ||
this.createdate = '' | ||
this.modifydate = '' | ||
this.isadmin = '' | ||
this.age = '' | ||
this.loginip = '' | ||
this.userstatus = '' | ||
this.error = '' | ||
this.islock = '' | ||
} | ||
private userid:String | ||
private username:String | ||
private usersex:String | ||
private birthday:String | ||
private password:String | ||
private nickname:String | ||
private email:String | ||
private createdate:String | ||
private modifydate:String | ||
private isadmin:String | ||
private age:String | ||
private loginip:String | ||
private userstatus:String | ||
private error:String | ||
private islock:String | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Vue from 'vue' | ||
|
||
export default new Vue() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import vueplugin from './vueplugin' | ||
|
||
export default vueplugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import axios from 'axios' | ||
|
||
const request = function (option = {}) { | ||
const _request = axios.create({ | ||
withCredentials: true, | ||
charset: 'UTF_8', | ||
timeout: 300000, | ||
baseURL: process.env.BASE_URL | ||
}) | ||
|
||
// 以下是响应拦截器 | ||
_request.interceptors.response.use(res => { | ||
console.log('拦截到请求响应') | ||
return res.data | ||
}) | ||
|
||
// 以下是请求拦截器 | ||
_request.interceptors.request.use(req => { | ||
return req | ||
}) | ||
|
||
return _request | ||
} | ||
|
||
export default request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import request from './request' | ||
import bus from './bus' | ||
|
||
let vueplugin = {} | ||
|
||
vueplugin.install = function (Vue, options) { | ||
Vue.prototype.$axios = request() | ||
Vue.prototype.$bus = bus | ||
} | ||
|
||
export default vueplugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
<template> | ||
<div> | ||
<h1>SysPage1</h1> | ||
<h1>SysPage1__</h1> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import axios from 'axios' | ||
export default { | ||
name: 'SysPage1' | ||
name: 'SysPage1', | ||
mounted () { | ||
console.log('请求开始') | ||
axios.get('/api/data').then( res => { | ||
console.dir(res) | ||
}) | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters