-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from itguide/v2
add address
- Loading branch information
Showing
20 changed files
with
964 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,5 @@ | ||
const isProdMode = Object.is(process.env.NODE_ENV, 'production') | ||
|
||
module.exports = { | ||
baseUrl: isProdMode ? 'http://api.zhenfan.shudong.wang/api/' : 'api/' | ||
} |
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
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,20 @@ | ||
/** | ||
* Created by jacksoft on 17/4/26. | ||
*/ | ||
Date.prototype.Format = function (fmt) { | ||
var o = { | ||
"M+": this.getMonth() + 1, //月份 | ||
"d+": this.getDate(), //日 | ||
"h+": this.getHours(), //小时 | ||
"m+": this.getMinutes(), //分 | ||
"s+": this.getSeconds(), //秒 | ||
"q+": Math.floor((this.getMonth() + 3) / 3), //季度 | ||
"S": this.getMilliseconds() //毫秒 | ||
}; | ||
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); | ||
for (var k in o) | ||
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); | ||
return fmt; | ||
} | ||
|
||
module.exports = {}; |
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,28 @@ | ||
import Vue from 'vue' | ||
import axios from 'axios' | ||
import apiConfig from '../../config/api.config' | ||
// import { getCookie,signOut,isLogin } from '../utils/authService' | ||
const service = axios.create({ | ||
baseURL: apiConfig.baseUrl | ||
}) | ||
|
||
// 拦截器 | ||
// service.interceptors.request.use(config => { | ||
// if (isLogin()) { | ||
// let token = getCookie('token').replace(/(^\")|(\"$)/g, ''); | ||
// config.headers.Authorization = `Bearer ${token}`; | ||
// return config; | ||
// } | ||
// return config | ||
// }, error => { | ||
// return Promise.reject(error) | ||
// }) | ||
|
||
// service.interceptors.response.use(response => { | ||
// return response | ||
// }, error => { | ||
// return Promise.reject(error) | ||
// }) | ||
|
||
Vue.prototype.$http = axios | ||
export default service |
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
Oops, something went wrong.