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
         return (
13
         return (
14
             <Block>
14
             <Block>
15
 
15
 
16
-                {type == link ? < WebView src={link} /> :
16
+                {type == 'link' ? < WebView src={link} /> :
17
 
17
 
18
                     <ScrollView style="padding:30rpx" scrollY>
18
                     <ScrollView style="padding:30rpx" scrollY>
19
 
19
 

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

1045
       </Block>
1045
       </Block>
1046
     )
1046
     )
1047
   }
1047
   }
1048
-  pointItemCilck(item) {
1048
+  pointItemCilck() {
1049
+    const { projectDetail } = this.state
1049
     Taro.navigateTo({
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
     const { projectDetail } = this.state
1056
     const { projectDetail } = this.state
1056
     return (
1057
     return (
1057
       <Block>
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
           </View>
1063
           </View>
1065
-        }
1064
+        </View>
1066
       </Block>
1065
       </Block>
1067
     )
1066
     )
1068
   }
1067
   }
1520
                     </View>
1519
                     </View>
1521
                   </View>
1520
                   </View>
1522
                   {/* 项目亮点 */}
1521
                   {/* 项目亮点 */}
1523
-                  {this.renderPoints()}
1522
+                  {projectDetail.highlightsType && this.renderPoints()}
1524
                   {/* 项目顾问 */}
1523
                   {/* 项目顾问 */}
1525
                   {this.renderConsuler()}
1524
                   {this.renderConsuler()}
1526
                   {/* 周边 */}
1525
                   {/* 周边 */}