fix: 更新API基础URL并优化列表项显示逻辑

- 将API基础URL从HTTP切换到HTTPS并更新路径
- 根据登录状态模糊显示部分列表内容
- 优化列表项标题显示格式
This commit is contained in:
zzp 2025-08-26 15:34:27 +08:00
parent 9e337565a5
commit e35509eda8
2 changed files with 46 additions and 27 deletions

View File

@ -1,8 +1,8 @@
// const baseURL = "http://192.168.31.25:8060/api";
// export const baseUrl = "http://192.168.3.38:8040/apih5";
export const baseUrl = "http://123.60.153.169:8040/apih5";
export const baseUrl = "https://cankao.cs.com.cn/mini";
// export const baseUrl = "https://cankao.cs.com.cn/apih5";
// export const baseUrlDataV = "https://cankao.cs.com.cn/zzck_datav";
export const baseUrlDataV = "http://123.60.153.169:9995/zzck_datav";
export const baseUrlDataV = "https://cankao.cs.com.cn/zzck_datav";
// export const baseUrlDataV = "http://123.60.153.169:9995/zzck_datav";

View File

@ -1,17 +1,23 @@
<template>
<view class="all">
<!-- #ifdef MP-WEIXIN -->
<view :style="{ height: getNavHeight() + 'px' }"></view>
<!-- #endif -->
<PageHeaderView :title="type == 0 ? '热门行业池Top10' : '风口概念池Top10'"></PageHeaderView>
<PageHeaderView
:title="type == 0 ? '热门行业池Top10' : '风口概念池Top10'"
></PageHeaderView>
<!-- 类目标签 start -->
<view class="page_content">
<view class="tag_list">
<view :class="['tag_item', clickTagIndex == index ? tagClickedClass : '']" class="tag_item"
v-for="(item, index) in tagList" :key="index" @click="clickTag(index)">
<view
:class="['tag_item', clickTagIndex == index ? tagClickedClass : '']"
class="tag_item"
v-for="(item, index) in tagList"
:key="index"
@click="clickTag(index)"
>
{{ item.content }}
</view>
</view>
@ -20,13 +26,26 @@
<!-- 列表 start -->
<view class="list">
<view v-for="(item, index) in list" :key="index" class="news-item" @click="goDetail(item)">
<view
v-for="(item, index) in list"
:key="index"
class="news-item"
@click="goDetail(item)"
>
<view class="news-content">
<text style="">
<text class="news-title">{{ item.title.slice(0, 3) }}</text>
<text :class="['news-title', isLogin ? '' : 'mohu']">{{
item.title.slice(3, item.title.length - 1)
}}</text>
</text>
<text class="news-title">{{ item.title }}</text>
<text class="news-desc">{{ item.summary }}</text>
<view class="news-meta">
<!-- <text class="news-title">{{ item.title }}</text> -->
<!-- <text class="news-desc">{{ item.summary }}</text> -->
<text :class="['news-desc', isLogin ? '' : 'mohu']">{{
item.summary
}}</text>
<view :class="['news-meta', isLogin ? '' : 'mohu']">
<text class="source">{{ item.tag }}</text>
<text class="time">{{ item.time }}</text>
</view>
@ -54,8 +73,9 @@ import { getListByTag, getListByTagIndustry } from "@/api/detail";
import dayjs from "dayjs/esm/index";
import { onLoad } from "@dcloudio/uni-app";
import { getNavHeight } from "@/utils/util"
import { getNavHeight } from "@/utils/util";
const isLogin = ref(uni.getStorageSync("token"));
// const props = defineProps({
// type: {
// type: String,
@ -106,7 +126,6 @@ async function getTopConcept_dFn() {
topConceptList.value = await getTopConcept_d({});
}
const list = ref([]);
async function getListByTagFn() {
let id = 0;
@ -116,7 +135,7 @@ async function getListByTagFn() {
} else {
id = topConceptList.value[clickTagIndex.value].content;
}
console.log("🚀 ~ getListByTagFn ~ id:", id)
console.log("🚀 ~ getListByTagFn ~ id:", id);
uni.showLoading();
if (props.type == 1) {
@ -146,12 +165,10 @@ function goDetail(item) {
const tagClickedClass = ref("");
const props = reactive({
})
const props = reactive({});
onLoad(async (e) => {
props.type = e.type
props.type = e.type;
if (e.type && e.type == 0) {
//
tagClickedClass.value = "tag_item_act_blue";
@ -171,11 +188,9 @@ onLoad(async (e) => {
}
getListByTagFn();
})
onMounted(async () => {
});
onMounted(async () => {});
</script>
<style scoped lang="scss">
@ -212,8 +227,8 @@ onMounted(async () => {
line-height: 40rpx;
text-align: center;
font-style: normal;
color: #AF201E;
background-color: #FAF3F2;
color: #af201e;
background-color: #faf3f2;
}
.tag_item_act_yellow {
@ -223,8 +238,8 @@ onMounted(async () => {
line-height: 40rpx;
text-align: center;
font-style: normal;
color: #AF201E;
background-color: #FAF3F2;
color: #af201e;
background-color: #faf3f2;
}
}
@ -300,4 +315,8 @@ onMounted(async () => {
text-align: left;
font-style: normal;
}
.mohu {
filter: blur(7rpx);
}
</style>