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