update(修改页面)
This commit is contained in:
parent
d6ebf4aef5
commit
7d465ca568
Binary file not shown.
|
@ -4,7 +4,7 @@
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/src/assets/img/logo.png" />
|
<link rel="icon" type="image/svg+xml" href="/src/assets/img/logo.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>NEER-APP-H5</title>
|
<title>Pineer</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
"react-i18next": "^14.0.1",
|
"react-i18next": "^14.0.1",
|
||||||
"react-router-dom": "^6.21.3",
|
"react-router-dom": "^6.21.3",
|
||||||
"sass": "^1.70.0",
|
"sass": "^1.70.0",
|
||||||
|
"ts-md5": "^1.3.1",
|
||||||
"zustand": "^4.5.0"
|
"zustand": "^4.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#root {
|
#root {
|
||||||
max-width: 1280px;
|
/* max-width: 1280px; */
|
||||||
margin: 0 auto;
|
/* margin: 0 auto; */
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,27 @@ import { request } from "./request";
|
||||||
import { AxiosRequestConfig } from 'axios';
|
import { AxiosRequestConfig } from 'axios';
|
||||||
|
|
||||||
//发送验证码
|
//发送验证码
|
||||||
export const sendCode = <T>(params: any,config:AxiosRequestConfig) =>
|
export const sendCode = <T>(params: {
|
||||||
|
areaCode?: string; // 区号,只有手机号才有
|
||||||
|
account: string; // 账号(邮箱或手机号)
|
||||||
|
status: 1 | 2; // 1=登录 2=注册
|
||||||
|
signature: string;
|
||||||
|
timestamp: string;
|
||||||
|
},config:AxiosRequestConfig) =>
|
||||||
request.get<T>("/api/account/sendVerificationCode", params, {
|
request.get<T>("/api/account/sendVerificationCode", params, {
|
||||||
timeout: 15000,
|
timeout: 15000,
|
||||||
...config
|
...config
|
||||||
});
|
});
|
||||||
//注册
|
//注册
|
||||||
export const signUp = <T>(params: any,config:AxiosRequestConfig) =>
|
export const signUp = <T>(params: {
|
||||||
|
account: string; // account
|
||||||
|
area?: string; // 顶级区域:朝鲜/平壤、中国/广东
|
||||||
|
areaCode?: string; // 区号,只有手机号才有
|
||||||
|
authCode: string; // 验证码
|
||||||
|
district?: string; // 二级区域:具体的区域
|
||||||
|
shareCode: string; // invitation code
|
||||||
|
userName: string; // 用户名称
|
||||||
|
},config:AxiosRequestConfig) =>
|
||||||
request.post<T>("/api/account/signUp", params, {
|
request.post<T>("/api/account/signUp", params, {
|
||||||
timeout: 15000,
|
timeout: 15000,
|
||||||
...config
|
...config
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<g>
|
<g>
|
||||||
<path
|
<path
|
||||||
d="M15.38570390625,3.583333L2.33317390625,3.583333C2.2623339062500003,3.583333,2.19317390625,3.592083,2.12692390625,3.6091670000000002L8.449003906249999,9.93083C8.61171390625,10.09349,8.87546390625,10.09349,9.03817390625,9.93083L15.38570390625,3.583333ZM16.28690390625,3.86042L11.19520390625,8.952079999999999L16.33070390625,14.0871C16.436903906250002,13.9471,16.49980390625,13.7725,16.49980390625,13.5833L16.49980390625,4.41667C16.49980390625,4.20292,16.41940390625,4.00833,16.28730390625,3.86042L16.28690390625,3.86042ZM15.48150390625,14.4167L10.60650390625,9.54125L9.62733390625,10.52042C9.13916390625,11.00867,8.347593906250001,11.00867,7.85942390625,10.52042L6.88067390625,9.54125L2.05400390625,14.3688C2.14150390625,14.3996,2.23525390625,14.4167,2.33358390625,14.4167L15.48190390625,14.4167L15.48150390625,14.4167ZM1.51275390625,13.7308L6.29150390625,8.95167L1.5306709062500001,4.19167C1.51018390625,4.26491,1.4998099062499999,4.34061,1.49983690625,4.41667L1.49983690625,13.5833C1.49983690625,13.6333,1.50400390625,13.6829,1.51275390625,13.7308ZM2.33317390625,2.75L15.66650390625,2.75C16.58700390625,2.75,17.33320390625,3.4961919999999997,17.33320390625,4.41667L17.33320390625,13.5833C17.33320390625,14.5038,16.58700390625,15.25,15.66650390625,15.25L2.33317390625,15.25C1.41269590625,15.25,0.66650390625,14.5038,0.66650390625,13.5833L0.66650390625,4.41667C0.666503757238,3.4961919999999997,1.41269590625,2.75,2.33317390625,2.75Z"
|
d="M15.38570390625,3.583333L2.33317390625,3.583333C2.2623339062500003,3.583333,2.19317390625,3.592083,2.12692390625,3.6091670000000002L8.449003906249999,9.93083C8.61171390625,10.09349,8.87546390625,10.09349,9.03817390625,9.93083L15.38570390625,3.583333ZM16.28690390625,3.86042L11.19520390625,8.952079999999999L16.33070390625,14.0871C16.436903906250002,13.9471,16.49980390625,13.7725,16.49980390625,13.5833L16.49980390625,4.41667C16.49980390625,4.20292,16.41940390625,4.00833,16.28730390625,3.86042L16.28690390625,3.86042ZM15.48150390625,14.4167L10.60650390625,9.54125L9.62733390625,10.52042C9.13916390625,11.00867,8.347593906250001,11.00867,7.85942390625,10.52042L6.88067390625,9.54125L2.05400390625,14.3688C2.14150390625,14.3996,2.23525390625,14.4167,2.33358390625,14.4167L15.48190390625,14.4167L15.48150390625,14.4167ZM1.51275390625,13.7308L6.29150390625,8.95167L1.5306709062500001,4.19167C1.51018390625,4.26491,1.4998099062499999,4.34061,1.49983690625,4.41667L1.49983690625,13.5833C1.49983690625,13.6333,1.50400390625,13.6829,1.51275390625,13.7308ZM2.33317390625,2.75L15.66650390625,2.75C16.58700390625,2.75,17.33320390625,3.4961919999999997,17.33320390625,4.41667L17.33320390625,13.5833C17.33320390625,14.5038,16.58700390625,15.25,15.66650390625,15.25L2.33317390625,15.25C1.41269590625,15.25,0.66650390625,14.5038,0.66650390625,13.5833L0.66650390625,4.41667C0.666503757238,3.4961919999999997,1.41269590625,2.75,2.33317390625,2.75Z"
|
||||||
fill="#f5d90a" fill-opacity="1" />
|
fill="#FCB44B" fill-opacity="1" />
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
@ -8,6 +8,7 @@ import { sendCode, signUp } from "../api";
|
||||||
import { sendCodeTypes, signUpTypes, ErrorType } from "../type/SignIn";
|
import { sendCodeTypes, signUpTypes, ErrorType } from "../type/SignIn";
|
||||||
import { Toast } from "antd-mobile";
|
import { Toast } from "antd-mobile";
|
||||||
import { useLocation, useNavigate } from "react-router-dom";
|
import { useLocation, useNavigate } from "react-router-dom";
|
||||||
|
import { Md5 } from "ts-md5";
|
||||||
|
|
||||||
function EmailForm() {
|
function EmailForm() {
|
||||||
const formRef: any = useRef()
|
const formRef: any = useRef()
|
||||||
|
@ -30,11 +31,16 @@ function EmailForm() {
|
||||||
if (email === "") {
|
if (email === "") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const timestamp = `${new Date().getTime()}`;
|
||||||
const res = await sendCode<sendCodeTypes>(
|
const res = await sendCode<sendCodeTypes>(
|
||||||
{
|
{
|
||||||
account: email,
|
account: email,
|
||||||
areaCode: "",
|
areaCode: "",
|
||||||
status: 2,
|
status: 2,
|
||||||
|
signature: Md5.hashStr(
|
||||||
|
`Neer${email},${2},${timestamp}GetCode`
|
||||||
|
),
|
||||||
|
timestamp
|
||||||
},
|
},
|
||||||
config
|
config
|
||||||
);
|
);
|
||||||
|
@ -50,7 +56,7 @@ function EmailForm() {
|
||||||
Toast.show({
|
Toast.show({
|
||||||
content: t('Send failure'),
|
content: t('Send failure'),
|
||||||
afterClose: () => {
|
afterClose: () => {
|
||||||
start(60 * 1000);
|
// start(60 * 1000);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -103,6 +109,7 @@ function EmailForm() {
|
||||||
areaCode: "",
|
areaCode: "",
|
||||||
authCode: authCode,
|
authCode: authCode,
|
||||||
shareCode: shareCode || formRef.current?.getFieldValue('shareCode'),
|
shareCode: shareCode || formRef.current?.getFieldValue('shareCode'),
|
||||||
|
userName: ""
|
||||||
},
|
},
|
||||||
config
|
config
|
||||||
);
|
);
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { useCountdown } from "../hooks/useCountdown";
|
||||||
import { sendCode, signUp } from "../api";
|
import { sendCode, signUp } from "../api";
|
||||||
import { sendCodeTypes, signUpTypes, ErrorType } from "../type/SignIn";
|
import { sendCodeTypes, signUpTypes, ErrorType } from "../type/SignIn";
|
||||||
import { Toast } from "antd-mobile";
|
import { Toast } from "antd-mobile";
|
||||||
|
import { Md5 } from "ts-md5";
|
||||||
function PhoneForm() {
|
function PhoneForm() {
|
||||||
const formRef: any = useRef()
|
const formRef: any = useRef()
|
||||||
const location = useLocation()
|
const location = useLocation()
|
||||||
|
@ -59,10 +59,15 @@ function PhoneForm() {
|
||||||
if (CurrentPhoneNumber === "") {
|
if (CurrentPhoneNumber === "") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const timestamp = `${new Date().getTime()}`;
|
||||||
const res = await sendCode<sendCodeTypes>({
|
const res = await sendCode<sendCodeTypes>({
|
||||||
account: CurrentPhoneNumber,
|
account: CurrentPhoneNumber,
|
||||||
areaCode: SelectCountry?.code || defaultAreaCode,
|
areaCode: SelectCountry?.code || defaultAreaCode,
|
||||||
status: 2,
|
status: 2,
|
||||||
|
signature: Md5.hashStr(
|
||||||
|
`Neer${CurrentPhoneNumber},${2},${timestamp}GetCode`
|
||||||
|
),
|
||||||
|
timestamp
|
||||||
}, config);
|
}, config);
|
||||||
console.log("res", res);
|
console.log("res", res);
|
||||||
if (res.status === 200 && res.data.data.sms) {
|
if (res.status === 200 && res.data.data.sms) {
|
||||||
|
@ -77,7 +82,7 @@ function PhoneForm() {
|
||||||
Toast.show({
|
Toast.show({
|
||||||
content: t('Send failure'),
|
content: t('Send failure'),
|
||||||
afterClose: () => {
|
afterClose: () => {
|
||||||
start(60 * 1000);
|
// start(60 * 1000);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -113,6 +118,7 @@ function PhoneForm() {
|
||||||
areaCode: SelectCountry?.code,
|
areaCode: SelectCountry?.code,
|
||||||
authCode: authCode,
|
authCode: authCode,
|
||||||
shareCode: shareCode || formRef.current?.getFieldValue('shareCode'),
|
shareCode: shareCode || formRef.current?.getFieldValue('shareCode'),
|
||||||
|
userName: ""
|
||||||
}, config)
|
}, config)
|
||||||
console.log('res', res)
|
console.log('res', res)
|
||||||
if (res.status === 200 && res.data.data.token) {
|
if (res.status === 200 && res.data.data.token) {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"Please enter SMS verification code":"Please enter SMS verification code",
|
"Please enter SMS verification code":"Please enter SMS verification code",
|
||||||
"Send verification code":"Send verification code",
|
"Send verification code":"Send verification code",
|
||||||
"Please enter the invitation code (optional)":"Please enter the invitation code (optional)",
|
"Please enter the invitation code (optional)":"Please enter the invitation code (optional)",
|
||||||
"register":"register",
|
"register":"Register",
|
||||||
"If you already have an account":"If you already have an account",
|
"If you already have an account":"If you already have an account",
|
||||||
"download the APP directly":"download the APP directly",
|
"download the APP directly":"download the APP directly",
|
||||||
"Continuing to represent you in agreeing to our":"Continuing to represent you in agreeing to our",
|
"Continuing to represent you in agreeing to our":"Continuing to represent you in agreeing to our",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
:
|
body,
|
||||||
{
|
html {
|
||||||
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
@ -13,16 +13,19 @@
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
#root {
|
#root {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background: #fafafb;
|
background: #fafafb;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #646cff;
|
color: #646cff;
|
||||||
text-decoration: inherit;
|
text-decoration: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
color: #535bf2;
|
color: #535bf2;
|
||||||
}
|
}
|
||||||
|
@ -51,9 +54,11 @@ button {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: border-color 0.25s;
|
transition: border-color 0.25s;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:hover {
|
button:hover {
|
||||||
border-color: #646cff;
|
border-color: #646cff;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:focus,
|
button:focus,
|
||||||
button:focus-visible {
|
button:focus-visible {
|
||||||
outline: 4px auto -webkit-focus-ring-color;
|
outline: 4px auto -webkit-focus-ring-color;
|
||||||
|
@ -68,10 +73,12 @@ button:focus-visible {
|
||||||
color: #213547;
|
color: #213547;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
color: #747bff;
|
color: #747bff;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -27,7 +27,7 @@
|
||||||
height: 2.75rem;
|
height: 2.75rem;
|
||||||
border-radius: .3125rem;
|
border-radius: .3125rem;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: .0625rem solid #f5d90a;
|
border: .0625rem solid #FCB44B;
|
||||||
margin-bottom: 1.25rem;
|
margin-bottom: 1.25rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import googleIcon from '../assets/img/google.png'
|
// import googleIcon from '../assets/img/google.png'
|
||||||
import appStoreIcon from '../assets/img/app_store.png'
|
// import appStoreIcon from '../assets/img/app_store.png'
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import Logo from "../assets/img/logo.png"
|
import Logo from "../assets/img/logo.png"
|
||||||
|
|
||||||
|
@ -14,14 +14,14 @@ function Download() {
|
||||||
<img src={Logo} alt="" />
|
<img src={Logo} alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div className="btn-box">
|
<div className="btn-box">
|
||||||
<div className="btn-item">
|
{/* <div className="btn-item">
|
||||||
<img src={googleIcon}alt="" />
|
<img src={googleIcon}alt="" />
|
||||||
<a href="">Google Play</a>
|
<a>Google Play</a>
|
||||||
</div>
|
</div>
|
||||||
<div className="btn-item">
|
<div className="btn-item">
|
||||||
<img src={appStoreIcon} alt="" />
|
<img src={appStoreIcon} alt="" />
|
||||||
<a href="">App Store</a>
|
<a>App Store</a>
|
||||||
</div>
|
</div> */}
|
||||||
<div className="btn-item">
|
<div className="btn-item">
|
||||||
<a href="https://d.pineer.cc/app-release.apk">{t('Download')} APK</a>
|
<a href="https://d.pineer.cc/app-release.apk">{t('Download')} APK</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.area-box {
|
.area-box {
|
||||||
overflow: scroll;
|
overflow-y: scroll;
|
||||||
height: calc(100vh - 7.5rem);
|
height: calc(100vh - 7.5rem);
|
||||||
padding: 0 1.5rem;
|
padding: 0 1.5rem;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@ -69,8 +69,8 @@
|
||||||
line-height: 3.25rem;
|
line-height: 3.25rem;
|
||||||
border-bottom: .0625rem solid #D8D8D8;
|
border-bottom: .0625rem solid #D8D8D8;
|
||||||
&.selected {
|
&.selected {
|
||||||
border-bottom: .0625rem solid #f5d90a;
|
border-bottom: .0625rem solid #FCB44B;
|
||||||
color: #f5d90a;
|
color: #FCB44B;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,8 +49,8 @@
|
||||||
margin-right: 2.0625rem;
|
margin-right: 2.0625rem;
|
||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
border-bottom: .0625rem solid #f5d90a;
|
border-bottom: .0625rem solid #FCB44B;
|
||||||
color: #f5d90a;
|
color: #FCB44B;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
width: 6.1875rem;
|
width: 6.1875rem;
|
||||||
height: 2.75rem;
|
height: 2.75rem;
|
||||||
border-radius: .3125rem;
|
border-radius: .3125rem;
|
||||||
background: #f5d90a;
|
background: #FCB44B;
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
font-size: .75rem;
|
font-size: .75rem;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
|
|
@ -92,7 +92,7 @@ function SignIn() {
|
||||||
{selectIndex === 1 && <PhoneForm></PhoneForm>}
|
{selectIndex === 1 && <PhoneForm></PhoneForm>}
|
||||||
<div className="to-download">
|
<div className="to-download">
|
||||||
<p style={{ color: '#999999' }}>{t("If you already have an account")}</p>
|
<p style={{ color: '#999999' }}>{t("If you already have an account")}</p>
|
||||||
<p onClick={() => navigate("/Download")}>{t("download the APP directly")}</p>
|
<p onClick={() => navigate("/Download")}>{t("Download the APP directly")}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="terms-service">
|
<div className="terms-service">
|
||||||
<p>{t("Continuing to represent you in agreeing to our")}</p>
|
<p>{t("Continuing to represent you in agreeing to our")}</p>
|
||||||
|
|
|
@ -2366,6 +2366,7 @@ __metadata:
|
||||||
react-i18next: "npm:^14.0.1"
|
react-i18next: "npm:^14.0.1"
|
||||||
react-router-dom: "npm:^6.21.3"
|
react-router-dom: "npm:^6.21.3"
|
||||||
sass: "npm:^1.70.0"
|
sass: "npm:^1.70.0"
|
||||||
|
ts-md5: "npm:^1.3.1"
|
||||||
typescript: "npm:^5.3.3"
|
typescript: "npm:^5.3.3"
|
||||||
vite: "npm:^5.0.8"
|
vite: "npm:^5.0.8"
|
||||||
zustand: "npm:^4.5.0"
|
zustand: "npm:^4.5.0"
|
||||||
|
@ -3054,6 +3055,13 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"ts-md5@npm:^1.3.1":
|
||||||
|
version: 1.3.1
|
||||||
|
resolution: "ts-md5@npm:1.3.1"
|
||||||
|
checksum: 10c0/1a3963172184ab260eadb0c34c597f97e64ecd5151c9cee3fe24c275945c659096adcb2a70f7ee434d7d163309f52e6df968a3ebaeee0cd422695c3650bdd6b8
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"tslib@npm:^2.4.1, tslib@npm:^2.5.0":
|
"tslib@npm:^2.4.1, tslib@npm:^2.5.0":
|
||||||
version: 2.6.2
|
version: 2.6.2
|
||||||
resolution: "tslib@npm:2.6.2"
|
resolution: "tslib@npm:2.6.2"
|
||||||
|
|
Loading…
Reference in New Issue