You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
632 B
JavaScript

6 years ago
/**
* 公共的JS类
* @author dexiang.jiang
* @date 2019/04/18 11:15
* @company kiisoo
*/
5 years ago
import roter from "../router";
6 years ago
// import store from '../store'
/**
* 跳转到登录页面
* @author dexiang.jiang
* @date 2019/04/18 11:19
*/
5 years ago
export function goToLogin() {
6 years ago
// store.commit("LOGOUT");
5 years ago
roter.push("/login");
6 years ago
}
5 years ago
export function formatDate(dt) {
dt = new Date(dt);
let year = dt.getFullYear();
let month = dt.getMonth() + 1;
let day = dt.getDate();
month = month < 10 ? "0" + month : month;
day = day < 10 ? "0" + day : day;
return year + "-" + month + "-" + day;
6 years ago
}
5 years ago
export default {
goToLogin,
};