- import user from '../user/index';
- export default {
- methods: {
- routerLogin: function (callback,loginCallback) {
- if (user.isLogin()) {
- return callback && callback();
- }
- else {
- loginCallback && loginCallback();
- return this.$router.navigateTo('login');
- }
- }
- }
- }
|