Jelajahi Sumber

fix: 更新客服链接bug

Before 9 bulan lalu
induk
melakukan
6a480ca6bb

+ 34 - 3
messages/en.json

@@ -296,10 +296,41 @@
   },
   "code": {
     "200": "successful",
-    "1005": "Invalid username or password.",
+
+    "400": "Parameter error",
+    "401": "privilege grant failed",
+    "403":"Request Rejected",
+    "500": "System error",
+    "800":"Resource locking in progress",
+    "1000": "unknown error",
+    "1001":"The resource already exists",
+    "1002": "The resource does not exist",
+    "1003":"Business logic does not pass",
+    "1004": "Status code error",
+    "1005": "Wrong password",
+    "1006": "Insufficient inventory prevents purchasing",
+    "1007":"SKU resource does not exist",
+    "1008": "Phone number is incorrectly formatted",
     "1009": "There is no such user",
-    "1010": "The phone number is already connected to another client.",
-    "1008": "Phone number is incorrectly formatted"
+    "1010": "The user is registered",
+    "1011":"Too many errors are prohibited",
+    "1012": "User banned",
+    "1200":"Insufficient inventory",
+    "1201": "",
+    "1202":"",
+    "1300": "",
+    "1301":"",
+    "1400": "",
+    "1401":"",
+    "1402": "",
+    "1403":"",
+    "1404": "",
+    "1405":"",
+    "1406": "",
+    "1407":"",
+    "1501": "",
+    "1502":"",
+    "1503": ""
   },
   "这是占位符": "",
   "form": {

+ 6 - 0
src/api/customservice.ts

@@ -26,6 +26,9 @@ export const getServicesApi = async () => {
         })
         .then((res) => {
             return res.data;
+        })
+        .catch((err) => {
+            return [];
         });
 };
 // 获取社交媒体链接
@@ -41,5 +44,8 @@ export const getSocialsApi = async () => {
         })
         .then((res) => {
             return res.data;
+        })
+        .catch((err) => {
+            return [];
         });
 };

+ 1 - 1
src/app/[locale]/(TabBar)/(ordinary)/deposit/DepositData.tsx

@@ -55,7 +55,7 @@ const DepositData: FC<Props> = (props) => {
                     return (
                         <Fragment key={item.id}>
                             <p
-                                className="btn-box"
+                                className="btn-box truncate"
                                 style={{
                                     borderColor: activeType.id === item.id ? "#ff9323" : "#333",
                                 }}

+ 1 - 1
src/app/[locale]/(TabBar)/(ordinary)/deposit/page.scss

@@ -20,7 +20,6 @@
       height: .3rem;
       margin-right: .06rem;
       width: .98rem !important;
-      -ms-flex-negative: 0;
       flex-shrink: 0;
       border-radius: .05rem;
       line-height: .28rem;
@@ -32,6 +31,7 @@
       color: #868686;
       font-size: .1rem;
       line-height: .28rem;
+      overflow: hidden;
       cursor: pointer;
       text-align: center;
       font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, Helvetica, Segoe UI, Arial, Roboto, PingFang SC, miui, Hiragino Sans GB, Microsoft Yahei, sans-serif;

+ 1 - 0
src/app/[locale]/(TabBar)/(ordinary)/profile/ProfileHeader.tsx

@@ -28,6 +28,7 @@ type Props = {
 };
 const VipCard = (props: { userVip: UserVipInfo }) => {
     const { userVip } = props;
+    console.log(`🚀🚀🚀🚀🚀-> in ProfileHeader.tsx on 31`, userVip);
     const t = useTranslations("ProfilePage");
 
     // Vip 图标

+ 1 - 0
src/app/[locale]/(TabBar)/[[...share]]/@actionWidget/Service.tsx

@@ -13,6 +13,7 @@ interface Props {
 const ServiceWidget: FC<Props> = (props) => {
     const { services, socials } = props;
     const defaultService = services.find((item) => item.is_suspend === 1);
+
     const newServices = services.filter((item) => item.is_suspend !== 1);
     const setSocials = useSocialStore((state) => state.setSocials);
     useEffect(() => {

+ 1 - 1
src/app/[locale]/(TabBar)/[[...share]]/_home/HomePromotion.tsx

@@ -61,7 +61,7 @@ const HomePromotion: FC<Props> = (props) => {
                                     actionData={promotion.action_params}
                                 >
                                     <img
-                                        className={"h-[2.5rem] w-[100%] pb-[0.1111rem]"}
+                                        className={"h-[2.3rem] w-[100%] pb-[0.1111rem]"}
                                         src={promotion.content.image}
                                         alt={promotion.content.title}
                                     />

+ 1 - 0
src/app/[locale]/(TabBar)/[[...share]]/page.tsx

@@ -20,6 +20,7 @@ const getGames = async () => {
 
 export default async function Page() {
     const group = await getGames();
+    console.log(`🚀🚀🚀🚀🚀-> in page.tsx on 23`, group);
     return (
         <>
             <HomeTabs tabs={group} />

+ 3 - 2
src/app/[locale]/(enter)/resetPhone/page.tsx

@@ -16,7 +16,8 @@ const ResetPhone: FC<Props> = () => {
     const router: any = useRouter();
     let [userPhone, setUserPhone] = useState("");
     const changeUserPhone = (e: { target: { value: any } }) => {
-        setUserPhone(e.target.value);
+        const value = e.target.value.replace(/[^0-9]/g, "");
+        setUserPhone(value);
     };
     let [msgError, setMsgError] = useState("");
     const blurVerifyPhone = (e: { target: { value: any } }) => {
@@ -65,7 +66,7 @@ const ResetPhone: FC<Props> = () => {
                 </div>
                 {msgError && <div className="tips"> {msgError} </div>}
                 <div className="btnContent">
-                    <ButtonOwn active={userPhone.length == 11} callbackFun={checkUserPhoneRequest}>
+                    <ButtonOwn active callbackFun={checkUserPhoneRequest}>
                         {t("Continuar")}
                     </ButtonOwn>
                 </div>

+ 1 - 1
src/app/[locale]/confirmPassword/page.tsx

@@ -54,7 +54,7 @@ const ResetPhone: FC<Props> = () => {
                 }
             })
             .catch((error) => {
-                Toast.show(error.data.msg);
+                Toast.show(t(`code.${error.data.code}`));
             });
     };
 

+ 2 - 2
src/app/[locale]/verification/page.tsx

@@ -16,7 +16,7 @@ const ResetPhone: FC<Props> = () => {
     const router: any = useRouter();
     let [code, setCode] = useState("");
     const changeCode = (e: { target: { value: any } }) => {
-        setCode(e.target.value);
+        setCode(e.target.value.replace(/[^0-9]/g, ""));
     };
 
     let searchParams = useSearchParams();
@@ -72,7 +72,7 @@ const ResetPhone: FC<Props> = () => {
                 </div>
                 <div className="phoneInput">
                     <input
-                        type="tel"
+                        type="number"
                         value={code}
                         onChange={changeCode}
                         placeholder={t("Reenviar")}

+ 0 - 1
src/utils/client/axios.ts

@@ -52,7 +52,6 @@ export default class Request {
                     if (config && config?.toast) {
                         Toast.show({
                             icon: "loading",
-                            content: "请求中...",
                             duration: 0,
                             maskClickable: false,
                         });

+ 1 - 0
src/utils/methods/index.ts

@@ -77,5 +77,6 @@ export let copyText = function (text: string) {
  * @description 两个数值计算百分比
  */
 export const percentage = (current: number, source: number) => {
+    console.log(`🚀🚀🚀🚀🚀-> in index.ts on 80`, current, source);
     return (current * 100) / source;
 };