diff --git a/app/login/page.js b/app/login/page.js index cf13426..3eedeab 100644 --- a/app/login/page.js +++ b/app/login/page.js @@ -155,11 +155,11 @@ function Login({ handleLogin }) { } ); if (data.ret === -1) { - // Toast.show({ - // icon: "fail", - // content: data.msg, - // position: "top", - // }); + Toast.show({ + icon: "fail", + content: data.msg, + position: "top", + }); return; } //登录 @@ -208,7 +208,7 @@ function Login({ handleLogin }) { const mobile_phone = encrypt.encrypt(mobilePhone); //发送短信验证码 try { - await fetch(`/api/veri_code/send`, { + const data = await fetch(`/api/veri_code/send`, { method: "POST", headers: { "Content-Type": "application/json", @@ -218,6 +218,14 @@ function Login({ handleLogin }) { region_code: regionCode, }), }); + if (data.ret === -1) { + Toast.show({ + icon: "fail", + content: data.msg, + position: "top", + }); + return; + } } catch (error) { console.error(error); } diff --git a/components/AddToHome/index.jsx b/components/AddToHome/index.jsx index 1f37e6b..eceaaa4 100644 --- a/components/AddToHome/index.jsx +++ b/components/AddToHome/index.jsx @@ -24,7 +24,7 @@ export default function AddToHome() { fit="cover" className="rounded-md mr-3" // src={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/icons/nodata.png"} - src={"/images/icon.png"} + src={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/images/icon.png"} placeholder="" width={46} height={46} @@ -66,7 +66,7 @@ export default function AddToHome() { ({ type: "img", url: item.urls?.[0], + fullwidth:item.w>item.h })); let videoArr = media.videos.map((item) => ({ type: "video", url: item.cover_urls?.[0], mp4: item.urls?.[0], + fullwidth:item.cover_w>item.cover_h })); let arr = [...imgArr, ...videoArr]; let newPhotos = [...arr]; @@ -249,7 +251,7 @@ export default function Photos({ placeholder={
} - width={currentPhotos.length > 1 ? "24vw" : "46vw"} + width={currentPhotos.length > 1 ? "24vw" : item.fullwidth?"100%":"46vw"} height={currentPhotos.length > 1 ? "24vw" : "100%"} className={`rounded max-w-full ${ item?.type == "hid" && type == "space" ? "imageBlur" : ""