Просмотр исходного кода

Guest 登录保存账号密码提示

zhejiushizhuce 2 лет назад
Родитель
Сommit
e31d49b895

+ 4 - 4
src/db/areaApi.js

@@ -3,22 +3,22 @@ const areaApi=[
     {
         id:1,
         areaID:1,
-        api:"http://brapi.24680.org/"
+        api:"https://brapi.24680.org/"
     },
     {
         id:2,
         areaID:2,
-        api:"http://mxapi.24680.org/"
+        api:"https://mxapi.24680.org/"
     },
     {
         id:3,
         areaID:3,
-        api:"http://ruapi.24680.org/"
+        api:"https://ruapi.24680.org/"
     },
     {
         id:4,
         areaID:4,
-        api:"http://euapi.24680.org/"
+        api:"https://euapi.24680.org/"
     }
 ]
 export default areaApi;

+ 10 - 0
src/features/mainSlice.js

@@ -45,6 +45,7 @@ import {
 } from "@constants/localkey";
 import {reqPayConfig} from "@features/paySlice";
 import FingerprintJS from '@fingerprintjs/fingerprintjs'
+import {APP_LOGIN_TYPE} from "@constants/app";
 const i18n=global.i18n;
 const generateNavs=(routes)=>{
     const navs=[];
@@ -359,6 +360,15 @@ const parseLogin=(state,action,arg,isShowMsg=true)=>{
             trackEvent("CompleteRegistration",{external_id:data.UserID})
         }
         checkChannel(data);
+        if (arg.type!=null&&arg.type===APP_LOGIN_TYPE.GUEST){
+            let {account,password}=data;
+            if (account!=null&&password!=null){
+                global.showSaveAccount({
+                    account,
+                    password
+                })
+            }
+        }
     }
     else
     {

+ 4 - 3
src/widgets/LoginForm/index.jsx

@@ -273,15 +273,16 @@ const LoginForm = ({close}) => {
         let item=getAreaItem();
         if (item==null)return (<></>);
         return (
-            <button type={"button"} className={styles.area_btn} onClick={()=>{
+            <button type={"button"} className={styles.area_btn} onClick={() => {
                 global.showAreaSelect();
             }}>
+                <img className={styles.flag} src={item.icon}/>
                 <span>{i18n.t(item.name)}</span>
                 <SvgIcon className={styles.icon} herf={"icon_Arrow"}></SvgIcon>
             </button>
         )
     }
-    const renderLoginToReg=()=>{
+    const renderLoginToReg = () =>{
         return (
             <div className={"d-flex flex-row align-items-center justify-content-between"}>
                 <div className={styles.l_reg_new}>
@@ -900,7 +901,7 @@ const LoginForm = ({close}) => {
     const renderRegGuest=()=>{
         return (
             <form key={"reg_guest"} autoComplete="off" className={styles.l_form} onSubmit={handleSubmit((data) => {
-                data.type=APP_LOGIN_TYPE.MAIL;
+                data.type=APP_LOGIN_TYPE.GUEST;
                 onSubmitReg(data);
             })}>
                 <button className={"button-green"}>

+ 5 - 0
src/widgets/LoginForm/styles.module.scss

@@ -139,4 +139,9 @@
     fill: var(--text);
     transform: rotate(90deg);
   }
+  & .flag{
+    width: 1.3rem;
+    height: auto;
+    margin-right: 0.2rem;
+  }
 }