11
This commit is contained in:
@@ -26,9 +26,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="cell" v-for="item in most_read_articles" :key="item.exchange_id" @click="goDetail(item.exchange_id)">
|
||||
<view class="cell" v-for="item in most_read_articles.slice(0,3)" :key="item.exchange_id" @click="goDetail(item.exchange_id)">
|
||||
<view class="circle"></view>
|
||||
<view class="title ellipsis-two-lines">{{ item.exchange_title }}</view>
|
||||
<view class="title ellipsis-one-lines">{{ item.exchange_title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -62,7 +62,7 @@
|
||||
>{{ item.user_name }}({{ item.hospital_name }})</view
|
||||
>
|
||||
</view>
|
||||
<view class="content" @click="goDetail(item.exchange_id)"> {{ item.exchange_content }} </view>
|
||||
<view class="content" @click="goDetail(item.exchange_id)"> {{ htmlToText(item.exchange_content) }} </view>
|
||||
<view
|
||||
class="imgbox"
|
||||
@click="goDetail(item.exchange_id)"
|
||||
@@ -86,9 +86,10 @@
|
||||
</up--image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="videocon">
|
||||
<view class="videocon" @click="goDetail(item.exchange_id)">
|
||||
<view
|
||||
class="imgbox"
|
||||
@click="goDetail(item.exchange_id)"
|
||||
v-if="
|
||||
item.exchange_content_video &&
|
||||
item.exchange_content_video.length > 0
|
||||
@@ -119,7 +120,7 @@
|
||||
<up-icon name="eye" color="#4B5563" size="28rpx"></up-icon>
|
||||
<view class="num">{{ item.read_num }}</view>
|
||||
</view>
|
||||
<view class="collect item">
|
||||
<view class="collect item" v-if="item.collect_num>0">
|
||||
<up-icon
|
||||
name="heart"
|
||||
color="#4B5563"
|
||||
@@ -127,7 +128,7 @@
|
||||
></up-icon>
|
||||
<view class="num">{{ item.collect_num }}</view>
|
||||
</view>
|
||||
<view class="chat item">
|
||||
<view class="chat item" v-if="item.comment_num>0">
|
||||
<up-icon name="chat" color="#4B5563" size="28rpx"></up-icon>
|
||||
<view class="num">{{ item.comment_num }}</view>
|
||||
</view>
|
||||
@@ -216,6 +217,13 @@ const goDetail = (id) => {
|
||||
|
||||
});
|
||||
};
|
||||
const htmlToText=(html)=>{
|
||||
return html
|
||||
.replace(/<[^>]*>/g, '') // 移除所有HTML标签
|
||||
.replace(/ /gi, ' ') // 将HTML实体转换为字符
|
||||
.replace(/<br\s*\/?>/gi, '\n').replace(/<img\s[^>]*>/gi, '') // 移除<img>标签及其内容
|
||||
.replace(/<video[^>]*>[\s\S]*?/gi, ''); // 将换行符替换为实际的换行符
|
||||
}
|
||||
const goodList=()=>{
|
||||
api.searchExchageGood({
|
||||
is_selected:1,
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
>
|
||||
<template #top>
|
||||
<navBarSearch
|
||||
:searchWord="keyWord"
|
||||
:navName="'肝胆相照病例交流园地'"
|
||||
@changeWord="changeWord"
|
||||
></navBarSearch>
|
||||
@@ -107,9 +108,10 @@
|
||||
</up--image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="videocon">
|
||||
<view class="videocon" @click="goDetail(item.exchange_id)">
|
||||
<view
|
||||
class="imgbox"
|
||||
@click="goDetail(item.exchange_id)"
|
||||
v-if="
|
||||
item.exchange_content_video &&
|
||||
item.exchange_content_video.length > 0
|
||||
@@ -551,6 +553,9 @@ onLoad((options) => {
|
||||
if(options.type=="mine"){
|
||||
isMine.value=true;
|
||||
}
|
||||
if(options.from=="talkHome"){
|
||||
showNum.value=true;
|
||||
}
|
||||
getCaseLabel(1,0)
|
||||
});
|
||||
onShow(()=>{
|
||||
|
||||
Reference in New Issue
Block a user