我有这样的链接!
`http://localhost:3000/admin/useractivation/mssh@gmail.com/%ecF%0d%e8%7c%8e%f9%2cD%f2%8ea%3b%07D%b2%7b%05%e6S%18cm_K%83%98%1f%b9%1c%ad%89N4%d3%e0%d9%1c%ba%8f%0aE%27%c2*-M%d6%05%cf%06%e4%d5%d8%d8%07%3d%e6%08k4%为%fb%c5!
我正在尝试获取值
mssh@gmail.com
%ecF%0d%e8%7c%8e%f9%2cD%f2%8ea%3b%07D%b2%7b%05%e6S%18cm_K%83%98%1f%b9%1c%ad%89N4%d3%e0%d9%1c%ba%8f%0aE%27%c2*-M%d6%05%cf%06%e4%d5%d8%07%3d%e6%08k4%be%fb%c5!
稍后将其用于身份验证过程(例如更改密码(。我的代码看起来像这个
mport Layout from "components/admin/layout/Layout";
import UserActivationForm from "components/admin/user/UserActivationForm";
import { useRouter } from "next/router";
import React from "react";
const Home = () => {
const router = useRouter()
const { slug } = router.query
console.log(slug)
return (
<Layout
title="Title"
description="Admin"
ogImage=""
url=""
>
<UserActivationForm />
</Layout>
);
};
export default Home;
如果我使用类似的链接
`http://localhost:3000/admin/useractivation/mssh@gmail.com/eeeee我可以从router.query 获取数组
[mssh@gmail.com,eeeee]
我怎样才能得到像(resetCodeHash(这样的字符串
%ecF%0d%e8%7c%8e%f9%2cD%f2%8ea%3b%07D%b2%7b%05%e6S%18cm_K%83%98%1f%b9%1c%ad%89N4%d3%e0%d9%1c%ba%8f%0aE%27%c2*-M%d6%05%cf%06%e4%d5%d8%d8%07%3d%e6%08k4%是%fb%c5!
提前感谢
%ecF%0d%e8%7c%8e%f9%2cD%f2%8ea%3b%07D%b2%7b%05%e6S%18cm_K%83%98%1f%b9%1c%ad%89N4%d3%e0%d9%1c%ba%8f%0aE%27%c2*-M%d6%05%cf%06%e4%d5%d8%07%3d%e6%08k4%be%fb%c5!
是resetCode=>字节数组。。。。字节[]我解决了把这个改成tolken!(字符串(
谢谢!