Skip to content

Commit

Permalink
[feature]{develop}: 去掉部分重复代码 修改开发环境端口号
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Jul 23, 2019
1 parent 76ccc0b commit 53d4912
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* @Last Modified time: 2018-12-23 10:57:18
*/

VUE_APP_BASE_URL=http://localhost:8089/
VUE_APP_BASE_URL=http://localhost:6543/
24 changes: 1 addition & 23 deletions src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export function DateTimeFormat(time) {

/**
* 时间戳转标准时间格式
* @param {String} timestamp
* @param {String} timestamp
*/
export function timestampToTime(timestamp) {
const date = new Date(timestamp); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
Expand All @@ -126,17 +126,6 @@ export function timestampToTime(timestamp) {
}


/**
* 获取当前日期 2019年01月01日
*/
export function DateTimeNow() {
const date = new Date();
const Y = `${date.getFullYear()}年`;
const M = `${date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1}月`;
const D = `${date.getDate()}日`;
return Y + M + D;
}

/**
* 获取当前日期 2019-01-11
*/
Expand All @@ -147,14 +136,3 @@ export function DateTimeNowSplit() {
const D = `${date.getDate()}`;
return Y + M + D;
}

/**
* yyyy-MM-dd HH:mm:ss 转 2019年1月1日
*/
export function DateTimeFormat(time) {
let date = time.split(' ')[0];
date = date.replace('-', '年');
date = date.replace('-', '月');
date += '日';
return date;
}

0 comments on commit 53d4912

Please sign in to comment.