fix: 统一新闻来源显示并添加手机号参数
修改多处组件将新闻来源统一显示为"中国证券报" 在获取文章详情API中添加可选phone参数 移除调试用的console.log语句
This commit is contained in:
parent
763053ad6d
commit
e763c82dce
|
|
@ -7,10 +7,9 @@ import request from "@/utils/index";
|
|||
* @returns
|
||||
*/
|
||||
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
|
||||
|
|
@ -33,7 +32,7 @@ export const fetchArticleFavorate = (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 });
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<view :class="['news-meta', isLogin ? '' : 'mohu']">
|
||||
<view style="display: flex; justify-content: space-between; width: 100%">
|
||||
<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>
|
||||
</view>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
<view class="author">
|
||||
<view class="name">
|
||||
<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 class="name" v-if="props.data.editor">
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ onLoad(async (option: any) => {
|
|||
newType.value = option.type || 14;
|
||||
const res = await fetchArticleDetail({
|
||||
id: option.id,
|
||||
// id: 763,
|
||||
phone: option?.phone || null,
|
||||
});
|
||||
|
||||
if (res.code === 200) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue