api路径更改
This commit is contained in:
parent
ae691c6db9
commit
dac7e6f727
|
|
@ -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><!-- 右边部分 -->
|
||||
|
|
|
|||
|
|
@ -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
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user