修改MySlider的样式
This commit is contained in:
parent
bc7c1b113a
commit
81c0d446d2
|
@ -254,7 +254,7 @@ export default function MySlider({
|
||||||
style={{
|
style={{
|
||||||
...tailwind("flex flex-row justify-between items-center"),
|
...tailwind("flex flex-row justify-between items-center"),
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
top: -48,
|
top: -54,
|
||||||
right: 24,
|
right: 24,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -284,7 +284,7 @@ export default function MySlider({
|
||||||
color: "#ff75c8",
|
color: "#ff75c8",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
-
|
~
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
|
@ -292,7 +292,7 @@ export default function MySlider({
|
||||||
color: "#ff75c8",
|
color: "#ff75c8",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{hasInfinity && rightProcess >= 1 ? ">" + upper_bound : rightValue}
|
{hasInfinity && rightProcess >= 1 ? "∞" : rightValue}
|
||||||
</Text>
|
</Text>
|
||||||
{unitSite == "right" && (
|
{unitSite == "right" && (
|
||||||
<Text
|
<Text
|
||||||
|
@ -334,7 +334,7 @@ export default function MySlider({
|
||||||
color: "#ffffff80",
|
color: "#ffffff80",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{hasInfinity ? ">" + upper_bound : upper_bound}
|
{hasInfinity ? "∞" : upper_bound}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
|
@ -4,13 +4,52 @@ import {
|
||||||
Image as NativeImage,
|
Image as NativeImage,
|
||||||
Text,
|
Text,
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
import React, { useState, useCallback } from "react";
|
import React, { useState, useEffect, useCallback } from "react";
|
||||||
import { useTailwind } from "tailwind-rn";
|
import { useTailwind } from "tailwind-rn";
|
||||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||||
|
import baseRequest from "../../../utils/baseRequest";
|
||||||
|
import { generateSignature } from "../../../utils/crypto";
|
||||||
export default function Message({ navigation }) {
|
export default function Message({ navigation }) {
|
||||||
|
const [data, setData] = useState([]);
|
||||||
const tailwind = useTailwind();
|
const tailwind = useTailwind();
|
||||||
const insets = useSafeAreaInsets();
|
const insets = useSafeAreaInsets();
|
||||||
|
useEffect(() => {
|
||||||
|
getData();
|
||||||
|
}, []);
|
||||||
|
const getData = async (searchValue) => {
|
||||||
|
const apiUrl = process.env.EXPO_PUBLIC_API_URL;
|
||||||
|
try {
|
||||||
|
const base = await baseRequest();
|
||||||
|
const body = {
|
||||||
|
mid: base.b_mid,
|
||||||
|
...base,
|
||||||
|
};
|
||||||
|
const signature = await generateSignature(body);
|
||||||
|
const _response = await fetch(
|
||||||
|
`${apiUrl}/api/notification/list_unread_by_mid?signature=${signature}`,
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
body: JSON.stringify(body),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const _data = await _response.json();
|
||||||
|
if (_data.ret === -1) {
|
||||||
|
Toast.show({
|
||||||
|
type: "error",
|
||||||
|
text1: _data.msg,
|
||||||
|
topOffset: 60,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setData(_data.data.list);
|
||||||
|
console.log("_data.data.list", _data.data);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
|
@ -18,7 +57,7 @@ export default function Message({ navigation }) {
|
||||||
paddingTop: insets.top,
|
paddingTop: insets.top,
|
||||||
paddingLeft: insets.left,
|
paddingLeft: insets.left,
|
||||||
paddingRight: insets.right,
|
paddingRight: insets.right,
|
||||||
...tailwind("flex flex-1"),
|
...tailwind("flex flex-1 p-4 mt-4"),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* 广告轮播 */}
|
{/* 广告轮播 */}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import {
|
||||||
Text,
|
Text,
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { Icon } from "@rneui/themed";
|
||||||
import { useTailwind } from "tailwind-rn";
|
import { useTailwind } from "tailwind-rn";
|
||||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||||
export default function NoticeItem({ leftIcon, hasLink }) {
|
export default function NoticeItem({ leftIcon, hasLink }) {
|
||||||
|
@ -48,9 +49,9 @@ export default function NoticeItem({ leftIcon, hasLink }) {
|
||||||
>
|
>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
...tailwind("mr-2 bg-white rounded-xl"),
|
...tailwind("mr-2 bg-white rounded-lg"),
|
||||||
width: 100,
|
width: 50,
|
||||||
height: 100,
|
height: 50,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* <NativeImage
|
{/* <NativeImage
|
||||||
|
@ -62,7 +63,7 @@ export default function NoticeItem({ leftIcon, hasLink }) {
|
||||||
</View>
|
</View>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
...tailwind("flex justify-center flex-1"),
|
...tailwind("flex flex-row justify-between flex-1 px-4"),
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -71,6 +72,14 @@ export default function NoticeItem({ leftIcon, hasLink }) {
|
||||||
>
|
>
|
||||||
{hasLink.text}
|
{hasLink.text}
|
||||||
</Text>
|
</Text>
|
||||||
|
<TouchableOpacity onPress={() => {}}>
|
||||||
|
<Icon
|
||||||
|
type="ionicon"
|
||||||
|
name="chevron-forward"
|
||||||
|
color="white"
|
||||||
|
size={24}
|
||||||
|
/>
|
||||||
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -81,11 +81,11 @@ export default function Search({ navigation, route }) {
|
||||||
upper_bound: 200,
|
upper_bound: 200,
|
||||||
lower_bound: 1,
|
lower_bound: 1,
|
||||||
default: 24,
|
default: 24,
|
||||||
step: 200 / 10,
|
step: 200 / 9,
|
||||||
type: "slider",
|
type: "slider",
|
||||||
unit: "万",
|
unit: "万",
|
||||||
key: "fans",
|
key: "fans",
|
||||||
stepValues: [1, 3, 5, 10, 20, 50, 75, 100, 150, 200, 1000],
|
stepValues: [1, 5, 10, 20, 50, 75, 100, 150, 200, 1000],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "身高",
|
name: "身高",
|
||||||
|
@ -194,25 +194,26 @@ export default function Search({ navigation, route }) {
|
||||||
const priceFilters = [
|
const priceFilters = [
|
||||||
{
|
{
|
||||||
name: "空间价格",
|
name: "空间价格",
|
||||||
upper_bound: 200,
|
upper_bound: 300,
|
||||||
lower_bound: 0,
|
lower_bound: 0,
|
||||||
default: 24,
|
default: 24,
|
||||||
step: 200 / 7,
|
step: 300 / 7,
|
||||||
type: "slider",
|
type: "slider",
|
||||||
unit: "¥",
|
unit: "¥",
|
||||||
key: "zone",
|
key: "zone",
|
||||||
stepValues: [0, 1, 10, 50, 100, 150, 200, 4000],
|
stepValues: [0, 10, 50, 100, 150, 200, 300, 4000],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "微信价格",
|
name: "微信价格",
|
||||||
upper_bound: 10000,
|
desc: "10金币=¥1",
|
||||||
|
upper_bound: 30000,
|
||||||
lower_bound: 0,
|
lower_bound: 0,
|
||||||
default: 24,
|
default: 24,
|
||||||
step: 10000 / 8,
|
step: 30000 / 9,
|
||||||
type: "slider",
|
type: "slider",
|
||||||
unit: "金币",
|
unit: "金币",
|
||||||
key: "wechat",
|
key: "wechat",
|
||||||
stepValues: [0, 10, 100, 200, 500, 1000, 5000, 10000, 100000],
|
stepValues: [0, 100, 300, 500, 1000, 5000, 10000, 20000, 30000, 100000],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const [filtersValue, setFiltersValue] = useState({
|
const [filtersValue, setFiltersValue] = useState({
|
||||||
|
@ -377,6 +378,8 @@ export default function Search({ navigation, route }) {
|
||||||
// offset: 0,
|
// offset: 0,
|
||||||
// limit: 20,
|
// limit: 20,
|
||||||
});
|
});
|
||||||
|
console.log(querryParams);
|
||||||
|
|
||||||
const response = await fetch(`${apiUrl}${api}?signature=${signature}`, {
|
const response = await fetch(`${apiUrl}${api}?signature=${signature}`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -1187,6 +1190,14 @@ export default function Search({ navigation, route }) {
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
))}
|
))}
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
...tailwind("text-sm font-medium mt-1 px-4"),
|
||||||
|
color: "#ffffff80",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
*{priceFilters[1]?.desc}
|
||||||
|
</Text>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
...tailwind("flex-row justify-around items-center mb-4 p-4"),
|
...tailwind("flex-row justify-around items-center mb-4 p-4"),
|
||||||
|
|
Loading…
Reference in New Issue