tiefen_space_web/app/pay/jsapi/[body]/page.jsx

16 lines
541 B
JavaScript

"use client";
import React, { useEffect } from "react";
import { useRouter } from "next/navigation";
export default function JsApi({ params }) {
const router = useRouter();
useEffect(() => {
const redirect_uri = `https://tiefen.fun/pay/inweixin/${params.body}`;
router.replace(
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc28fd8aaf31984b6&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`
);
}, []);
return <section className="bg-white"></section>;
}