index.jsx 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import Taro from "@tarojs/taro"
  2. import { Icon, View } from "@tarojs/components"
  3. import { useEffect, useState } from "react"
  4. import CustomNav from '@/components/CustomNav'
  5. import withLayout from '@/layouts'
  6. import './style.less'
  7. export default (props) => {
  8. const { ico, textNext } = props
  9. const YES = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/YES.png'
  10. const No = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/No.png'
  11. const [imageOne, setImageOne] = useState(false)
  12. const [imageTow, setImageTow] = useState(false)
  13. const handleYES = () => {
  14. setImageOne(true)
  15. setImageTow(false)
  16. }
  17. const handleNo = () => {
  18. setImageOne(false)
  19. setImageTow(true)
  20. }
  21. return (
  22. <View >
  23. <View style='font-size: 20px;font-weight: bold;color: #140F0F;marginLeft:10px;;'>
  24. 2<text style='font-size: 13px;font-weight: bold;color: #140F0F;'> / 5 </text>你是单身吗?
  25. </View>
  26. <view className='Girl-Conste-box' onClick={handleYES} >
  27. <View className='Girl-box-imageContent'>
  28. <image className={`Girl-box-image imageTwo ${imageOne && 'Girl-imageLess'} `} src={YES} />
  29. </View>
  30. <view className='Girl-box-content' >
  31. <View className='Girl-box-C-title' >
  32. YES
  33. </View>
  34. <View className='Girl-box-C-moon' >
  35. </View>
  36. </view>
  37. </view>
  38. <view className='Girl-Conste-box' onClick={handleNo} >
  39. <View className='Girl-box-imageContent'>
  40. <image className={`Girl-box-image ${imageTow && 'Girl-imageLess'} `} src={No} />
  41. </View>
  42. <view className='Girl-box-content' >
  43. <View className='Girl-box-C-title' >
  44. No
  45. </View>
  46. <View className='Girl-box-C-moon' >
  47. </View>
  48. </view>
  49. </view>
  50. </View>
  51. )
  52. }