shenwu hai 6 meses
pai
achega
0cc52ad44e

+ 1 - 1
src/components/bottomModal/shubi/index.tsx

@@ -14,7 +14,7 @@ function Shubi(props: {
                 <View className="shubi_info">余额:{props?.shubiData?.coinNum || 0}书币</View>
             </> : <View className="shubi_title">选择套餐</View>
         }
-        <ShubiBox />
+        <ShubiBox mar0={!props?.isBook} />
     </View>
 }
 export default Shubi

+ 1 - 1
src/components/bottomModal/vip/index.tsx

@@ -9,7 +9,7 @@ function Vip(props: { isBook: boolean }) {
             </> : <View className="shubi_title">选择套餐</View>
         }
 
-        <VipBox />
+        <VipBox  mar0={!props?.isBook} />
     </View>
 }
 export default Vip

+ 3 - 0
src/components/pay/shubi/index.less

@@ -104,4 +104,7 @@
     display: flex;
     align-items: center;
     margin: 16rpx auto 70rpx;
+}
+.mar_bom_0{
+    margin-bottom: 0px;
 }

+ 4 - 3
src/components/pay/shubi/index.tsx

@@ -7,16 +7,17 @@ import { setApp } from "@src/config";
 import usePay from "@src/Hook/usePay";
 interface Props {
     store?: Store;
+    mar0?: boolean
 }
 function ShubiBox(props?: Props) {
     let { pay } = usePay()
     let [eq, setEq] = useState(0)
-    let [payData,setPayData]=useState<any>(null)
+    let [payData, setPayData] = useState<any>(null)
     let [ok, setOk] = useState(false)
     let data = useMemo(() => {
         let thatData = props?.store?.indexStore?.rechargeTemplate?.find(item => item.templateType === 1)
         let datas = thatData?.rechargeConfigs[0]?.rechargeConfigList
-        setApp({payData:datas[0]})
+        setApp({ payData: datas[0] })
         setPayData(datas[0])
         return datas
     }, [props?.store?.indexStore?.rechargeTemplate])
@@ -47,7 +48,7 @@ function ShubiBox(props?: Props) {
             }
         </View>
         <View className="shubi_box_btn" onClick={() => { setOk(true); pay() }}>确认协议并支付{payData?.price}元</View>
-        <View className="shubi_box_gz">
+        <View className={`shubi_box_gz ${props?.mar0 ? "mar_bom_0" : ""}`}>
             <RadioGroup onChange={(e: any) => {
                 setOk(true)
             }}>

+ 3 - 0
src/components/pay/vip/index.less

@@ -123,4 +123,7 @@
     display: flex;
     align-items: center;
     margin: 16rpx auto 70rpx;
+}
+.mar_bom_0{
+    margin-bottom: 0px;
 }

+ 4 - 3
src/components/pay/vip/index.tsx

@@ -8,6 +8,7 @@ import { inject, observer } from "mobx-react";
 import { getEnum } from "@src/utils";
 interface Props {
     store?: Store;
+    mar0?: boolean
 }
 function VipBox(props?: Props) {
     let { pay } = usePay()
@@ -19,7 +20,7 @@ function VipBox(props?: Props) {
         let thatData = props?.store?.indexStore?.rechargeTemplate?.find(item => item.templateType === 2)
         let datas = thatData?.rechargeConfigs[0]?.rechargeConfigList
         if (datas?.length > 0) {
-            setApp({payData:datas[0]})
+            setApp({ payData: datas[0] })
             setPayData(datas[0])
         }
         return datas
@@ -48,7 +49,7 @@ function VipBox(props?: Props) {
                         setPayData(item)
                     }}>
                         <View className="vip_box_tip">{item?.subscript}</View>
-                        <View className="vip_box_title">{vipList?.find(i=>i.value === item.vipDays)?.text?.replace('会员','')}</View>
+                        <View className="vip_box_title">{vipList?.find(i => i.value === item.vipDays)?.text?.replace('会员', '')}</View>
                         <View className="vip_box_num">{item?.price}元</View>
                         {/* <View className="vip_box_price"></View> */}
                         <View className="vip_box_give">{item?.obtain}元/天</View>
@@ -57,7 +58,7 @@ function VipBox(props?: Props) {
             }
         </ScrollView>
         <View className="vip_box_btn" onClick={() => { setOk(true); pay() }}>确认协议并支付{payData?.price}元</View>
-        <View className="vip_box_gz">
+        <View className={`vip_box_gz ${props?.mar0 ? "mar_bom_0" : ""}`}>
             <RadioGroup onChange={(e: any) => {
                 setOk(true)
             }}>