添加webviewBase监听
This commit is contained in:
parent
c0c9520fee
commit
ae2d164b84
|
@ -11,6 +11,7 @@ export default function BillDetail({ params }) {
|
|||
const [data, setData] = useState([]);
|
||||
const [isFetching, setIsFetching] = useState(true);
|
||||
const searchParams = useSearchParams();
|
||||
const webviewBase = webviewBaseRequest()
|
||||
const base = useMemo(()=>{
|
||||
let searchParamsObj=null;
|
||||
if(searchParams.get("b_mid")){
|
||||
|
@ -25,8 +26,8 @@ export default function BillDetail({ params }) {
|
|||
searchParamsObj.b_ch=searchParams.get("b_ch");
|
||||
searchParamsObj.b_ts=searchParams.get("b_ts");
|
||||
}
|
||||
return searchParamsObj || webviewBaseRequest();
|
||||
},[searchParams]);
|
||||
return searchParamsObj || webviewBase;
|
||||
},[searchParams,webviewBase]);
|
||||
useEffect(() => {
|
||||
const getData = async () => {
|
||||
let type;
|
||||
|
|
|
@ -44,6 +44,7 @@ export default function Pay() {
|
|||
|
||||
//获取当前充值档位
|
||||
const [isFetching, setIsFetching] = useState(true);
|
||||
const webviewBase = webviewBaseRequest()
|
||||
const base = useMemo(()=>{
|
||||
let searchParamsObj=null;
|
||||
if(searchParams.get("b_mid")){
|
||||
|
@ -58,8 +59,8 @@ export default function Pay() {
|
|||
searchParamsObj.b_ch=searchParams.get("b_ch");
|
||||
searchParamsObj.b_ts=searchParams.get("b_ts");
|
||||
}
|
||||
return searchParamsObj || webviewBaseRequest();
|
||||
},[searchParams]);
|
||||
return searchParamsObj || webviewBase;
|
||||
},[searchParams,webviewBase]);
|
||||
useEffect(() => {
|
||||
const getData = async () => {
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ export default function Vip() {
|
|||
const [isVip, setIsVip] = useState(false);
|
||||
const [name, setName] = useState("");
|
||||
const [isFetching, setIsFetching] = useState(true);
|
||||
const webviewBase = webviewBaseRequest()
|
||||
const base = useMemo(()=>{
|
||||
let searchParamsObj=null;
|
||||
if(searchParams.get("b_mid")){
|
||||
|
@ -37,8 +38,8 @@ export default function Vip() {
|
|||
searchParamsObj.b_ch=searchParams.get("b_ch");
|
||||
searchParamsObj.b_ts=searchParams.get("b_ts");
|
||||
}
|
||||
return searchParamsObj || webviewBaseRequest();
|
||||
},[searchParams]);
|
||||
return searchParamsObj || webviewBase;
|
||||
},[searchParams,webviewBase]);
|
||||
const getUserData = async () => {
|
||||
try {
|
||||
const signature = generateSignature({
|
||||
|
|
|
@ -16,6 +16,7 @@ export default function Pay({ params }) {
|
|||
//超粉商品数据
|
||||
const [superfanshipData, setSuperfanshipData] = useState();
|
||||
const [isFetching, setIsFetching] = useState(true);
|
||||
const webviewBase = webviewBaseRequest()
|
||||
const base = useMemo(()=>{
|
||||
let searchParamsObj=null;
|
||||
if(searchParams.get("b_mid")){
|
||||
|
@ -30,8 +31,8 @@ export default function Pay({ params }) {
|
|||
searchParamsObj.b_ch=searchParams.get("b_ch");
|
||||
searchParamsObj.b_ts=searchParams.get("b_ts");
|
||||
}
|
||||
return searchParamsObj || webviewBaseRequest();
|
||||
},[searchParams]);
|
||||
return searchParamsObj || webviewBase;
|
||||
},[searchParams,webviewBase]);
|
||||
//获取当前选购的商品数据
|
||||
const getData = async () => {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue