This commit is contained in:
zoujiandong
2025-07-15 17:48:57 +08:00
parent 30b08f1933
commit b0f1a37ece
101 changed files with 4315 additions and 263 deletions
+1
View File
@@ -278,6 +278,7 @@ const queryList = (pageNo, pageSize) => {
.tagsbox {
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
.tag {
padding: 0 10rpx;
margin-right: 16rpx;
+53 -29
View File
@@ -13,20 +13,24 @@
</template>
<template #bottom>
<view class="bottom">
<view class="iptbox">
<view class="iptbox" @click="open">
<up--image
:src="chatImg"
mode="widthFix"
width="46rpx"
height="46rpx"
radius="50%"
></up--image>
<up-input
@focus="open"
type="text"
placeholderClass="placeholderClass"
placeholder="对病例发表您的看法"
class="ipt"
/>
<view class="iptcon">
<up-input
:disabled="true"
type="text"
placeholderClass="placeholderClass"
placeholder="对病例发表您的看法"
class="ipt"
/>
</view>
</view>
<view class="right">
<up--image
@@ -101,9 +105,9 @@
<!-- #ifdef MP-WEIXIN -->
<polyv-player
id="{{'playerContext'+info.video_no}}"
playerId="{{'playerId'+info.video_no}}"
vid="{{info.video_no }}"
:id="'playerContext'+info.video_no"
:playerId="'playerId'+info.video_no"
:vid="info.video_no"
height="500rpx"
autoplay="{{false}}"
>
@@ -116,7 +120,9 @@
<!-- #endif -->
</view>
<view class="videobox" v-else-if="type == 'article'" style="min-height:350rpx">
<view class="content" v-html="info.article_content"></view>
<view class="content">
<up-parse :content="fromatImg(info.article_content)"></up-parse>
</view>
</view>
<view class="videobox" v-else>
<view class="cloumn" v-if="info.exchange_content">
@@ -211,7 +217,8 @@
item.is_author,
item.user_name,
item.is_top,
2
2,
item.user_id
)
"
>...</view
@@ -236,7 +243,7 @@
class="item"
v-for="(cell, index) in item.sub_comment.slice(0, 3)"
:key="cell.comment_id"
style="padding-left: 0"
style="padding-left: 0;padding-right:0"
>
<up--image
:src="headImg"
@@ -257,7 +264,8 @@
cell.is_author,
cell.user_name,
cell.is_top,
3
3,
cell.user_id
)
"
>...</view
@@ -306,6 +314,8 @@
<view class="poptitle"></view>
<view class="wraper">
<up--textarea
focus="true"
ref="commentTextarea"
height="200"
v-model="content"
:placeholder="placeholder"
@@ -359,11 +369,11 @@
@open="openDeal"
>
<view class="dealbox">
<view class="dealcell" @click="toggleTop" v-if="level == 2">{{
<view class="dealcell" @click="toggleTop" v-if="level == 2 && is_author">{{
is_top ? "取消置顶" : "置顶"
}}</view>
<view class="dealcell" @click="openCommentDialog">回复</view>
<view class="dealcell" v-if="is_author" @click="delComment">删除</view>
<view class="dealcell" v-if="is_author || user_id==comment_userId" @click="delComment">删除</view>
<view class="bar"></view>
<view class="dealcell" @click="closeDealPop">取消</view>
</view>
@@ -408,7 +418,8 @@
mainCommentObj.is_author,
mainCommentObj.user_name,
mainCommentObj.is_top,
2
2,
mainCommentObj.user_id
)
"
>...</view
@@ -455,7 +466,8 @@
cell.is_author,
cell.user_name,
cell.is_top,
3
3,
cell.user_id
)
"
>...</view
@@ -530,7 +542,7 @@
</up-overlay>
</template>
<script setup>
import { reactive, ref } from "vue";
import { nextTick, reactive, ref } from "vue";
import headImg from "@/static/headImg.png";
import collectonImg from "@/static/collectOn.png";
import collectImg from "@/static/collect.png";
@@ -543,10 +555,9 @@ import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
import api from "@/api/api";
import { onLoad } from "@dcloudio/uni-app";
import dayjs from "dayjs";
// #ifdef h5
import baoliVideo from "@/components/baoliVideo/baoliVideo.vue";
// #endif
import baoliVideo from "@/components/baoliVideo/baoliVideo.vue";
const user_id=ref('');
const paging = ref(null);
const dataList = ref([]);
const total = ref(0);
@@ -576,7 +587,8 @@ const clickIndex = ref(0);
const is_top = ref(false);
const option_id = ref("");
const point=ref(0)
const comment_userId=ref('');
const commentTextarea=ref(null)
const confirmGive = () => {
showGive.value = false;
@@ -702,6 +714,10 @@ onLoad((options) => {
} else {
getExchangeDetail(options.id);
}
let userInfo=uni.getStorageSync('userInfo');
if(userInfo.user_id){
user_id.value=userInfo.user_id;
}
readRecord()
});
const clearComment = () => {
@@ -728,8 +744,9 @@ const showReplyPop = () => {
}
showCommentDialog.value = true;
};
const alertDeal = (parentId, rootId, isAuthor, name, top, commentLevel) => {
const alertDeal = (parentId, rootId, isAuthor, name, top, commentLevel,userId) => {
parent_id.value = parentId;
comment_userId.value=userId;
root_id.value = rootId;
is_author.value = isAuthor == 1 ? true : false;
reply_name.value = name;
@@ -842,8 +859,7 @@ const getExchangeComment = (params) => {
};
const open = () => {
showCommentDialog.value = true;
console.log("open");
};
};
const close = () => {
showCommentDialog.value = false;
console.log("close");
@@ -1360,7 +1376,12 @@ const delVideoComment = (id) => {
});
};
const fromatImg = (val) => {
return val.replace(/\<img/gi, '<img style="width:100%"');
if(val){
return val.replace(/\<img/gi, '<img class="imgstyle"');
}else{
return '';
}
};
const delExchangeComment = (id) => {
// 调用删除评论的API
@@ -1584,6 +1605,9 @@ const readRecord=()=>{
padding: 30rpx 0;
background: #f5f6f9;
text-align: center;
:deep(.imgstyle){
max-width: 100%!important;
}
}
.count {
margin-top: 24rpx;
+15 -6
View File
@@ -68,7 +68,7 @@
</view>
</view>
<view class="listbox">
<view class="cell" v-for="item in new_articles" :key="item.article_id" @click="goDetail(item.article_id)">
<view class="cell" v-for="item in new_articles" :key="item.article_id" @click="goDetail(item.article_id,item.is_link,item.is_link_url)">
<view class="circle"></view>
<view class="info">
<view class="name">{{item.article_title }}</view>
@@ -89,7 +89,7 @@
</view>
</view>
<view class="listbox">
<view class="cell" v-for="item in most_read_articles" :key="item.article_id" @click="goDetail(item.article_id)">
<view class="cell" v-for="item in most_read_articles" :key="item.article_id" @click="goDetail(item.article_id,item.is_link,item.is_link_url)">
<view class="circle"></view>
<view class="info">
<view class="name">{{item.article_title }}</view>
@@ -149,10 +149,18 @@ const new_articles = ref([]);
const recommend_doctor=ref([]);
const recommend_hospital=ref([]);
const numInfo=reactive({})
const goDetail = (id) => {
navTo({
url: `/pages/detail/detail?id=${id}&type=article`,
});
const goDetail = (id,isLink,src) => {
if(isLink==1){
navTo({
url: `/pages/web/web?src=${src}`,
});
}else{
navTo({
url: `/pages/detail/detail?id=${id}&type=article`,
});
}
};
const goListBy=(id,name,type)=>{
let url=''
@@ -218,6 +226,7 @@ onShow(() => {
.tagsbox {
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
.tag {
padding: 0 10rpx;
margin-right: 16rpx;
+1
View File
@@ -284,6 +284,7 @@ const queryList = (pageNo, pageSize) => {
.tagsbox {
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
.tag {
padding: 0 10rpx;
margin-right: 16rpx;
+1
View File
@@ -530,6 +530,7 @@ const queryList = (pageNo, pageSize) => {
.tagsbox {
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
.tag {
padding: 0 10rpx;
margin-right: 16rpx;
+26 -12
View File
@@ -37,20 +37,20 @@
<up-dropdown-item
v-model="order.push_date"
title="发布时间"
@change="change"
@change="changeDate"
:options="options"
></up-dropdown-item>
<up-dropdown-item
v-model="order.read_num"
title="阅读量"
@change="change"
@change="changeRead"
:options="options"
></up-dropdown-item>
</up-dropdown>
</view>
</template>
<view class="item" v-for="(item, index) in dataList" :key="index" @click="isArticle?goDetail(item.article_id):goDetail(item.video_id)">
<view class="item" v-for="(item, index) in dataList" :key="index" @click="isArticle?goDetail(item.article_id,item.is_link,item.is_link_url):goDetail(item.video_id,item.is_link,item.is_link_url)">
<view class="title ellipsis">{{isArticle?item.article_title:item.video_title }}</view>
<view class="tagsbox">
<view class="tag" v-for="tag in item.author" :key="tag.author_id">{{ tag.doctor_name }}</view>
@@ -283,7 +283,7 @@ onLoad((options) => {
keyWord.value = options.keyWord;
};
if(options.order=='new'){
order.push_date='asc'
order.push_date='desc'
};
if(options.order=='read'){
order.read_num='desc'
@@ -312,19 +312,32 @@ onLoad((options) => {
canOpenCase.value = true;
}
});
const change=(e)=>{
const changeDate=(e)=>{
console.log(e);
order.read_num='';
paging.value.reload();
}
const changeRead=(e)=>{
console.log(e);
order.push_date=''
paging.value.reload();
}
const formatdate=(date)=>{
return dayjs(date).format('YYYY-MM-DD')
}
const goDetail=(id)=>{
console.log(11111)
console.log(id)
let type=isArticle.value?'article':'video'
navTo({
url: `/pages/detail/detail?id=${id}&type=${type}`
})
const goDetail=(id,isLink,src)=>{
console.log(isLink)
if(isLink==1){
navTo({
url: `/pages/web/web?src=${src}`,
});
}else{
let type=isArticle.value?'article':'video'
navTo({
url: `/pages/detail/detail?id=${id}&type=${type}`
})
}
}
const swicthType=()=>{
isArticle.value=!isArticle.value;
@@ -751,6 +764,7 @@ const queryList = (pageNo, pageSize) => {
.tagsbox {
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
.tag {
padding: 0 10rpx;
margin-right: 16rpx;
+1
View File
@@ -402,6 +402,7 @@ const changeWord=(value)=>{
.tagsbox {
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
.tag {
padding: 0 10rpx;
margin-right: 16rpx;
+1
View File
@@ -427,6 +427,7 @@ const changeWord=(value)=>{
.tagsbox {
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
.tag {
padding: 0 10rpx;
margin-right: 16rpx;
+1
View File
@@ -363,6 +363,7 @@ const queryList = (pageNo, pageSize) => {
.tagsbox {
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
.tag {
padding: 0 10rpx;
margin-right: 16rpx;
+16
View File
@@ -0,0 +1,16 @@
<template>
<web-view :src="src"></web-view>
</template>
<script setup>
import { ref } from 'vue';
import { onLoad } from "@dcloudio/uni-app";
const src=ref('')
onLoad((option)=>{
src.value=option.src
})
</script>
<style scoped>
</style>