This commit is contained in:
zoujiandong
2025-07-30 13:58:39 +08:00
parent afc79a0f26
commit 43abd1f3d6
360 changed files with 27253 additions and 0 deletions
+228
View File
@@ -0,0 +1,228 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const utils_navTo = require("../../utils/navTo.js");
const api_api = require("../../api/api.js");
if (!Array) {
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
const _easycom_up__image2 = common_vendor.resolveComponent("up--image");
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
(_easycom_u_icon2 + _easycom_up__image2 + _easycom_up_icon2)();
}
const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js";
const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js";
const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js";
if (!Math) {
(navBar + _easycom_u_icon + _easycom_up__image + _easycom_up_icon + tabBar)();
}
const navBar = () => "../../components/navBar/navBar.js";
const tabBar = () => "../../components/tabBar/tabBar.js";
const _sfc_main = {
__name: "caseTalk",
setup(__props) {
const numInfo = common_vendor.reactive({});
const most_read_articles = common_vendor.ref([]);
const new_articles = common_vendor.ref([]);
const formatdate = (date) => {
return common_vendor.dayjs(date).format("YYYY-MM-DD");
};
const goList = (type) => {
if (type == "read") {
utils_navTo.navTo({
url: "/pages/specialList/specialList?is_selected=1"
});
} else {
utils_navTo.navTo({
url: "/pages/specialList/specialList"
});
}
};
const getStatic = () => {
api_api.api.getExchangeStatic().then((res) => {
let result = res.data.data;
Object.assign(numInfo, result);
});
};
const goDetail = (id) => {
utils_navTo.navTo({
url: `/pages/detail/detail?id=${id}&type=exchange`
});
};
const videoErrorCallback = (e) => {
common_vendor.index.showModal({
content: e.target.errMsg,
showCancel: false
});
};
const searchList = async () => {
let searchForm = {
page: 1,
page_size: 10
};
api_api.api.searchExchage({
...searchForm
}).then((res) => {
new_articles.value = res.data.data.data;
}).catch((err) => {
});
};
const htmlToText = (html) => {
return html.replace(/<[^>]*>/g, "").replace(/&nbsp;/gi, " ").replace(/<br\s*\/?>/gi, "\n").replace(/<img\s[^>]*>/gi, "").replace(/<video[^>]*>[\s\S]*?/gi, "");
};
const goodList = () => {
api_api.api.searchExchageGood({
is_selected: 1,
limit: 5
}).then((res) => {
most_read_articles.value = res.data.data;
});
};
const goPublish = () => {
utils_navTo.navTo({
url: "/pages/publish/publish"
});
};
common_vendor.onShow(() => {
getStatic();
goodList();
searchList();
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
navName: "肝胆相照病例交流园地",
type: "caseTalk"
}),
b: common_vendor.t(numInfo.exchange_num),
c: common_vendor.t(numInfo.exchange_collect_num),
d: common_vendor.t(numInfo.exchange_read_num),
e: most_read_articles.value.length > 0
}, most_read_articles.value.length > 0 ? {
f: common_vendor.p({
name: "arrow-right",
size: "16",
color: "#3CC7C0"
}),
g: common_vendor.o(($event) => goList("read")),
h: common_vendor.f(most_read_articles.value.slice(0, 3), (item, k0, i0) => {
return {
a: common_vendor.t(item.exchange_title),
b: item.exchange_id,
c: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id)
};
})
} : {}, {
i: common_vendor.p({
name: "arrow-right",
size: "16",
color: "#3CC7C0"
}),
j: common_vendor.o(($event) => goList("new")),
k: common_vendor.f(new_articles.value, (item, k0, i0) => {
return common_vendor.e({
a: common_vendor.t(item.exchange_title),
b: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id),
c: "4b2e7592-3-" + i0,
d: common_vendor.p({
src: item.avatar ? item.avatar : common_vendor.unref(common_assets.headImg),
width: "46rpx",
height: "46rpx",
radius: "50%"
}),
e: common_vendor.t(item.user_name),
f: common_vendor.t(item.hospital_name),
g: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id),
h: common_vendor.t(htmlToText(item.exchange_content)),
i: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id),
j: item.exchange_content_image && item.exchange_content_image.length > 0
}, item.exchange_content_image && item.exchange_content_image.length > 0 ? {
k: common_vendor.f(item.exchange_content_image, (unit, k1, i1) => {
return {
a: "4b2e7592-4-" + i0 + "-" + i1,
b: common_vendor.p({
src: unit,
radius: "10",
width: "220rpx",
height: "220rpx"
}),
c: unit
};
}),
l: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id)
} : {}, {
m: item.exchange_content_video && item.exchange_content_video.length > 0
}, item.exchange_content_video && item.exchange_content_video.length > 0 ? {
n: common_vendor.f(item.exchange_content_video, (videoCell, index, i1) => {
return {
a: index,
b: videoCell,
c: common_vendor.o(videoErrorCallback, index)
};
}),
o: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id)
} : {}, {
p: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id),
q: item.label && item.label.length > 0
}, item.label && item.label.length > 0 ? {
r: common_vendor.f(item.label, (cell, k1, i1) => {
return {
a: common_vendor.t(cell.label_name),
b: cell.exchange_label_id
};
}),
s: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id)
} : {}, {
t: "4b2e7592-5-" + i0,
v: common_vendor.t(item.read_num),
w: item.collect_num > 0
}, item.collect_num > 0 ? {
x: "4b2e7592-6-" + i0,
y: common_vendor.p({
name: "heart",
color: "#4B5563",
size: "28rpx"
}),
z: common_vendor.t(item.collect_num)
} : {}, {
A: item.comment_num > 0
}, item.comment_num > 0 ? {
B: "4b2e7592-7-" + i0,
C: common_vendor.p({
name: "chat",
color: "#4B5563",
size: "28rpx"
}),
D: common_vendor.t(item.comment_num)
} : {}, {
E: "4b2e7592-8-" + i0,
F: common_vendor.t(formatdate(item.push_date)),
G: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id),
H: item.exchange_id
});
}),
l: common_vendor.p({
name: "eye",
color: "#4B5563",
size: "28rpx"
}),
m: common_vendor.p({
name: "clock",
color: "#4B5563",
size: "28rpx"
}),
n: common_vendor.p({
value: 2
}),
o: common_vendor.p({
name: "plus",
color: "#fff",
size: "18"
}),
p: common_vendor.o(goPublish)
});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-4b2e7592"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/caseTalk/caseTalk.js.map
@@ -0,0 +1,11 @@
{
"navigationBarTitleText": "肝胆相照临床病例库",
"navigationStyle": "custom",
"usingComponents": {
"u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon",
"up--image": "../../node-modules/uview-plus/components/u--image/u--image",
"up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon",
"nav-bar": "../../components/navBar/navBar",
"tab-bar": "../../components/tabBar/tabBar"
}
}
@@ -0,0 +1 @@
<view class="upage data-v-4b2e7592"><nav-bar wx:if="{{a}}" class="data-v-4b2e7592" u-i="4b2e7592-0" bind:__l="__l" u-p="{{a}}"></nav-bar><view class="databox data-v-4b2e7592"><view class="cell data-v-4b2e7592"><view class="num data-v-4b2e7592">{{b}}</view><view class="name data-v-4b2e7592">病例数</view></view><view class="cell data-v-4b2e7592"><view class="num data-v-4b2e7592">{{c}}</view><view class="name data-v-4b2e7592">互动数</view></view><view class="cell data-v-4b2e7592"><view class="num data-v-4b2e7592">{{d}}</view><view class="name data-v-4b2e7592">浏览量</view></view></view><view class="bar data-v-4b2e7592"></view><view class="box data-v-4b2e7592"><view wx:if="{{e}}" class="special mostread data-v-4b2e7592"><view class="titlebox data-v-4b2e7592"><view class="title data-v-4b2e7592">精选病例</view><view class="more data-v-4b2e7592" bindtap="{{g}}"><view class="morename data-v-4b2e7592">查看更多</view><u-icon wx:if="{{f}}" class="data-v-4b2e7592" u-i="4b2e7592-1" bind:__l="__l" u-p="{{f}}"></u-icon></view></view><view class="list data-v-4b2e7592"><view wx:for="{{h}}" wx:for-item="item" wx:key="b" class="cell data-v-4b2e7592" bindtap="{{item.c}}"><view class="circle data-v-4b2e7592"></view><view class="title ellipsis-one-lines data-v-4b2e7592">{{item.a}}</view></view></view></view><view class="bar data-v-4b2e7592"></view><view class="record special data-v-4b2e7592"><view class="titlebox data-v-4b2e7592"><view class="title data-v-4b2e7592">最新收录</view><view class="more data-v-4b2e7592" bindtap="{{j}}"><view class="morename data-v-4b2e7592">查看更多</view><u-icon wx:if="{{i}}" class="data-v-4b2e7592" u-i="4b2e7592-2" bind:__l="__l" u-p="{{i}}"></u-icon></view></view><view class="list data-v-4b2e7592"><view wx:for="{{k}}" wx:for-item="item" wx:key="H" class="cell data-v-4b2e7592"><view class="title ellipsis-two-lines data-v-4b2e7592" bindtap="{{item.b}}">{{item.a}}</view><view class="doctor data-v-4b2e7592" bindtap="{{item.g}}"><up--image wx:if="{{item.d}}" class="data-v-4b2e7592" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"></up--image><view class="name data-v-4b2e7592">{{item.e}}({{item.f}})</view></view><view class="content ellipsis-two-lines data-v-4b2e7592" bindtap="{{item.i}}">{{item.h}}</view><view wx:if="{{item.j}}" class="imgbox data-v-4b2e7592" bindtap="{{item.l}}"><view wx:for="{{item.k}}" wx:for-item="unit" wx:key="c" class="imgcell data-v-4b2e7592"><up--image wx:if="{{unit.b}}" class="data-v-4b2e7592" u-s="{{['d']}}" u-i="{{unit.a}}" bind:__l="__l" u-p="{{unit.b}}"><view class="data-v-4b2e7592" slot="error" style="font-size:24rpx">加载失败</view></up--image></view></view><view class="videocon data-v-4b2e7592" bindtap="{{item.p}}"><view wx:if="{{item.m}}" class="imgbox data-v-4b2e7592" bindtap="{{item.o}}"><video wx:for="{{item.n}}" wx:for-item="videoCell" wx:key="a" class="myVideo data-v-4b2e7592" src="{{videoCell.b}}" binderror="{{videoCell.c}}" controls></video></view></view><view wx:if="{{item.q}}" class="tagbox data-v-4b2e7592" bindtap="{{item.s}}"><view wx:for="{{item.r}}" wx:for-item="cell" wx:key="b" class="tag data-v-4b2e7592">{{cell.a}}</view></view><view class="deal data-v-4b2e7592" bindtap="{{item.G}}"><view class="left data-v-4b2e7592"><view class="eyebox item data-v-4b2e7592"><up-icon wx:if="{{l}}" class="data-v-4b2e7592" u-i="{{item.t}}" bind:__l="__l" u-p="{{l}}"></up-icon><view class="num data-v-4b2e7592">{{item.v}}</view></view><view wx:if="{{item.w}}" class="collect item data-v-4b2e7592"><up-icon wx:if="{{item.y}}" class="data-v-4b2e7592" u-i="{{item.x}}" bind:__l="__l" u-p="{{item.y}}"></up-icon><view class="num data-v-4b2e7592">{{item.z}}</view></view><view wx:if="{{item.A}}" class="chat item data-v-4b2e7592"><up-icon wx:if="{{item.C}}" class="data-v-4b2e7592" u-i="{{item.B}}" bind:__l="__l" u-p="{{item.C}}"></up-icon><view class="num data-v-4b2e7592">{{item.D}}</view></view></view><view class="time data-v-4b2e7592"><up-icon wx:if="{{m}}" class="data-v-4b2e7592" u-i="{{item.E}}" bind:__l="__l" u-p="{{m}}"></up-icon><view class="num data-v-4b2e7592">{{item.F}}</view></view></view></view></view></view></view></view><tab-bar wx:if="{{n}}" class="data-v-4b2e7592" u-i="4b2e7592-9" bind:__l="__l" u-p="{{n}}"></tab-bar><view class="publish data-v-4b2e7592" bindtap="{{p}}"><up-icon wx:if="{{o}}" class="data-v-4b2e7592" u-i="4b2e7592-10" bind:__l="__l" u-p="{{o}}"></up-icon></view>
@@ -0,0 +1,200 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.publish.data-v-4b2e7592 {
width: 92rpx;
height: 92rpx;
background: #3CC7C0;
border-radius: 50%;
position: fixed;
right: 30rpx;
bottom: 180rpx;
display: flex;
justify-content: center;
align-items: center;
}
.upage.data-v-4b2e7592 {
display: flex;
flex-direction: column;
height: calc(100vh - 120rpx);
}
.mostread .cell.data-v-4b2e7592 {
padding: 22rpx 0rpx !important;
margin: 0 30rpx;
display: flex;
}
.box.data-v-4b2e7592 {
flex: 1;
padding-bottom: 30rpx;
overflow-y: scroll;
}
.myVideo.data-v-4b2e7592 {
width: 100%;
border-radius: 15rpx;
}
.deal.data-v-4b2e7592 {
padding-top: 20rpx;
display: flex;
color: #4B5563;
font-size: 24rpx;
justify-content: space-between;
}
.deal .left.data-v-4b2e7592 {
display: flex;
align-items: center;
}
.deal .left .item.data-v-4b2e7592 {
width: 100rpx;
}
.deal .collect.data-v-4b2e7592 {
display: flex;
align-items: center;
}
.deal .eyebox.data-v-4b2e7592,
.deal .chat.data-v-4b2e7592 {
display: flex;
align-items: center;
}
.deal .time.data-v-4b2e7592 {
display: flex;
align-items: center;
}
.deal .num.data-v-4b2e7592 {
margin-left: 8rpx;
}
.tagbox.data-v-4b2e7592 {
margin-top: 24rpx;
display: flex;
}
.tagbox .tag.data-v-4b2e7592 {
height: 54rpx;
padding: 0 28rpx;
background: #ECFAF9;
border-radius: 30rpx;
margin-right: 12rpx;
font-size: 27rpx;
color: #3CC7C0;
display: flex;
align-items: center;
justify-content: center;
}
.doctor.data-v-4b2e7592 {
display: flex;
align-items: center;
}
.record.data-v-4b2e7592 {
padding-top: 30rpx;
}
.record .list.data-v-4b2e7592 {
margin: 30rpx 30rpx;
}
.record .list .name.data-v-4b2e7592 {
padding: 20rpx 0 20rpx 15rpx;
font-size: 27rpx;
color: #333333;
}
.record .list .content.data-v-4b2e7592 {
font-size: 27rpx;
color: #666666;
line-height: 38rpx;
}
.record .list .imgbox.data-v-4b2e7592 {
display: flex;
margin-top: 24rpx;
}
.record .list .imgbox .imgcell.data-v-4b2e7592 {
width: 220rpx;
height: 220rpx;
margin-right: 20rpx;
}
.record .list .imgbox .imgcell.data-v-4b2e7592:last-child {
margin-right: 0;
}
.special.data-v-4b2e7592 {
padding-top: 30rpx;
}
.special .list.data-v-4b2e7592 {
margin: 8rpx 0rpx 0;
}
.special .list .cell.data-v-4b2e7592 {
padding: 22rpx 30rpx;
border-bottom: 2rpx solid #f3f4f6;
}
.special .list .cell .circle.data-v-4b2e7592 {
flex-shrink: 0;
margin-top: 15rpx;
width: 15rpx;
height: 15rpx;
background: #3cc7c0;
border-radius: 50%;
}
.special .list .cell .title.data-v-4b2e7592 {
margin-left: 10rpx;
font-size: 32rpx;
color: #000000;
line-height: 46rpx;
}
.special .list .cell.data-v-4b2e7592:last-child {
border-bottom: none;
}
.titlebox.data-v-4b2e7592 {
margin: 0 30rpx;
display: flex;
justify-content: space-between;
}
.titlebox .more.data-v-4b2e7592 {
display: flex;
align-items: center;
}
.titlebox .more .morename.data-v-4b2e7592 {
margin-right: 10rpx;
font-size: 28rpx;
color: #3cc7c0;
}
.bar.data-v-4b2e7592 {
height: 16rpx;
background: #f3f4f6;
}
.databox.data-v-4b2e7592 {
height: 162rpx;
background: #ffffff;
display: flex;
padding: 0 30rpx;
justify-content: space-between;
}
.databox .cell.data-v-4b2e7592 {
flex: 1;
padding: 35rpx 0;
text-align: center;
}
.databox .cell .num.data-v-4b2e7592 {
font-size: 38rpx;
color: #3cc7c0;
}
.databox .cell .name.data-v-4b2e7592 {
margin-top: 18rpx;
font-size: 28rpx;
color: #4b5563;
}