diff --git a/api/public.js b/api/public.js index f3fc6e9..5416ab4 100644 --- a/api/public.js +++ b/api/public.js @@ -2,6 +2,7 @@ import { get } from "@/utils/storeInfo"; import requireAPI from "@/utils/requireAPI"; import { Toast } from "antd-mobile"; import { JSEncrypt } from "jsencrypt"; +import baseRequest from "@/utils/baseRequest"; //关注和取关功能 export const handleLogout = async () => { const account = get("account"); @@ -168,7 +169,7 @@ export const createOrder = async (type = "alipay_h5") => { return; } - const base = webviewBaseRequest(); + const base = baseRequest(); const body = { ...base, product_id: customCoin.selected ? "h5_custom_coin" : selectedPrice.id, diff --git a/app/my/wallet/page.js b/app/my/wallet/page.js index b3085be..efc03c9 100644 --- a/app/my/wallet/page.js +++ b/app/my/wallet/page.js @@ -95,9 +95,10 @@ export default function Wallet() { // title: "充值中心", // uri: process.env.EXPO_PUBLIC_WEB_URL + "/pay", // }) + {console.log("base,base",base); router.push( - `/webView/${encodeURIComponent(`pay?mid=${encodeURIComponent(JSON.stringify(base))}`)}` - ) + `/webView/${encodeURIComponent(`pay?base=${encodeURIComponent(JSON.stringify(base))}`)}` + )} } className="flex justify-between items-center py-4 w-full" > diff --git a/app/search/page.js b/app/search/page.js index 0a2c251..b1f5d74 100644 --- a/app/search/page.js +++ b/app/search/page.js @@ -158,7 +158,7 @@ const ZoneItem = ({ data, showMore, link,search }) => { return ( {router.push(`/search?search=${search}`);router.push(link);}} + onClick={() => {router.push(link)}} key={data.id} arrow={false} > diff --git a/utils/baseRequest.js b/utils/baseRequest.js index 747976a..c90007b 100644 --- a/utils/baseRequest.js +++ b/utils/baseRequest.js @@ -11,6 +11,7 @@ export default function baseRequest() { b_ch: "h5", b_ts: b_ts, b_token: token, + b_did: navigator?.userAgent.slice(0,32), }; // console.log("baseRequest",baseRequest) return baseRequest; diff --git a/utils/webviewBaseRequest.js b/utils/webviewBaseRequest.js index 3e3539f..629540c 100644 --- a/utils/webviewBaseRequest.js +++ b/utils/webviewBaseRequest.js @@ -5,7 +5,7 @@ export default function webviewBaseRequest() { const b_ts = new Date().getTime(); const baseRequest = { b_mid: parseInt(cookies.b_mid), - b_did: navigator.userAgent, + b_did: window && window.navigator?.userAgent.slice(0,65), b_ver: cookies.b_ver, b_dt: parseInt(cookies.b_dt), b_model: cookies.b_model,