index.jsx 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import { Component } from 'react'
  2. import Taro from '@tarojs/taro'
  3. import { View, Text, Image } from '@tarojs/components'
  4. import { AtList, AtListItem } from "taro-ui"
  5. import './index.less'
  6. import loginOut from '../../images/mine/loginOut.png'
  7. import edit from '../../images/mine/edit.png'
  8. import norm from '../../images/mine/norm.png'
  9. export default class Index extends Component {
  10. handleLogout = () => {
  11. Taro.showModal({
  12. title: '',
  13. content: '退出后,请重新登录!',
  14. cancelText: '暂不退出',
  15. confirmText: '退出登录',
  16. cancelColor: '#000000',
  17. confirmColor: '#F6C71A',
  18. success: function (res) {
  19. if (res.confirm) {
  20. console.log('用户点击退出登录')
  21. }
  22. }
  23. })
  24. }
  25. render () {
  26. return (
  27. <View className='index'>
  28. {/* 个人信息 */}
  29. <View className="info">
  30. <Image src='' className="avatar" />
  31. <View className="info-right">
  32. <View className='user-info'>
  33. <View className="name">张三</View>
  34. <View className="account">138001</View>
  35. </View>
  36. <Image onClick={() => Taro.navigateTo({ url: `/pages/mineSub/infoEdit/index` })} className='edit-icon' src={edit}></Image>
  37. </View>
  38. </View>
  39. {/* 功能 */}
  40. <View className='function'>
  41. <AtList hasBorder={false}>
  42. <AtListItem hasBorder={false} onClick={() => Taro.navigateTo({ url: `/pages/mineSub/userSpecification/index` })} title='用户规范' arrow='right' thumb={norm}/>
  43. <View className='line'></View>
  44. <AtListItem
  45. hasBorder={false}
  46. title='退出登录'
  47. arrow='right'
  48. thumb={loginOut}
  49. onClick={this.handleLogout}
  50. />
  51. </AtList>
  52. </View>
  53. </View>
  54. )
  55. }
  56. }