瀏覽代碼

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into dev

Yansen 5 年之前
父節點
當前提交
b8c73317ce

+ 3
- 2
src/onlineSelling/pages/houseList/index.js 查看文件

@@ -191,8 +191,9 @@ export default class HouseList extends Component {
191 191
     const consultant = this.$router.params.consultant || qrcodeParams.consultant || Taro.getStorageSync('consultantId') || ""
192 192
     const consultantId = this.$router.params.consultantId || qrcodeParams.consultantId || ""
193 193
     const recommender = this.$router.params.recommender || qrcodeParams.recommender || ""
194
-
195
-    if (consultant) {
194
+    const { userInfo: { person: { personId } } } = this.props
195
+    const notSelf = personId != consultant
196
+    if (notSelf && consultant) {
196 197
       getCardDetail(consultant).then(res => {
197 198
         this.setState({
198 199
           consultData: res,

+ 4
- 3
src/onlineSelling/pages/live/index.js 查看文件

@@ -123,8 +123,9 @@ export default class livePage extends Component {
123 123
     let { qrcodeParams, queryInfo } = this.state
124 124
     const consultant = this.$router.params.consultant || qrcodeParams.consultant || Taro.getStorageSync('consultantId') || ''
125 125
     const recommender = this.$router.params.recommender || qrcodeParams.recommender || Taro.getStorageSync('recommender') || ''
126
-
127
-    if (consultant) {
126
+    const { userInfo: { person: { personId } } } = this.props
127
+    const notSelf = personId != consultant
128
+    if (notSelf && consultant) {
128 129
       getCardDetail(consultant).then(res => {
129 130
         this.setState({
130 131
           consultData: res,
@@ -234,7 +235,7 @@ export default class livePage extends Component {
234 235
     this.setState({ showShareMenu: false })
235 236
     const id = this.$router.params.id || this.state.liveDetail.liveActivityId
236 237
     const { userInfo: { person: { personId, personType, userId } } } = this.props
237
-    const { liveDetail: { shareContents, buildingId },qrcodeParams } = this.state
238
+    const { liveDetail: { shareContents, buildingId }, qrcodeParams } = this.state
238 239
     const consultantId1 = this.$router.params.consultantId || qrcodeParams.consultantId || ''
239 240
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : consultantId1
240 241
     const shareData = shareContents && shareContents.length ? shareContents[0] : { shareContentTitle: '精彩直播', shareContentImg: null };

+ 3
- 5
src/pages/news/detail/index.js 查看文件

@@ -251,7 +251,7 @@ export default class NewsDetail extends Component {
251 251
     const consultant = this.$router.params.consultant || qrcodeParams.consultant || Taro.getStorageSync('consultantId') || ''
252 252
     const consultantId = this.$router.params.consultantId || qrcodeParams.consultantId || ""
253 253
     const recommender = this.$router.params.recommender || qrcodeParams.recommender || Taro.getStorageSync('recommender') || ''
254
-    const { dispatchProjectDetail } = this.props
254
+    const { dispatchProjectDetail, userInfo = {} } = this.props
255 255
     Taro.showLoading()
256 256
     console.log(newsId, "newsIdnewsIdnewsIdnewsIdnewsId")
257 257
     queryNewsDetail(newsId, queryInfo, { ['x-consultant']: consultant, ['x-recommender']: recommender }).then(res => {
@@ -289,12 +289,10 @@ export default class NewsDetail extends Component {
289 289
           })
290 290
         }
291 291
       })
292
-
293 292
       WxParse.wxParse('article', 'html', res.newsDetail, this.$scope, 0)
294
-
295 293
     })
296
-
297
-    if (consultant) {
294
+    const notSelf = userInfo.person.personId != consultant
295
+    if (notSelf && consultant) {
298 296
       getCardDetail(consultant).then(res => {
299 297
         this.setState({
300 298
           consultData: res,

+ 4
- 3
src/pages/project/detail/index.js 查看文件

@@ -254,7 +254,7 @@ export default class Index extends Component {
254 254
       this.loadHelpGroupList()
255 255
 
256 256
       addItemUv(id)
257
-      const { qrcodeParams } = this.state
257
+      const { sceneParams = {} } = this.state
258 258
       // 埋点
259 259
       const consultant = this.$router.params.consultant || sceneParams.consultant || Taro.getStorageSync('consultantId') || ''
260 260
       // const consultant = this.$router.params.consultant || qrcodeParams.consultant
@@ -275,8 +275,9 @@ export default class Index extends Component {
275 275
       //   })
276 276
       //   console.log('项目详情')
277 277
       // })
278
-
279
-      if (consultant) {
278
+      const { userInfo: { person: { personId } } } = this.props
279
+      const notSelf = personId != consultant
280
+      if (notSelf && consultant) {
280 281
         getCardDetail(consultant).then(res => {
281 282
           this.setState({
282 283
             consultData: res,