This commit is contained in:
saplf
2019-09-05 23:24:49 +08:00
parent df25ff4244
commit c8f919ce5a
19 changed files with 658 additions and 37 deletions

View File

@@ -1,7 +1,7 @@
import { Model } from 'dva';
import _ from 'lodash';
import { getLocale, setLocale } from 'umi-plugin-locale'
import { loadUser, storeUser, clearUser, clearMineList, clearCoins } from '@/utils/storage';
import { loadUser, storeUser, clearUser, clearMineList, clearCoins, clearDrawCoins } from '@/utils/storage';
import { User } from '@/types/common';
const initState = () => {
@@ -47,6 +47,7 @@ const model: Model = {
*logout(_, { put, all }) {
clearMineList();
clearCoins();
clearDrawCoins();
yield all([
put({ type: 'clearUser' }),
put({ type: 'home/clear' }),