diff --git a/src/api/cms/cmsArticle/index.ts b/src/api/cms/cmsArticle/index.ts index 94339ec..608c0e5 100644 --- a/src/api/cms/cmsArticle/index.ts +++ b/src/api/cms/cmsArticle/index.ts @@ -207,7 +207,7 @@ export async function getByIds(params?: CmsArticleParam) { /** * 根据code查询文章 */ -export async function getCmsArticleByCode(code: string) { +export async function getByCode(code: string) { const res = await request.get>( '/cms/cms-article/getByCode/' + code ); diff --git a/src/api/cms/cmsNavigation/index.ts b/src/api/cms/cmsNavigation/index.ts index c293d18..7eb316f 100644 --- a/src/api/cms/cmsNavigation/index.ts +++ b/src/api/cms/cmsNavigation/index.ts @@ -123,3 +123,16 @@ export async function getNavigationByPath(params: CmsNavigationParam) { } +/** + * 根据code查询导航 + */ +export async function getByCode(code: string) { + const res = await request.get>( + '/cms/cms-navigation/getByCode/' + code + ); + if (res.code === 0 && res.data) { + return res.data; + } + return Promise.reject(new Error(res.message)); +} + diff --git a/src/app.ts b/src/app.ts index 94746fc..3997a8e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -11,7 +11,7 @@ import { useConfig } from "@/hooks/useConfig"; // 引入新的自定义Hook function App(props: { children: any; }) { const { refetch: handleTheme } = useConfig(); // 使用新的Hook - + const reload = () => { Taro.login({ success: (res) => { @@ -78,11 +78,7 @@ function App(props: { children: any; }) { // 显示邀请提示 setTimeout(() => { - Taro.showToast({ - title: `检测到邀请信息 ID:${inviteParams.inviter}`, - icon: 'success', - duration: 3000 - }) + console.log(`检测到邀请信息 ID:${inviteParams.inviter}`) }, 1000) } else { @@ -102,4 +98,4 @@ function App(props: { children: any; }) { return props.children } -export default App \ No newline at end of file +export default App diff --git a/src/shop/goodsDetail/index.tsx b/src/shop/goodsDetail/index.tsx index 17715b2..50fe83e 100644 --- a/src/shop/goodsDetail/index.tsx +++ b/src/shop/goodsDetail/index.tsx @@ -361,11 +361,11 @@ const GoodsDetail = () => { {/*底部购买按钮*/} - + -