Authored by TaoHuang

fix login

@@ -18,7 +18,7 @@ export default { @@ -18,7 +18,7 @@ export default {
18 this.$emit('click', {uid: user.uid}); 18 this.$emit('click', {uid: user.uid});
19 } else { 19 } else {
20 this.$emit('cancel'); 20 this.$emit('cancel');
21 - this.$yoho.goLogin(); 21 + this.$sdk.goLogin();
22 } 22 }
23 } 23 }
24 }, 24 },
@@ -13,6 +13,7 @@ import {forEach, fill} from 'lodash'; @@ -13,6 +13,7 @@ import {forEach, fill} from 'lodash';
13 import {createNamespacedHelpers} from 'vuex'; 13 import {createNamespacedHelpers} from 'vuex';
14 const {mapActions} = createNamespacedHelpers('user'); 14 const {mapActions} = createNamespacedHelpers('user');
15 const {mapActions: articleMapActions} = createNamespacedHelpers('article'); 15 const {mapActions: articleMapActions} = createNamespacedHelpers('article');
  16 +import cookie from 'yoho-cookie';
16 17
17 const classMap = { 18 const classMap = {
18 fav: { 19 fav: {
@@ -6,6 +6,8 @@ import {createApp} from './app'; @@ -6,6 +6,8 @@ import {createApp} from './app';
6 import {createApi} from 'create-api'; 6 import {createApi} from 'create-api';
7 import {Style, Toast, Dialog, ActionSheet} from 'cube-ui'; //eslint-disable-line 7 import {Style, Toast, Dialog, ActionSheet} from 'cube-ui'; //eslint-disable-line
8 import Prompt from 'plugins/grass-prompt'; 8 import Prompt from 'plugins/grass-prompt';
  9 +import bus from 'plugins/bus';
  10 +
9 import {get} from 'lodash'; 11 import {get} from 'lodash';
10 import Lazy from 'vue-lazyload'; 12 import Lazy from 'vue-lazyload';
11 import yoho from 'common/yoho'; 13 import yoho from 'common/yoho';
@@ -38,6 +40,8 @@ Vue.prop('auth', function() { @@ -38,6 +40,8 @@ Vue.prop('auth', function() {
38 40
39 return true; 41 return true;
40 }); 42 });
  43 +
  44 +Vue.prop('bus', bus());
41 Vue.use(Prompt); 45 Vue.use(Prompt);
42 Vue.use(Toast); 46 Vue.use(Toast);
43 Vue.use(Dialog); 47 Vue.use(Dialog);
@@ -45,7 +49,6 @@ Vue.use(ActionSheet); @@ -45,7 +49,6 @@ Vue.use(ActionSheet);
45 Vue.prop('api', createApi(context, store)); 49 Vue.prop('api', createApi(context, store));
46 Vue.use(Lazy, {error: ''}); 50 Vue.use(Lazy, {error: ''});
47 51
48 -  
49 InitClient(store); 52 InitClient(store);
50 53
51 const trackPage = (path) => { 54 const trackPage = (path) => {
  1 +import Vue from 'vue';
  2 +
  3 +export default () => {
  4 + return new Vue();
  5 +};