张延森 5 years ago
commit
6ce111f946
1 changed files with 7 additions and 4 deletions
  1. 7
    4
      src/pages/project/h5Page.js

+ 7
- 4
src/pages/project/h5Page.js View File

80
     const router = Taro.getStorageSync('router')
80
     const router = Taro.getStorageSync('router')
81
 
81
 
82
     const consultant = person.personType == ROLE_CODE['CONSULTANT'] ? person.userId : ""
82
     const consultant = person.personType == ROLE_CODE['CONSULTANT'] ? person.userId : ""
83
-    const firstShare = this.$router.params.firstShare || person.personId
83
+    const firstShare = this.$router.params.firstShare || router.query.firstShare || person.personId
84
     const id = this.$router.params.id || router.query.id || ""
84
     const id = this.$router.params.id || router.query.id || ""
85
 
85
 
86
     let queryParams = [
86
     let queryParams = [
90
       `id=${id}`
90
       `id=${id}`
91
     ]
91
     ]
92
 
92
 
93
-
94
     const res = [
93
     const res = [
95
       'pages/project/h5Page',
94
       'pages/project/h5Page',
96
       queryParams.join('&'),
95
       queryParams.join('&'),
293
     const { userInfo: { person } } = this.props
292
     const { userInfo: { person } } = this.props
294
     const consultant = person.personType == ROLE_CODE['CONSULTANT'] ? person.userId : ""
293
     const consultant = person.personType == ROLE_CODE['CONSULTANT'] ? person.userId : ""
295
     const h5id = this.$router.params.id || router.query.id || ""
294
     const h5id = this.$router.params.id || router.query.id || ""
295
+    const firstShare = this.$router.params.firstShare || router.query.firstShare || person.personId
296
     const webUrlParams = [
296
     const webUrlParams = [
297
       `personId=${person.personId}`,
297
       `personId=${person.personId}`,
298
       `h5id=${h5id}`,
298
       `h5id=${h5id}`,
299
       `consultant=${consultant}`,
299
       `consultant=${consultant}`,
300
+      `firstShare=${firstShare}`,
300
       `codeParams=${encodeURIComponent(codeParams)}`,
301
       `codeParams=${encodeURIComponent(codeParams)}`,
301
     ].join('&')
302
     ].join('&')
302
 
303
 
303
-    console.log(`${pageInfo.h5Address}?${webUrlParams}`)
304
+    console.log('----web-h5------>', `${pageInfo.h5Address}?${webUrlParams}`)
305
+
306
+    const showH5 = pageInfo.h5Address && pageInfo.h5Address !== 'about' && pageInfo.h5Address !== 'http://about' && pageInfo.h5Address !== 'https://about'
304
 
307
 
305
     return (
308
     return (
306
       <Block>
309
       <Block>
307
         {this.renderMaskBanner()}
310
         {this.renderMaskBanner()}
308
-        {webViewVisible && <WebView src={`${pageInfo.h5Address}?${webUrlParams}`} />}
311
+        {webViewVisible && showH5 && <WebView src={`${pageInfo.h5Address}?${webUrlParams}`} />}
309
       </Block>
312
       </Block>
310
     )
313
     )
311
   }
314
   }