修改router行为

This commit is contained in:
yezian 2024-08-13 11:18:46 +08:00
parent 0854f3193b
commit 5728611c38
4 changed files with 51 additions and 28 deletions

View File

@ -21,8 +21,6 @@ export default function BillLayout({ children }) {
icon={faAngleLeft} icon={faAngleLeft}
size="xl" size="xl"
onClick={() => { onClick={() => {
pathname.split("/").length < 4?
router.push("/my/wallet"):
router.back(); router.back();
}} }}
/> />
@ -42,6 +40,7 @@ export default function BillLayout({ children }) {
: "text-[#FFFFFF80]" : "text-[#FFFFFF80]"
}`} }`}
href="recharge" href="recharge"
replace
> >
充值 充值
</Link> </Link>
@ -52,6 +51,7 @@ export default function BillLayout({ children }) {
: "text-[#FFFFFF80]" : "text-[#FFFFFF80]"
}`} }`}
href="cost" href="cost"
replace
> >
消费 消费
</Link> </Link>
@ -62,6 +62,7 @@ export default function BillLayout({ children }) {
: "text-[#FFFFFF80]" : "text-[#FFFFFF80]"
}`} }`}
href="income" href="income"
replace
> >
收益 收益
</Link> </Link>
@ -72,6 +73,7 @@ export default function BillLayout({ children }) {
: "text-[#FFFFFF80]" : "text-[#FFFFFF80]"
}`} }`}
href="withdrawal" href="withdrawal"
replace
> >
提现 提现
</Link> </Link>
@ -80,7 +82,9 @@ export default function BillLayout({ children }) {
</div> </div>
)} )}
{pathname.split("/").length >3 && <div className="mt-14 px-4 flex flex-1">{children}</div>} {pathname.split("/").length > 3 && (
<div className="mt-14 px-4 flex flex-1">{children}</div>
)}
</section> </section>
); );
} }

View File

@ -15,40 +15,61 @@ export default function AddToHome() {
icon={faAngleLeft} icon={faAngleLeft}
size="xl" size="xl"
onClick={() => { onClick={() => {
router.push("/my"); router.back();
}} }}
/> />
</div> </div>
<p className="text-base text-center leading-9">添加到主屏幕</p> <p className="text-base text-center leading-9">添加到主屏幕</p>
</div> </div>
{/* 内容 */} {/* 内容 */}
<div className="p-4 mt-14"> <div className="p-4 mt-14">
<div> <div>
<p className="text-base font-bold">在浏览器中如何将铁粉空间添加到主屏幕</p> <p className="text-base font-bold">
<p className="text-xs text-[red]">请勿在当前页面点击[添加到主屏幕]</p> 在浏览器中如何将铁粉空间添加到主屏幕
<p className="text-xs my-2 text-[#ffffff69]">以IOS的Safari浏览器为例</p> </p>
<p className="text-xs text-[red]">
请勿在当前页面点击[添加到主屏幕]
</p>
<p className="text-xs my-2 text-[#ffffff69]">
以IOS的Safari浏览器为例
</p>
</div> </div>
<div> <div>
<p className="text-xs mt-4 mb-2">1.在浏览器中打开主界面点击浏览器中的[分享]按钮</p> <p className="text-xs mt-4 mb-2">
1.在浏览器中打开主界面点击浏览器中的[分享]按钮
</p>
<div className="flex justify-center"> <div className="flex justify-center">
<Image <Image
src={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/images/addToHome1.png"} src={
process.env.NEXT_PUBLIC_WEB_ASSETS_URL +
"/images/addToHome1.png"
}
placeholder="" placeholder=""
className="w-[60%]" className="w-[60%]"
/> />
</div> </div>
<p className="text-xs mt-4 mb-2">2.打开分享弹框后点击[添加到主屏幕]</p> <p className="text-xs mt-4 mb-2">
2.打开分享弹框后点击[添加到主屏幕]
</p>
<div className="flex justify-center"> <div className="flex justify-center">
<Image <Image
src={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/images/addToHome2.png"} src={
process.env.NEXT_PUBLIC_WEB_ASSETS_URL +
"/images/addToHome2.png"
}
placeholder="" placeholder=""
className="w-[60%]" className="w-[60%]"
/> />
</div> </div>
<p className="text-xs mt-4 mb-2">3.打开添加到主屏幕弹框后点击[添加]按钮即可成功添加到主屏幕</p> <p className="text-xs mt-4 mb-2">
3.打开添加到主屏幕弹框后点击[添加]按钮即可成功添加到主屏幕
</p>
<div className="flex justify-center"> <div className="flex justify-center">
<Image <Image
src={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/images/addToHome3.png"} src={
process.env.NEXT_PUBLIC_WEB_ASSETS_URL +
"/images/addToHome3.png"
}
placeholder="" placeholder=""
className="w-[60%]" className="w-[60%]"
/> />

View File

@ -67,8 +67,14 @@ export default function UnlockedWechat() {
<ul className="p-4 overflow-y-auto scrollbarBox_hidden"> <ul className="p-4 overflow-y-auto scrollbarBox_hidden">
{data.map((item, index) => ( {data.map((item, index) => (
<li key={item.id + "_" + index}> <li key={item.id + "_" + index}>
<div className="grid gap-2 items-center" style={{gridTemplateColumns:"calc(100% - 90px) 90px"}}> <div
<div className="grid w-full " style={{gridTemplateColumns:"3rem calc(100% - 3rem)"}}> className="grid gap-2 items-center"
style={{ gridTemplateColumns: "calc(100% - 90px) 90px" }}
>
<div
className="grid w-full "
style={{ gridTemplateColumns: "3rem calc(100% - 3rem)" }}
>
<Avatar <Avatar
className="w-12 h-12 rounded-full" className="w-12 h-12 rounded-full"
src={item.account?.avatar?.images[0]?.urls[0]} src={item.account?.avatar?.images[0]?.urls[0]}
@ -115,8 +121,7 @@ export default function UnlockedWechat() {
avatar={currentStreamer.current?.account?.avatar?.images[0]?.urls[0]} avatar={currentStreamer.current?.account?.avatar?.images[0]?.urls[0]}
streamerData={{ streamerData={{
streamer_ext: { streamer_ext: {
wechat_lock_type: wechat_lock_type: currentStreamer.current?.lock_type,
currentStreamer.current?.lock_type,
}, },
}} }}
/> />

View File

@ -134,13 +134,6 @@ export default function Wallet() {
<FontAwesomeIcon icon={faAngleRight} size="xl" /> <FontAwesomeIcon icon={faAngleRight} size="xl" />
</div> </div>
<div <div
// onClick={() =>
// navigation.navigate("WebWithHeader", {
// title: "收支明细",
// uri: process.env.EXPO_PUBLIC_WEB_URL + "/bill/recharge",
// })
// }
onClick={() => { onClick={() => {
router.push("/bill/recharge"); router.push("/bill/recharge");
}} }}