index.jsx 1.2KB

1234567891011121314151617181920212223242526272829303132333435
  1. import React, { useState } from 'react'
  2. import Taro from '@tarojs/taro'
  3. import Page from '@/layouts'
  4. import '@/assets/css/reset.less'
  5. import '@/assets/css/iconfont.less'
  6. import './index.less'
  7. export default function WuYeBaoXiuQuYu () {
  8. const [TypeList] = useState([
  9. { icon: 'icongonggongquyu', name: '公共区域问题', desc: '如绿植被破坏、楼道灯不亮等问题', id: 1 },
  10. { icon: 'iconfangwuzhiliang', name: '房屋质量问题', desc: '如家中墙体开裂、墙皮脱落等问题', id: 2 },
  11. { icon: 'iconhuneisheshi', name: '户内设施问题', desc: '如通浴室下水道、保洁等可能需要收费的项目', id: 3 }
  12. ])
  13. return (
  14. <Page>
  15. <view className='WuYeBaoXiuQuYu'>
  16. {
  17. TypeList.map((item, index) => (
  18. <view key={`WuYeBaoXiuQuYu-${index}`}>
  19. <view onClick={() => { Taro.redirectTo({ url: `/pages/WuYe/TianJiaBaoXiu/index?type=${item.id}` }) }}>
  20. <view>
  21. <text className={`iconfont ${item.icon}`}></text>
  22. <text>{item.name}</text>
  23. </view>
  24. <text>{item.desc}</text>
  25. </view>
  26. </view>
  27. ))
  28. }
  29. </view>
  30. </Page>
  31. )
  32. }