xujing 5 lat temu
rodzic
commit
d03a8360d5
3 zmienionych plików z 40 dodań i 31 usunięć
  1. 1
    1
      config/prod.js
  2. 22
    15
      src/pages/activity/detail/index.js
  3. 17
    15
      src/pages/news/detail/index.js

+ 1
- 1
config/prod.js Wyświetl plik

@@ -9,7 +9,7 @@ module.exports = {
9 9
     WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10 10
     // HOST: '"https://lt.pawoma.cn"',
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    Version:'V3.5.5_2019-12-24'
12
+    Version:'V3.5.5_2019-12-25'
13 13
   },
14 14
   weapp: {},
15 15
   h5: {}

+ 22
- 15
src/pages/activity/detail/index.js Wyświetl plik

@@ -87,9 +87,29 @@ export default class Detail extends Component {
87 87
     const consultant = this.$router.params.consultant || router.query.consultant
88 88
     const consultantId = this.$router.params.consultantId || router.query.consultantId || ""
89 89
     const recommender = this.$router.params.recommender || router.query.recommender || ""
90
+
90 91
     queryActivityDetail(id).then(res => {
91 92
       Taro.hideLoading()
92 93
       const { isSaved, isSign } = res
94
+
95
+      savePoint({
96
+        event: 'detail',
97
+        eventType: 'activity',
98
+        propertyName: '活动详情',
99
+        buildingId: res.buildingId,
100
+        targetId: res.dynamicId,
101
+        consultantId: consultantId,
102
+        sharePersonId: recommender,
103
+        data: '{}'
104
+      }).then(res1 => {
105
+        this.setState({
106
+          recordId: res1.recordId
107
+        })
108
+        console.log('活动详情')
109
+      }).catch(err => {
110
+        console.log(err, "err")
111
+      })
112
+
93 113
       this.setState({
94 114
         detail: res,
95 115
         isSaved,
@@ -107,21 +127,7 @@ export default class Detail extends Component {
107 127
       })
108 128
       WxParse.wxParse('article', 'html', res.desc, this.$scope, 0)
109 129
 
110
-      savePoint({
111
-        event: 'detail',
112
-        eventType: 'activity',
113
-        propertyName: '活动详情',
114
-        buildingId: res.buildingId,
115
-        targetId: res.dynamicId,
116
-        consultantId: consultantId,
117
-        sharePersonId: recommender,
118
-        data: '{}'
119
-      }).then(res1 => {
120
-        this.setState({
121
-          recordId: res1.recordId
122
-        })
123
-        console.log('活动详情')
124
-      })
130
+
125 131
     })
126 132
 
127 133
     if (consultant) {
@@ -177,6 +183,7 @@ export default class Detail extends Component {
177 183
     })
178 184
     const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
179 185
     const shareData = shareContents && shareContents.length ? shareContents[0] : { shareContentTitle: title, shareContentImg: imgUrl };
186
+    console.log(`/pages/activity/detail/index?id=${dynamicId}&from=dynamic_share&recommender=${personId}&consultant=${consultant}&consultantId=${consultantId}`)
180 187
     return {
181 188
       title: shareData.shareContentTitle,
182 189
       path: `/pages/activity/detail/index?id=${dynamicId}&from=dynamic_share&recommender=${personId}&consultant=${consultant}&consultantId=${consultantId}`,//分享地址

+ 17
- 15
src/pages/news/detail/index.js Wyświetl plik

@@ -140,7 +140,7 @@ export default class NewsDetail extends Component {
140 140
     })
141 141
   }
142 142
 
143
-  currentPageAndParams () {
143
+  currentPageAndParams() {
144 144
     const { detail: { newsId } } = this.state
145 145
     const { userInfo: { person: { personId, personType, userId } } } = this.props
146 146
     const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
@@ -206,20 +206,6 @@ export default class NewsDetail extends Component {
206 206
     Taro.showLoading()
207 207
     queryNewsDetail(newsId).then(res => {
208 208
       Taro.hideLoading()
209
-      this.setState({
210
-        detail: res,
211
-        loaded: true,
212
-        isSaved: res.isSave
213
-      }, () => {
214
-        const { detail } = this.state
215
-        if (detail.posters && detail.posters.length && detail.posters[0].posterImg) {
216
-          this.setState({
217
-            posterShow: 'flex'
218
-          })
219
-        }
220
-      })
221
-
222
-      WxParse.wxParse('article', 'html', res.newsDetail, this.$scope, 0)
223 209
       // 埋点
224 210
       savePoint({
225 211
         event: 'detail',
@@ -236,6 +222,22 @@ export default class NewsDetail extends Component {
236 222
         })
237 223
         console.info('资讯详情')
238 224
       })
225
+    
226
+      this.setState({
227
+        detail: res,
228
+        loaded: true,
229
+        isSaved: res.isSave
230
+      }, () => {
231
+        const { detail } = this.state
232
+        if (detail.posters && detail.posters.length && detail.posters[0].posterImg) {
233
+          this.setState({
234
+            posterShow: 'flex'
235
+          })
236
+        }
237
+      })
238
+
239
+      WxParse.wxParse('article', 'html', res.newsDetail, this.$scope, 0)
240
+
239 241
     })
240 242
 
241 243
     if (consultant) {