Merge branch 'mini' of https://gitee.com/zzpaym/zhongzheng-sample-clear-h5 into mini
This commit is contained in:
commit
69da934f68
|
|
@ -8,10 +8,9 @@ onLaunch(() => {
|
||||||
console.log("App Launch");
|
console.log("App Launch");
|
||||||
stores.initWxConfig();
|
stores.initWxConfig();
|
||||||
});
|
});
|
||||||
onShow(() => { });
|
onShow(() => {});
|
||||||
onHide(() => {
|
onHide(() => {
|
||||||
console.log("App Hide");
|
console.log("App Hide");
|
||||||
uni.setStorageSync('homeTabIndex', null)
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -72,3 +72,12 @@ export const doShare = (data: any) => {
|
||||||
return Request.post("/user/share", data);
|
return Request.post("/user/share", data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 国内资讯列表
|
||||||
|
export const getDomestic = (data: any) => {
|
||||||
|
return Request.get("/news/domestic", data);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 国内资讯详情
|
||||||
|
export const getDomesticDetail = (data: any) => {
|
||||||
|
return Request.get(`/news/domestic/${data.id}`);
|
||||||
|
};
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 674 B |
Binary file not shown.
|
After Width: | Height: | Size: 555 B |
|
|
@ -1,18 +1,34 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="news-rank-list">
|
<view class="news-rank-list">
|
||||||
<u-skeleton rows="5" title loading style="margin-bottom: 30rpx" v-if="loading"></u-skeleton>
|
<u-skeleton
|
||||||
|
rows="5"
|
||||||
|
title
|
||||||
|
loading
|
||||||
|
style="margin-bottom: 30rpx"
|
||||||
|
v-if="loading"
|
||||||
|
></u-skeleton>
|
||||||
<view class="list" v-else>
|
<view class="list" v-else>
|
||||||
<view v-for="(item, index) in rankListLocal" :key="index" class="news-item" @click="goDetail(item, 0)">
|
<view
|
||||||
|
v-for="(item, index) in rankListLocal"
|
||||||
|
:key="index"
|
||||||
|
class="news-item"
|
||||||
|
@click="goDetail(item, 0)"
|
||||||
|
>
|
||||||
<view class="rank-tag">
|
<view class="rank-tag">
|
||||||
<view v-if="index == 0" class="rank-text-top3">
|
<view v-if="index == 0" class="rank-text-top3">
|
||||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_top_1.png" />
|
<image
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_top_1.png"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="index == 1" class="rank-text-top3">
|
<view v-else-if="index == 1" class="rank-text-top3">
|
||||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_top_2.png" />
|
<image
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_top_2.png"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="index == 2" class="rank-text-top3">
|
<view v-else-if="index == 2" class="rank-text-top3">
|
||||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_top_3.png" />
|
<image
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_top_3.png"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<text class="rank-text" v-else>{{ index + 1 }}</text>
|
<text class="rank-text" v-else>{{ index + 1 }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -21,15 +37,19 @@
|
||||||
<view class="news-content">
|
<view class="news-content">
|
||||||
<text style="">
|
<text style="">
|
||||||
<text class="news-title">{{ item.title.slice(0, 3) }}</text>
|
<text class="news-title">{{ item.title.slice(0, 3) }}</text>
|
||||||
<text :class="['news-title', isLogin ? '' : 'mohu']">{{ item.title.slice(3, item.title.length
|
<text :class="['news-title', isLogin ? '' : 'mohu']">{{
|
||||||
- 1) }}</text>
|
item.title.slice(3, item.title.length)
|
||||||
|
}}</text>
|
||||||
</text>
|
</text>
|
||||||
<text :class="['news-desc', isLogin ? '' : 'mohu']">{{ item.summary }}</text>
|
<text :class="['news-desc', isLogin ? '' : 'mohu']">{{
|
||||||
|
item.summary
|
||||||
|
}}</text>
|
||||||
|
|
||||||
<view :class="['news-meta', isLogin ? '' : 'mohu']">
|
<view :class="['news-meta', isLogin ? '' : 'mohu']">
|
||||||
|
<view
|
||||||
<view style="display: flex;justify-content: space-between;width: 100%;">
|
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">{{ item.source }}</text>
|
||||||
<text class="time">{{
|
<text class="time">{{
|
||||||
dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss")
|
dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss")
|
||||||
|
|
@ -37,27 +57,36 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="r_option">
|
<view class="r_option">
|
||||||
<image class="option_icon"
|
<image
|
||||||
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/eye_icon%402x.png"></image>
|
class="option_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/eye_icon%402x.png"
|
||||||
|
></image>
|
||||||
<text class="option_text">{{ item.viewCount }}</text>
|
<text class="option_text">{{ item.viewCount }}</text>
|
||||||
|
|
||||||
<image class="option_icon"
|
<image
|
||||||
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/like_icon%402x.png"></image>
|
class="option_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/like_icon%402x.png"
|
||||||
|
></image>
|
||||||
<text class="option_text">{{ item.likeCount }}</text>
|
<text class="option_text">{{ item.likeCount }}</text>
|
||||||
|
|
||||||
<image class="option_icon"
|
<image
|
||||||
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/share_icon%402x.png"></image>
|
class="option_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/share_icon%402x.png"
|
||||||
|
></image>
|
||||||
<text class="option_text">{{ item.shareCount }}</text>
|
<text class="option_text">{{ item.shareCount }}</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="lock_view" v-if="!isLogin">
|
<view class="lock_view" v-if="!isLogin">
|
||||||
<image class="lock_icon"
|
<image
|
||||||
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/lock_icon%402x.png">
|
class="lock_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/lock_icon%402x.png"
|
||||||
|
>
|
||||||
</image>
|
</image>
|
||||||
<text class="lock_text">海外独家资讯内容,<text style="color: #D13E3C">登录</text>后可查阅全文</text>
|
<text class="lock_text"
|
||||||
|
>海外独家资讯内容,<text style="color: #d13e3c">登录</text
|
||||||
|
>后可查阅全文</text
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -74,7 +103,7 @@ import { Session } from "@/utils/storage";
|
||||||
const isExp = ref(true);
|
const isExp = ref(true);
|
||||||
const rankListLocal = ref([]);
|
const rankListLocal = ref([]);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const isLogin = ref(uni.getStorageSync('token'))
|
const isLogin = ref(uni.getStorageSync("token"));
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => isExp.value,
|
() => isExp.value,
|
||||||
|
|
@ -110,16 +139,28 @@ watch(
|
||||||
let viewCount = 0;
|
let viewCount = 0;
|
||||||
let favCount = 0;
|
let favCount = 0;
|
||||||
if (item.likeCount) {
|
if (item.likeCount) {
|
||||||
likeCount = item.likeCount > 10000 ? Number(item.likeCount / 10000).toFixed(1) + '万' : item.likeCount;
|
likeCount =
|
||||||
|
item.likeCount > 10000
|
||||||
|
? Number(item.likeCount / 10000).toFixed(1) + "万"
|
||||||
|
: item.likeCount;
|
||||||
}
|
}
|
||||||
if (item.shareCount) {
|
if (item.shareCount) {
|
||||||
shareCount = item.shareCount > 10000 ? Number(item.shareCount / 10000).toFixed(1) + '万' : item.shareCount;
|
shareCount =
|
||||||
|
item.shareCount > 10000
|
||||||
|
? Number(item.shareCount / 10000).toFixed(1) + "万"
|
||||||
|
: item.shareCount;
|
||||||
}
|
}
|
||||||
if (item.viewCount) {
|
if (item.viewCount) {
|
||||||
viewCount = item.viewCount > 10000 ? Number(item.viewCount / 10000).toFixed(1) + '万' : item.viewCount;
|
viewCount =
|
||||||
|
item.viewCount > 10000
|
||||||
|
? Number(item.viewCount / 10000).toFixed(1) + "万"
|
||||||
|
: item.viewCount;
|
||||||
}
|
}
|
||||||
if (item.favCount) {
|
if (item.favCount) {
|
||||||
favCount = item.favCount > 10000 ? Number(item.favCount / 10000).toFixed(1) + '万' : item.viewCount;
|
favCount =
|
||||||
|
item.favCount > 10000
|
||||||
|
? Number(item.favCount / 10000).toFixed(1) + "万"
|
||||||
|
: item.viewCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
rankListLocal.value.push({
|
rankListLocal.value.push({
|
||||||
|
|
@ -145,14 +186,25 @@ const props = defineProps({
|
||||||
|
|
||||||
const clickItem = ref({});
|
const clickItem = ref({});
|
||||||
function goDetail(item) {
|
function goDetail(item) {
|
||||||
if (uni.getStorageSync("token")) {
|
|
||||||
clickItem.value = item;
|
clickItem.value = item;
|
||||||
|
if (uni.getStorageSync("token")) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/detail/indexNewsInfo?id=${item.news_id}`,
|
url: `/pages/detail/indexNewsInfo?id=${item.news_id}`,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
LoginShow.value = true;
|
uni.navigateTo({
|
||||||
|
url: "/pages/login/indexMini",
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (uni.getStorageSync("token")) {
|
||||||
|
// clickItem.value = item;
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: `/pages/detail/indexNewsInfo?id=${item.news_id}`,
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
const LoginShow = ref(false);
|
const LoginShow = ref(false);
|
||||||
|
|
@ -238,7 +290,7 @@ const handlePopupErrorCallback = () => {
|
||||||
|
|
||||||
font-family: AvantiBold;
|
font-family: AvantiBold;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #5A5A5A;
|
color: #5a5a5a;
|
||||||
line-height: 26rpx;
|
line-height: 26rpx;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
|
@ -247,7 +299,6 @@ const handlePopupErrorCallback = () => {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.news-content {
|
.news-content {
|
||||||
|
|
@ -289,7 +340,7 @@ const handlePopupErrorCallback = () => {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #999;
|
color: #999;
|
||||||
margin-top: 10rpx;
|
margin-top: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.source,
|
.source,
|
||||||
|
|
@ -336,9 +387,8 @@ const handlePopupErrorCallback = () => {
|
||||||
filter: blur(7rpx);
|
filter: blur(7rpx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.lock_view {
|
.lock_view {
|
||||||
background: linear-gradient(180deg, rgba(248, 244, 238, 0) 0%, #F8F4EE 100%);
|
background: linear-gradient(180deg, rgba(248, 244, 238, 0) 0%, #f8f4ee 100%);
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
padding: 10rpx 20rpx;
|
padding: 10rpx 20rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -360,7 +410,7 @@ const handlePopupErrorCallback = () => {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #7F6242;
|
color: #7f6242;
|
||||||
line-height: 33rpx;
|
line-height: 33rpx;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<text style="margin-left: 40rpx;margin-right: 40rpx;display: flex;">
|
<text style="margin-left: 40rpx; margin-right: 40rpx; display: flex">
|
||||||
<text class="title">{{ props.data.title?.slice(0, 3) }}</text>
|
<text class="title">{{ props.data.title?.slice(0, 3) }}</text>
|
||||||
<text :class="['title', isLogin ? '' : 'mohu']">{{ props.data.title?.slice(3,
|
<text :class="['title', isLogin ? '' : 'mohu']">{{
|
||||||
props.data.title.length
|
props.data.title?.slice(3, props.data.title.length)
|
||||||
- 1) }}</text>
|
}}</text>
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
<view class="author">
|
<view class="author">
|
||||||
<view class="name">
|
<view class="name" v-if="!isDomestic">
|
||||||
<text class="text">来源:</text>
|
<text class="text">来源:</text>
|
||||||
<text class="text">{{ props.data.tag }}</text>
|
<text class="text">{{ props.data.tag }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -22,25 +22,41 @@
|
||||||
|
|
||||||
<!-- 两个标签 start -->
|
<!-- 两个标签 start -->
|
||||||
<view class="r_r_tags">
|
<view class="r_r_tags">
|
||||||
<view style="display: flex; margin-top: 20rpx; overflow-x: auto; width: 95vw">
|
<view
|
||||||
|
style="display: flex; margin-top: 20rpx; overflow-x: auto; width: 95vw"
|
||||||
|
>
|
||||||
<view class="r_tags">
|
<view class="r_tags">
|
||||||
<view class="tag" style="background-color: #fff9ec; color: #ffb100"
|
<view
|
||||||
v-for="(item, index) in props.data.conceptLabels" :key="index">{{ item }}</view>
|
class="tag"
|
||||||
|
style="background-color: #fff9ec; color: #ffb100"
|
||||||
|
v-for="(item, index) in props.data.conceptLabels"
|
||||||
|
:key="index"
|
||||||
|
>{{ item }}</view
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="display: flex; margin-top: 20rpx; overflow-x: auto; width: 100vw">
|
<view
|
||||||
|
style="display: flex; margin-top: 20rpx; overflow-x: auto; width: 100vw"
|
||||||
|
>
|
||||||
<view class="r_tags">
|
<view class="r_tags">
|
||||||
<view class="tag" style="background-color: #f5f8fe; color: #007aff"
|
<view
|
||||||
v-for="(item, index) in props.data.industryLabels" :key="index">{{ item }}</view>
|
class="tag"
|
||||||
|
style="background-color: #f5f8fe; color: #007aff"
|
||||||
|
v-for="(item, index) in props.data.industryLabels"
|
||||||
|
:key="index"
|
||||||
|
>{{ item }}</view
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 两个标签 end -->
|
<!-- 两个标签 end -->
|
||||||
|
|
||||||
<!-- 摘要 -->
|
<!-- 摘要 -->
|
||||||
<view :class="['desc', isLogin ? '' : 'mohu']" v-if="props.data.summary">
|
<view
|
||||||
|
:class="['desc', isLogin ? '' : 'mohu']"
|
||||||
|
v-if="props.data.summary && !isDomestic"
|
||||||
|
>
|
||||||
<!-- <view class="bill_icon"></view> -->
|
<!-- <view class="bill_icon"></view> -->
|
||||||
{{ props.data.summary }}
|
{{ props.data.summary }}
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -54,8 +70,11 @@
|
||||||
v-html="props.data.content">
|
v-html="props.data.content">
|
||||||
</text> -->
|
</text> -->
|
||||||
|
|
||||||
<rich-text :class="['articleDes', isLogin ? '' : 'mohu']" style="white-space: pre-wrap"
|
<rich-text
|
||||||
v-html="props.data.content"></rich-text>
|
:class="['articleDes', isLogin ? '' : 'mohu']"
|
||||||
|
style="white-space: pre-wrap"
|
||||||
|
v-html="props.data.content"
|
||||||
|
></rich-text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view
|
<!-- <view
|
||||||
|
|
@ -77,12 +96,16 @@ import {
|
||||||
onShareTimeline,
|
onShareTimeline,
|
||||||
} from "@dcloudio/uni-app";
|
} from "@dcloudio/uni-app";
|
||||||
// import articleMock from "@/mock/article.js";
|
// import articleMock from "@/mock/article.js";
|
||||||
const isLogin = ref(uni.getStorageSync('token'))
|
const isLogin = ref(uni.getStorageSync("token"));
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => { },
|
default: () => {},
|
||||||
|
},
|
||||||
|
isDomestic: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const tagList1 = ref([
|
const tagList1 = ref([
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,48 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="list" v-if="data.length">
|
<view class="list" v-if="data.length">
|
||||||
<view class="listItem" v-for="item in props.data" :key="item.id" @click="handleClick(item)">
|
<view
|
||||||
|
class="listItem"
|
||||||
|
v-for="item in props.data"
|
||||||
|
:key="item.id"
|
||||||
|
@click="handleClick(item)"
|
||||||
|
>
|
||||||
<view class="listItemHeader">
|
<view class="listItemHeader">
|
||||||
<view class="ListItemImg" v-if="item.picture">
|
<view class="ListItemImg" v-if="item.picture">
|
||||||
<image :src="item.picture" class="ListItemImage" mode="widthFix" style="width: 204rpx" />
|
<image
|
||||||
<image class="ListItemBg" :src="item.picture" style="width: 100%; height: 100%" />
|
:src="item.picture"
|
||||||
|
class="ListItemImage"
|
||||||
|
mode="widthFix"
|
||||||
|
style="width: 204rpx"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
class="ListItemBg"
|
||||||
|
:src="item.picture"
|
||||||
|
style="width: 100%; height: 100%"
|
||||||
|
/>
|
||||||
<view class="tag" v-if="item.newType !== 'search'">{{
|
<view class="tag" v-if="item.newType !== 'search'">{{
|
||||||
item.tag
|
item.tag
|
||||||
}}</view>
|
}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="listItemHeaderContent">
|
<view class="listItemHeaderContent">
|
||||||
<view :class="['listItemTitle', !item.summary && 'noAbstract']" v-html="item.title">
|
<view v-if="!isLogin">
|
||||||
|
<text :class="['listItemTitle']">{{ item.title.slice(0, 3) }}</text>
|
||||||
|
<text :class="['listItemTitle', isLogin ? '' : 'mohu']">
|
||||||
|
{{ item.title.slice(3, item.title.length) }}
|
||||||
|
</text></view
|
||||||
|
>
|
||||||
|
<view v-else>
|
||||||
|
<view :class="['listItemTitle1']" v-html="item.title"> </view>
|
||||||
</view>
|
</view>
|
||||||
|
<view
|
||||||
|
:class="['listItemAbstract', isLogin ? '' : 'mohu']"
|
||||||
<view class="listItemAbstract" v-if="item.newType !== 'search'">{{
|
v-if="item.newType !== 'search'"
|
||||||
item.summary
|
v-html="item.summary"
|
||||||
}}</view>
|
></view>
|
||||||
<view class="listItemAbstract" v-else v-html="item.MarkInRedContent || item.abstract"></view>
|
<view
|
||||||
|
:class="['listItemAbstract', isLogin ? '' : 'mohu']"
|
||||||
|
v-else
|
||||||
|
v-html="item.MarkInRedContent || item.abstract"
|
||||||
|
></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -25,25 +50,32 @@
|
||||||
<view class="tag">{{ item.tag }}</view>
|
<view class="tag">{{ item.tag }}</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<view class="listItemContent">
|
<view :class="['listItemContent', isLogin ? '' : 'mohu']">
|
||||||
<view style="display: flex;">
|
<view style="display: flex">
|
||||||
<view class="tag">{{ item.tag }}</view>
|
<view class="tag">{{ item.tag }}</view>
|
||||||
<view class="listItemTime" style="margin-left: 10rpx;">{{ item.time }}</view>
|
<view class="listItemTime" style="margin-left: 10rpx">{{
|
||||||
|
item.time
|
||||||
|
}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="r_option">
|
<view class="r_option">
|
||||||
<image class="option_icon"
|
<image
|
||||||
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/eye_icon%402x.png"></image>
|
class="option_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/eye_icon%402x.png"
|
||||||
|
></image>
|
||||||
<text class="option_text">{{ item.readNums }}</text>
|
<text class="option_text">{{ item.readNums }}</text>
|
||||||
|
|
||||||
<image class="option_icon"
|
<image
|
||||||
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/like_icon%402x.png"></image>
|
class="option_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/like_icon%402x.png"
|
||||||
|
></image>
|
||||||
<text class="option_text">{{ item.likeNums }}</text>
|
<text class="option_text">{{ item.likeNums }}</text>
|
||||||
|
|
||||||
<image class="option_icon"
|
<image
|
||||||
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/share_icon%402x.png"></image>
|
class="option_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/share_icon%402x.png"
|
||||||
|
></image>
|
||||||
<text class="option_text">{{ item.shareNums }}</text>
|
<text class="option_text">{{ item.shareNums }}</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -59,6 +91,7 @@ import { ref } from "vue";
|
||||||
import { onShow, onLoad } from "@dcloudio/uni-app";
|
import { onShow, onLoad } from "@dcloudio/uni-app";
|
||||||
|
|
||||||
const emit = defineEmits(["handleListJump", "onClick"]);
|
const emit = defineEmits(["handleListJump", "onClick"]);
|
||||||
|
const isLogin = ref(uni.getStorageSync("token"));
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 列表内容
|
// 列表内容
|
||||||
|
|
@ -82,7 +115,7 @@ const handleClick = (item: any) => {
|
||||||
.list {
|
.list {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 0 21rpx 30rpx 21rpx;
|
padding: 0 40rpx 30rpx 40rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
font-family: "SourceHanSansCN-Regular";
|
font-family: "SourceHanSansCN-Regular";
|
||||||
|
|
||||||
|
|
@ -133,12 +166,14 @@ const handleClick = (item: any) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.listItemHeaderContent {
|
.listItemHeaderContent {
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-left: 0rpx;
|
padding-left: 0rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
.listItemTitle {
|
.listItemTitle1 {
|
||||||
// font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-size: var(--h1-font-size);
|
font-size: var(--h1-font-size);
|
||||||
color: #333;
|
color: #333;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
|
|
@ -147,8 +182,28 @@ const handleClick = (item: any) => {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
// font-weight: bold;
|
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #192236;
|
||||||
|
line-height: 45rpx;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
.listItemTitle {
|
||||||
|
// font-size: 32rpx;
|
||||||
|
// font-size: var(--h1-font-size);
|
||||||
|
// color: #333;
|
||||||
|
// display: -webkit-box;
|
||||||
|
// -webkit-box-orient: vertical;
|
||||||
|
// -webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: normal;
|
||||||
|
word-break: break-all;
|
||||||
|
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
|
@ -210,7 +265,7 @@ const handleClick = (item: any) => {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #2D3849;
|
color: #2d3849;
|
||||||
line-height: 33rpx;
|
line-height: 33rpx;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
|
@ -272,7 +327,6 @@ const handleClick = (item: any) => {
|
||||||
font-family: "SourceHanSansCN-Medium";
|
font-family: "SourceHanSansCN-Medium";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.r_option {
|
.r_option {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -294,4 +348,8 @@ const handleClick = (item: any) => {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mohu {
|
||||||
|
filter: blur(7rpx);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,335 @@
|
||||||
|
<template>
|
||||||
|
<view class="list" v-if="data.length">
|
||||||
|
<view
|
||||||
|
class="listItem"
|
||||||
|
v-for="item in props.data"
|
||||||
|
:key="item.id"
|
||||||
|
@click="handleClick(item)"
|
||||||
|
>
|
||||||
|
<view class="listItemHeader">
|
||||||
|
<view class="ListItemImg" v-if="item.picture">
|
||||||
|
<image
|
||||||
|
:src="item.picture"
|
||||||
|
class="ListItemImage"
|
||||||
|
mode="widthFix"
|
||||||
|
style="width: 204rpx"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
class="ListItemBg"
|
||||||
|
:src="item.picture"
|
||||||
|
style="width: 100%; height: 100%"
|
||||||
|
/>
|
||||||
|
<view class="tag" v-if="item.newType !== 'search'">{{
|
||||||
|
item.tag
|
||||||
|
}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="listItemHeaderContent">
|
||||||
|
<view v-if="!isLogin">
|
||||||
|
<text :class="['listItemTitle']">{{ item.title.slice(0, 3) }}</text>
|
||||||
|
<text :class="['listItemTitle', isLogin ? '' : 'mohu']">
|
||||||
|
{{ item.title.slice(3, item.title.length) }}
|
||||||
|
</text></view
|
||||||
|
>
|
||||||
|
<view v-else>
|
||||||
|
<view :class="['listItemTitle1']" v-html="item.title"> </view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
:class="['listItemAbstract', isLogin ? '' : 'mohu']"
|
||||||
|
v-if="item.newType !== 'search'"
|
||||||
|
v-html="item.summary"
|
||||||
|
></view>
|
||||||
|
<view
|
||||||
|
:class="['listItemAbstract', isLogin ? '' : 'mohu']"
|
||||||
|
v-else
|
||||||
|
v-html="item.MarkInRedContent || item.abstract"
|
||||||
|
></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <view class="tabContainer">
|
||||||
|
<view class="tag">{{ item.tag }}</view>
|
||||||
|
</view> -->
|
||||||
|
|
||||||
|
<view :class="['listItemContent', isLogin ? '' : 'mohu']">
|
||||||
|
<view style="display: flex">
|
||||||
|
<view class="tag">中国证券报</view>
|
||||||
|
<view class="listItemTime" style="margin-left: 10rpx">{{
|
||||||
|
item.publishTime
|
||||||
|
}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <view class="listItemFooter" v-if="item.needpay"></view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <u-empty mode="news" v-else> </u-empty> -->
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { onShow, onLoad } from "@dcloudio/uni-app";
|
||||||
|
|
||||||
|
const emit = defineEmits(["handleListJump", "onClick"]);
|
||||||
|
const isLogin = ref(uni.getStorageSync("token"));
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
// 列表内容
|
||||||
|
data: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log("props ===>", props.data);
|
||||||
|
const handleListJump = (item) => {
|
||||||
|
emit("handleListJump", item);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 点击新闻传给父组件
|
||||||
|
const handleClick = (item: any) => {
|
||||||
|
emit("onClick", item);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.list {
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 0 40rpx 30rpx 40rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
font-family: "SourceHanSansCN-Regular";
|
||||||
|
|
||||||
|
.listItem {
|
||||||
|
border-bottom: 2rpx solid rgba(51, 51, 51, 0.1);
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
|
||||||
|
.listItemHeader {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.ListItemImg {
|
||||||
|
width: 204rpx;
|
||||||
|
height: 204rpx;
|
||||||
|
border-radius: 9rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #c4c4c4;
|
||||||
|
flex-shrink: 0;
|
||||||
|
position: relative;
|
||||||
|
margin-right: 12rpx;
|
||||||
|
|
||||||
|
.ListItemImage {
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
z-index: 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ListItemBg {
|
||||||
|
filter: blur(30rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 6rpx 16rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
background-color: #e7303f;
|
||||||
|
// font-size: 20rpx;
|
||||||
|
font-size: var(--h6-font-size);
|
||||||
|
color: #fff;
|
||||||
|
z-index: 9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.listItemHeaderContent {
|
||||||
|
// width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-left: 0rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.listItemTitle1 {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-size: var(--h1-font-size);
|
||||||
|
color: #333;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: normal;
|
||||||
|
word-break: break-all;
|
||||||
|
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #192236;
|
||||||
|
line-height: 45rpx;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
.listItemTitle {
|
||||||
|
// font-size: 32rpx;
|
||||||
|
// font-size: var(--h1-font-size);
|
||||||
|
// color: #333;
|
||||||
|
// display: -webkit-box;
|
||||||
|
// -webkit-box-orient: vertical;
|
||||||
|
// -webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: normal;
|
||||||
|
word-break: break-all;
|
||||||
|
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #192236;
|
||||||
|
line-height: 45rpx;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
|
||||||
|
// text-align: left;
|
||||||
|
&.noAbstract {
|
||||||
|
-webkit-line-clamp: 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.isVip {
|
||||||
|
display: inline-block;
|
||||||
|
width: 50rpx;
|
||||||
|
height: 29rpx;
|
||||||
|
background-image: url(https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/icon_vip.png);
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.listItemTitleContent {
|
||||||
|
// font-size: 32rpx;
|
||||||
|
font-size: var(--h1-font-size);
|
||||||
|
// color: #333;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: normal;
|
||||||
|
// font-weight: bold;
|
||||||
|
|
||||||
|
.isVip {
|
||||||
|
display: inline-block;
|
||||||
|
width: 50rpx;
|
||||||
|
height: 29rpx;
|
||||||
|
background-image: url(https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/icon_vip.png);
|
||||||
|
background-size: cover;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-right: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.listItemAbstract {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-top: 12rpx;
|
||||||
|
// font-size: 26rpx;
|
||||||
|
font-size: var(--h3-font-size);
|
||||||
|
color: rgba(51, 51, 51, 0.6);
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: normal;
|
||||||
|
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #2d3849;
|
||||||
|
line-height: 33rpx;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.listItemContent {
|
||||||
|
// font-size: 20rpx;
|
||||||
|
font-size: var(--h6-font-size);
|
||||||
|
color: #b9b9b9;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 21rpx 0 0 0;
|
||||||
|
|
||||||
|
.listItemData {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.dataItem {
|
||||||
|
margin-right: 12rpx;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabContainer {
|
||||||
|
display: flex;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-top: 21rpx;
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 6rpx 16rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
background-color: #e7303f;
|
||||||
|
// font-size: 20rpx;
|
||||||
|
font-size: var(--h6-font-size);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.listItemFooter {
|
||||||
|
height: 74rpx;
|
||||||
|
margin-top: 15rpx;
|
||||||
|
background-image: url(https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/vip_sub_2.png);
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.listItemTitleContentText {
|
||||||
|
font-family: "SourceHanSansCN-Medium";
|
||||||
|
}
|
||||||
|
|
||||||
|
.r_option {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 10rpx;
|
||||||
|
|
||||||
|
.option_icon {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option_text {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #192236;
|
||||||
|
line-height: 33rpx;
|
||||||
|
text-align: justify;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mohu {
|
||||||
|
filter: blur(7rpx);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -21,8 +21,16 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="recommendedList" v-if="hotNewsList.length != 0">
|
<view class="recommendedList" v-if="hotNewsList.length != 0">
|
||||||
<u-scroll-list :indicator="false">
|
<u-scroll-list :indicator="false">
|
||||||
<view class="recommendedList-item" v-for="(item, index) in hotNewsList" :key="item.id">
|
<view
|
||||||
<RecommendedItem :data="{ item }" @handleClick="doDetail" :noPayShow="true" />
|
class="recommendedList-item"
|
||||||
|
v-for="(item, index) in hotNewsList"
|
||||||
|
:key="item.id"
|
||||||
|
>
|
||||||
|
<RecommendedItem
|
||||||
|
:data="{ item }"
|
||||||
|
@handleClick="doDetail"
|
||||||
|
:noPayShow="true"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</u-scroll-list>
|
</u-scroll-list>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -44,8 +52,11 @@
|
||||||
<!-- 订阅 支付 -->
|
<!-- 订阅 支付 -->
|
||||||
<Pay :show="payShow" @onClick="handleClose" @handleSub="handleClickPay" />
|
<Pay :show="payShow" @onClick="handleClose" @handleSub="handleClickPay" />
|
||||||
<!-- 登录弹框 -->
|
<!-- 登录弹框 -->
|
||||||
<LoginPopup :show="LoginShow" @handlePopupClose="handlePopupClose"
|
<LoginPopup
|
||||||
@handlePopupSuccessCallback="handlePopupSuccessCallback" />
|
:show="LoginShow"
|
||||||
|
@handlePopupClose="handlePopupClose"
|
||||||
|
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -95,7 +106,11 @@ watch(
|
||||||
() => props.newsList,
|
() => props.newsList,
|
||||||
(newValue, oldValue) => {
|
(newValue, oldValue) => {
|
||||||
const token = Session.get("token");
|
const token = Session.get("token");
|
||||||
isPay.value = !token ? true : newValue[0]?.needpay ? newValue[0]?.needpay : false;
|
isPay.value = !token
|
||||||
|
? true
|
||||||
|
: newValue[0]?.needpay
|
||||||
|
? newValue[0]?.needpay
|
||||||
|
: false;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -253,7 +268,8 @@ const handlePopupSuccessCallback = () => {
|
||||||
display: block;
|
display: block;
|
||||||
width: 44rpx;
|
width: 44rpx;
|
||||||
height: 6rpx;
|
height: 6rpx;
|
||||||
background: url("https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/icon_dot.png") no-repeat center;
|
background: url("https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/icon_dot.png")
|
||||||
|
no-repeat center;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -434,7 +450,11 @@ const handlePopupSuccessCallback = () => {
|
||||||
// margin-bottom: 24rpx;
|
// margin-bottom: 24rpx;
|
||||||
padding: 40rpx 0;
|
padding: 40rpx 0;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
background: linear-gradient(90deg, rgba(255, 250, 240, 1) 0%, rgba(254, 238, 210, 1) 100%);
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
rgba(255, 250, 240, 1) 0%,
|
||||||
|
rgba(254, 238, 210, 1) 100%
|
||||||
|
);
|
||||||
|
|
||||||
.need-pay-text {
|
.need-pay-text {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
@ -452,7 +472,11 @@ const handlePopupSuccessCallback = () => {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
background: linear-gradient(90deg, rgba(252, 92, 105, 1) 0%, rgba(231, 48, 63, 1) 100%);
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
rgba(252, 92, 105, 1) 0%,
|
||||||
|
rgba(231, 48, 63, 1) 100%
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
<template>
|
||||||
|
<view class="news-rank-list">
|
||||||
|
<List :data="newsList" @onClick="doDetail" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onMounted, reactive, ref, watch } from "vue";
|
||||||
|
import dayjs from "dayjs/esm/index";
|
||||||
|
import LoginPopup from "@/components/loginPopup/index.vue";
|
||||||
|
import { Session } from "@/utils/storage";
|
||||||
|
import { getDomestic } from "@/api/index";
|
||||||
|
import List from "@/components/articleList/indexDomestic.vue";
|
||||||
|
import { onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
|
||||||
|
|
||||||
|
const newsList = ref([]);
|
||||||
|
|
||||||
|
const form = reactive({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
});
|
||||||
|
|
||||||
|
function doDetail(item) {
|
||||||
|
uni.setStorageSync("homeTabIndex", 2);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/detail/indexNewsInfo?id=" + item.id + "&type=guonei",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getDomesticFn() {
|
||||||
|
uni.showLoading();
|
||||||
|
let { code, data } = await getDomestic({
|
||||||
|
...form,
|
||||||
|
});
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
if (code == 200) {
|
||||||
|
if (form.pageNum == 1) {
|
||||||
|
newsList.value = data.records;
|
||||||
|
} else {
|
||||||
|
newsList.value = [...newsList.value, ...data.records];
|
||||||
|
}
|
||||||
|
console.log("🚀 ~ getDomesticFn ~ newsList.value:", newsList.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getDomesticFn();
|
||||||
|
});
|
||||||
|
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
form.pageNum = 1;
|
||||||
|
getDomesticFn();
|
||||||
|
});
|
||||||
|
|
||||||
|
onReachBottom(() => {
|
||||||
|
form.pageNum++;
|
||||||
|
getDomesticFn();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
|
|
@ -2,7 +2,10 @@
|
||||||
<view class="mine">
|
<view class="mine">
|
||||||
<!-- 用户信息 -->
|
<!-- 用户信息 -->
|
||||||
<view class="userContainer">
|
<view class="userContainer">
|
||||||
<u-avatar src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/avatar.png" size="60"></u-avatar>
|
<u-avatar
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/avatar.png"
|
||||||
|
size="60"
|
||||||
|
></u-avatar>
|
||||||
<view class="userData">
|
<view class="userData">
|
||||||
<text class="phone">{{
|
<text class="phone">{{
|
||||||
!isLoginStatus
|
!isLoginStatus
|
||||||
|
|
@ -33,30 +36,53 @@
|
||||||
<!-- 其他功能区 -->
|
<!-- 其他功能区 -->
|
||||||
<view class="otherContainer" v-if="isLoginStatus">
|
<view class="otherContainer" v-if="isLoginStatus">
|
||||||
<u-cell-group :border="false">
|
<u-cell-group :border="false">
|
||||||
<u-cell title="已订阅栏目" icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/vip.png" isLink
|
<u-cell
|
||||||
:iconStyle="{ width: '46rpx', height: '32rpx', marginRight: '14rpx' }" :titleStyle="{
|
title="已订阅栏目"
|
||||||
|
icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/vip.png"
|
||||||
|
isLink
|
||||||
|
:iconStyle="{ width: '46rpx', height: '32rpx', marginRight: '14rpx' }"
|
||||||
|
:titleStyle="{
|
||||||
fontSize: '32rpx',
|
fontSize: '32rpx',
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
}" @click="handleClick(-1)">
|
}"
|
||||||
|
@click="handleClick(-1)"
|
||||||
|
>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
<u-cell title="我的收藏" icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/star.png" isLink
|
<u-cell
|
||||||
:iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }" :titleStyle="{
|
title="我的收藏"
|
||||||
|
icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/star.png"
|
||||||
|
isLink
|
||||||
|
:iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }"
|
||||||
|
:titleStyle="{
|
||||||
fontSize: '32rpx',
|
fontSize: '32rpx',
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
}" @click="handleClick(0)">
|
}"
|
||||||
|
@click="handleClick(0)"
|
||||||
|
>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
<u-cell title="我喜欢的" icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/like.png" isLink
|
<u-cell
|
||||||
:iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }" :titleStyle="{
|
title="我喜欢的"
|
||||||
|
icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/like.png"
|
||||||
|
isLink
|
||||||
|
:iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }"
|
||||||
|
:titleStyle="{
|
||||||
fontSize: '32rpx',
|
fontSize: '32rpx',
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
}" @click="handleClick(1)">
|
}"
|
||||||
|
@click="handleClick(1)"
|
||||||
|
>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
<!-- title="浏览记录" :icon="time" :border="false" -->
|
<!-- title="浏览记录" :icon="time" :border="false" -->
|
||||||
<u-cell icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/time.png" isLink
|
<u-cell
|
||||||
:iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }" :titleStyle="{
|
icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/time.png"
|
||||||
|
isLink
|
||||||
|
:iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }"
|
||||||
|
:titleStyle="{
|
||||||
fontSize: '32rpx',
|
fontSize: '32rpx',
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
}" @click="handleClick(2)">
|
}"
|
||||||
|
@click="handleClick(2)"
|
||||||
|
>
|
||||||
<template #title>
|
<template #title>
|
||||||
<view class="recordText">
|
<view class="recordText">
|
||||||
<text style="font-size: 32rpx">浏览记录</text>
|
<text style="font-size: 32rpx">浏览记录</text>
|
||||||
|
|
@ -64,8 +90,6 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
|
|
||||||
|
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -83,8 +107,12 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 登录弹框 -->
|
<!-- 登录弹框 -->
|
||||||
<LoginPopup :show="LoginShow" @handlePopupClose="handlePopupClose"
|
<LoginPopup
|
||||||
@handlePopupSuccessCallback="handlePopupSuccessCallback" @handlePopupErrorCallback="handlePopupErrorCallback" />
|
:show="LoginShow"
|
||||||
|
@handlePopupClose="handlePopupClose"
|
||||||
|
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
||||||
|
@handlePopupErrorCallback="handlePopupErrorCallback"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -151,7 +179,6 @@ const loginOut = () => {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: "/pages/login/index",
|
url: "/pages/login/index",
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClick = (val: number) => {
|
const handleClick = (val: number) => {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,10 @@
|
||||||
<Navbar title="中证参考" :hasBack="false"></Navbar>
|
<Navbar title="中证参考" :hasBack="false"></Navbar>
|
||||||
<!-- 用户信息 -->
|
<!-- 用户信息 -->
|
||||||
<view class="userContainer">
|
<view class="userContainer">
|
||||||
<u-avatar src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/avatar.png" size="60"></u-avatar>
|
<u-avatar
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/avatar.png"
|
||||||
|
size="60"
|
||||||
|
></u-avatar>
|
||||||
<view class="userData">
|
<view class="userData">
|
||||||
<text class="phone">{{
|
<text class="phone">{{
|
||||||
!isLoginStatus ? "未登录用户" : maskPhoneNumber()
|
!isLoginStatus ? "未登录用户" : maskPhoneNumber()
|
||||||
|
|
@ -38,24 +41,41 @@
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
}" @click="handleClick(-1)">
|
}" @click="handleClick(-1)">
|
||||||
</u-cell> -->
|
</u-cell> -->
|
||||||
<u-cell title="我的收藏" icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/star.png" isLink
|
<u-cell
|
||||||
:iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }" :titleStyle="{
|
title="我的收藏"
|
||||||
|
icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/star.png"
|
||||||
|
isLink
|
||||||
|
:iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }"
|
||||||
|
:titleStyle="{
|
||||||
fontSize: '32rpx',
|
fontSize: '32rpx',
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
}" @click="handleClick(0)">
|
}"
|
||||||
|
@click="handleClick(0)"
|
||||||
|
>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
<u-cell title="我喜欢的" icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/like.png" isLink
|
<u-cell
|
||||||
:iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }" :titleStyle="{
|
title="我喜欢的"
|
||||||
|
icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/like.png"
|
||||||
|
isLink
|
||||||
|
:iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }"
|
||||||
|
:titleStyle="{
|
||||||
fontSize: '32rpx',
|
fontSize: '32rpx',
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
}" @click="handleClick(1)">
|
}"
|
||||||
|
@click="handleClick(1)"
|
||||||
|
>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
<!-- title="浏览记录" :icon="time" :border="false" -->
|
<!-- title="浏览记录" :icon="time" :border="false" -->
|
||||||
<u-cell icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/time.png" isLink
|
<u-cell
|
||||||
:iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }" :titleStyle="{
|
icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/time.png"
|
||||||
|
isLink
|
||||||
|
:iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }"
|
||||||
|
:titleStyle="{
|
||||||
fontSize: '32rpx',
|
fontSize: '32rpx',
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
}" @click="handleClick(2)">
|
}"
|
||||||
|
@click="handleClick(2)"
|
||||||
|
>
|
||||||
<template #title>
|
<template #title>
|
||||||
<view class="recordText">
|
<view class="recordText">
|
||||||
<text style="font-size: 32rpx">浏览记录</text>
|
<text style="font-size: 32rpx">浏览记录</text>
|
||||||
|
|
@ -63,13 +83,17 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
<u-cell title="隐私协议"
|
<u-cell
|
||||||
|
title="隐私协议"
|
||||||
icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/%E9%9A%90%E7%A7%81%E5%8D%8F%E8%AE%AE%E5%92%8C%E7%94%A8%E6%88%B7%E5%8D%8F%E8%AE%AEicon.png"
|
icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/%E9%9A%90%E7%A7%81%E5%8D%8F%E8%AE%AE%E5%92%8C%E7%94%A8%E6%88%B7%E5%8D%8F%E8%AE%AEicon.png"
|
||||||
isLink :iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }" :titleStyle="{
|
isLink
|
||||||
|
:iconStyle="{ width: '40rpx', height: '40rpx', marginRight: '20rpx' }"
|
||||||
|
:titleStyle="{
|
||||||
fontSize: '32rpx',
|
fontSize: '32rpx',
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
}" @click="handleClick(3)">
|
}"
|
||||||
|
@click="handleClick(3)"
|
||||||
|
>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -88,8 +112,12 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 登录弹框 -->
|
<!-- 登录弹框 -->
|
||||||
<LoginPopup :show="LoginShow" @handlePopupClose="handlePopupClose"
|
<LoginPopup
|
||||||
@handlePopupSuccessCallback="handlePopupSuccessCallback" @handlePopupErrorCallback="handlePopupErrorCallback" />
|
:show="LoginShow"
|
||||||
|
@handlePopupClose="handlePopupClose"
|
||||||
|
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
||||||
|
@handlePopupErrorCallback="handlePopupErrorCallback"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -99,9 +127,9 @@ import { onPullDownRefresh, onShow } from "@dcloudio/uni-app";
|
||||||
import { Session } from "@/utils/storage";
|
import { Session } from "@/utils/storage";
|
||||||
import LoginPopup from "@/components/loginPopup/index.vue";
|
import LoginPopup from "@/components/loginPopup/index.vue";
|
||||||
import { useShareStore } from "@/stores/shareStore";
|
import { useShareStore } from "@/stores/shareStore";
|
||||||
import Navbar from '@/components/mini/Navbar.vue'
|
import Navbar from "@/components/mini/Navbar.vue";
|
||||||
|
|
||||||
const emit = defineEmits(['logout'])
|
const emit = defineEmits(["logout"]);
|
||||||
|
|
||||||
const stores = useShareStore();
|
const stores = useShareStore();
|
||||||
const curPages = getCurrentPages();
|
const curPages = getCurrentPages();
|
||||||
|
|
@ -161,23 +189,23 @@ const loginBtnStatus = () => {
|
||||||
|
|
||||||
// 退出登录,回到登录页面
|
// 退出登录,回到登录页面
|
||||||
const loginOut = () => {
|
const loginOut = () => {
|
||||||
uni.clearStorageSync()
|
uni.clearStorageSync();
|
||||||
emit("logout")
|
emit("logout");
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClick = (val: number) => {
|
const handleClick = (val: number) => {
|
||||||
|
uni.setStorageSync("homeTabIndex", 1);
|
||||||
if (val === -1) {
|
if (val === -1) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/subscribed/index",
|
url: "/pages/subscribed/index",
|
||||||
});
|
});
|
||||||
} else if (val === 3) {
|
} else if (val === 3) {
|
||||||
wx.openPrivacyContract({
|
wx.openPrivacyContract({
|
||||||
success: () => { }, // 打开成功
|
success: () => {}, // 打开成功
|
||||||
fail: () => { }, // 打开失败
|
fail: () => {}, // 打开失败
|
||||||
complete: () => { },
|
complete: () => {},
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/bookmark/index?tabs=${val}`,
|
url: `/pages/bookmark/index?tabs=${val}`,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,85 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="tabbar">
|
<view class="tabbar">
|
||||||
<view class="tabbar_item" @click="tabChange(0)">
|
<view class="tabbar_item" @click="tabChange(0)">
|
||||||
<image v-if="tabIndex == 1" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/home_icon_normal.png"
|
<image
|
||||||
class="tabbar_img" />
|
v-if="tabIndex == 0"
|
||||||
<image v-if="tabIndex == 0" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/home_icon_pre.png"
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/home_icon_pre.png"
|
||||||
class="tabbar_img" />
|
class="tabbar_img"
|
||||||
<text class="tabbar_title" :style="{ color: tabIndex == 0 ? '#D13E3C' : '#757A80' }">海外资讯</text>
|
/>
|
||||||
|
<image
|
||||||
|
v-else
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/home_icon_normal.png"
|
||||||
|
class="tabbar_img"
|
||||||
|
/>
|
||||||
|
<text
|
||||||
|
class="tabbar_title"
|
||||||
|
:style="{ color: tabIndex == 0 ? '#D13E3C' : '#757A80' }"
|
||||||
|
>海外资讯</text
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="tabbar_item" @click="tabChange(2)">
|
||||||
|
<image
|
||||||
|
v-if="tabIndex == 2"
|
||||||
|
src="../../assets/activeCaixun.png"
|
||||||
|
class="tabbar_img"
|
||||||
|
/>
|
||||||
|
<image v-else src="../../assets/caixun.png" class="tabbar_img" />
|
||||||
|
<text
|
||||||
|
class="tabbar_title"
|
||||||
|
:style="{ color: tabIndex == 2 ? '#D13E3C' : '#757A80' }"
|
||||||
|
>国内资讯</text
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="tabbar_item" @click="tabChange(1)">
|
<view class="tabbar_item" @click="tabChange(1)">
|
||||||
<image v-if="tabIndex == 0" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/mine_icon_normal.png"
|
<image
|
||||||
class="tabbar_img" />
|
v-if="tabIndex == 1"
|
||||||
<image v-if="tabIndex == 1" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/mine_icon_pre.png"
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/mine_icon_pre.png"
|
||||||
class="tabbar_img" />
|
class="tabbar_img"
|
||||||
<text class="tabbar_title" :style="{ color: tabIndex == 1 ? '#D13E3C' : '#757A80' }">全部</text>
|
/>
|
||||||
|
<image
|
||||||
|
v-else
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/mine_icon_normal.png"
|
||||||
|
class="tabbar_img"
|
||||||
|
/>
|
||||||
|
<text
|
||||||
|
class="tabbar_title"
|
||||||
|
:style="{ color: tabIndex == 1 ? '#D13E3C' : '#757A80' }"
|
||||||
|
>我的
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, onUnmounted, reactive } from "vue";
|
import { ref, onMounted, watch, reactive } from "vue";
|
||||||
const emit = defineEmits(["tabChange"]);
|
const emit = defineEmits(["tabChange"]);
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
tabIndex: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.tabIndex,
|
||||||
|
(newValue, oldValue) => {
|
||||||
|
console.log("🚀 ~ newValue:", newValue);
|
||||||
|
if (newValue) {
|
||||||
|
tabIndex.value = newValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const tabIndex = ref(0);
|
const tabIndex = ref(0);
|
||||||
function tabChange(index) {
|
function tabChange(index) {
|
||||||
tabIndex.value = index;
|
tabIndex.value = index;
|
||||||
emit("tabChange", index);
|
emit("tabChange", index);
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => { });
|
onMounted(async () => {});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
// const baseURL = "http://192.168.31.25:8060/api";
|
// const baseUrl = "http://192.168.31.25:8060/api";
|
||||||
|
// export const baseUrl = "http://127.0.0.1:8040/apih5";
|
||||||
// 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.79.143:8041/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 = "https://cankao.cs.com.cn/zzck_datav";
|
||||||
|
// export const baseUrlDataV = "http://123.60.153.169:9995/zzck_datav";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,9 @@
|
||||||
"path": "pages/login/indexMini"
|
"path": "pages/login/indexMini"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/realtimeInfo/rankDetail"
|
"path": "pages/realtimeInfo/rankDetail",
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/home/index",
|
"path": "pages/home/index",
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,43 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view :style="{ height: getNavHeight() + 'px', position: 'sticky', top: 0, background: '#fff', zIndex: '9999' }">
|
<view
|
||||||
|
:style="{
|
||||||
|
height: getNavHeight() + 'px',
|
||||||
|
position: 'sticky',
|
||||||
|
top: 0,
|
||||||
|
background: '#fff',
|
||||||
|
zIndex: '9999',
|
||||||
|
}"
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<!-- 导航栏 start -->
|
<!-- 导航栏 start -->
|
||||||
<view class="custom-bav-bar"
|
<view
|
||||||
:style="{ position: 'sticky', top: getNavHeight() + 'px', background: '#fff', zIndex: '9999' }">
|
class="custom-bav-bar"
|
||||||
|
:style="{
|
||||||
|
position: 'sticky',
|
||||||
|
top: getNavHeight() + 'px',
|
||||||
|
background: '#fff',
|
||||||
|
zIndex: '9999',
|
||||||
|
}"
|
||||||
|
>
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_left.png" class="back_icon"
|
<image
|
||||||
@click="handleBack" />
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_left.png"
|
||||||
|
class="back_icon"
|
||||||
|
@click="handleBack"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="center">
|
<view class="center">
|
||||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/detail_logo.png" class="logo_icon" />
|
<image
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/detail_logo.png"
|
||||||
|
class="logo_icon"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 文章正文 start -->
|
<!-- 文章正文 start -->
|
||||||
<Article :data="data" />
|
<Article :data="data" :isDomestic="isDomestic" />
|
||||||
<!-- 分割 -->
|
<!-- 分割 -->
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<!-- 推荐栏目 -->
|
<!-- 推荐栏目 -->
|
||||||
|
|
@ -30,60 +49,82 @@
|
||||||
/> -->
|
/> -->
|
||||||
|
|
||||||
<!-- 底部栏 评论 / 收藏 -->
|
<!-- 底部栏 评论 / 收藏 -->
|
||||||
<Comment v-if="isLogin" :data="data" @handleClickLike="handleClickLike" @handleClickStar="handleClickStar" />
|
<Comment
|
||||||
|
v-if="isLogin && !isDomestic"
|
||||||
|
:data="data"
|
||||||
|
@handleClickLike="handleClickLike"
|
||||||
|
@handleClickStar="handleClickStar"
|
||||||
|
/>
|
||||||
|
|
||||||
<view class="login_unlock" v-if="!isLogin">
|
<view class="login_unlock" v-if="!isLogin">
|
||||||
<view class="r_image">
|
<view class="r_image">
|
||||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/lock_banner%402x.png"></image>
|
<image
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/lock_banner%402x.png"
|
||||||
|
></image>
|
||||||
|
|
||||||
<view class="image_text">
|
<view class="image_text">
|
||||||
<text class="image_text_title">登录解锁</text>
|
<text class="image_text_title">登录解锁</text>
|
||||||
<text class="image_text_sub_title">海外独家资讯内容,登录后可查阅全文</text>
|
<text class="image_text_sub_title"
|
||||||
|
>海外独家资讯内容,登录后可查阅全文</text
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="login_unlock_btn">立即登录</view>
|
<view class="login_unlock_btn" @click="goLogin">立即登录</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { onLoad, onShareAppMessage, onShow } from "@dcloudio/uni-app";
|
import {
|
||||||
|
onLoad,
|
||||||
|
onShareAppMessage,
|
||||||
|
onShareTimeline,
|
||||||
|
onShow,
|
||||||
|
} from "@dcloudio/uni-app";
|
||||||
import { onReachBottom } from "@dcloudio/uni-app";
|
import { onReachBottom } from "@dcloudio/uni-app";
|
||||||
import {
|
import {
|
||||||
fetchArticleDetail,
|
fetchArticleDetail,
|
||||||
fetchArticleLike,
|
fetchArticleLike,
|
||||||
fetchArticleFavorate,
|
fetchArticleFavorate,
|
||||||
} from "@/api/detail";
|
} from "@/api/detail";
|
||||||
import { getNewsList, doShare } from "@/api";
|
import { getNewsList, doShare, getDomesticDetail } from "@/api";
|
||||||
import Article from "@/components/article/indexNewsInfo.vue";
|
import Article from "@/components/article/indexNewsInfo.vue";
|
||||||
import Column from "@/components/column/index.vue";
|
import Column from "@/components/column/index.vue";
|
||||||
import Comment from "@/components/comment/indexMini.vue";
|
import Comment from "@/components/comment/indexMini.vue";
|
||||||
import { useShareStore } from "@/stores/shareStore";
|
import { useShareStore } from "@/stores/shareStore";
|
||||||
import { Session } from "@/utils/storage";
|
import { Session } from "@/utils/storage";
|
||||||
import { getNavHeight } from "@/utils/util"
|
import { getNavHeight } from "@/utils/util";
|
||||||
|
|
||||||
|
|
||||||
const stores = useShareStore();
|
const stores = useShareStore();
|
||||||
const curPages = getCurrentPages();
|
const curPages = getCurrentPages();
|
||||||
const isLogin = ref<boolean>(uni.getStorageSync("token") ? true : false);
|
const isLogin = ref<boolean>(uni.getStorageSync("token") ? true : false);
|
||||||
|
|
||||||
|
|
||||||
const data = ref<any>({});
|
const data = ref<any>({});
|
||||||
const newType = ref<any>("");
|
const newType = ref<any>("");
|
||||||
const columnList = ref<any>([]);
|
const columnList = ref<any>([]);
|
||||||
const columnName = ref("");
|
const columnName = ref("");
|
||||||
|
|
||||||
|
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
console.log("🚀 ~ onReachBottom ~ onReachBottom:");
|
console.log("🚀 ~ onReachBottom ~ onReachBottom:");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const isDomestic = ref<boolean>(false);
|
||||||
onLoad(async (option: any) => {
|
onLoad(async (option: any) => {
|
||||||
uni.pageScrollTo({
|
uni.pageScrollTo({
|
||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
});
|
});
|
||||||
|
if (option?.type == "guonei") {
|
||||||
|
isDomestic.value = true;
|
||||||
|
let res = await getDomesticDetail({ id: option.id });
|
||||||
|
if (res.code === 200) {
|
||||||
|
data.value = res.data;
|
||||||
|
|
||||||
|
data.value.content = res.data.content.replace(/\n{3,}/g, "\n");
|
||||||
|
|
||||||
|
columnName.value = data.columnName1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
newType.value = option.type || 14;
|
newType.value = option.type || 14;
|
||||||
const res = await fetchArticleDetail({
|
const res = await fetchArticleDetail({
|
||||||
id: option.id,
|
id: option.id,
|
||||||
|
|
@ -93,12 +134,13 @@ onLoad(async (option: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
data.value = res.data;
|
data.value = res.data;
|
||||||
|
|
||||||
res.data.content = res.data.content.replace(/\n{3,}/g, '\n');
|
res.data.content = res.data.content.replace(/\n{3,}/g, "\n");
|
||||||
|
|
||||||
columnName.value = res.data.columnName1;
|
columnName.value = res.data.columnName1;
|
||||||
newList(res.data.columnId1);
|
newList(res.data.columnId1);
|
||||||
wxShare();
|
wxShare();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const newList = async (columnId: number) => {
|
const newList = async (columnId: number) => {
|
||||||
|
|
@ -206,20 +248,36 @@ const jumpDetail = (item: any) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function goLogin() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/login/indexMini",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
onShareTimeline(async (res) => {
|
||||||
|
let { code } = await doShare({
|
||||||
|
id: data.value.id,
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
title: data.value.title, //标题
|
||||||
|
path: "/pages/detail/indexNewsInfo?id=" + data.value.id, //可以指定动态路径
|
||||||
|
imageUrl:
|
||||||
|
"https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/share_pic_1%402x.png", //分享图
|
||||||
|
};
|
||||||
|
});
|
||||||
onShareAppMessage(async (res) => {
|
onShareAppMessage(async (res) => {
|
||||||
console.log("🚀 ~ res:", res)
|
console.log("🚀 ~ res:", res);
|
||||||
console.log("🚀 ~ data.value:", data.value)
|
console.log("🚀 ~ data.value:", data.value);
|
||||||
|
|
||||||
let { code } = await doShare({
|
let { code } = await doShare({
|
||||||
id: data.value.id
|
id: data.value.id,
|
||||||
})
|
});
|
||||||
return {
|
return {
|
||||||
title: data.value.title,//标题
|
title: data.value.title, //标题
|
||||||
path: '/page/detail/indexNewsInfo?id=' + data.value.id,//可以指定动态路径
|
path: "/pages/detail/indexNewsInfo?id=" + data.value.id, //可以指定动态路径
|
||||||
imageUrl: 'https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/share_pic_1%402x.png',//分享图
|
imageUrl:
|
||||||
}
|
"https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/share_pic_1%402x.png", //分享图
|
||||||
|
};
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
@ -333,7 +391,7 @@ onShareAppMessage(async (res) => {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #FFFFFF;
|
color: #ffffff;
|
||||||
line-height: 42rpx;
|
line-height: 42rpx;
|
||||||
text-shadow: 0px 2px 8px rgba(43, 51, 75, 0.35);
|
text-shadow: 0px 2px 8px rgba(43, 51, 75, 0.35);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
@ -344,7 +402,7 @@ onShareAppMessage(async (res) => {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #B5BED5;
|
color: #b5bed5;
|
||||||
line-height: 33rpx;
|
line-height: 33rpx;
|
||||||
text-shadow: 0px 2px 8px rgba(43, 51, 75, 0.35);
|
text-shadow: 0px 2px 8px rgba(43, 51, 75, 0.35);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
@ -355,20 +413,19 @@ onShareAppMessage(async (res) => {
|
||||||
width: 78vw;
|
width: 78vw;
|
||||||
height: 128rpx;
|
height: 128rpx;
|
||||||
margin-bottom: 60rpx;
|
margin-bottom: 60rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.login_unlock_btn {
|
.login_unlock_btn {
|
||||||
width: 100%;
|
width: 80%;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background: #D13E3C;
|
background: #d13e3c;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
|
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #FFFFFF;
|
color: #ffffff;
|
||||||
line-height: 45rpx;
|
line-height: 45rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="root" :style="{ backgroundColor: tabIndex == 4 ? '#f6f6f6' : '#ffffff' }">
|
<view
|
||||||
|
class="root"
|
||||||
|
:style="{ backgroundColor: tabIndex == 4 ? '#f6f6f6' : '#ffffff' }"
|
||||||
|
>
|
||||||
<!-- 首页 start -->
|
<!-- 首页 start -->
|
||||||
<Index v-if="menuStateConfig.home.active" :columnState="menuStateConfig.home" :colList="homeColList" @onChange="handleMenuChange"></Index>
|
<Index
|
||||||
|
v-if="menuStateConfig.home.active"
|
||||||
|
:columnState="menuStateConfig.home"
|
||||||
|
:colList="homeColList"
|
||||||
|
@onChange="handleMenuChange"
|
||||||
|
></Index>
|
||||||
<!-- 首页 end -->
|
<!-- 首页 end -->
|
||||||
<!-- vip start -->
|
<!-- vip start -->
|
||||||
<vip v-if="menuStateConfig.vip.active" :columnState="menuStateConfig.vip" :colList="vipColList" @onChange="handleMenuChange"></vip>
|
<vip
|
||||||
|
v-if="menuStateConfig.vip.active"
|
||||||
|
:columnState="menuStateConfig.vip"
|
||||||
|
:colList="vipColList"
|
||||||
|
@onChange="handleMenuChange"
|
||||||
|
></vip>
|
||||||
<!-- vip end -->
|
<!-- vip end -->
|
||||||
<!-- 我的 start -->
|
<!-- 我的 start -->
|
||||||
<mine v-if="menuStateConfig.mine.active"></mine>
|
<mine v-if="menuStateConfig.mine.active"></mine>
|
||||||
|
|
@ -19,14 +32,24 @@
|
||||||
@change="handleMenuChange($event, 'tabbar')"
|
@change="handleMenuChange($event, 'tabbar')"
|
||||||
z-index="600"
|
z-index="600"
|
||||||
>
|
>
|
||||||
<u-tabbar-item :text="item.title" v-for="(item, index) in menuList" :key="index">
|
<u-tabbar-item
|
||||||
|
:text="item.title"
|
||||||
|
v-for="(item, index) in menuList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
<template #active-icon>
|
<template #active-icon>
|
||||||
<view v-if="index == 0" style="height: 40rpx"></view>
|
<view v-if="index == 0" style="height: 40rpx"></view>
|
||||||
<image :src="item.iconc" :class="[index == 0 ? 'vipcass_c' : 'menu_icon']"></image>
|
<image
|
||||||
|
:src="item.iconc"
|
||||||
|
:class="[index == 0 ? 'vipcass_c' : 'menu_icon']"
|
||||||
|
></image>
|
||||||
</template>
|
</template>
|
||||||
<template #inactive-icon>
|
<template #inactive-icon>
|
||||||
<view v-if="index == 0" style="height: 40rpx"></view>
|
<view v-if="index == 0" style="height: 40rpx"></view>
|
||||||
<image :src="item.icon" :class="[index == 0 ? 'vipcass' : 'menu_icon']"></image>
|
<image
|
||||||
|
:src="item.icon"
|
||||||
|
:class="[index == 0 ? 'vipcass' : 'menu_icon']"
|
||||||
|
></image>
|
||||||
</template>
|
</template>
|
||||||
</u-tabbar-item>
|
</u-tabbar-item>
|
||||||
</u-tabbar>
|
</u-tabbar>
|
||||||
|
|
@ -135,11 +158,17 @@ const setMenuStateConfig = (option: any) => {
|
||||||
const __menuStateConfig = Session.get("menuStateConfig");
|
const __menuStateConfig = Session.get("menuStateConfig");
|
||||||
|
|
||||||
if (__menuStateConfig) {
|
if (__menuStateConfig) {
|
||||||
const activeObject: any = Object.values(__menuStateConfig).find((item: any) => item.active);
|
const activeObject: any = Object.values(__menuStateConfig).find(
|
||||||
|
(item: any) => item.active
|
||||||
|
);
|
||||||
const activeId = activeObject ? activeObject.id : 0;
|
const activeId = activeObject ? activeObject.id : 0;
|
||||||
tabIndex.value = activeId;
|
tabIndex.value = activeId;
|
||||||
menuStateConfig.value = __menuStateConfig;
|
menuStateConfig.value = __menuStateConfig;
|
||||||
} else if (option?.tabIndex || option?.columnIndex || option?.subColumnIndex) {
|
} else if (
|
||||||
|
option?.tabIndex ||
|
||||||
|
option?.columnIndex ||
|
||||||
|
option?.subColumnIndex
|
||||||
|
) {
|
||||||
const index = Number(option?.tabIndex) || 0;
|
const index = Number(option?.tabIndex) || 0;
|
||||||
const columnIndex = Number(option?.columnIndex) || 0;
|
const columnIndex = Number(option?.columnIndex) || 0;
|
||||||
const subColumnIndex = Number(option?.subColumnIndex) || 0;
|
const subColumnIndex = Number(option?.subColumnIndex) || 0;
|
||||||
|
|
|
||||||
|
|
@ -8,19 +8,29 @@
|
||||||
<!-- <view class="bottom_btn" @click="goIndex"> 立即进入 </view> -->
|
<!-- <view class="bottom_btn" @click="goIndex"> 立即进入 </view> -->
|
||||||
|
|
||||||
<!-- 用户协议 -->
|
<!-- 用户协议 -->
|
||||||
<view class="tips">
|
<view class="tips" @click="doChangeCheck">
|
||||||
|
<u-checkbox-group
|
||||||
<u-checkbox-group v-model="checked" placement="column" @change="checkboxChange">
|
v-model="checked"
|
||||||
|
placement="column"
|
||||||
|
activeColor="#e7303f"
|
||||||
|
@change="checkboxChange"
|
||||||
|
>
|
||||||
<u-checkbox class="checkbox" shape="circle"></u-checkbox>
|
<u-checkbox class="checkbox" shape="circle"></u-checkbox>
|
||||||
</u-checkbox-group>
|
</u-checkbox-group>
|
||||||
|
|
||||||
<text class="r_userAgreement">已阅读并同意<text class="userAgreement"
|
<text class="r_userAgreement"
|
||||||
@click="goUserAgreement">《江南农商银行隐私政策》《中证参考智能资讯小程序服务使用许可及服务协议》</text>,首次登录的手机号将自动注册。</text>
|
>已阅读并同意<text class="userAgreement" @click="goUserAgreement"
|
||||||
|
>《江南农商银行隐私政策》《中证参考智能资讯小程序服务使用许可及服务协议》</text
|
||||||
|
>,首次登录的手机号将自动注册。</text
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<button
|
||||||
<button v-if="checked && checked?.length > 0" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"
|
v-if="checked && checked?.length > 0"
|
||||||
class="bottom_btn">
|
open-type="getPhoneNumber"
|
||||||
|
@getphonenumber="getPhoneNumber"
|
||||||
|
class="bottom_btn"
|
||||||
|
>
|
||||||
<view>
|
<view>
|
||||||
<text>立即进入</text>
|
<text>立即进入</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -49,14 +59,13 @@ import { doWxAuth } from "@/api/index";
|
||||||
import { onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
|
import { onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { useShareStore } from "@/stores/shareStore";
|
import { useShareStore } from "@/stores/shareStore";
|
||||||
const stores = useShareStore();
|
const stores = useShareStore();
|
||||||
const checked = ref([])
|
const checked = ref([]);
|
||||||
|
|
||||||
watch(checked, (newVal) => {
|
watch(checked, (newVal) => {
|
||||||
console.log("🚀 ~ newVal:", newVal)
|
console.log("🚀 ~ newVal:", newVal);
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
let timer = ref();
|
let timer = ref();
|
||||||
|
|
||||||
|
|
@ -141,20 +150,27 @@ onLoad((option) => {
|
||||||
// }, 2000)
|
// }, 2000)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function doChangeCheck() {
|
||||||
|
if (checked.value && checked.value.length > 0) {
|
||||||
|
checked.value = [];
|
||||||
|
} else {
|
||||||
|
checked.value = [""];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 点击用户协议
|
// 点击用户协议
|
||||||
function needCheck() {
|
function needCheck() {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "请先同意用户协议",
|
title: "请先同意用户协议",
|
||||||
icon: 'none'
|
icon: "none",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function goUserAgreement() {
|
function goUserAgreement() {
|
||||||
wx.openPrivacyContract({
|
wx.openPrivacyContract({
|
||||||
success: () => { }, // 打开成功
|
success: () => {}, // 打开成功
|
||||||
fail: () => { }, // 打开失败
|
fail: () => {}, // 打开失败
|
||||||
complete: () => { },
|
complete: () => {},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -165,7 +181,7 @@ onUnload(() => {
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
stores.initWxConfig();
|
stores.initWxConfig();
|
||||||
uni.setStorageSync('homeTabIndex', null)
|
uni.setStorageSync("homeTabIndex", null);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -232,7 +248,6 @@ onShow(() => {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
|
|
||||||
|
|
||||||
:deep(.u-checkbox) {
|
:deep(.u-checkbox) {
|
||||||
margin-top: 5rpx;
|
margin-top: 5rpx;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,37 +2,54 @@
|
||||||
<!-- 顶部 banner 区域 -->
|
<!-- 顶部 banner 区域 -->
|
||||||
<view class="all">
|
<view class="all">
|
||||||
<!-- <Navbar title="中证参考" :hasBack="false"></Navbar> -->
|
<!-- <Navbar title="中证参考" :hasBack="false"></Navbar> -->
|
||||||
<image class="top_bk" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/top_bg.png"></image>
|
<image
|
||||||
|
class="top_bk"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/top_bg.png"
|
||||||
|
></image>
|
||||||
|
|
||||||
<view :style="{
|
<view
|
||||||
|
:style="{
|
||||||
height: getNavHeight() + 'px',
|
height: getNavHeight() + 'px',
|
||||||
backgroundColor: isScroll ? '#fff' : 'transparent',
|
backgroundColor: isScroll ? '#fff' : 'transparent',
|
||||||
position: 'sticky', top: 0,
|
position: 'sticky',
|
||||||
|
top: 0,
|
||||||
zIndex: '999999',
|
zIndex: '999999',
|
||||||
}" v-if="tabIndex == 0"></view>
|
}"
|
||||||
<view :style="{
|
v-if="tabIndex == 0 || tabIndex == 2"
|
||||||
|
></view>
|
||||||
|
<view
|
||||||
|
:style="{
|
||||||
height: getNavHeight() + 'px',
|
height: getNavHeight() + 'px',
|
||||||
backgroundColor: '#fff',
|
backgroundColor: '#fff',
|
||||||
position: 'sticky', top: 0,
|
position: 'sticky',
|
||||||
|
top: 0,
|
||||||
zIndex: '999999',
|
zIndex: '999999',
|
||||||
|
}"
|
||||||
}" v-else></view>
|
v-else
|
||||||
|
></view>
|
||||||
|
|
||||||
<view class="content">
|
<view class="content">
|
||||||
|
<view
|
||||||
<view :style="{
|
:style="{
|
||||||
position: 'sticky', top: getNavHeight() + 'px',
|
position: 'sticky',
|
||||||
|
top: getNavHeight() + 'px',
|
||||||
backgroundColor: isScroll ? '#fff' : 'transparent',
|
backgroundColor: isScroll ? '#fff' : 'transparent',
|
||||||
zIndex: '9999'
|
zIndex: '9999',
|
||||||
}" v-if="tabIndex == 0">
|
}"
|
||||||
|
v-if="tabIndex == 0 || tabIndex == 2"
|
||||||
|
>
|
||||||
<view class="r_sreach">
|
<view class="r_sreach">
|
||||||
<image class="logo_text" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/logo_text_icon.png">
|
<image
|
||||||
|
class="logo_text"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/logo_text_icon.png"
|
||||||
|
>
|
||||||
</image>
|
</image>
|
||||||
|
|
||||||
<view class="sreach" @click="goSreach">
|
<view class="sreach" @click="goSreach" v-if="tabIndex == 0">
|
||||||
|
|
||||||
<view class="sreach_icon">
|
<view class="sreach_icon">
|
||||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_search_line.png"></image>
|
<image
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_search_line.png"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="sreach_text">
|
<view class="sreach_text">
|
||||||
<text>搜索资讯</text>
|
<text>搜索资讯</text>
|
||||||
|
|
@ -40,102 +57,124 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="padding: 0 24rpx;margin-top: 30rpx;">
|
<view style="padding: 0 24rpx; margin-top: 30rpx" v-if="tabIndex == 0">
|
||||||
<u-swiper :list="list1" @change="change" @click="click"></u-swiper>
|
<u-swiper :list="list1" @change="change" @click="click"></u-swiper>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="padding-top: 30rpx;background-color: white;padding-bottom: 30rpx;">
|
<view
|
||||||
|
v-if="tabIndex == 0"
|
||||||
|
style="
|
||||||
|
padding-top: 30rpx;
|
||||||
|
background-color: white;
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
"
|
||||||
|
>
|
||||||
<Tabs></Tabs>
|
<Tabs></Tabs>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="margin-top: 30rpx;" v-if="tabIndex == 0">
|
<view style="margin-top: 30rpx" v-if="tabIndex == 0">
|
||||||
<RankListMini :newsList="newsList"></RankListMini>
|
<RankListMini :newsList="newsList"></RankListMini>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 列表区域 -->
|
||||||
|
<view style="margin-top: 50rpx" v-if="tabIndex == 2">
|
||||||
|
<Domestic />
|
||||||
|
</view>
|
||||||
|
|
||||||
<MineMini v-if="tabIndex == 1" @logout="tabIndex = 0"></MineMini>
|
<MineMini v-if="tabIndex == 1" @logout="tabIndex = 0"></MineMini>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<Tabbar @tabChange="tabChange"></Tabbar>
|
<Tabbar :tabIndex="tabIndex" @tabChange="tabChange"></Tabbar>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, defineAsyncComponent, reactive } from "vue";
|
import { ref, onMounted, defineAsyncComponent, reactive } from "vue";
|
||||||
import Tabbar from "@/components/mini/Tabbar.vue";
|
import Tabbar from "@/components/mini/Tabbar.vue";
|
||||||
import Navbar from '@/components/mini/Navbar.vue'
|
import Navbar from "@/components/mini/Navbar.vue";
|
||||||
import RankListMini from "@/components/RankListMini.vue";
|
import RankListMini from "@/components/RankListMini.vue";
|
||||||
// const Mine = defineAsyncComponent(() => import("@/components/mine.vue"));
|
// const Mine = defineAsyncComponent(() => import("@/components/mine.vue"));
|
||||||
import MineMini from "@/components/mineMini.vue";
|
import MineMini from "@/components/mineMini.vue";
|
||||||
import Tabs from "@/components/mini/Tabs.vue";
|
import Tabs from "@/components/mini/Tabs.vue";
|
||||||
import {
|
import { getTopNews } from "@/api/newsInfo";
|
||||||
getTopNews,
|
|
||||||
} from "@/api/newsInfo";
|
|
||||||
import { onPageNotFound, onPageScroll, onShow } from "@dcloudio/uni-app";
|
import { onPageNotFound, onPageScroll, onShow } from "@dcloudio/uni-app";
|
||||||
import { getNavHeight } from "@/utils/util"
|
import { getNavHeight } from "@/utils/util";
|
||||||
|
import Domestic from "@/components/domesticMini.vue";
|
||||||
|
|
||||||
const list1 = reactive([
|
const list1 = reactive([
|
||||||
'https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/banner1.png',
|
"https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/banner1.png",
|
||||||
'https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/banner1.png',
|
"https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/banner1.png",
|
||||||
'https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/banner1.png',
|
"https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/banner1.png",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const newsList = ref([]);
|
const newsList = ref([]);
|
||||||
// 概念标签贴标
|
// 概念标签贴标
|
||||||
async function getNewsList() {
|
async function getNewsList() {
|
||||||
newsList.value = await getTopNews({});
|
newsList.value = await getTopNews({});
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
const tabIndex = ref(0);
|
const tabIndex = ref(0);
|
||||||
function tabChange(index) {
|
function tabChange(index) {
|
||||||
|
|
||||||
tabIndex.value = index;
|
tabIndex.value = index;
|
||||||
uni.setStorageSync('homeTabIndex', index)
|
|
||||||
|
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
getNewsList()
|
getNewsList();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
uni.setStorageSync("homeTabIndex", 2);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function goSreach() {
|
function goSreach() {
|
||||||
|
if (uni.getStorageSync("token")) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/sreachReq/index',
|
url: "/pages/sreachReq/index",
|
||||||
})
|
});
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/login/indexMini",
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isScroll = ref(false);
|
||||||
const isScroll = ref(false)
|
|
||||||
onPageScroll((val) => {
|
onPageScroll((val) => {
|
||||||
|
if (tabIndex.value == 0 || tabIndex.value == 1) {
|
||||||
if (val.scrollTop > 150) {
|
if (val.scrollTop > 150) {
|
||||||
isScroll.value = true
|
isScroll.value = true;
|
||||||
} else {
|
} else {
|
||||||
isScroll.value = false
|
isScroll.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
onShow(() => {
|
|
||||||
if (uni.getStorageSync('homeTabIndex') == 1) {
|
|
||||||
tabChange(1)
|
|
||||||
} else {
|
} else {
|
||||||
tabChange(0)
|
if (val.scrollTop > 80) {
|
||||||
|
isScroll.value = true;
|
||||||
|
} else {
|
||||||
|
isScroll.value = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.setStorageSync('homeTabIndex', null)
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
getNewsList()
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
if (
|
||||||
|
uni.getStorageSync("homeTabIndex") == 1 ||
|
||||||
|
uni.getStorageSync("homeTabIndex") == 2
|
||||||
|
) {
|
||||||
|
tabChange(uni.getStorageSync("homeTabIndex"));
|
||||||
|
} else {
|
||||||
|
tabChange(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.setStorageSync("homeTabIndex", null);
|
||||||
|
});
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
getNewsList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,74 @@
|
||||||
<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> -->
|
||||||
|
|
||||||
|
<image
|
||||||
|
class="top_bk"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/top_bg.png"
|
||||||
|
></image>
|
||||||
|
|
||||||
|
<view class="content">
|
||||||
|
<view
|
||||||
|
:style="{
|
||||||
|
height: getNavHeight() + 'px',
|
||||||
|
backgroundColor: isScroll ? '#fff' : 'transparent',
|
||||||
|
position: 'sticky',
|
||||||
|
top: 0,
|
||||||
|
zIndex: '999999',
|
||||||
|
}"
|
||||||
|
></view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
:style="{
|
||||||
|
position: 'sticky',
|
||||||
|
top: getNavHeight() + 'px',
|
||||||
|
backgroundColor: isScroll ? '#fff' : 'transparent',
|
||||||
|
zIndex: '9999',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<view class="r_sreach">
|
||||||
|
<!-- <image
|
||||||
|
class="logo_text"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/logo_text_icon.png"
|
||||||
|
>
|
||||||
|
</image> -->
|
||||||
|
|
||||||
|
<u-icon
|
||||||
|
name="arrow-left"
|
||||||
|
color="#333"
|
||||||
|
size="22"
|
||||||
|
@click="goBack"
|
||||||
|
></u-icon>
|
||||||
|
|
||||||
|
<view class="sreach" @click="goSreach">
|
||||||
|
<view class="sreach_icon">
|
||||||
|
<image
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_search_line.png"
|
||||||
|
></image>
|
||||||
|
</view>
|
||||||
|
<view class="sreach_text">
|
||||||
|
<text>搜索资讯</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 类目标签 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,21 +77,57 @@
|
||||||
|
|
||||||
<!-- 列表 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)
|
||||||
|
}}</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']">
|
||||||
|
<view>
|
||||||
<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>
|
||||||
|
|
||||||
|
<view class="r_option">
|
||||||
|
<image
|
||||||
|
class="option_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/eye_icon%402x.png"
|
||||||
|
></image>
|
||||||
|
<text class="option_text">{{ item.readNums }}</text>
|
||||||
|
|
||||||
|
<image
|
||||||
|
class="option_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/like_icon%402x.png"
|
||||||
|
></image>
|
||||||
|
<text class="option_text">{{ item.likeNums }}</text>
|
||||||
|
|
||||||
|
<image
|
||||||
|
class="option_icon"
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/share_icon%402x.png"
|
||||||
|
></image>
|
||||||
|
<text class="option_text">{{ item.shareNums }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 列表 end -->
|
<!-- 列表 end -->
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
@ -54,8 +147,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 +200,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 +209,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) {
|
||||||
|
|
@ -139,19 +232,38 @@ async function getListByTagFn() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function goDetail(item) {
|
function goDetail(item) {
|
||||||
|
if (uni.getStorageSync("token")) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/detail/indexNewsInfo?id=" + item.id,
|
url: "/pages/detail/indexNewsInfo?id=" + item.id,
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/login/indexMini",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function goSreach() {
|
||||||
|
if (uni.getStorageSync("token")) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/sreachReq/index",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/login/indexMini",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function goBack() {
|
||||||
|
uni.navigateBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
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,16 +283,17 @@ onLoad(async (e) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
getListByTagFn();
|
getListByTagFn();
|
||||||
})
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onMounted(async () => {});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.page_content {
|
.page_content {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
|
background-color: white;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_list {
|
.tag_list {
|
||||||
|
|
@ -212,8 +325,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 +336,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 +413,88 @@ onMounted(async () => {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mohu {
|
||||||
|
filter: blur(7rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.r_option {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 10rpx;
|
||||||
|
|
||||||
|
.option_icon {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option_text {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #192236;
|
||||||
|
line-height: 33rpx;
|
||||||
|
text-align: justify;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.top_bk {
|
||||||
|
width: 100%;
|
||||||
|
height: 300rpx;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
position: relative;
|
||||||
|
z-index: 99999;
|
||||||
|
padding-bottom: 300rpx;
|
||||||
|
.r_sreach {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo_text {
|
||||||
|
width: 88rpx;
|
||||||
|
height: 45rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sreach {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0rpx 30rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 100rpx;
|
||||||
|
width: 47vw;
|
||||||
|
height: 68rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sreach_icon {
|
||||||
|
margin-right: 10rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 35rpx;
|
||||||
|
height: 35rpx;
|
||||||
|
margin-top: 5rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sreach_text {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
line-height: 33rpx;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,40 +1,78 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="sreachcss">
|
<view class="sreachcss">
|
||||||
<view :style="{ height: getNavHeight() + 'px', position: 'sticky', top: 0, background: '#fff', zIndex: '9999' }">
|
<view
|
||||||
|
:style="{
|
||||||
|
height: getNavHeight() + 'px',
|
||||||
|
position: 'sticky',
|
||||||
|
top: 0,
|
||||||
|
background: '#fff',
|
||||||
|
zIndex: '9999',
|
||||||
|
}"
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 导航栏 start -->
|
<!-- 导航栏 start -->
|
||||||
<view class="custom-bav-bar"
|
<view
|
||||||
:style="{ position: 'sticky', top: getNavHeight() + 'px', left: 0, background: '#fff', zIndex: '9999' }">
|
class="custom-bav-bar"
|
||||||
|
:style="{
|
||||||
|
position: 'sticky',
|
||||||
|
top: getNavHeight() + 'px',
|
||||||
|
left: 0,
|
||||||
|
background: '#fff',
|
||||||
|
zIndex: '9999',
|
||||||
|
}"
|
||||||
|
>
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_left.png" class="back_icon"
|
<image
|
||||||
@click="handleBack" />
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_left.png"
|
||||||
|
class="back_icon"
|
||||||
|
@click="handleBack"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="center">
|
<view class="center">
|
||||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/detail_logo.png" class="logo_icon" />
|
<image
|
||||||
|
src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/detail_logo.png"
|
||||||
|
class="logo_icon"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 搜索 start -->
|
<!-- 搜索 start -->
|
||||||
<view class="sreach">
|
<view class="sreach">
|
||||||
<view style="width: 70vw; margin-left: 50rpx">
|
<view style="width: 75vw; margin-left: 50rpx">
|
||||||
<u-input v-model="keyWord" @change="handleChange" prefixIcon="search" style="flex: 1" placeholder="搜索快讯"
|
<u-input
|
||||||
class="sreach_input" :border="false" />
|
v-model="keyWord"
|
||||||
|
@change="handleChange"
|
||||||
|
confirm-type="search"
|
||||||
|
@confirm="getData()"
|
||||||
|
prefixIcon="search"
|
||||||
|
style="flex: 1"
|
||||||
|
placeholder="搜索资讯"
|
||||||
|
class="sreach_input"
|
||||||
|
:border="false"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<text class="serach_btn" @click="getData()">搜索</text>
|
<text class="serach_btn" @click="getData()">搜索</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 搜索 end -->
|
<!-- 搜索 end -->
|
||||||
|
|
||||||
<List :data="screenList" @onClick="handleSwiperJump" v-if="screenList.length !== 0" />
|
<List
|
||||||
|
:data="screenList"
|
||||||
|
@onClick="handleSwiperJump"
|
||||||
|
v-if="screenList.length !== 0"
|
||||||
|
/>
|
||||||
<!-- 列表 end -->
|
<!-- 列表 end -->
|
||||||
<!-- 加载更多的按钮 -->
|
<!-- 加载更多的按钮 -->
|
||||||
<!-- <view class="onLoad-btn" @click="onload" v-if="finish === false && inputValue">加载更多</view> -->
|
<!-- <view class="onLoad-btn" @click="onload" v-if="finish === false && inputValue">加载更多</view> -->
|
||||||
|
|
||||||
<view style="margin-top: 20vh">
|
<view style="margin-top: 20vh">
|
||||||
<u-empty v-if="screenList.length === 0" text="无搜索结果" width="157" height="50"
|
<u-empty
|
||||||
icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/nosearch_icon%E5%A4%87%E4%BB%BD%402x.png"></u-empty>
|
v-if="screenList.length === 0"
|
||||||
|
text="无搜索结果"
|
||||||
|
width="157"
|
||||||
|
height="50"
|
||||||
|
icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/nosearch_icon%E5%A4%87%E4%BB%BD%402x.png"
|
||||||
|
></u-empty>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view v-if="finish && screenList.length > 0" class="noMore">
|
<!-- <view v-if="finish && screenList.length > 0" class="noMore">
|
||||||
|
|
@ -47,8 +85,11 @@
|
||||||
<Pay :show="payShow" @onClick="handleClose" @handleSub="handleSub" />
|
<Pay :show="payShow" @onClick="handleClose" @handleSub="handleSub" />
|
||||||
|
|
||||||
<!-- 登录弹框 -->
|
<!-- 登录弹框 -->
|
||||||
<LoginPopup :show="LoginShow" @handlePopupClose="handlePopupClose"
|
<LoginPopup
|
||||||
@handlePopupSuccessCallback="handlePopupSuccessCallback" />
|
:show="LoginShow"
|
||||||
|
@handlePopupClose="handlePopupClose"
|
||||||
|
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -63,7 +104,6 @@ import LoginPopup from "@/components/loginPopup/index.vue";
|
||||||
import Pay from "@/components/pay/index.vue";
|
import Pay from "@/components/pay/index.vue";
|
||||||
import { getNavHeight } from "@/utils/util";
|
import { getNavHeight } from "@/utils/util";
|
||||||
|
|
||||||
|
|
||||||
const articleList = ref([]);
|
const articleList = ref([]);
|
||||||
const finish = ref(false);
|
const finish = ref(false);
|
||||||
const screenList = ref([]);
|
const screenList = ref([]);
|
||||||
|
|
@ -99,7 +139,6 @@ const handleSub = async () => {
|
||||||
item.needpay = false;
|
item.needpay = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
articleList.value = articleResult;
|
articleList.value = articleResult;
|
||||||
|
|
@ -141,14 +180,23 @@ const handleShowPay = (type) => {
|
||||||
// 点击轮播图进入详情
|
// 点击轮播图进入详情
|
||||||
const handleSwiperJump = (item: any) => {
|
const handleSwiperJump = (item: any) => {
|
||||||
console.log("item ===>", item);
|
console.log("item ===>", item);
|
||||||
if (item.needpay) {
|
if (uni.getStorageSync("token")) {
|
||||||
// 需要先弹出订阅的弹框
|
|
||||||
handleShowPay(item.type);
|
|
||||||
} else {
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/detail/indexNewsInfo?id=${item.id}&type=${item.type}`,
|
url: `/pages/detail/indexNewsInfo?id=${item.id}&type=${item.type}`,
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/login/indexMini",
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
// if (item.needpay) {
|
||||||
|
// // 需要先弹出订阅的弹框
|
||||||
|
// handleShowPay(item.type);
|
||||||
|
// } else {
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: `/pages/detail/indexNewsInfo?id=${item.id}&type=${item.type}`,
|
||||||
|
// });
|
||||||
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleChange = (val: string) => {
|
const handleChange = (val: string) => {
|
||||||
|
|
@ -194,9 +242,11 @@ const getData = async () => {
|
||||||
`<text style="color: #E7303F">$&</text>`
|
`<text style="color: #E7303F">$&</text>`
|
||||||
);
|
);
|
||||||
|
|
||||||
item.title = item.title.replace(keyWord.value, '<span style="color: red;">' + keyWord.value + '</span>');
|
item.title = item.title.replace(
|
||||||
console.log("🚀 ~ getData ~ item.title :", item.title)
|
keyWord.value,
|
||||||
|
'<span style="color: red;">' + keyWord.value + "</span>"
|
||||||
|
);
|
||||||
|
console.log("🚀 ~ getData ~ item.title :", item.title);
|
||||||
|
|
||||||
item.MarkInRedContent =
|
item.MarkInRedContent =
|
||||||
item.contentText &&
|
item.contentText &&
|
||||||
|
|
@ -229,7 +279,7 @@ onShow(() => {
|
||||||
.sreachcss {
|
.sreachcss {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
padding: 0 30rpx;
|
// padding: 0 30rpx;
|
||||||
|
|
||||||
.sreach {
|
.sreach {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -296,7 +346,6 @@ onShow(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.custom-bav-bar {
|
.custom-bav-bar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
|
|
@ -337,10 +386,9 @@ onShow(() => {
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #D13E3C;
|
color: #d13e3c;
|
||||||
line-height: 45rpx;
|
line-height: 45rpx;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
flex: 1;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,12 @@
|
||||||
<!-- 列表区域 -->
|
<!-- 列表区域 -->
|
||||||
<!-- @click="jump(item)" -->
|
<!-- @click="jump(item)" -->
|
||||||
<view class="colListContainer">
|
<view class="colListContainer">
|
||||||
<view class="colListItem" v-for="item in data" :key="item.id" @click="jump(item)">
|
<view
|
||||||
|
class="colListItem"
|
||||||
|
v-for="item in data"
|
||||||
|
:key="item.id"
|
||||||
|
@click="jump(item)"
|
||||||
|
>
|
||||||
<view class="ItemLeft">
|
<view class="ItemLeft">
|
||||||
<view class="colName">{{ item.name }}</view>
|
<view class="colName">{{ item.name }}</view>
|
||||||
<view class="colDesc">{{ item.desc }}</view>
|
<view class="colDesc">{{ item.desc }}</view>
|
||||||
|
|
@ -38,7 +43,7 @@ const props = defineProps({
|
||||||
// 列表内容
|
// 列表内容
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => { },
|
default: () => {},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -53,7 +58,9 @@ const formatData = (data: any) => {
|
||||||
if (data.indexOf(item.type) !== -1) {
|
if (data.indexOf(item.type) !== -1) {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
validTime: formatTime(new Date().getTime() + 1000 * 60 * 60 * 24 * 30),
|
validTime: formatTime(
|
||||||
|
new Date().getTime() + 1000 * 60 * 60 * 24 * 30
|
||||||
|
),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -135,7 +142,8 @@ const colList = ref([
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.flashBack {}
|
.flashBack {
|
||||||
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: var(--h1-font-size);
|
font-size: var(--h1-font-size);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue