static放对象存储
This commit is contained in:
parent
784e1c2be1
commit
b94cba2379
BIN
caokao-h5.zip
BIN
caokao-h5.zip
Binary file not shown.
|
|
@ -1,11 +1,6 @@
|
|||
<template>
|
||||
<view class="list">
|
||||
<view
|
||||
v-for="(item, index) in props.data"
|
||||
:key="index"
|
||||
class="item"
|
||||
|
||||
>
|
||||
<view v-for="(item, index) in props.data" :key="index" class="item">
|
||||
<!-- 标题 start -->
|
||||
<!-- <text class="title" v-html="item.title">{{ item.title }}</text> -->
|
||||
<text @click="handleClick(item)" class="title" v-html="item.MarkInRedTitle || item.title"></text>
|
||||
|
|
@ -13,20 +8,16 @@
|
|||
<!-- 内容 start -->
|
||||
|
||||
<view class="r_content">
|
||||
<image src="@/static/icon_act_lt.png" class="title_icon"></image>
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_act_lt.png" class="title_icon">
|
||||
</image>
|
||||
<text @click="handleClick(item)" class="content" v-html="item.MarkInRedContent || item.content"></text>
|
||||
<!-- <text @click="handleClick(item)" class="content">{{ item.content }}</text> -->
|
||||
<!-- 需要付费锁 start -->
|
||||
<view class="need_login" v-if="item.needpay" @click="handleSubListItem(item)">
|
||||
<image src="@/static/icon_lock.png" class="need_icon"></image>
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_lock.png" class="need_icon">
|
||||
</image>
|
||||
<text>订阅后解锁全文</text>
|
||||
<u-icon
|
||||
name="arrow-right"
|
||||
color="#fff"
|
||||
size="10"
|
||||
style="margin-left: 10rpx"
|
||||
bold
|
||||
></u-icon>
|
||||
<u-icon name="arrow-right" color="#fff" size="10" style="margin-left: 10rpx" bold></u-icon>
|
||||
</view>
|
||||
<!-- 需要付费锁 end -->
|
||||
</view>
|
||||
|
|
@ -54,18 +45,18 @@ const props = defineProps({
|
|||
// 列表内容
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
default: () => { },
|
||||
},
|
||||
});
|
||||
console.log("props.data", props.data)
|
||||
onBeforeMount(() => {});
|
||||
onBeforeMount(() => { });
|
||||
|
||||
// 点击订阅
|
||||
const handleSubListItem = (item) => {
|
||||
// props.data.needpay = true;
|
||||
// return () => {
|
||||
// console.log("item ===>", item)
|
||||
emit("handleSubListItem", item.id);
|
||||
// console.log("item ===>", item)
|
||||
emit("handleSubListItem", item.id);
|
||||
// }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
<view class="homeTopContainer">
|
||||
<!-- 搜索框 -->
|
||||
<view class="sreach">
|
||||
<image src="@/static/logo_mini.png" class="sreach_icon" @click="messageShow = true"></image>
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/logo_mini.png" class="sreach_icon"
|
||||
@click="messageShow = true"></image>
|
||||
<u-input v-model="keyWord" prefixIcon="search" style="flex: 1" placeholder="搜索资讯"
|
||||
placeholderClass="search_placeholder" class="sreach_input" :border="false" @confirm="goSreach" />
|
||||
</view>
|
||||
|
|
@ -16,7 +17,7 @@
|
|||
<view class="headerBanner"> </view>
|
||||
<!-- 搜索框 -->
|
||||
<!-- <view class="sreach">
|
||||
<image src="@/static/logo_mini.png" class="sreach_icon" @click="messageShow = true"></image>
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/logo_mini.png" class="sreach_icon" @click="messageShow = true"></image>
|
||||
<u-input v-model="keyWord" prefixIcon="search" style="flex: 1" placeholder="搜索资讯" placeholderClass="search_placeholder" class="sreach_input" :border="false" @confirm="goSreach" />
|
||||
</view> -->
|
||||
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
<!-- <view class="r_tab">
|
||||
<view v-for="(item, index) in colList" :key="item.id" class="tab_item" @click="handleTabsClick(item)">
|
||||
<text :style="{ fontWeight: index == columnIndex ? 'bold' : '' }"> {{ item.name }}</text>
|
||||
<image src="@/static/bk_tab.png" class="bk_tab" v-if="index == columnIndex"></image>
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/bk_tab.png" class="bk_tab" v-if="index == columnIndex"></image>
|
||||
<view class="badge" v-if="isBadeg && index !== 1">
|
||||
<u-badge value="new"></u-badge>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
<view class="index-wrap" @touchmove="handleScroll" @scroll.passive="getScroll($event)">
|
||||
<!-- 搜索框 -->
|
||||
<view :class="['sreach', overlayShow && 'searchIncreaseLevel']">
|
||||
<image src="@/static/logo_mini.png" class="sreach_icon" @click="messageShow = true"></image>
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/logo_mini.png" class="sreach_icon"
|
||||
@click="messageShow = true"></image>
|
||||
<u-input v-model="keyWord" prefixIcon="search" style="flex: 1" placeholder="搜索资讯"
|
||||
placeholderClass="search_placeholder" class="sreach_input" :border="false" @confirm="goSreach" />
|
||||
</view>
|
||||
|
|
@ -141,7 +142,7 @@ import down from "https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/dow
|
|||
import { scrollToTop, formatTime, jumpUrl } from "@/utils/util.ts";
|
||||
import { useShareStore } from "@/stores/shareStore";
|
||||
import { useTimerStore } from "@/stores/timerStore";
|
||||
import shareImg from "@/static/share-tips-img.png";
|
||||
import shareImg from "https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/share-tips-img.png";
|
||||
import Pay from "@/components/pay/index.vue";
|
||||
import LoginPopup from "@/components/loginPopup/index.vue";
|
||||
const emit = defineEmits(["onChange"]);
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
<template>
|
||||
<view class="message">
|
||||
<view class="left_icon">
|
||||
<image src="@/static/icon_light.png" class="icon_light"></image>
|
||||
<image
|
||||
src="@/static/icon_message_title.png"
|
||||
class="icon_message_title"
|
||||
></image>
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_light.png" class="icon_light"></image>
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_message_title.png"
|
||||
class="icon_message_title"></image>
|
||||
</view>
|
||||
|
||||
<text class="message_title">市场风格切换 大中盘股相关ETF领涨</text>
|
||||
|
|
@ -108,6 +106,7 @@ const jump = () => {
|
|||
0% {
|
||||
top: -200rpx;
|
||||
}
|
||||
|
||||
100% {
|
||||
top: 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,258 @@
|
|||
<template>
|
||||
<view class="news-rank-list">
|
||||
<u-skeleton rows="5" title loading style="margin-bottom: 30rpx" v-if="loading"></u-skeleton>
|
||||
<view class="list" v-else>
|
||||
<view v-for="(item, index) in rankListLocal" :key="index" class="news-item" @click="goDetail(item, 0)">
|
||||
<view class="rank-tag">
|
||||
<text class="rank-text">{{ index + 1 }}</text>
|
||||
</view>
|
||||
|
||||
<!-- :style="{ filter: Session.get('token') ? '' : 'blur(5px)' }" -->
|
||||
<view class="news-content">
|
||||
<text class="news-title">{{ item.title }}</text>
|
||||
<text class="news-desc">{{ item.summary }}</text>
|
||||
<view class="news-meta">
|
||||
<view>
|
||||
<text class="source">{{ item.source }}</text>
|
||||
<text class="time">{{
|
||||
dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss")
|
||||
}}</text>
|
||||
</view>
|
||||
<text class="score">
|
||||
<text v-if="index < 3">资讯评分:</text>
|
||||
{{ item.news_score }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view @click="isExp = !isExp" class="r_exp">
|
||||
<text v-if="isExp">收起</text>
|
||||
<text v-else>展开全部</text>
|
||||
<img src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/zixun/up_icon.png" class="exp_up" v-if="isExp" />
|
||||
<img src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/zixun/down_icon.png" class="exp_up" v-else />
|
||||
</view>
|
||||
|
||||
<LoginPopup :show="LoginShow" @handlePopupClose="handlePopupClose"
|
||||
@handlePopupSuccessCallback="handlePopupSuccessCallback" @handlePopupErrorCallback="handlePopupErrorCallback" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import dayjs from "dayjs/esm/index";
|
||||
import LoginPopup from "@/components/loginPopup/index.vue";
|
||||
import { Session } from "@/utils/storage";
|
||||
|
||||
const isExp = ref(false);
|
||||
const rankListLocal = ref([]);
|
||||
const loading = ref(true);
|
||||
|
||||
watch(
|
||||
() => isExp.value,
|
||||
(newValue, oldValue) => {
|
||||
rankListLocal.value = [];
|
||||
props.newsList.forEach((item, index) => {
|
||||
if (!isExp.value && index > 9) {
|
||||
return;
|
||||
}
|
||||
|
||||
rankListLocal.value.push(item);
|
||||
});
|
||||
|
||||
loading.value = false;
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.newsList,
|
||||
(newValue, oldValue) => {
|
||||
rankListLocal.value = [];
|
||||
props.newsList.forEach((item, index) => {
|
||||
if (!isExp.value && index > 9) {
|
||||
return;
|
||||
}
|
||||
|
||||
rankListLocal.value.push(item);
|
||||
});
|
||||
loading.value = false;
|
||||
}
|
||||
);
|
||||
|
||||
// 接收父组件传入的新闻列表
|
||||
const props = defineProps({
|
||||
newsList: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const clickItem = ref({});
|
||||
function goDetail(item) {
|
||||
if (Session.get("token")) {
|
||||
clickItem.value = item;
|
||||
uni.navigateTo({
|
||||
url: `/pages/detail/indexNewsInfo?id=${item.news_id}`,
|
||||
});
|
||||
} else {
|
||||
LoginShow.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
const LoginShow = ref(false);
|
||||
const isLoginStatus = ref();
|
||||
// 关闭弹框
|
||||
const handlePopupClose = () => {
|
||||
LoginShow.value = false;
|
||||
};
|
||||
|
||||
// 登录成功之后的回调
|
||||
const handlePopupSuccessCallback = () => {
|
||||
isLoginStatus.value = true;
|
||||
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/detail/indexNewsInfo?id=${clickItem.value.news_id}`,
|
||||
// });
|
||||
};
|
||||
|
||||
// 登录失败之后的回调
|
||||
const handlePopupErrorCallback = () => {
|
||||
console.log("登录失败");
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.news-rank-list {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.list {
|
||||
min-height: 700rpx;
|
||||
}
|
||||
|
||||
.news-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 15px;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.rank-tag {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.rank-text-top3 {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #ffffff;
|
||||
line-height: 33rpx;
|
||||
text-shadow: 0px 0px 2px #deb72b;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
img {
|
||||
width: 33rpx;
|
||||
height: 41rpx;
|
||||
margin-top: -10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.rank-text {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #e98254;
|
||||
margin-top: -20rpx;
|
||||
}
|
||||
|
||||
.news-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.news-title {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 5px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.news-desc {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
display: -webkit-box;
|
||||
/* 设置为WebKit内核的弹性盒子模型 */
|
||||
-webkit-box-orient: vertical;
|
||||
/* 垂直排列 */
|
||||
-webkit-line-clamp: 2;
|
||||
/* 限制显示三行 */
|
||||
overflow: hidden;
|
||||
/* 隐藏超出范围的内容 */
|
||||
text-overflow: ellipsis;
|
||||
/* 使用省略号 */
|
||||
}
|
||||
|
||||
.news-meta {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.source,
|
||||
.time,
|
||||
.score {
|
||||
// opacity: 0.8;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
line-height: 30rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.time {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.score {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 22rpx;
|
||||
color: #ffa800;
|
||||
line-height: 30rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.exp_up {
|
||||
width: 21rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
.r_exp {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 10rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -24,11 +24,7 @@
|
|||
<image :src="props.data.picture" mode="widthFix" />
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="articleDes"
|
||||
:class="props?.data?.needpay && 'needpay'"
|
||||
v-html="props.data.content"
|
||||
>
|
||||
<view class="articleDes" :class="props?.data?.needpay && 'needpay'" v-html="props.data.content">
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -47,7 +43,7 @@ import articleMock from "@/mock/article.js";
|
|||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
default: () => { },
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -124,8 +120,10 @@ const handleSub = () => {
|
|||
font-size: 20px;
|
||||
color: #333;
|
||||
// font-weight: 700;
|
||||
white-space: normal; /* 允许换行 */
|
||||
overflow-wrap: break-word; /* 在必要时单词内部断行 */
|
||||
white-space: normal;
|
||||
/* 允许换行 */
|
||||
overflow-wrap: break-word;
|
||||
/* 在必要时单词内部断行 */
|
||||
font-family: "SourceHanSansCN-Medium";
|
||||
}
|
||||
|
||||
|
|
@ -149,6 +147,7 @@ const handleSub = () => {
|
|||
color: rgba(51, 51, 51, 0.6);
|
||||
}
|
||||
}
|
||||
|
||||
// 摘要
|
||||
.desc {
|
||||
padding: 12rpx;
|
||||
|
|
@ -161,7 +160,9 @@ const handleSub = () => {
|
|||
font-size: var(--h2-font-size);
|
||||
text-indent: 0.5em;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: break-word; /* 在必要时单词内部断行 */
|
||||
overflow-wrap: break-word;
|
||||
|
||||
/* 在必要时单词内部断行 */
|
||||
.bill_icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
|
|
@ -169,7 +170,7 @@ const handleSub = () => {
|
|||
margin-right: 12rpx;
|
||||
margin-top: 6rpx;
|
||||
background-size: contain;
|
||||
background-image: url(@/static/icon_act_lt.png);
|
||||
background-image: url(https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_act_lt.png);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -183,6 +184,7 @@ const handleSub = () => {
|
|||
.articleDes {
|
||||
padding: 0 30rpx 30rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
::v-deep {
|
||||
p {
|
||||
margin: 30rpx 0;
|
||||
|
|
@ -191,15 +193,19 @@ const handleSub = () => {
|
|||
color: #333;
|
||||
text-indent: 2em;
|
||||
line-height: 48rpx;
|
||||
white-space: normal; /* 允许换行 */
|
||||
overflow-wrap: break-word; /* 在必要时单词内部断行 */
|
||||
white-space: normal;
|
||||
/* 允许换行 */
|
||||
overflow-wrap: break-word;
|
||||
/* 在必要时单词内部断行 */
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
margin-left: -2em;
|
||||
// margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
&.needpay {
|
||||
height: 730rpx;
|
||||
overflow: hidden;
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ const handleSub = () => {
|
|||
margin-right: 12rpx;
|
||||
margin-top: 6rpx;
|
||||
background-size: contain;
|
||||
background-image: url(@/static/icon_act_lt.png);
|
||||
background-image: url(https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_act_lt.png);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,17 +8,12 @@
|
|||
</view>
|
||||
<view class="more" @click="jumpAll">
|
||||
<text class="text">全部</text>
|
||||
<image src="@/static/icon_right.png" class="right_icon" />
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_right.png" class="right_icon" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="news-list" v-if="props.data.length">
|
||||
<view
|
||||
class="news-item"
|
||||
v-for="item in props.data"
|
||||
:key="item.id"
|
||||
@click="jumpDetail(item)"
|
||||
>
|
||||
<view class="news-item" v-for="item in props.data" :key="item.id" @click="jumpDetail(item)">
|
||||
<view class="news-title">{{ item.title }}</view>
|
||||
<view class="news-time">
|
||||
<view>{{ item.time }}</view>
|
||||
|
|
@ -78,15 +73,18 @@ const jumpDetail = (item: any) => {
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
font-family: "SourceHanSansCN-Medium";
|
||||
|
||||
.text1 {
|
||||
// font-size: 32rpx;
|
||||
font-size: var(--h1-font-size);
|
||||
color: #e7303f;
|
||||
}
|
||||
|
||||
.text2 {
|
||||
font-size: var(--h1-font-size);
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 4rpx;
|
||||
height: 28rpx;
|
||||
|
|
@ -99,6 +97,7 @@ const jumpDetail = (item: any) => {
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.text {
|
||||
// font-size: 24rpx;
|
||||
font-size: var(--h4-font-size);
|
||||
|
|
@ -114,9 +113,11 @@ const jumpDetail = (item: any) => {
|
|||
|
||||
.news-list {
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.news-item {
|
||||
padding: 10rpx 0 20rpx;
|
||||
border-bottom: 2rpx solid rgba(51, 51, 51, 0.1);
|
||||
|
||||
.news-title {
|
||||
// font-size: 32rpx;
|
||||
font-size: var(--h1-font-size);
|
||||
|
|
@ -128,6 +129,7 @@ const jumpDetail = (item: any) => {
|
|||
text-overflow: ellipsis;
|
||||
font-family: "SourceHanSansCN-Medium";
|
||||
}
|
||||
|
||||
.news-time {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
|
@ -137,6 +139,7 @@ const jumpDetail = (item: any) => {
|
|||
font-size: var(--h6-font-size);
|
||||
|
||||
color: #b9b9b9;
|
||||
|
||||
.num {
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,28 +2,26 @@
|
|||
<view class="comment">
|
||||
<Tips v-if="messageShow" />
|
||||
<view class="comment-input">
|
||||
<input
|
||||
type="text"
|
||||
confrim-type="done"
|
||||
placeholder="输入评论内容……"
|
||||
class="input-field"
|
||||
v-model="comment"
|
||||
@confirm="handleSubmit"
|
||||
/>
|
||||
<input type="text" confrim-type="done" placeholder="输入评论内容……" class="input-field" v-model="comment"
|
||||
@confirm="handleSubmit" />
|
||||
|
||||
<!-- <view class="input-field">输入评论内容……</view> -->
|
||||
</view>
|
||||
<view class="comment-count">
|
||||
<view class="count" @click="handleClickLike">
|
||||
<image :src="props.data.isLike ? IconLikeActive : IconLike" class="icon" />
|
||||
<image
|
||||
:src="props.data.isLike ? 'https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_like_active.png' : 'https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_like.png'"
|
||||
class="icon" />
|
||||
<text class="num">{{ props.data.likeNums }}</text>
|
||||
</view>
|
||||
<view class="count" @click="handleClickStar">
|
||||
<image :src="props.data.isFav ? IconStarActive : IconStar" class="icon" />
|
||||
<image
|
||||
:src="props.data.isFav ? 'https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_star_active.png' : 'https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_star.png'"
|
||||
class="icon" />
|
||||
<text class="num">{{ props.data.favNums }}</text>
|
||||
</view>
|
||||
<!-- <view class="count">
|
||||
<image src="@/static/icon_message.png" class="icon" />
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_message.png" class="icon" />
|
||||
<text class="num">{{
|
||||
props.data.comment > 1000 ? "999+" : props.data.comment
|
||||
}}</text>
|
||||
|
|
@ -35,16 +33,16 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
// import { likeNews } from "@/api";
|
||||
import IconLike from "@/static/icon_like.png";
|
||||
import IconStar from "@/static/icon_star.png";
|
||||
import IconLikeActive from "@/static/icon_like_active.png";
|
||||
import IconStarActive from "@/static/icon_star_active.png";
|
||||
// import IconLike from "https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_like.png";
|
||||
// import IconStar from "https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_star.png";
|
||||
// import IconLikeActive from "https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_like_active.png";
|
||||
// import IconStarActive from "https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_star_active.png";
|
||||
const emit = defineEmits(["handleClickLike", "handleClickStar"]);
|
||||
const messageShow = ref(false);
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
default: () => { },
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -89,6 +87,7 @@ const handleSubmit = () => {
|
|||
|
||||
.comment-input {
|
||||
width: 100%;
|
||||
|
||||
.input-field {
|
||||
height: 72rpx;
|
||||
background-color: #f5f5f5;
|
||||
|
|
@ -100,6 +99,7 @@ const handleSubmit = () => {
|
|||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.input-placeholder {
|
||||
color: rgba(51, 51, 51, 0.6);
|
||||
}
|
||||
|
|
@ -109,6 +109,7 @@ const handleSubmit = () => {
|
|||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
|
||||
.count {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,9 @@
|
|||
<template>
|
||||
<view class="need_subscribe" @click="handleClick(true)">
|
||||
<view class="need_login">
|
||||
<image src="@/static/icon_lock.png" class="need_icon"></image>
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_lock.png" class="need_icon"></image>
|
||||
<text>订阅后解锁全文</text>
|
||||
<u-icon
|
||||
name="arrow-right"
|
||||
color="#fff"
|
||||
size="12"
|
||||
style="margin-left: 10rpx"
|
||||
bold
|
||||
></u-icon>
|
||||
<u-icon name="arrow-right" color="#fff" size="12" style="margin-left: 10rpx" bold></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -33,11 +27,9 @@ const handleClick = (value: any) => {
|
|||
box-sizing: border-box;
|
||||
|
||||
.need_login {
|
||||
background: linear-gradient(
|
||||
108deg,
|
||||
rgba(231, 48, 63, 1) 12%,
|
||||
rgba(255, 255, 255, 0.8) 78%
|
||||
);
|
||||
background: linear-gradient(108deg,
|
||||
rgba(231, 48, 63, 1) 12%,
|
||||
rgba(255, 255, 255, 0.8) 78%);
|
||||
backdrop-filter: blur(2px);
|
||||
padding: 0 20rpx;
|
||||
border-radius: 10rpx;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
<view class="vipHeader">
|
||||
<!-- 搜索 start -->
|
||||
<view class="search">
|
||||
<image src="@/static/log_caixun.png" class="logo" mode="aspectFit"></image>
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/log_caixun.png" class="logo"
|
||||
mode="aspectFit"></image>
|
||||
<u-input v-model="keyWord" prefixIcon="search" prefixIconStyle="color: rgba(255,255,255, 0.8)" style="flex: 1"
|
||||
placeholder="搜索资讯" class="search_input" color="#fff" :placeholderStyle="{ color: 'rgba(255,255,255,0.6)' }"
|
||||
:border="false" @confirm="goSearch" />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import swiperImg from "@/static/swiper_image.png";
|
||||
import swiperImg from "https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/swiper_image.png";
|
||||
// thumbnail
|
||||
import thumbnail2 from "https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/thumbnail2.png";
|
||||
import thumbnail3 from "https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/thumbnail3.png";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import swiperImg from "@/static/swiper_image.png";
|
||||
import swiperImg from "https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/swiper_image.png";
|
||||
// thumbnail
|
||||
import thumbnail2 from "https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/thumbnail2.png";
|
||||
import thumbnail3 from "https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/thumbnail3.png";
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
},
|
||||
"pages": [
|
||||
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/minihome/index"
|
||||
},
|
||||
{
|
||||
"path": "pages/realtimeInfo/index"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
<!-- 导航栏 start -->
|
||||
<view class="custom-bav-bar">
|
||||
<view class="left">
|
||||
<image src="@/static/icon_left.png" class="back_icon" @click="handleBack" />
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_left.png" class="back_icon"
|
||||
@click="handleBack" />
|
||||
</view>
|
||||
<view class="center">
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/detail_logo.png" class="logo_icon" />
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
<!-- 导航栏 start -->
|
||||
<view class="custom-bav-bar">
|
||||
<view class="left">
|
||||
<image src="@/static/icon_left.png" class="back_icon" @click="handleBack" />
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_left.png" class="back_icon"
|
||||
@click="handleBack" />
|
||||
</view>
|
||||
<view class="center">
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/detail_logo.png" class="logo_icon" />
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
<view class="all">
|
||||
<Navbar title="中证参考" :hasBack="false"></Navbar>
|
||||
|
||||
<text>123</text>
|
||||
|
||||
<RankListMini :newsList="newsList"></RankListMini>
|
||||
|
||||
<tabbar></tabbar>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -12,13 +14,31 @@
|
|||
import { ref, onMounted, onUnmounted, reactive } from "vue";
|
||||
import tabbar from "@/components/mini/Tabbar.vue";
|
||||
import Navbar from '@/components/mini/Navbar.vue'
|
||||
import RankListMini from "@/components/RankListMini.vue";
|
||||
import {
|
||||
getindustryCount,
|
||||
getConceptCount,
|
||||
getTopNews,
|
||||
getTopIndustry_d,
|
||||
getTopConcept_d,
|
||||
getNews_cnt_d,
|
||||
newsInfoScore,
|
||||
} from "@/api/newsInfo";
|
||||
|
||||
const newsList = ref([]);
|
||||
// 概念标签贴标
|
||||
async function getNewsList() {
|
||||
newsList.value = await getTopNews({});
|
||||
}
|
||||
|
||||
const tabIndex = ref(0);
|
||||
function tabChange(index) {
|
||||
tabIndex.value = index;
|
||||
}
|
||||
|
||||
onMounted(async () => { });
|
||||
onMounted(async () => {
|
||||
getNewsList()
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ const handleSwiperClick = () => {
|
|||
height: 168rpx;
|
||||
position: absolute;
|
||||
// background-color: #f2505d;
|
||||
background-image: url(@/static/news_bg.png);
|
||||
background-image: url(https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/news_bg.png);
|
||||
background-size: cover;
|
||||
top: -2rpx;
|
||||
left: 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue