diff --git a/app/login/page.js b/app/login/page.js index 5acf906..5da505f 100644 --- a/app/login/page.js +++ b/app/login/page.js @@ -416,6 +416,7 @@ function Login({ handleLogin }) { placeholder="请输入密码" name="password" type="password" + maxLength={15} onChange={(value) => { setLoginInfo({ ...loginInfo, password: value }); }} diff --git a/app/space/setting/spaceRefund/page.jsx b/app/space/setting/spaceRefund/page.jsx index ad6b5c3..11e6bf9 100644 --- a/app/space/setting/spaceRefund/page.jsx +++ b/app/space/setting/spaceRefund/page.jsx @@ -169,7 +169,6 @@ export default function SpaceRefund() { placeholder="请输入联系方式" onChange={(value) => setContact(value)} value={contact} - maxLength={20} className="bg-[#FFFFFF1A] text-white rounded-2xl mt-2 p-2" style={{ "--placeholder-color": "#FFFFFF80", diff --git a/components/OwnInput/index.js b/components/OwnInput/index.js index d388e75..d8e5550 100644 --- a/components/OwnInput/index.js +++ b/components/OwnInput/index.js @@ -15,6 +15,7 @@ export default function OwnInput({ className, inputClassName = "", id, + maxLength = 999, }) { return (
@@ -24,7 +25,7 @@ export default function OwnInput({ disabled={disabled} name={name} type={type} - maxLength={11} + maxLength={maxLength} onChange={(e) => onChange(e.target?.value)} value={value} className={`w-full placeholder:text-[#FFFFFF80] text-[16px] focus:text-[16px] ${inputClassName}`} diff --git a/utils/tools.js b/utils/tools.js index f9e65cf..12c2882 100644 --- a/utils/tools.js +++ b/utils/tools.js @@ -1,3 +1,4 @@ +import { Toast } from "antd-mobile"; //格式化时间戳 export function formatDeadline(timestamp) { const date = new Date(timestamp * 1000); // 时间戳以秒为单位,需要乘以1000转换成毫秒 @@ -144,7 +145,12 @@ export function getVideoBase64(url) { // 监听视频事件,在发生错误时 Promise 会 reject video.addEventListener("error", function () { - reject(new Error("视频加载错误")); + // reject(new Error("视频加载错误")); + Toast.show({ + icon: "fail", + content: "请更换浏览器,IOS用户建议使用Safari。", + position: "top", + }); // 清除内存 canvas.remove(); video.remove();