api路径更改

This commit is contained in:
WindowBird 2025-10-13 09:07:28 +08:00
parent ae691c6db9
commit dac7e6f727
3 changed files with 111 additions and 111 deletions

View File

@ -41,7 +41,7 @@ const props = withDefaults(defineProps<Props>(), {
})
// API
const API_BASE_URL = 'http://192.168.2.26:4101'
const API_BASE_URL = 'http://192.168.2.77:4101'
// 使
const internalArticleData = ref({
@ -355,9 +355,9 @@ const loadCSSFiles = () => {
class="sy_news animated" data-wow-delay="200ms"
style="visibility: visible; animation-delay: 200ms; animation-name: fadeInDown;">
<RecommendedArticles
:show-types="['solution', 'developKnowledge', 'industryTrend']"
:articles-per-type="3"
:show-title="false"
:show-types="['solution', 'developKnowledge', 'industryTrend']"
/>
</div>
</aside><!-- 右边部分 -->

View File

@ -24,7 +24,7 @@ export interface ArticleListParams {
}
// API基础地址
const API_BASE_URL = 'http://192.168.2.26:4101'
const API_BASE_URL = 'http://192.168.2.77:4101'
/**
*
@ -85,13 +85,13 @@ export const fetchRecommendedArticles = async (
pageNum: 1,
pageSize: pageSize
})
return { type, articles: response.data }
return {type, articles: response.data}
})
const responses = await Promise.all(promises)
// 整理结果
responses.forEach(({ type, articles }) => {
responses.forEach(({type, articles}) => {
result[type] = articles
})

View File

@ -29,7 +29,7 @@ const loading = ref(true)
const error = ref('')
// API
const API_BASE_URL = 'http://192.168.2.26:4101'
const API_BASE_URL = 'http://192.168.2.77:4101'
//
const fetchArticle = async (id: string) => {
@ -98,7 +98,7 @@ watch(() => route.params.id, (newId) => {
<template>
<view>
<NewsNew :article-data="articleData" :loading="loading" :error="error" />
<NewsNew :article-data="articleData" :error="error" :loading="loading"/>
</view>
</template>