瀏覽代碼

静态页面

xcx 4 年之前
父節點
當前提交
033ea69856
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. 5
    1
      src/pages/index/index.js

+ 5
- 1
src/pages/index/index.js 查看文件

@@ -123,7 +123,11 @@ export default class Index extends Component {
123 123
     const city = this.state.city || this.props.curCity
124 124
     if (city && city.id) {
125 125
       ready.queue(() => {
126
-        this.loadData({ curCity: city })
126
+        this.setState({
127
+          CityData: city
128
+        }, () => {
129
+          this.loadData({ curCity: city })
130
+        })
127 131
       })
128 132
     }
129 133
   }