xujing před 5 roky
rodič
revize
bb1aed578e
1 změnil soubory, kde provedl 7 přidání a 4 odebrání
  1. 7
    4
      src/pages/project/index.js

+ 7
- 4
src/pages/project/index.js Zobrazit soubor

125
   componentDidShow() {
125
   componentDidShow() {
126
 
126
 
127
     getIndexShare().then(res => {
127
     getIndexShare().then(res => {
128
-      this.setState({
129
-        shareImg: res.imgUrl,
130
-        imgDocument: res.imgDocument,
131
-      })
128
+      if (res) {
129
+
130
+        this.setState({
131
+          shareImg: res.imgUrl,
132
+          imgDocument: res.imgDocument,
133
+        })
134
+      }
132
     })
135
     })
133
     if (this.props.curCity.id) {
136
     if (this.props.curCity.id) {
134
       ready.queue(() => {
137
       ready.queue(() => {