1007395918@qq.com 5 years ago
parent
commit
202f8368f1
2 changed files with 10 additions and 11 deletions
  1. 1
    1
      src/pages/project/detail/highLight.js
  2. 9
    10
      src/pages/project/detail/index.js

+ 1
- 1
src/pages/project/detail/highLight.js View File

@@ -13,7 +13,7 @@ export default class highLight extends Component {
13 13
         return (
14 14
             <Block>
15 15
 
16
-                {type == link ? < WebView src={link} /> :
16
+                {type == 'link' ? < WebView src={link} /> :
17 17
 
18 18
                     <ScrollView style="padding:30rpx" scrollY>
19 19
 

+ 9
- 10
src/pages/project/detail/index.js View File

@@ -1045,9 +1045,10 @@ export default class Index extends Component {
1045 1045
       </Block>
1046 1046
     )
1047 1047
   }
1048
-  pointItemCilck(item) {
1048
+  pointItemCilck() {
1049
+    const { projectDetail } = this.state
1049 1050
     Taro.navigateTo({
1050
-      url: '/pages/project/detail/highLight?type=' + item.highlightsType + '&link=' + item.highlightsLink + '&content=' + item.highlights
1051
+      url: '/pages/project/detail/highLight?type=' + projectDetail.highlightsType + '&link=' + projectDetail.highlightsLink + '&content=' + projectDetail.highlights
1051 1052
     })
1052 1053
   }
1053 1054
 
@@ -1055,14 +1056,12 @@ export default class Index extends Component {
1055 1056
     const { projectDetail } = this.state
1056 1057
     return (
1057 1058
       <Block>
1058
-        {projectDetail.highlightsCover &&
1059
-          <View className="activity">
1060
-            <View className="title">项目亮点</View>
1061
-            <View style={{ position: 'relative', padding: '0 30rpx' }} onClick={() => this.pointItemCilck(projectDetail)}>
1062
-              <Image style="height:230rpx;width:100%;border-radius: 24rpx;" src={transferImage(projectDetail.highlightsCover)} mode="aspectFill"></Image>
1063
-            </View>
1059
+        <View className="activity">
1060
+          <View className="title">项目亮点</View>
1061
+          <View style={{ position: 'relative', padding: '0 30rpx' }} onClick={() => this.pointItemCilck()}>
1062
+            <Image style="height:230rpx;width:100%;border-radius: 24rpx;" src={transferImage(projectDetail.highlightsCover || require('@/assets/empty.png'))} mode="aspectFill"></Image>
1064 1063
           </View>
1065
-        }
1064
+        </View>
1066 1065
       </Block>
1067 1066
     )
1068 1067
   }
@@ -1520,7 +1519,7 @@ export default class Index extends Component {
1520 1519
                     </View>
1521 1520
                   </View>
1522 1521
                   {/* 项目亮点 */}
1523
-                  {this.renderPoints()}
1522
+                  {projectDetail.highlightsType && this.renderPoints()}
1524 1523
                   {/* 项目顾问 */}
1525 1524
                   {this.renderConsuler()}
1526 1525
                   {/* 周边 */}