1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- import Taro from "@tarojs/taro"
- import { Icon, View } from "@tarojs/components"
- import { useEffect, useState } from "react"
- import CustomNav from '@/components/CustomNav'
- import withLayout from '@/layouts'
-
-
- import './style.less'
-
-
- export default (props) => {
- const { ico, textNext, onSelected, nextQuestio } = props
-
- const YES = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/YES.png'
- const No = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/No.png'
-
- const [imageOne, setImageOne] = useState(false)
- const [imageTow, setImageTow] = useState(false)
-
- const handleYES = () => {
- setImageOne(true)
- setImageTow(false)
- onSelected()
- setTimeout(() => {
- nextQuestio()
-
- }, 500);
-
- }
-
-
- const handleNo = () => {
- setImageOne(false)
- setImageTow(true)
- onSelected()//未选择不给到下一题
- setTimeout(() => {
- nextQuestio()
-
- }, 500);
-
- }
-
-
-
-
-
- return (
- <View >
- <View style='font-size: 20px;font-weight: bold;color: #140F0F;marginLeft:10px;;'>
- 2<text style='font-size: 13px;font-weight: bold;color: #140F0F;'> / 5 </text>你是单身吗?
- </View>
-
-
- <view className='Girl-Conste-box' onClick={handleYES} >
- <View className='Girl-box-imageContent'>
- <image className={`Girl-box-image imageTwo ${imageOne && 'Girl-imageLess'} `} src={YES} />
-
- </View>
- <view className='Girl-box-content' >
- <View className='Girl-box-C-title' >
- YES
- </View>
- <View className='Girl-box-C-moon' >
- 是
- </View>
- </view>
-
- </view>
-
- <view className='Girl-Conste-box' onClick={handleNo} >
- <View className='Girl-box-imageContent'>
- <image className={`Girl-box-image ${imageTow && 'Girl-imageLess'} `} src={No} />
- </View>
- <view className='Girl-box-content' >
- <View className='Girl-box-C-title' >
- No
- </View>
- <View className='Girl-box-C-moon' >
- 否
- </View>
- </view>
-
- </view>
-
-
-
-
- </View>
-
-
- )
- }
|