fix: 统一新闻来源显示并添加手机号参数
修改多处组件将新闻来源统一显示为"中国证券报" 在获取文章详情API中添加可选phone参数 移除调试用的console.log语句
This commit is contained in:
parent
763053ad6d
commit
e763c82dce
|
|
@ -7,10 +7,9 @@ import request from "@/utils/index";
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const fetchArticleDetail = (data: any) => {
|
export const fetchArticleDetail = (data: any) => {
|
||||||
return request.get(`/news/detail/${data.id}`);
|
return request.get(`/news/detail/${data.id}?phone=${data?.phone || null}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文章点赞
|
* 文章点赞
|
||||||
* @param data
|
* @param data
|
||||||
|
|
@ -33,11 +32,11 @@ export const fetchArticleFavorate = (data: any) => {
|
||||||
|
|
||||||
// 热门行业
|
// 热门行业
|
||||||
export const getListByTagIndustry = (data: any) => {
|
export const getListByTagIndustry = (data: any) => {
|
||||||
console.log("🚀 ~ getListByTagIndustry ~ data:", data)
|
console.log("🚀 ~ getListByTagIndustry ~ data:", data);
|
||||||
return request.get("/news/list/industry", { name: data.name });
|
return request.get("/news/list/industry", { name: data.name });
|
||||||
};
|
};
|
||||||
|
|
||||||
// 概念标签
|
// 概念标签
|
||||||
export const getListByTag = (data: any) => {
|
export const getListByTag = (data: any) => {
|
||||||
return request.get("/news/list/tag", { name: data.name });
|
return request.get("/news/list/tag", { name: data.name });
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
<view :class="['news-meta', isLogin ? '' : 'mohu']">
|
<view :class="['news-meta', isLogin ? '' : 'mohu']">
|
||||||
<view style="display: flex; justify-content: space-between; width: 100%">
|
<view style="display: flex; justify-content: space-between; width: 100%">
|
||||||
<view style="display: flex">
|
<view style="display: flex">
|
||||||
<text class="source">{{ item.source }}</text>
|
<text class="source">中国证券报</text>
|
||||||
<text class="time">{{ dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss") }}</text>
|
<text class="time">{{ dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss") }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@
|
||||||
<view class="author">
|
<view class="author">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<text class="text">来源:</text>
|
<text class="text">来源:</text>
|
||||||
<text class="text">{{ isDomestic ? "中国证券报" : props.data.tag }}</text>
|
<!-- <text class="text">{{ isDomestic ? "中国证券报" : props.data.tag }}</text> -->
|
||||||
|
<text class="text">中国证券报</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="name" v-if="props.data.editor">
|
<view class="name" v-if="props.data.editor">
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ onLoad(async (option: any) => {
|
||||||
newType.value = option.type || 14;
|
newType.value = option.type || 14;
|
||||||
const res = await fetchArticleDetail({
|
const res = await fetchArticleDetail({
|
||||||
id: option.id,
|
id: option.id,
|
||||||
// id: 763,
|
phone: option?.phone || null,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue