进行decodeURIComponent处理

This commit is contained in:
al 2024-07-24 13:23:44 +08:00
parent e95fbf9c16
commit 56d50eb095
4 changed files with 48 additions and 40 deletions

View File

@ -13,17 +13,19 @@ export default function BillDetail({ params }) {
const searchParams = useSearchParams();
const getBase = useCallback((webviewBase)=>{
let searchParamsObj=null;
if(searchParams.get("b_mid")){
let currentBaseCode = searchParams.get("base")
if(currentBase){
let currentBase = decodeURIComponent(currentBaseCode);
searchParamsObj={};
searchParamsObj.b_mid=searchParams.get("b_mid");
searchParamsObj.b_did=searchParams.get("b_did");
searchParamsObj.b_ver=searchParams.get("b_ver");
searchParamsObj.b_dt=searchParams.get("b_dt");
searchParamsObj.b_model=searchParams.get("b_model");
searchParamsObj.b_nt=searchParams.get("b_nt");
searchParamsObj.b_token=searchParams.get("b_token");
searchParamsObj.b_ch=searchParams.get("b_ch");
searchParamsObj.b_ts=searchParams.get("b_ts");
searchParamsObj.b_mid=currentBase.get("b_mid");
searchParamsObj.b_did=currentBase.get("b_did");
searchParamsObj.b_ver=currentBase.get("b_ver");
searchParamsObj.b_dt=currentBase.get("b_dt");
searchParamsObj.b_model=currentBase.get("b_model");
searchParamsObj.b_nt=currentBase.get("b_nt");
searchParamsObj.b_token=currentBase.get("b_token");
searchParamsObj.b_ch=currentBase.get("b_ch");
searchParamsObj.b_ts=currentBase.get("b_ts");
}
return searchParamsObj || webviewBase;
},[searchParams]);

View File

@ -46,17 +46,19 @@ export default function Pay() {
const [isFetching, setIsFetching] = useState(true);
const getBase = useCallback((webviewBase)=>{
let searchParamsObj=null;
if(searchParams.get("b_mid")){
let currentBaseCode = searchParams.get("base")
if(currentBase){
let currentBase = decodeURIComponent(currentBaseCode);
searchParamsObj={};
searchParamsObj.b_mid=searchParams.get("b_mid");
searchParamsObj.b_did=searchParams.get("b_did");
searchParamsObj.b_ver=searchParams.get("b_ver");
searchParamsObj.b_dt=searchParams.get("b_dt");
searchParamsObj.b_model=searchParams.get("b_model");
searchParamsObj.b_nt=searchParams.get("b_nt");
searchParamsObj.b_token=searchParams.get("b_token");
searchParamsObj.b_ch=searchParams.get("b_ch");
searchParamsObj.b_ts=searchParams.get("b_ts");
searchParamsObj.b_mid=currentBase.get("b_mid");
searchParamsObj.b_did=currentBase.get("b_did");
searchParamsObj.b_ver=currentBase.get("b_ver");
searchParamsObj.b_dt=currentBase.get("b_dt");
searchParamsObj.b_model=currentBase.get("b_model");
searchParamsObj.b_nt=currentBase.get("b_nt");
searchParamsObj.b_token=currentBase.get("b_token");
searchParamsObj.b_ch=currentBase.get("b_ch");
searchParamsObj.b_ts=currentBase.get("b_ts");
}
return searchParamsObj || webviewBase;
},[searchParams]);

View File

@ -26,17 +26,19 @@ export default function Vip() {
const getBase = useCallback((webviewBase)=>{
let searchParamsObj=null;
if(searchParams.get("b_mid")){
let currentBaseCode = searchParams.get("base")
if(currentBase){
let currentBase = decodeURIComponent(currentBaseCode);
searchParamsObj={};
searchParamsObj.b_mid=searchParams.get("b_mid");
searchParamsObj.b_did=searchParams.get("b_did");
searchParamsObj.b_ver=searchParams.get("b_ver");
searchParamsObj.b_dt=searchParams.get("b_dt");
searchParamsObj.b_model=searchParams.get("b_model");
searchParamsObj.b_nt=searchParams.get("b_nt");
searchParamsObj.b_token=searchParams.get("b_token");
searchParamsObj.b_ch=searchParams.get("b_ch");
searchParamsObj.b_ts=searchParams.get("b_ts");
searchParamsObj.b_mid=currentBase.get("b_mid");
searchParamsObj.b_did=currentBase.get("b_did");
searchParamsObj.b_ver=currentBase.get("b_ver");
searchParamsObj.b_dt=currentBase.get("b_dt");
searchParamsObj.b_model=currentBase.get("b_model");
searchParamsObj.b_nt=currentBase.get("b_nt");
searchParamsObj.b_token=currentBase.get("b_token");
searchParamsObj.b_ch=currentBase.get("b_ch");
searchParamsObj.b_ts=currentBase.get("b_ts");
}
return searchParamsObj || webviewBase;
},[searchParams]);

View File

@ -18,17 +18,19 @@ export default function Pay({ params }) {
const [isFetching, setIsFetching] = useState(true);
const getBase = useCallback((webviewBase)=>{
let searchParamsObj=null;
if(searchParams.get("b_mid")){
let currentBaseCode = searchParams.get("base")
if(currentBase){
let currentBase = decodeURIComponent(currentBaseCode);
searchParamsObj={};
searchParamsObj.b_mid=searchParams.get("b_mid");
searchParamsObj.b_did=searchParams.get("b_did");
searchParamsObj.b_ver=searchParams.get("b_ver");
searchParamsObj.b_dt=searchParams.get("b_dt");
searchParamsObj.b_model=searchParams.get("b_model");
searchParamsObj.b_nt=searchParams.get("b_nt");
searchParamsObj.b_token=searchParams.get("b_token");
searchParamsObj.b_ch=searchParams.get("b_ch");
searchParamsObj.b_ts=searchParams.get("b_ts");
searchParamsObj.b_mid=currentBase.get("b_mid");
searchParamsObj.b_did=currentBase.get("b_did");
searchParamsObj.b_ver=currentBase.get("b_ver");
searchParamsObj.b_dt=currentBase.get("b_dt");
searchParamsObj.b_model=currentBase.get("b_model");
searchParamsObj.b_nt=currentBase.get("b_nt");
searchParamsObj.b_token=currentBase.get("b_token");
searchParamsObj.b_ch=currentBase.get("b_ch");
searchParamsObj.b_ts=currentBase.get("b_ts");
}
return searchParamsObj || webviewBase;
},[searchParams]);