更改图片宽度

This commit is contained in:
al 2024-08-09 21:02:50 +08:00
parent 0419b405fc
commit c23977cf1e
3 changed files with 20 additions and 10 deletions

View File

@ -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);
}

View File

@ -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() {
<Image
fit="cover"
// src={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/icons/nodata.png"}
src={"/icons/ios_share.png"}
src={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/icons/ios_share.png"}
placeholder=""
width={32}
height={32}
@ -76,7 +76,7 @@ export default function AddToHome() {
<Image
fit="contain"
// src={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/icons/nodata.png"}
src={"/images/addToHome.png"}
src={process.env.NEXT_PUBLIC_WEB_ASSETS_URL+"/images/addToHome.png"}
placeholder=""
width={54}
height={70}

View File

@ -35,11 +35,13 @@ export default function Photos({
let imgArr = media.images.map((item) => ({
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={
<div className="w-full min-h-[24vw] bg-[#1d1d1d] rounded"></div>
}
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" : ""