xujing hace 5 años
padre
commit
bb1aed578e
Se han modificado 1 ficheros con 7 adiciones y 4 borrados
  1. 7
    4
      src/pages/project/index.js

+ 7
- 4
src/pages/project/index.js Ver fichero

@@ -125,10 +125,13 @@ export default class Index extends Component {
125 125
   componentDidShow() {
126 126
 
127 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 136
     if (this.props.curCity.id) {
134 137
       ready.queue(() => {