hot update

This commit is contained in:
zuiidea
2017-04-24 10:09:10 +08:00
parent 7284cad8aa
commit 6c48480031
2 changed files with 3 additions and 4 deletions
+2 -1
View File
@@ -79,8 +79,9 @@ let zuimei = {
return name
},
getWeatherByCode (num) {
getWeatherByCode (number) {
let wea = ''
let num = Number(number)
if (num === 0) {
wea = '晴'
} else if (num === 1) {
+1 -3
View File
@@ -3,11 +3,9 @@ import PropTypes from 'prop-types'
import { Router } from 'dva/router'
import App from './routes/app'
const cached = {}
const registerModel = (app, model) => {
if (!cached[model.namespace]) {
if (!(app._models.filter(m => m.namespace === model.namespace).length === 1)) {
app.model(model)
cached[model.namespace] = 1
}
}