3.12提交

This commit is contained in:
zoujiandong 2026-03-12 14:38:11 +08:00
parent 08e3ba22c5
commit 2831de027c
14 changed files with 2852 additions and 252 deletions

View File

@ -711,6 +711,9 @@ const api = {
getCollect(data){
return request('/expertAPI/collection', data, 'post', false);
},
getDiscollect(data){
return request('/expertAPI/discollection', data, 'post', false);
},
getGanDanFileOrder(data){
return request('/expertPay/getGanDanFileOrder', data, 'post', false);
},
@ -720,6 +723,9 @@ const api = {
polularScienceArticleListIndexNew(data){
return request('/expertAPI/polularScienceArticleListIndexNew', data, 'post', false);
},
getNewsDetail(data){
return request('/expertAPI/newsDetial', data, 'post', false);
},
//https://dev-app.igandan.com/app/expertPay/getGanDanFileOrder

View File

@ -1709,7 +1709,7 @@
"list": [
{
"name": "",
"path": "pages_app/patientMsg/patientMsg",
"path": "pages_app/newsList/newsList",
"query": ""
}
]

View File

@ -15,7 +15,7 @@ const countDown=()=>{
}
timer.value=setInterval(()=>{
count.value++;
if(count.value>=5){
if(count.value>=8){
clearInterval(timer.value);
plus.runtime.quit();
}

View File

@ -383,7 +383,8 @@
};
onShow(() => {
polularScienceArticleListByKeywordsNew(false);
polularScienceArticleListByKeywordsNew(true);
loadGuideTags();
});
</script>
@ -513,13 +514,14 @@ $padding-small: 20rpx;
border-radius: $border-radius;
padding: $padding;
display: flex;
gap: 24rpx;
.article-image {
width: 260rpx;
height: 160rpx;
border-radius: $border-radius-small;
flex-shrink: 0;
margin-right: 24rpx;
}
.article-content {

View File

@ -24,6 +24,7 @@
<uni-swipe-action-item
v-for="(card, index) in bankCards"
:key="card.uuid"
style="margin-bottom: 20rpx;"
@change="onSwipeChange($event, card)"
>
<template v-slot:right>
@ -71,7 +72,7 @@ import empty from "@/components/empty/empty.vue"
import emptyBankImg from "@/static/empty_bank.png"
const bankCards = ref([]);
const openedSwipeUuid = ref('');
import { onLoad,onBackPress } from '@dcloudio/uni-app';
import { onLoad,onBackPress,onShow } from '@dcloudio/uni-app';
const from = ref('');
const returnTo = ref('');
onLoad((options) => {
@ -82,9 +83,12 @@ onLoad((options) => {
returnTo.value = decodeURIComponent(options.returnTo);
}
});
onShow(() => {
getBankCardList();
});
onBackPress(() => {
if(!from.value){
uni.navigateBack();
plus.runtime.quit();
return true;
}
});
@ -200,9 +204,6 @@ const getBankLogo = (bankName) => {
return bankLogos[bankName] || bankName.charAt(0);
};
onMounted(() => {
getBankCardList();
});
</script>
<style lang="scss" scoped>
@ -265,7 +266,7 @@ onMounted(() => {
border-radius: 16rpx;
padding: 30rpx;
display: flex;
margin-bottom: 20rpx;
align-items: center;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);

View File

@ -75,7 +75,7 @@
<swiper-item
v-for="(banner, index) in bannerList"
:key="banner.id"
@click="playBannerVideo(banner)"
@click="goToNewsDetail(banner)"
>
<view class="banner-item">
<image
@ -112,7 +112,7 @@
<uni-icons type="eye" size="14" color="#999"></uni-icons>
<text>{{ news.readnum || 0 }}</text>
<uni-icons type="hand-up" size="14" color="#999" style="margin-left: 20rpx;"></uni-icons>
<text>{{ news.likenum || 0 }}</text>
<text>{{ news.agreenum || 0 }}</text>
</view>
</view>
</view>
@ -138,13 +138,25 @@
<script setup>
import { ref, onMounted, reactive } from 'vue';
import { onShow, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app';
import { onShow, onPullDownRefresh, onReachBottom,onLoad,onBackPress} from '@dcloudio/uni-app';
import api from '@/api/api.js';
import docUrl from '@/utils/docUrl.js';
import navTo from "@/utils/navTo.js";
import navBar from '@/components/navBar/navBar.vue';
import dayjs from 'dayjs';
import searchImg from "@/static/search.png";
const from=ref('');
onLoad((options) => {
if(options.from){
from.value = options.from;
}
});
onBackPress(() => {
if(!from.value){
plus.runtime.quit();
return true
}
});
// Banner
const bannerList = ref([]);
const currentBannerIndex = ref(0);
@ -222,7 +234,11 @@
//
const goBack = () => {
uni.navigateBack();
if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
};
const goToSearch = () => {
@ -493,10 +509,13 @@
const goToNewsDetail = (item) => {
console.log('Go to news detail:', item);
// Implement navigation to news detail page
const encoded = encodeURIComponent(docUrl+item.path);
navTo({
url: `/pages_app/webview/webview?url=${encoded}&type=news&share=1&sharetitle=${item.title}`
});
//const encoded = encodeURIComponent(docUrl+item.path);
// navTo({
// url: `/pages_app/webview/webview?url=${encoded}&type=news&share=1&sharetitle=${item.title}`
// });
navTo({
url: `/pages_app/webview/webviewClass?url=${encodeURIComponent(docUrl+item.path+'?fromtype=doctor')}&title=新闻详情&uuid=${item.uuid}&sharetitle=${item.title}&summary=${item.summary}&type=huanjiao_news&imgPath=${encodeURIComponent(item.headImg)}`
});
// uni.navigateTo({
// url: `/pages_app/newsDetail/newsDetail?id=${item.uuid || item.id}`
// });

View File

@ -21,7 +21,7 @@
<!-- 头部信息卡片 -->
<view class="card header-card">
<image class="avatar" :src="docUrl+patientInfo.photo" mode="aspectFill"></image>
<image class="avatar" :src="avatarSrc" mode="aspectFill" @error="handleAvatarError"></image>
<view class="base-info">
<view class="name-row">
<text class="name">{{ patientInfo.realName || '未知' }}</text>
@ -110,15 +110,24 @@
import recordImg from "@/static/image_backgrond_red_big.png"
import manImg from "@/static/new_man_big.png"
import womanImg from "@/static/new_woman_big.png"
import defaultImg from "@/static/default.png"
const showAllHistory = ref(false);
const patientDetail = ref({});
const patient_uuid = ref('');
const note = ref('');
const avatarLoadError = ref(false);
//
const patientInfo = computed(() => {
return patientDetail.value.patient || {};
});
const avatarSrc = computed(() => {
if (avatarLoadError.value) return defaultImg;
return patientInfo.value.photo ? (docUrl + patientInfo.value.photo) : defaultImg;
});
const handleAvatarError = () => {
avatarLoadError.value = true;
};
@ -205,6 +214,7 @@
}).then(res=>{
if(res.code == 200){
patientDetail.value = res.data;
avatarLoadError.value = false;
console.log('患者详情数据:', res.data);
} else {
uni.showToast({

View File

@ -97,16 +97,75 @@
<!-- 患者列表区域 -->
<view class="patient-list" v-if="activeTab === 'list'">
<!-- <view class="listbox" style="z-index:99;" v-if="showAlert">
<view class="listbox alertContent" v-if="showAlert">
<image :src="alertImg" class="alert-img" mode="widthFix"></image>
<image :src="delImg" class="del-img" mode="widthFix" @click="hideAlert"></image>
</view> -->
<view class="listbox">
</view>
<view class="listbox" v-if="patientList.length>0">
<!-- 使用 up-index-list 索引组件数据动态渲染 -->
<up-index-list :index-list="indexList" v-if="loadFinish" >
<!-- 特殊操作项 -->
<template #header>
<view class="special-actions" >
<view class="action-item" @click="addNewPatient">
<view class="action-icon new-patient">
<up-image :src="newPatientImg" width="60rpx" height="60rpx" ></up-image>
</view>
<text class="action-text">新的患者<text class="new-patient-count" v-if="applyList.length > 0">(待审核{{ applyList.length }})</text></text>
<uni-icons type="right" size="20" color="#999"></uni-icons>
</view>
<view class="action-item" @click="managePatientGroups">
<view class="action-icon group-icon">
<view class="grid-icon">
<view class="grid-item"></view>
<view class="grid-item"></view>
<view class="grid-item"></view>
<view class="grid-item"></view>
</view>
</view>
<text class="action-text">患者分组 <text class="new-patient-count" v-if="patientList.length > 0">(随访{{ patientList.length }})</text></text>
<uni-icons type="right" size="20" color="#999"></uni-icons>
</view>
</view>
</template>
<template v-for="group in patientGroups" :key="group.letter" >
<up-index-item >
<up-index-anchor :text="group.letter" />
<view class="group-section">
<view class="patient-item" v-for="item in group.items" :key="item.uuid || item.id" >
<!-- <template v-if="item.placeholder">
<view class="patient-avatar-placeholder">
<uni-icons type="person" size="32" color="#ffffff" @click="goPatientDetail(item.uuid)"></uni-icons>
</view>
</template> -->
<image class="patient-avatar" :src="item._avatarLoadError ? defaultImg : item.avatarUrl" mode="aspectFill" @error="handlePatientAvatarError(item)" @click="goPatientDetail(item.uuid)"></image>
<view class="patient-info" @click="goPatientDetail(item.uuid)">
<text class="patient-name">{{ item.realName }}</text>
<view class="patient-badge" v-if="item.badge">
<text class="badge-text">{{ item.badge }}</text>
</view>
</view>
<view class="patient-status">
<uni-icons type="compose" size="20" color="#8B2316" @click.stop="editPatient(item.uuid)"></uni-icons>
<text class="follow-date">随访于{{ item.joinDateYMD }}</text>
</view>
</view>
</view>
</up-index-item>
</template>
</up-index-list>
</view>
<view class="listbox" v-if="patientList.length === 0">
<view class="special-actions" >
<view class="action-item" @click="addNewPatient">
<view class="action-icon new-patient">
<uni-icons type="person" size="24" color="#ffffff"></uni-icons>
<uni-icons type="plus" size="16" color="#ffffff" style="position: absolute; right: 8rpx; bottom: 8rpx;"></uni-icons>
<up-image :src="newPatientImg" width="60rpx" height="60rpx" ></up-image>
</view>
<text class="action-text">新的患者<text class="new-patient-count" v-if="applyList.length > 0">(待审核{{ applyList.length }})</text></text>
<uni-icons type="right" size="20" color="#999"></uni-icons>
@ -125,34 +184,7 @@
<uni-icons type="right" size="20" color="#999"></uni-icons>
</view>
</view>
<!-- 使用 up-index-list 索引组件数据动态渲染 -->
<up-index-list :index-list="indexList" v-if="loadFinish">
<template v-for="group in patientGroups" :key="group.letter" >
<up-index-item >
<up-index-anchor :text="group.letter" v-if="group.items.length > 0"/>
<view class="group-section">
<view class="patient-item" v-for="item in group.items" :key="item.uuid || item.id" v-if="group.items.length > 0">
<template >
<image class="patient-avatar" :src="item.avatarUrl" mode="aspectFill" @click="goPatientDetail(item.uuid)"></image>
</template>
<view class="patient-info" @click="goPatientDetail(item.uuid)">
<text class="patient-name">{{ item.realName }}</text>
<view class="patient-badge" v-if="item.badge">
<text class="badge-text">{{ item.badge }}</text>
</view>
</view>
<view class="patient-status">
<up-image :src="editImg" width="35rpx" height="35rpx" @click.stop="editPatient(item.uuid)"></up-image>
<text class="follow-date">随访于{{ item.joinDateYMD }}</text>
</view>
</view>
<empty v-if="group.items.length === 0" :emptyDesc="'您暂无随访患者'"></empty>
</view>
</up-index-item>
</template>
</up-index-list>
<empty v-if="patientList.length === 0"></empty>
<empty ></empty>
</view>
</view>
<view class="plan" v-if="activeTab === 'plan'">
@ -247,20 +279,23 @@
import { onShow,onLoad,onBackPress} from "@dcloudio/uni-app";
import dayImg from "@/static/visit_data11.png"
import planImg from "@/static/visitplan.png"
import editImg from "@/static/edit_patitent.png"
import api from '@/api/api.js';
import navTo from '@/utils/navTo.js';
import docUrl from '@/utils/docUrl.js';
import defaultImg from "@/static/default.png"
import newPatientImg from "@/static/new_patient.png"
import delImg from "@/static/iv_delete.png"
const patientList = ref([]);
const showAlert = ref(false);
const patientDataLoaded = ref(false);
const patientDataLoading = ref(false);
const firstLetterCache = new Map();
const showAlert = ref(false);
const navHeight = ref(40);
onBackPress(() => {
plus.runtime.quit();
return true;
});
import alertImg from "@/static/patientgif.png"
const getNavHeight = () => {
const systemInfo = uni.getSystemInfoSync();
console.log(2223);
@ -271,17 +306,9 @@
import pinyin from 'pinyin';
import dayjs from 'dayjs'
import lineImg from "@/static/item_visitplan_fg.png"
import empty from '@/components/empty/empty.vue'
import defaultImg from "@/static/default.png"
import delImg from "@/static/iv_delete.png"
const loadFinish = ref(false);
import alertImg from "@/static/patientgif.png"
//import ConversationList from './conversation-list/index.vue'
const title = ref('患者消息');
const hideAlert = () => {
showAlert.value = false;
uni.setStorageSync('hasAlert', true);
}
const goPatientDetail = (uuid) => {
navTo({
url: `/pages_app/patientDetail/patientDetail?uuid=${uuid}`
@ -293,6 +320,10 @@
url: `/pages_app/patientSetting/patientSetting?uuid=${uuid}`
})
}
const handlePatientAvatarError = (item) => {
if (!item) return
item._avatarLoadError = true
}
const goCode = () => {
navTo({
url: `/pages_app/myCode/myCode`
@ -403,10 +434,8 @@
}
const letters = Array.from(map.keys()).sort((a,b) => a.localeCompare(b));
patientGroups.value = letters.map(l => ({ letter: l, items: map.get(l) }));
console.log(patientGroups.value)
rebuildIndexList();
if(source.length === 0){
console.log(111122)
if(patientList.value.length==0){
indexList.value=[]
}
nextTick(() => {
@ -491,6 +520,10 @@
});
}
};
const hideAlert = () => {
showAlert.value = false;
uni.setStorageSync('hasAlert', true);
}
const patientListByGBK = async () => {
if (patientDataLoading.value) return;
patientDataLoading.value = true;
@ -634,15 +667,14 @@
break;
case 'list':
title.value = '患者列表';
// if (patientDataLoaded.value) {
// loadFinish.value = true;
// break;
// }
if (patientDataLoaded.value) {
loadFinish.value = true;
break;
}
uni.showLoading({
title: '加载中...',
mask: true
});
getApplyList();
patientListByGBK();
//
break;
@ -752,19 +784,23 @@
</script>
<style lang="scss" scoped>
.alert-img{
position: absolute;
top:0;
width: 100%;
bottom: 0;
}
.del-img{
position: absolute;
top: 280rpx;
z-index: 999;
right: 100rpx;
width: 48rpx;
height: 48rpx;
.alertContent{
z-index:99;
position: fixed;
bottom: 100rpx;
width:100%;
top:calc(var(--status-bar-height) + 44px);
.alert-img{
width:100%;
}
.del-img{
position: absolute;
top: 280rpx;
z-index: 999;
right: 100rpx;
width: 48rpx;
height: 48rpx;
}
}
.save-btn {
font-size: 32rpx;
@ -912,7 +948,7 @@
}
.tab-text {
font-size: 32rpx;
font-size: 28rpx;
color: #999999;
transition: color 0.3s;
}
@ -944,21 +980,19 @@
//
.patient-list {
:deep(.u-index-list__letter){
top:50%!important;
}
:deep(.u-index-list__scroll-view){
height:calc(100vh - var(--status-bar-height) - 44px - 103rpx);
}
:deep(.hide-index-bar .u-index-list__sidebar),
:deep(.hide-index-bar .u-index-list__index-box) {
display: none !important;
}
// position: fixed;
width: 100%;
margin-top:calc(var(--status-bar-height) + 44px);
height:calc(100vh - var(--status-bar-height) - 44px - 103rpx);
overflow-y: scroll;
display: flex;
flex-direction:column;
background-color: #ffffff;
bottom: 103rpx;

View File

@ -6,9 +6,7 @@
left-icon="left"
:title="title"
@clickLeft="goBack"
color="#8B2316"
:border="false"
backgroundColor="#eee"
>
@ -97,7 +95,7 @@
<!-- 患者列表区域 -->
<view class="patient-list" v-show="activeTab === 'list'">
<view class="listbox" style="z-index:99;" v-if="showAlert">
<view class="listbox alertContent" v-if="showAlert">
<image :src="alertImg" class="alert-img" mode="widthFix"></image>
<image :src="delImg" class="del-img" mode="widthFix" @click="hideAlert"></image>
</view>
@ -109,10 +107,10 @@
<template #header>
<view class="special-actions" >
<view class="action-item" @click="addNewPatient">
<view class="action-icon new-patient">
<uni-icons type="person" size="24" color="#ffffff"></uni-icons>
<uni-icons type="plus" size="16" color="#ffffff" style="position: absolute; right: 8rpx; bottom: 8rpx;"></uni-icons>
</view>
<up-image :src="newPatientImg" width="60rpx" height="60rpx" ></up-image>
</view>
<text class="action-text">新的患者<text class="new-patient-count" v-if="applyList.length > 0">(待审核{{ applyList.length }})</text></text>
<uni-icons type="right" size="20" color="#999"></uni-icons>
</view>
@ -165,8 +163,7 @@
<view class="special-actions" >
<view class="action-item" @click="addNewPatient">
<view class="action-icon new-patient">
<uni-icons type="person" size="24" color="#ffffff"></uni-icons>
<uni-icons type="plus" size="16" color="#ffffff" style="position: absolute; right: 8rpx; bottom: 8rpx;"></uni-icons>
<up-image :src="newPatientImg" width="60rpx" height="60rpx" ></up-image>
</view>
<text class="action-text">新的患者<text class="new-patient-count" v-if="applyList.length > 0">(待审核{{ applyList.length }})</text></text>
<uni-icons type="right" size="20" color="#999"></uni-icons>
@ -284,6 +281,8 @@
import navTo from '@/utils/navTo.js';
import docUrl from '@/utils/docUrl.js';
import defaultImg from "@/static/default.png"
import newPatientImg from "@/static/new_patient.png"
import delImg from "@/static/iv_delete.png"
const patientList = ref([]);
const patientDataLoaded = ref(false);
const patientDataLoading = ref(false);
@ -783,6 +782,24 @@
</script>
<style lang="scss" scoped>
.alertContent{
z-index:99;
position: fixed;
bottom: 100rpx;
width:100%;
top:calc(var(--status-bar-height) + 44px);
.alert-img{
width:100%;
}
.del-img{
position: absolute;
top: 280rpx;
z-index: 999;
right: 100rpx;
width: 48rpx;
height: 48rpx;
}
}
.save-btn {
font-size: 32rpx;
color: #8b2316;
@ -973,8 +990,7 @@
margin-top:calc(var(--status-bar-height) + 44px);
height:calc(100vh - var(--status-bar-height) - 44px - 103rpx);
overflow-y: scroll;
display: flex;
flex-direction:column;
background-color: #ffffff;
bottom: 103rpx;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -26,23 +26,34 @@
</uni-nav-bar>
</view>
</view>
<view class="bottom-box" >
<view class="bottom-cell">
<image class="bottom-cell-img" :src="readImg" />
<web-view
v-if="safeUrl"
:src="safeUrl"
:webview-styles="webviewStyles"
></web-view>
<view class="bottom-box">
<view class="bottom-cell">
<image class="bottom-cell-img" :src="readImg" />
<text class="bottom-cell-text">{{ readnum }}</text>
</view>
<view class="bottom-cell" @click="toggleAgree">
<image class="bottom-cell-img" :src="isAgree==1?likeImg:dislikeImg" />
</view>
<view class="bottom-cell" @click="toggleAgree">
<image
class="bottom-cell-img"
:src="isAgree == 1 ? likeImg : dislikeImg"
/>
<text class="bottom-cell-text">{{ agreenum }}</text>
</view>
<view class="bottom-cell" @click="toggleCollect">
<image class="bottom-cell-img" :src="isCollection==1?collectImg:discollectImg" />
</view>
<view class="bottom-cell" @click="toggleCollect">
<image
class="bottom-cell-img"
:src="isCollection == 1 ? collectImg : discollectImg"
/>
<text class="bottom-cell-text">收藏</text>
</view>
<view class="bottom-cell" @click="shareToggle">
<image class="bottom-cell-img" :src="shareImgBottom" />
</view>
<view class="bottom-cell" @click="shareToggle">
<image class="bottom-cell-img" :src="shareImgBottom" />
<text class="bottom-cell-text">分享</text>
</view>
</view>
</view>
<uni-popup ref="shareRef" type="bottom" safeArea backgroundColor="#fff">
<view class="share-popup">
@ -92,6 +103,7 @@ import dislikeImg from "@/static/argee_no.png";
import shareImgBottom from "@/static/icon_share.png";
const title = ref("新闻详情");
const type = ref("");
const safeUrl = ref("");
const backgroundColor = ref("");
const hasBg = ref(false);
@ -106,93 +118,168 @@ const readnum = ref(0);
const agreenum = ref(0);
const isAgree = ref(0);
const user_uuid = ref("");
const bottomHeight=ref(65);
const bottomHeight = ref(65);
const NAV_BAR_HEIGHT_PX = 44;
const WEBVIEW_BOTTOM_PX = 65;
const webviewTopPx = ref(88);
const webviewHeightPx = ref(600);
const webviewStyles = ref({
width: "100%",
top: `${webviewTopPx.value}px`,
height: `${webviewHeightPx.value}px`,
bottom: `65px`,
});
const applyWebviewLayout = () => {
};
const initWebviewLayout = () => {
const resInfo = uni.getSystemInfoSync();
const statusBarHeight = Number(resInfo.statusBarHeight || 0);
const windowHeight = Number(resInfo.windowHeight || 0);
webviewTopPx.value = Math.round(statusBarHeight + NAV_BAR_HEIGHT_PX);
webviewHeightPx.value = Math.max(
200,
Math.round(windowHeight - webviewTopPx.value - WEBVIEW_BOTTOM_PX)
);
webviewStyles.value = {
width: "100%",
top: `${webviewTopPx.value}px`,
height: `${webviewHeightPx.value}px`,
bottom: `${WEBVIEW_BOTTOM_PX}px`,
};
};
const getCollect = () => {
api.getCollect({
other_uuid: uuid.value,
user_uuid: user_uuid.value,
type: 2,
}).then(res => {
if(res.code == 200) {
api
.getCollect({
other_uuid: uuid.value,
user_uuid: user_uuid.value,
type: type.value=='huanjiao_news'?1:2,
})
.then((res) => {
if (res.code == 200) {
uni.showToast({
title: "收藏成功",
icon: "none",
});
getKePuCollection();
}
});
if (type.value == "huanjiao_news") {
getNewsDetail();
} else {
getKePuCollection();
}
}
});
};
const getDiscollect = () => {
api.getDiscollect({
other_uuid: uuid.value,
user_uuid: user_uuid.value,
type: 2,
}).then(res => {
console.log(res);
if(res.code == 200) {
uni.showToast({
title: "取消收藏成功",
icon: "none",
});
getKePuCollection();
}
});
api
.getDiscollect({
other_uuid: uuid.value,
user_uuid: user_uuid.value,
type: type.value=='huanjiao_news'?1:2,
})
.then((res) => {
console.log(res);
if (res.code == 200) {
uni.showToast({
title: "取消收藏成功",
icon: "none",
});
if(type.value=='huanjiao_news'){
getNewsDetail();
}else{
getKePuCollection();
}
}
});
};
const toggleCollect = () => {
if(isCollection.value == 0) {
console.log("收藏状态" + isCollection.value);
if (isCollection.value == 0) {
getCollect();
} else {
getDiscollect();
}
};
const toggleAgree = () => {
if(isAgree.value == 0) {
if (isAgree.value == 0) {
getAgree();
} else {
getDisagree();
}
};
const getAgree = () => {
api.getAgree({
news_article_uuid: uuid.value,
user_uuid: user_uuid.value,
type: 2,
}).then(res => {
api
.getAgree({
news_article_uuid: uuid.value,
user_uuid: user_uuid.value,
type: type.value=='huanjiao_news'?1:2,
})
.then((res) => {
if(type.value=='huanjiao_news'){
getNewsDetail();
}else{
getKePuCollection();
});
}
});
};
const getDisagree = () => {
api.getDisagree({
news_article_uuid: uuid.value,
user_uuid: user_uuid.value,
type: 2,
}).then(res => {
console.log(res);
api
.getDisagree({
news_article_uuid: uuid.value,
user_uuid: user_uuid.value,
type: type.value=='huanjiao_news'?1:2,
})
.then((res) => {
console.log(res);
if(type.value=='huanjiao_news'){
getNewsDetail();
}else{
getKePuCollection();
});
}
});
};
const getOutRead = () => {
api.getOutRead({
uuid: uuid.value,
type: 2,
}).then(res => {
console.log(res);
});
api
.getOutRead({
uuid: uuid.value,
type: type.value == "huanjiao_news" ? 1 : 2,
})
.then((res) => {
console.log(res);
});
};
const getNewsDetail = () => {
api
.getNewsDetail({
uuid: uuid.value,
})
.then((res) => {
console.log(res);
if (res.code == 200) {
isCollection.value = res.data.isCollection;
readnum.value = res.data.readnum;
agreenum.value = res.data.agreenum;
isAgree.value = res.data.isAgree;
}
});
};
const getKePuCollection = () => {
api.getKePuCollection({
uuid: uuid.value,
user_uuid: user_uuid.value,
}).then(res => {
console.log(res.data);
if(res.code == 200) {
isCollection.value = res.data.isCollection;
readnum.value = res.data.readnum;
agreenum.value = res.data.agreenum;
isAgree.value = res.data.isAgree;
}
});
api
.getKePuCollection({
uuid: uuid.value,
user_uuid: user_uuid.value,
})
.then((res) => {
console.log(res.data);
if (res.code == 200) {
isCollection.value = res.data.isCollection;
readnum.value = res.data.readnum;
agreenum.value = res.data.agreenum;
isAgree.value = res.data.isAgree;
}
});
};
const goBack = () => {
uni.navigateBack({
@ -203,8 +290,12 @@ const goBack = () => {
},
});
};
const webviewRef = ref(null);
onShow(() => {
setTimeout(() => {
uni.hideLoading();
}, 2000);
// console.log('show');
// plus.screen.lockOrientation('portrait-primary');
});
@ -217,7 +308,15 @@ onHide(() => {
// plus.screen.lockOrientation('landscape-primary');
});
onLoad((query) => {
uni.showLoading({
title: '加载中',
mask: true,
});
//initWebviewLayout();
const userInfo = uni.getStorageSync("userInfo");
if (query.type) {
type.value = query.type;
}
user_uuid.value = userInfo.uuid;
if (query.title) {
title.value = query.title;
@ -233,21 +332,30 @@ onLoad((query) => {
backgroundColor.value = "linear-gradient(to bottom,'#fff' , '#398775')";
}
getKePuCollection();
if (type.value == "huanjiao_news") {
getNewsDetail();
} else {
getKePuCollection();
}
getOutRead();
var height = 0; //
uni.getSystemInfo({
success: (sysinfo) => {
height = sysinfo.windowHeight; //
//bottomHeight.value=height-140
},
complete: () => {},
});
const raw = query && (query.url || "");
const raw =
query && (query.url || query.href || query.link || query.src || "");
if (!raw) {
uni.showToast({
title: "未获取到网页链接",
icon: "none",
});
}
try {
safeUrl.value = decodeURIComponent(raw);
shareImg.value = query.imgPath?decodeURIComponent(query.imgPath):'https://doc.igandan.com/app/html/img/2016/20160714132557.png';
console.log( safeUrl.value);
// query.imgPath
// ? decodeURIComponent(query.imgPath)
// : "https://doc.igandan.com/app/html/img/2016/20160714132557.png";
shareImg.value ="https://doc.igandan.com/app/html/img/2016/20160714132557.png";
console.log(shareImg.value);
if (query.type == "live_yugao") {
shareTitle.value = query.sharetitle;
summary.value = "分享一篇来自“肝胆相照”的会议预告:" + shareTitle.value;
@ -257,79 +365,57 @@ onLoad((query) => {
} else if (query.type == "live") {
shareTitle.value = "肝胆相照直播:" + query.sharetitle;
summary.value = shareTitle.value;
}else if(query.type=='news'){
} else if (query.type == "news") {
shareTitle.value = query.sharetitle;
summary.value ='';
}else if(query.type=='huanjiao'){
console.log(query.sharetitle);
console.log(query.summary);
summary.value = "";
} else if (query.type == "huanjiao" || query.type == "huanjiao_news") {
console.log(query.sharetitle);
console.log(query.summary);
shareTitle.value = query.sharetitle;
summary.value = query.summary;
}
// #ifdef APP-PLUS
const resInfo = uni.getSystemInfoSync(); // 使 uni.getSystemInfo({...}).then(res => {...})
let statusBarHeight = resInfo.statusBarHeight;
let wv = plus.webview.create("", "custom-webview", {
top: statusBarHeight + 44 + "px",
bottom: "65px",
});
wv.loadURL(safeUrl.value);
// let wv = plus.webview.create("", "custom-webview", {
// top: statusBarHeight + navHeight + "px",
// height: calcWebviewHeight(baseWindowHeight) + "px",
// bottom: fixedBottomHeight + "px",
// });
// webviewRef.value = wv;
// wv.loadURL(safeUrl.value);
let pages = getCurrentPages();
let page = pages[pages.length - 1];
// let pages = getCurrentPages();
// let page = pages[pages.length - 1];
var currentWebview = page.$getAppWebview(); //html5plusplus.webview.currentWebview()uni-appvue使plus.webview.currentWebview()
currentWebview.append(wv);
setTimeout(function () {
wv = currentWebview.children()[0];
wv.setStyle({
top: statusBarHeight + 44 + "px",
height: height - 140,
bottom: "65px",
scalable: true,
videoFullscreen: "landscape",
zIndex: -1,
});
}, 300); //
wv.onloaded = (e) => {
wv.show();
};
// var currentWebview = page.$getAppWebview(); //html5plusplus.webview.currentWebview()uni-appvue使plus.webview.currentWebview()
// currentWebview.append(wv);
// const applyWebviewStyle = (windowH) => {
// wv.setStyle({
// top: statusBarHeight + navHeight + "px",
// height: calcWebviewHeight(windowH) + "px",
// bottom: fixedBottomHeight + "px",
// scalable: true,
// videoFullscreen: "landscape",
// zIndex: -1,
// });
// };
// setTimeout(function () {
// wv = currentWebview.children()[0];
// webviewRef.value = wv;
// applyWebviewStyle(baseWindowHeight);
// }, 300); //
// wv.onloaded = (e) => {
// wv.show();
// };
uni.onWindowResize((res) => {
if (res.size.windowHeight < height) {
console.log(res.size.windowHeight);
console.log(height);
console.log("键盘高度", res.height);
setTimeout(function () {
wv.setStyle({
//web-viewpx
top: statusBarHeight + 44 + "px",
videoFullscreen: "landscape",
height: height - res.size.windowHeight + 100,
scalable: true, //webview
bottom: "65px",
});
}, 0);
//
//
} else {
setTimeout(function () {
wv.setStyle({
//web-viewpx
top: statusBarHeight + 44 + "px",
height: height - 80,
bottom: "65px",
videoFullscreen: "landscape",
scalable: true, //webview
});
}, 0);
}
});
// uni.onWindowResize((res) => {
// const resizeH = Number((res && res.size && res.size.windowHeight) || baseWindowHeight);
// setTimeout(function () {
// applyWebviewStyle(resizeH);
// }, 0);
// });
//
createNativePopup();
// #endif
} catch (e) {
safeUrl.value = raw;
@ -1012,6 +1098,8 @@ const shareToWeibo = () => {
</script>
<style>
.bottom-box {
position: fixed;
bottom: 0;
@ -1020,20 +1108,17 @@ const shareToWeibo = () => {
height: 60px;
display: flex;
align-items: center;
z-index:99;
z-index: 99;
background-color: #fff;
}
.bottom-cell {
flex: 1;
height:55px;
border-right: 2rpx solid #ccc;
border-top: 2rpx solid #ccc;
height: 55px;
border-right: 2rpx solid #ccc;
border-top: 2rpx solid #ccc;
display: flex;
align-items: center;
justify-content: center;
}
.bottom-cell:last-child {
border-right: none;

View File

@ -140,7 +140,7 @@
<uni-icons type="article" size="80" color="#cccccc"></uni-icons>
<text class="empty-text">暂无文章</text>
</view> -->
<empty v-if="articleList.length === 0 && !loading" :emptyDesc="'暂无文章'"></empty>
<empty v-if="articleList.length === 0 && !loading" :emptyDesc="'暂无视频'"></empty>
</scroll-view>
<!-- 底部导航栏 -->

BIN
static/new_patient.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB