diff --git a/components/Banner/index.jsx b/components/Banner/index.jsx index bd0814f..8bf5466 100644 --- a/components/Banner/index.jsx +++ b/components/Banner/index.jsx @@ -40,6 +40,7 @@ export default function Banner({ onPress={() => { const linkAndParams = goToPage(banner?.link); const link = banner?.link; + console.log("linkAndParams", linkAndParams); if (typeof linkAndParams === "string") { if ( link?.action === "webViewHeaderInward" || diff --git a/screeens/NoticeDetail/components/MessageList/index.jsx b/screeens/NoticeDetail/components/MessageList/index.jsx index 28a82e4..b77aa0b 100644 --- a/screeens/NoticeDetail/components/MessageList/index.jsx +++ b/screeens/NoticeDetail/components/MessageList/index.jsx @@ -280,13 +280,12 @@ const MessageList = ({ navigation, noticeCount, refInstance }) => { const links = scollNotice?.hyperlinks; let link = null; if (links.length > 1) { - link = links.filter((it) => it.inward_action_type === "app")[0] - ?.url; + link = links.filter((it) => it.action === "inward")[0]?.url; } else { link = links[0]?.url; } const linkAndParams = goToPage({ - action: links[0]?.inward_action_type, + action: links[0]?.action, url: link, }); return linkAndParams; diff --git a/screeens/NoticeDetail/components/NoticeItem/index.jsx b/screeens/NoticeDetail/components/NoticeItem/index.jsx index 015b16a..eeea6b5 100644 --- a/screeens/NoticeDetail/components/NoticeItem/index.jsx +++ b/screeens/NoticeDetail/components/NoticeItem/index.jsx @@ -68,15 +68,14 @@ export default function NoticeItem({ navigation, leftIcon, hasLink, data }) { const links = data?.hyperlinks; let link = null; if (links.length > 1) { - link = links.filter( - (it) => it.inward_action_type === "app" - )[0]?.params; + link = links.filter((it) => it.action === "inward")[0] + ?.params; } else { link = links[0]?.params; } const linkAndParams = goToPage({ url: link, - action: links[0]?.inward_action_type, + action: links[0]?.action, }); if (typeof linkAndParams === "string") { if ( diff --git a/screeens/Search/HostList/index.jsx b/screeens/Search/HostList/index.jsx index 63016c6..45e038c 100644 --- a/screeens/Search/HostList/index.jsx +++ b/screeens/Search/HostList/index.jsx @@ -122,14 +122,12 @@ export default function HostList() { const links = item?.hyperlinks; let link = null; if (links.length > 1) { - link = links.filter( - (it) => it.inward_action_type === "app" - )[0]?.url; + link = links.filter((it) => it.action === "inward")[0]?.url; } else { link = links[0]?.url; } const linkAndParams = goToPage({ - action: links[0]?.inward_action_type, + action: links[0]?.action, url: link, }); if (typeof linkAndParams === "string") { diff --git a/utils/tools.js b/utils/tools.js index b4f4dff..e51e260 100644 --- a/utils/tools.js +++ b/utils/tools.js @@ -55,7 +55,7 @@ export function debounce(fn, delay) { } // 跳转页面 export function goToPage({ url, action }) { - if (action !== "app") return url; + if (action !== "inward") return url; let linkArr = url.split("?"); const params = linkArr[1]?.split("&");