|
@@ -1,7 +1,7 @@
|
|
|
'use client'
|
|
|
-import { FC, PropsWithChildren } from "react";
|
|
|
+import { FC, PropsWithChildren ,useRef, useState } from "react";
|
|
|
import { useRouter } from "@/i18n";
|
|
|
-import './page.css'
|
|
|
+import './page.scss'
|
|
|
|
|
|
interface Props { }
|
|
|
const App: FC<PropsWithChildren<Props>> = (props) =>{
|
|
@@ -20,8 +20,35 @@ const App: FC<PropsWithChildren<Props>> = (props) =>{
|
|
|
}
|
|
|
router.back()
|
|
|
}
|
|
|
+ const sliderRef = useRef<HTMLDivElement>(null)
|
|
|
+ const [num,setNum] = useState(100)
|
|
|
+ const [money,setMoney] = useState('5000')
|
|
|
+ const handleSlide:any =(e:React.MouseEvent<HTMLDivElement,MouseEvent>)=>{
|
|
|
+ if(sliderRef.current){
|
|
|
+ const startX = sliderRef.current.getBoundingClientRect().x
|
|
|
+ const x = e.clientX - startX
|
|
|
+ const xRem = x/(144*0.6)
|
|
|
+ const intNum = Math.round(10000*xRem)-Math.round(10000*xRem%10)
|
|
|
+ setNum(intNum)
|
|
|
+ const m = intNum*50
|
|
|
+ let r = ''
|
|
|
+ const arr = m.toString().split('')
|
|
|
+ arr.forEach((item,i)=>{
|
|
|
+ if(i!==arr.length&&(arr.length-i-1)%3===0){
|
|
|
+ r += item + ','
|
|
|
+ }else{
|
|
|
+ r += item
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ setMoney(r)
|
|
|
+
|
|
|
+ const scale = ((Math.round((xRem * 10000)))/100.00).toFixed(2) + '%';
|
|
|
+ sliderRef.current.style.width = scale
|
|
|
+ }
|
|
|
+ }
|
|
|
return (
|
|
|
- <div className="vux-drawer">
|
|
|
+ <div className="vux-drawer-faq">
|
|
|
<div className="vux-drawer-body" style={{transform: "translate3d(0px, 0px, 0px)"}}>
|
|
|
<div className="referral router-view" id="id-router-view" style={{backgroundColor: "rgb(237, 237, 237)"}}>
|
|
|
<div className="headerBack">
|
|
@@ -57,7 +84,7 @@ const App: FC<PropsWithChildren<Props>> = (props) =>{
|
|
|
<div className="van-tab">
|
|
|
<span className="van-tab__text">TUTORIAL</span>
|
|
|
</div>
|
|
|
- <div className="van-tabs__line" style={{transform: "translateX(442px) translateX(-50%); transition-duration: 0.3s"}}></div>
|
|
|
+ <div className="van-tabs__line"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -90,12 +117,12 @@ const App: FC<PropsWithChildren<Props>> = (props) =>{
|
|
|
<div className="imgContent rowReverse">
|
|
|
<img src="/img/cash.png" alt="" />
|
|
|
<div>
|
|
|
- Número de indicações > 100
|
|
|
+ Número de indicações > {num}
|
|
|
<br />
|
|
|
- Comissão > R$ 5,000 todo mês!
|
|
|
+ Comissão > R$ {money} todo mês!
|
|
|
</div>
|
|
|
- <div className="slider van-slider" style={{height: "0.02rem"}}>
|
|
|
- <div className="van-slider__bar" style={{width: "0.900901%", background: "rgb(0, 157, 128)"}}>
|
|
|
+ <div className="slider van-slider" style={{height: "0.02rem"}} onClick={handleSlide}>
|
|
|
+ <div className="van-slider__bar" style={{width: "0.900901%", background: "rgb(0, 157, 128)"}} ref={sliderRef}>
|
|
|
<div role="slider" className="van-slider__button-wrapper">
|
|
|
<div className="img"></div>
|
|
|
</div>
|