Browse Source

静态页面

1002884655 4 years ago
parent
commit
b185186b0a
1 changed files with 14 additions and 2 deletions
  1. 14
    2
      src/pages/index/index.js

+ 14
- 2
src/pages/index/index.js View File

@@ -410,6 +410,18 @@ export default class Index extends Component {
410 410
       url: '/pages/project/list/index'
411 411
     })
412 412
   }
413
+  NavClick (item) {
414
+    if (item.router !== null) {
415
+      Taro.navigateTo({
416
+        url: item.router
417
+      })
418
+    } else {
419
+      Taro.showToast({
420
+        title: '敬请期待',
421
+        icon: 'none'
422
+      })
423
+    }
424
+  }
413 425
   render () {
414 426
     const { NavList, StoreList, bannerList, CityData, helpGroupList, BuildingList, propagandaBanner } = this.state
415 427
     return (
@@ -444,12 +456,12 @@ export default class Index extends Component {
444 456
           <View className='Nav flex-h'>
445 457
             {
446 458
               NavList.map((item, index) => (
447
-                <Navigator className='flex-item' url={item.router} key={`Nav-${index}`}>
459
+                <View className='flex-item' onClick={this.NavClick.bind(this, item)} key={`Nav-${index}`}>
448 460
                   <View>
449 461
                     <Image mode='heightFix' className='centerLabel' src={item.img} />
450 462
                   </View>
451 463
                   <Text>{item.name}</Text>
452
-                </Navigator>
464
+                </View>
453 465
               ))
454 466
             }
455 467
           </View>