判断是否登录。

feature_0521
kevin jiang 5 years ago
parent abf4f2ce10
commit 4798e009ba

@ -13,6 +13,8 @@
</template>
<script>
import {checkLogin} from "../../utils/Common";
export default {
name: "OrganizationMain",
data() {
@ -22,6 +24,7 @@
}
},
created() {
checkLogin();
this.threeLevel = JSON.parse(sessionStorage.getItem("threeLevel"));
this.menuInit();
},

@ -51,6 +51,7 @@
import zeroExtend from "../../services/customer/zeroExtend";
import staff from "../../services/staff/staff";
import IncreaseData from "../../services/generalize/IncreaseData";
import {checkLogin} from "../../utils/Common";
export default {
data() {
@ -200,6 +201,9 @@
shopList: [], //
}
},
created() {
checkLogin();
},
mounted: function () {
this.getSelectList();
this.listRoleInfo();

@ -18,6 +18,13 @@ export function goToLogin() {
roter.push("/login");
}
export function checkLogin() {
// store.commit("LOGOUT");
if(!sessionStorage.getItem("loginInfo")){
goToLogin();
}
}
export function formatDate(dt) {
dt = new Date(dt);
let year = dt.getFullYear();

Loading…
Cancel
Save