fix: 更新API基础URL并优化列表项显示逻辑
- 将API基础URL从HTTP切换到HTTPS并更新路径 - 根据登录状态模糊显示部分列表内容 - 优化列表项标题显示格式
This commit is contained in:
parent
9e337565a5
commit
e35509eda8
|
|
@ -1,8 +1,8 @@
|
||||||
// const baseURL = "http://192.168.31.25:8060/api";
|
// const baseURL = "http://192.168.31.25:8060/api";
|
||||||
// export const baseUrl = "http://192.168.3.38:8040/apih5";
|
// 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 baseUrl = "https://cankao.cs.com.cn/apih5";
|
||||||
|
|
||||||
// export const baseUrlDataV = "https://cankao.cs.com.cn/zzck_datav";
|
export const baseUrlDataV = "https://cankao.cs.com.cn/zzck_datav";
|
||||||
export const baseUrlDataV = "http://123.60.153.169:9995/zzck_datav";
|
// export const baseUrlDataV = "http://123.60.153.169:9995/zzck_datav";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="all">
|
<view class="all">
|
||||||
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<view :style="{ height: getNavHeight() + 'px' }"></view>
|
<view :style="{ height: getNavHeight() + 'px' }"></view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
<PageHeaderView :title="type == 0 ? '热门行业池Top10' : '风口概念池Top10'"></PageHeaderView>
|
<PageHeaderView
|
||||||
|
:title="type == 0 ? '热门行业池Top10' : '风口概念池Top10'"
|
||||||
|
></PageHeaderView>
|
||||||
|
|
||||||
<!-- 类目标签 start -->
|
<!-- 类目标签 start -->
|
||||||
<view class="page_content">
|
<view class="page_content">
|
||||||
<view class="tag_list">
|
<view class="tag_list">
|
||||||
<view :class="['tag_item', clickTagIndex == index ? tagClickedClass : '']" class="tag_item"
|
<view
|
||||||
v-for="(item, index) in tagList" :key="index" @click="clickTag(index)">
|
:class="['tag_item', clickTagIndex == index ? tagClickedClass : '']"
|
||||||
|
class="tag_item"
|
||||||
|
v-for="(item, index) in tagList"
|
||||||
|
:key="index"
|
||||||
|
@click="clickTag(index)"
|
||||||
|
>
|
||||||
{{ item.content }}
|
{{ item.content }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -20,13 +26,26 @@
|
||||||
|
|
||||||
<!-- 列表 start -->
|
<!-- 列表 start -->
|
||||||
<view class="list">
|
<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">
|
<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-title">{{ item.title }}</text>
|
<!-- <text class="news-desc">{{ item.summary }}</text> -->
|
||||||
<text class="news-desc">{{ item.summary }}</text>
|
<text :class="['news-desc', isLogin ? '' : 'mohu']">{{
|
||||||
<view class="news-meta">
|
item.summary
|
||||||
|
}}</text>
|
||||||
|
<view :class="['news-meta', isLogin ? '' : 'mohu']">
|
||||||
<text class="source">{{ item.tag }}</text>
|
<text class="source">{{ item.tag }}</text>
|
||||||
<text class="time">{{ item.time }}</text>
|
<text class="time">{{ item.time }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -54,8 +73,9 @@ import { getListByTag, getListByTagIndustry } from "@/api/detail";
|
||||||
|
|
||||||
import dayjs from "dayjs/esm/index";
|
import dayjs from "dayjs/esm/index";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
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({
|
// const props = defineProps({
|
||||||
// type: {
|
// type: {
|
||||||
// type: String,
|
// type: String,
|
||||||
|
|
@ -106,7 +126,6 @@ async function getTopConcept_dFn() {
|
||||||
topConceptList.value = await getTopConcept_d({});
|
topConceptList.value = await getTopConcept_d({});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const list = ref([]);
|
const list = ref([]);
|
||||||
async function getListByTagFn() {
|
async function getListByTagFn() {
|
||||||
let id = 0;
|
let id = 0;
|
||||||
|
|
@ -116,7 +135,7 @@ async function getListByTagFn() {
|
||||||
} else {
|
} else {
|
||||||
id = topConceptList.value[clickTagIndex.value].content;
|
id = topConceptList.value[clickTagIndex.value].content;
|
||||||
}
|
}
|
||||||
console.log("🚀 ~ getListByTagFn ~ id:", id)
|
console.log("🚀 ~ getListByTagFn ~ id:", id);
|
||||||
|
|
||||||
uni.showLoading();
|
uni.showLoading();
|
||||||
if (props.type == 1) {
|
if (props.type == 1) {
|
||||||
|
|
@ -146,12 +165,10 @@ function goDetail(item) {
|
||||||
|
|
||||||
const tagClickedClass = ref("");
|
const tagClickedClass = ref("");
|
||||||
|
|
||||||
const props = reactive({
|
const props = reactive({});
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
onLoad(async (e) => {
|
onLoad(async (e) => {
|
||||||
props.type = e.type
|
props.type = e.type;
|
||||||
if (e.type && e.type == 0) {
|
if (e.type && e.type == 0) {
|
||||||
// 热门行业池
|
// 热门行业池
|
||||||
tagClickedClass.value = "tag_item_act_blue";
|
tagClickedClass.value = "tag_item_act_blue";
|
||||||
|
|
@ -171,11 +188,9 @@ onLoad(async (e) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
getListByTagFn();
|
getListByTagFn();
|
||||||
})
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onMounted(async () => {});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
@ -212,8 +227,8 @@ onMounted(async () => {
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: #AF201E;
|
color: #af201e;
|
||||||
background-color: #FAF3F2;
|
background-color: #faf3f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_item_act_yellow {
|
.tag_item_act_yellow {
|
||||||
|
|
@ -223,8 +238,8 @@ onMounted(async () => {
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: #AF201E;
|
color: #af201e;
|
||||||
background-color: #FAF3F2;
|
background-color: #faf3f2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -300,4 +315,8 @@ onMounted(async () => {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mohu {
|
||||||
|
filter: blur(7rpx);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue