xujing 5 年之前
父節點
當前提交
734fb33887
共有 1 個檔案被更改,包括 11 行新增10 行删除
  1. 11
    10
      src/pages/project/index.js

+ 11
- 10
src/pages/project/index.js 查看文件

97
 
97
 
98
       Taro.hideTabBar()
98
       Taro.hideTabBar()
99
       this.getLocation()
99
       this.getLocation()
100
+      this.getIndexShareInfo()
100
 
101
 
101
       Taro.setNavigationBarTitle({ title: this.props.userInfo.miniApp.name })
102
       Taro.setNavigationBarTitle({ title: this.props.userInfo.miniApp.name })
102
 
103
 
113
       })
114
       })
114
     })
115
     })
115
   }
116
   }
116
-
117
+  getIndexShareInfo() {
118
+    getIndexShare().then(res => {
119
+      this.setState({
120
+        shareImg: (res || {}).imgUrl,
121
+        imgDocument: (res || {}).imgDocument,
122
+      })
123
+      console.log(res, '首页分享信息')
124
+    })
125
+  }
117
 
126
 
118
   toChatList() {
127
   toChatList() {
119
     // const { dispatch } = getStore()
128
     // const { dispatch } = getStore()
124
   }
133
   }
125
   componentDidShow() {
134
   componentDidShow() {
126
 
135
 
127
-    getIndexShare().then(res => {
128
-      this.setState({
129
-        shareImg: (res || {}).imgUrl,
130
-        imgDocument: (res || {}).imgDocument,
131
-      })
132
-      console.log(res, '首页分享信息')
133
-    }).catch(err => {
134
-      console.log(err, '首页分享err信息')
135
-    })
136
+    this.getIndexShareInfo()
136
     if (this.props.curCity.id) {
137
     if (this.props.curCity.id) {
137
       ready.queue(() => {
138
       ready.queue(() => {
138
         // Taro.hideTabBar()
139
         // Taro.hideTabBar()