From 25a83ba8cae1b445299704d9d883704f5d615d0d Mon Sep 17 00:00:00 2001 From: al Date: Thu, 12 Sep 2024 18:19:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BF=98=E8=AE=B0?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E5=92=8C=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E6=88=91=E7=9A=84=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BC=9A=E5=91=98=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/public.js | 5 +-- app/login/page.js | 4 ++- app/my/page.js | 24 +++++++++++-- app/my/setting/editPassword/page.js | 13 ++++--- app/search/page.js | 55 +++++++++++++++++++++++++++-- components/WithAuth/index.js | 5 ++- 6 files changed, 91 insertions(+), 15 deletions(-) diff --git a/api/public.js b/api/public.js index 2057ac0..92cc6b3 100644 --- a/api/public.js +++ b/api/public.js @@ -1,9 +1,9 @@ -import { get } from "@/utils/storeInfo"; +import { get, clear } from "@/utils/storeInfo"; import requireAPI from "@/utils/requireAPI"; import { Toast } from "antd-mobile"; import { JSEncrypt } from "jsencrypt"; import baseRequest from "@/utils/baseRequest"; -//关注和取关功能 +//退出登录 export const handleLogout = async () => { const account = get("account"); try { @@ -20,6 +20,7 @@ export const handleLogout = async () => { }); return; } + clear(); } catch (error) { // console.error(error); } diff --git a/app/login/page.js b/app/login/page.js index f129623..1509965 100644 --- a/app/login/page.js +++ b/app/login/page.js @@ -380,7 +380,9 @@ function Login({ handleLogin }) {
- router.push(`/my/setting/editPassword?forgetPassword=true`) + router.push( + `/my/setting/editPassword?forgetPassword=true&phone=${loginInfo.mobilePhone}` + ) } className="text-[#FF669E] text-xs mt-2 text-right" > diff --git a/app/my/page.js b/app/my/page.js index 35bbee8..650150e 100644 --- a/app/my/page.js +++ b/app/my/page.js @@ -3,7 +3,7 @@ import React, { useEffect, useState } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faAngleRight } from "@fortawesome/free-solid-svg-icons"; -import { Avatar, Image, Toast } from "antd-mobile"; +import { Avatar, Image, Toast, Space } from "antd-mobile"; import { useRouter, useSearchParams } from "next/navigation"; import { get } from "@/utils/storeInfo"; import requireAPI from "@/utils/requireAPI"; @@ -94,7 +94,27 @@ const My = () => { style={{ "--size": "76px", "--border-radius": "50%" }} />
-

{userInfo.name}

+ +

+ {userInfo.name} +

+ {userInfo?.is_a_member === 1 && ( + + )} +
{ // const mobile_phone = get("mobile_phone"); // console.log("mobile_phone",mobile_phone) @@ -212,6 +214,8 @@ export default function EditPassword() { 验证码

setVeriCode("")} placeholder="请输入验证码" onChange={(value) => setVeriCode(value)} value={veriCode} @@ -241,11 +245,12 @@ export default function EditPassword() { 新密码

setNewPassword(value)} value={newPassword} type="password" - autoComplete="off" style={{ "--placeholder-color": "#FFFFFF80", "--font-size": "16px", diff --git a/app/search/page.js b/app/search/page.js index f0c0242..1bb75b0 100644 --- a/app/search/page.js +++ b/app/search/page.js @@ -10,6 +10,7 @@ import { Popup, Radio, Picker, + Space, } from "antd-mobile"; import { useRouter } from "next/navigation"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; @@ -368,7 +369,6 @@ export default function Search() { delete currentFilterValue.comprehensiveUsed; delete currentFilterValue.priceUsed; querryParams = currentFilterValue; - console.log("querryParams", querryParams); try { const data = await requireAPI("POST", "/api/streamer/filter", { body: { ...querryParams }, @@ -547,7 +547,9 @@ export default function Search() { }} > + +

综合筛选

+
+ { + setIsFilterVisible({ + zone_admission_price: false, + comprehensive: false, + }); + setCurrentFiltersChangeValue(filtersValue); + }} + /> +
+
{filters.map((item, index) => (
+ +

价格筛选

+
+ { + setIsFilterVisible({ + zone_admission_price: false, + comprehensive: false, + }); + setCurrentFiltersChangeValue(filtersValue); + }} + /> +
+
{priceFilters.map((item, index) => (
{ const hasToken = await get("token"); - // console.log("hasToken", hasToken); - if(pathname.includes("wxpay_h5")){ - return + if (pathname.includes("wxpay_h5")) { + return; } if (hasToken) { const currentIsLogin = await checkAuth(); From 4ad9e4f4c64ed5d7c99d5537375100891ccdf3df Mon Sep 17 00:00:00 2001 From: al Date: Thu, 12 Sep 2024 19:14:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Drole=E4=B8=8D=E4=B8=BA3?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E4=B8=8D=E6=98=BE=E7=A4=BA=E4=BC=9A=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/my/page.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/app/my/page.js b/app/my/page.js index 650150e..d2cf46e 100644 --- a/app/my/page.js +++ b/app/my/page.js @@ -16,6 +16,7 @@ const My = () => { // setUserInfo(userInfo); getData(userInfo); } + console.log("userInfo", userInfo); // getData(userInfo); }, []); const getData = async (oldUserInfo) => { @@ -151,7 +152,27 @@ const My = () => { style={{ "--size": "76px", "--border-radius": "50%" }} />
-

{userInfo.name}

+ +

+ {userInfo.name} +

+ {userInfo?.is_a_member === 1 && ( + + )} +