3.17
This commit is contained in:
parent
4a22470f38
commit
b5cc11ddd3
@ -108,9 +108,12 @@
|
|||||||
<view class="item-title">{{ news.title }}</view>
|
<view class="item-title">{{ news.title }}</view>
|
||||||
<view class="item-meta">
|
<view class="item-meta">
|
||||||
<text class="item-date">{{ formatDate(news.createDate) }}</text>
|
<text class="item-date">{{ formatDate(news.createDate) }}</text>
|
||||||
<view class="item-stats">
|
<view class="item-stats middel" >
|
||||||
<uni-icons type="eye" size="14" color="#999"></uni-icons>
|
<uni-icons type="eye" size="14" color="#999"></uni-icons>
|
||||||
<text>{{ news.readnum || 0 }}</text>
|
<text>{{ news.readnum || 0 }}</text>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="item-stats">
|
||||||
<uni-icons type="hand-up" size="14" color="#999" style="margin-left: 20rpx;"></uni-icons>
|
<uni-icons type="hand-up" size="14" color="#999" style="margin-left: 20rpx;"></uni-icons>
|
||||||
<text>{{ news.agreenum || 0 }}</text>
|
<text>{{ news.agreenum || 0 }}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -736,6 +739,8 @@
|
|||||||
color: #999;
|
color: #999;
|
||||||
|
|
||||||
.item-date {
|
.item-date {
|
||||||
|
width:125rpx;
|
||||||
|
white-space: nowrap;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -743,10 +748,15 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
|
||||||
text {
|
text {
|
||||||
margin-left: 8rpx;
|
margin-left: 8rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.middel {
|
||||||
|
width:95rpx;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -399,7 +399,7 @@
|
|||||||
const videoId = video.id || video.uuid;
|
const videoId = video.id || video.uuid;
|
||||||
|
|
||||||
navTo({
|
navTo({
|
||||||
url: `/pages_app/videoDetail/videoDetail?id=${videoId}`
|
url: `/pages_app/videoDetail/videoDetail?id=${videoId}&type=patientVideo`
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -136,10 +136,10 @@
|
|||||||
const requestPage = patientListPage.value
|
const requestPage = patientListPage.value
|
||||||
const res = await api.patientListByGBKPage({
|
const res = await api.patientListByGBKPage({
|
||||||
page: requestPage,
|
page: requestPage,
|
||||||
pageNum: requestPage,
|
//pageNum: requestPage,
|
||||||
current: requestPage,
|
//current: requestPage,
|
||||||
pageSize: patientListPageSize.value,
|
pageSize: patientListPageSize.value,
|
||||||
size: patientListPageSize.value
|
//size: patientListPageSize.value
|
||||||
})
|
})
|
||||||
if (!isApiSuccess(res)) return
|
if (!isApiSuccess(res)) return
|
||||||
const { list, total, pageNum, pages, isLastPage } = parsePagedPatients(res)
|
const { list, total, pageNum, pages, isLastPage } = parsePagedPatients(res)
|
||||||
@ -175,8 +175,8 @@
|
|||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
if(options.from == 'chatMsg'){
|
if(options.from ){
|
||||||
from.value = 'chatMsg';
|
from.value =options.from;
|
||||||
}
|
}
|
||||||
// 读取已选中的成员ID
|
// 读取已选中的成员ID
|
||||||
try {
|
try {
|
||||||
@ -257,7 +257,7 @@
|
|||||||
}
|
}
|
||||||
const goBack = () => uni.navigateBack()
|
const goBack = () => uni.navigateBack()
|
||||||
const confirmSelect = () => {
|
const confirmSelect = () => {
|
||||||
if(from.value == 'chatMsg'){
|
if(from.value == 'chatMsg' || from.value == 'videoDetail'){
|
||||||
if(selectedIds.value.length >200){
|
if(selectedIds.value.length >200){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '选择人数不能超过200',
|
title: '选择人数不能超过200',
|
||||||
|
|||||||
@ -204,6 +204,12 @@
|
|||||||
<view class="share-popup">
|
<view class="share-popup">
|
||||||
<view class="share-title">分享到</view>
|
<view class="share-title">分享到</view>
|
||||||
<view class="share-content">
|
<view class="share-content">
|
||||||
|
<view class="share-item" @click="shareToPatient" v-if="type == 'patientVideo'">
|
||||||
|
<view class="share-icon wechat-icon" style="background: none;">
|
||||||
|
<image class="share-img" :src="paitientImg" mode="aspectFill" />
|
||||||
|
</view>
|
||||||
|
<text class="share-text">患者</text>
|
||||||
|
</view>
|
||||||
<view class="share-item" @click="shareToWechat">
|
<view class="share-item" @click="shareToWechat">
|
||||||
<view class="share-icon wechat-icon">
|
<view class="share-icon wechat-icon">
|
||||||
<image class="share-img" :src="wxImg" mode="aspectFill" />
|
<image class="share-img" :src="wxImg" mode="aspectFill" />
|
||||||
@ -228,12 +234,25 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
<!-- 选择弹窗(复制自 groupMessage) -->
|
||||||
|
<view v-if="showModal" class="mask" @click="closeModal"></view>
|
||||||
|
<view v-if="showModal" class="center-modal">
|
||||||
|
<view class="modal-title">温馨提示</view>
|
||||||
|
<view class="modal-divider"></view>
|
||||||
|
<view class="modal-item" @click="onSelect('single')">
|
||||||
|
<text class="text">单独选择</text>
|
||||||
|
</view>
|
||||||
|
<view class="modal-divider"></view>
|
||||||
|
<view class="modal-item" @click="onSelect('group')">
|
||||||
|
<text class="text">分组选择</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, nextTick } from "vue";
|
import { ref, nextTick } from "vue";
|
||||||
//import uniVideo from "@/components/uniVideo/uniVideo.vue";
|
//import uniVideo from "@/components/uniVideo/uniVideo.vue";
|
||||||
import { onLoad, onShow,onReady } from "@dcloudio/uni-app";
|
import { onLoad, onShow,onReady,onUnload } from "@dcloudio/uni-app";
|
||||||
import unidialog from "@/components/dialog/dialog.vue";
|
import unidialog from "@/components/dialog/dialog.vue";
|
||||||
import collectImg from "@/static/icon_book_collect_sel.png";
|
import collectImg from "@/static/icon_book_collect_sel.png";
|
||||||
import discollectImg from "@/static/icon_book_collect_nor.png";
|
import discollectImg from "@/static/icon_book_collect_nor.png";
|
||||||
@ -245,11 +264,13 @@ import logoImg from "@/static/weiboShare.png";
|
|||||||
import isAndroid from "@/utils/platform.js";
|
import isAndroid from "@/utils/platform.js";
|
||||||
import avastarImg from "@/static/avastar.png";
|
import avastarImg from "@/static/avastar.png";
|
||||||
import playImg from "@/static/play.png";
|
import playImg from "@/static/play.png";
|
||||||
|
import paitientImg from "@/static/info_icon_1.png";
|
||||||
import api from "@/api/api";
|
import api from "@/api/api";
|
||||||
import docUrl from "@/utils/docUrl";
|
import docUrl from "@/utils/docUrl";
|
||||||
import navTo from "@/utils/navTo";
|
import navTo from "@/utils/navTo";
|
||||||
const shareLink = ref("");
|
const shareLink = ref("");
|
||||||
import otherHost from "@/utils/otherHost";
|
import otherHost from "@/utils/otherHost";
|
||||||
|
const selectedPatients = ref([]);
|
||||||
const video_uuid = ref("");
|
const video_uuid = ref("");
|
||||||
const videoInfo = ref({});
|
const videoInfo = ref({});
|
||||||
const networkVisible = ref(false);
|
const networkVisible = ref(false);
|
||||||
@ -270,6 +291,7 @@ const downLoadStatus = ref('start');
|
|||||||
let downList = uni.getStorageSync("downLoadVideo") || [];
|
let downList = uni.getStorageSync("downLoadVideo") || [];
|
||||||
const downLoadList = ref(downList);
|
const downLoadList = ref(downList);
|
||||||
const isFullScreen = ref(false);
|
const isFullScreen = ref(false);
|
||||||
|
const showModal = ref(false);
|
||||||
|
|
||||||
//import DomVideoPlayer from 'uniapp-video-player'
|
//import DomVideoPlayer from 'uniapp-video-player'
|
||||||
//import sunnyVideo from "@/uni_modules/sunny-video/components/sunny-video/sunny-video.vue";
|
//import sunnyVideo from "@/uni_modules/sunny-video/components/sunny-video/sunny-video.vue";
|
||||||
@ -500,6 +522,16 @@ const collection = async () => {
|
|||||||
videoDetail();
|
videoDetail();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const addpoint=()=>{
|
||||||
|
api.addBonusPointsN({
|
||||||
|
score_type:5
|
||||||
|
}).then(res=>{
|
||||||
|
if(res.code==200){
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
const discollection = async () => {
|
const discollection = async () => {
|
||||||
const res = await api.discollection({
|
const res = await api.discollection({
|
||||||
other_uuid: video_uuid.value,
|
other_uuid: video_uuid.value,
|
||||||
@ -573,8 +605,17 @@ const resumeDownloadingTasks = () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
onUnload(() => {
|
||||||
|
uni.$off('selectedChatPatientsSingle');
|
||||||
|
});
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
uni.$on('selectedChatPatientsSingle',(data)=>{
|
||||||
|
console.log(data)
|
||||||
|
selectedPatients.value = data.patients;
|
||||||
|
if(type.value == 'patientVideo') {
|
||||||
|
addGroupSendMsg4YunXin()
|
||||||
|
}
|
||||||
|
});
|
||||||
hasDownload.value = false;
|
hasDownload.value = false;
|
||||||
downLoadStatus.value = 'start';
|
downLoadStatus.value = 'start';
|
||||||
console.log('onShow');
|
console.log('onShow');
|
||||||
@ -622,10 +663,65 @@ onShow(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const shareRef = ref();
|
const shareRef = ref();
|
||||||
|
const shareActionLocked = ref(false);
|
||||||
|
const lastShareActionAt = ref(0);
|
||||||
|
const runShareActionOnce = (action) => {
|
||||||
|
const now = Date.now();
|
||||||
|
if (shareActionLocked.value) return false;
|
||||||
|
if (now - Number(lastShareActionAt.value || 0) < 800) return false;
|
||||||
|
shareActionLocked.value = true;
|
||||||
|
lastShareActionAt.value = now;
|
||||||
|
try {
|
||||||
|
action && action();
|
||||||
|
} finally {
|
||||||
|
setTimeout(() => {
|
||||||
|
shareActionLocked.value = false;
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
// 分享APP
|
// 分享APP
|
||||||
const shareToggle = () => {
|
const shareToggle = () => {
|
||||||
shareRef.value.open();
|
shareRef.value.open();
|
||||||
};
|
};
|
||||||
|
const shareToPatient = () => {
|
||||||
|
if (!runShareActionOnce(() => {})) return;
|
||||||
|
closeShare();
|
||||||
|
setTimeout(() => {
|
||||||
|
openModal();
|
||||||
|
}, 120);
|
||||||
|
};
|
||||||
|
const openModal = () => {
|
||||||
|
showModal.value = true;
|
||||||
|
};
|
||||||
|
const closeModal = () => {
|
||||||
|
showModal.value = false;
|
||||||
|
};
|
||||||
|
const addGroupSendMsg4YunXin=async()=>{
|
||||||
|
const res=await api.addGroupSendMsg4YunXin({
|
||||||
|
patient_user_uuid: selectedPatients.value.map(item => item.uuid).join(','),
|
||||||
|
msg_content: videoInfo.value.uuid,
|
||||||
|
msg_type:4,
|
||||||
|
});
|
||||||
|
if(res.code==200){
|
||||||
|
uni.showToast({ title: "推荐成功", icon: "none" });
|
||||||
|
|
||||||
|
}else{
|
||||||
|
uni.showToast({ title: res.msg, icon: "none" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const onSelect = (type) => {
|
||||||
|
showModal.value = false;
|
||||||
|
if (type === "single") {
|
||||||
|
navTo({
|
||||||
|
url: "/pages_app/selectPatient/selectPatient?from=videoDetail",
|
||||||
|
});
|
||||||
|
} else if (type === "group") {
|
||||||
|
navTo({
|
||||||
|
url: "/pages_chat/patientGroup/patientGroup?from=videoDetail",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 关闭分享弹窗
|
// 关闭分享弹窗
|
||||||
const closeShare = () => {
|
const closeShare = () => {
|
||||||
@ -634,6 +730,10 @@ const closeShare = () => {
|
|||||||
|
|
||||||
// 分享到微信
|
// 分享到微信
|
||||||
const shareToWechat = () => {
|
const shareToWechat = () => {
|
||||||
|
if (!runShareActionOnce(() => {})) return;
|
||||||
|
if(type.value == 'patientVideo') {
|
||||||
|
addpoint();
|
||||||
|
}
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// 使用系统分享
|
// 使用系统分享
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
@ -652,6 +752,7 @@ const shareToWechat = () => {
|
|||||||
href: shareLink.value,
|
href: shareLink.value,
|
||||||
imageUrl: res2.tempFilePath,
|
imageUrl: res2.tempFilePath,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
|
|
||||||
console.log("success:" + JSON.stringify(res));
|
console.log("success:" + JSON.stringify(res));
|
||||||
},
|
},
|
||||||
fail: function (err) {
|
fail: function (err) {
|
||||||
@ -729,6 +830,10 @@ const shareToWechat = () => {
|
|||||||
|
|
||||||
// 分享到朋友圈
|
// 分享到朋友圈
|
||||||
const shareToMoments = () => {
|
const shareToMoments = () => {
|
||||||
|
if (!runShareActionOnce(() => {})) return;
|
||||||
|
if(type.value == 'patientVideo') {
|
||||||
|
addpoint();
|
||||||
|
}
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: isAndroid?docUrl + videoInfo.value.imgpath:'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
|
url: isAndroid?docUrl + videoInfo.value.imgpath:'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
|
||||||
@ -746,6 +851,7 @@ const shareToMoments = () => {
|
|||||||
href: shareLink.value,
|
href: shareLink.value,
|
||||||
imageUrl: res2.tempFilePath,
|
imageUrl: res2.tempFilePath,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
|
|
||||||
//console.log("success:" + JSON.stringify(res));
|
//console.log("success:" + JSON.stringify(res));
|
||||||
},
|
},
|
||||||
fail: function (err) {
|
fail: function (err) {
|
||||||
@ -783,6 +889,7 @@ const shareToMoments = () => {
|
|||||||
|
|
||||||
// 分享到新浪微博
|
// 分享到新浪微博
|
||||||
const shareToWeibo = () => {
|
const shareToWeibo = () => {
|
||||||
|
if (!runShareActionOnce(() => {})) return;
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
uni.share({
|
uni.share({
|
||||||
provider: "sinaweibo",
|
provider: "sinaweibo",
|
||||||
@ -831,19 +938,23 @@ const shareToWeibo = () => {
|
|||||||
closeShare();
|
closeShare();
|
||||||
};
|
};
|
||||||
const from = ref('');
|
const from = ref('');
|
||||||
|
const type = ref('');
|
||||||
// 使用uni-app的onLoad生命周期
|
// 使用uni-app的onLoad生命周期
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
|
if(options.type) {
|
||||||
|
type.value = options.type;
|
||||||
|
}
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
videoWidth.value = res.windowWidth; // 窗口宽度
|
videoWidth.value = res.windowWidth; // 窗口宽度
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log('enrtyVideoDetail');
|
console.log('enrtyVideoDetail');
|
||||||
uni.sendNativeEvent('enrtyVideoDetail', {
|
// uni.sendNativeEvent('enrtyVideoDetail', {
|
||||||
msg: 'enrtyVideoDetail'
|
// msg: 'enrtyVideoDetail'
|
||||||
}, ret => {
|
// }, ret => {
|
||||||
console.log(ret);
|
// console.log(ret);
|
||||||
})
|
// })
|
||||||
video_uuid.value = options.id;
|
video_uuid.value = options.id;
|
||||||
from.value = options.from;
|
from.value = options.from;
|
||||||
if(from.value != 'download') {
|
if(from.value != 'download') {
|
||||||
@ -1503,6 +1614,50 @@ $theme-color: #8b2316;
|
|||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 选择弹窗(与 groupMessage 保持一致) */
|
||||||
|
.mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
z-index: 1100;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center-modal {
|
||||||
|
position: fixed;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
margin-top:100rpx;
|
||||||
|
width: 650rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
z-index: 9999999;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 10rpx 40rpx rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-title {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 34rpx;
|
||||||
|
color: #8b2316;
|
||||||
|
padding: 28rpx 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-item {
|
||||||
|
padding: 36rpx 28rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333333;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-divider {
|
||||||
|
height: 2rpx;
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
|
||||||
// 删除确认弹窗
|
// 删除确认弹窗
|
||||||
.delete-modal-mask {
|
.delete-modal-mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|||||||
@ -2,16 +2,21 @@
|
|||||||
<view class="container" :style="{ backgroundColor: backgroundColor }">
|
<view class="container" :style="{ backgroundColor: backgroundColor }">
|
||||||
<!-- 分享弹窗 -->
|
<!-- 分享弹窗 -->
|
||||||
|
|
||||||
<view class="navbox">
|
<view class="navbox" style="z-index:9999999999999999999999999999999">
|
||||||
<view class="status_bar"></view>
|
<view class="status_bar"></view>
|
||||||
<uni-nav-bar
|
<uni-nav-bar
|
||||||
left-icon="left"
|
|
||||||
:title="title"
|
:title="title"
|
||||||
@clickLeft="goBack"
|
@clickLeft="goBack"
|
||||||
|
@click-left="goBack"
|
||||||
color="#8B2316"
|
color="#8B2316"
|
||||||
:border="false"
|
:border="false"
|
||||||
backgroundColor="#eeeeee"
|
backgroundColor="#eeeeee"
|
||||||
>
|
>
|
||||||
|
<template #left>
|
||||||
|
<view class="back-hit" @click.stop="goBack">
|
||||||
|
<uni-icons type="left" size="22" color="#8B2316"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<view class="nav-actions">
|
<view class="nav-actions">
|
||||||
<view class="collect-img" @click="shareToggle" v-if="canShare">
|
<view class="collect-img" @click="shareToggle" v-if="canShare">
|
||||||
@ -27,7 +32,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<web-view
|
<web-view
|
||||||
v-if="safeUrl"
|
v-if="safeUrl && !usePlusWebview"
|
||||||
:src="safeUrl"
|
:src="safeUrl"
|
||||||
:webview-styles="webviewStyles"
|
:webview-styles="webviewStyles"
|
||||||
></web-view>
|
></web-view>
|
||||||
@ -102,7 +107,8 @@ import docUrl from "@/utils/docUrl";
|
|||||||
import likeImg from "@/static/argee_sure.png";
|
import likeImg from "@/static/argee_sure.png";
|
||||||
import dislikeImg from "@/static/argee_no.png";
|
import dislikeImg from "@/static/argee_no.png";
|
||||||
import shareImgBottom from "@/static/icon_share.png";
|
import shareImgBottom from "@/static/icon_share.png";
|
||||||
|
import paitientImg from "@/static/info_icon_1.png";
|
||||||
|
const selectedPatients = ref([]);
|
||||||
const title = ref("新闻详情");
|
const title = ref("新闻详情");
|
||||||
const type = ref("");
|
const type = ref("");
|
||||||
const safeUrl = ref("");
|
const safeUrl = ref("");
|
||||||
@ -124,11 +130,13 @@ const NAV_BAR_HEIGHT_PX = 44;
|
|||||||
const WEBVIEW_BOTTOM_PX = 55;
|
const WEBVIEW_BOTTOM_PX = 55;
|
||||||
const webviewTopPx = ref(88);
|
const webviewTopPx = ref(88);
|
||||||
const webviewBottomPx = ref(WEBVIEW_BOTTOM_PX);
|
const webviewBottomPx = ref(WEBVIEW_BOTTOM_PX);
|
||||||
|
const usePlusWebview = ref(false);
|
||||||
|
const appPlusWebview = ref(null);
|
||||||
|
|
||||||
const webviewStyles = ref({
|
const webviewStyles = ref({
|
||||||
width: "100%",
|
width: "100%",
|
||||||
top: `${webviewTopPx.value}px`,
|
top: webviewTopPx.value,
|
||||||
bottom: `${webviewBottomPx.value}px`
|
bottom: webviewBottomPx.value
|
||||||
});
|
});
|
||||||
const applyWebviewLayout = () => {
|
const applyWebviewLayout = () => {
|
||||||
const resInfo = uni.getSystemInfoSync();
|
const resInfo = uni.getSystemInfoSync();
|
||||||
@ -140,9 +148,20 @@ const applyWebviewLayout = () => {
|
|||||||
webviewBottomPx.value = Math.round(WEBVIEW_BOTTOM_PX + safeAreaBottom);
|
webviewBottomPx.value = Math.round(WEBVIEW_BOTTOM_PX + safeAreaBottom);
|
||||||
webviewStyles.value = {
|
webviewStyles.value = {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
top: `${webviewTopPx.value}px`,
|
top: webviewTopPx.value,
|
||||||
bottom: `${webviewBottomPx.value}px`
|
bottom: webviewBottomPx.value
|
||||||
};
|
};
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
if (usePlusWebview.value && appPlusWebview.value) {
|
||||||
|
appPlusWebview.value.setStyle({
|
||||||
|
top: `${webviewTopPx.value}px`,
|
||||||
|
bottom: `${webviewBottomPx.value}px`,
|
||||||
|
scalable: true,
|
||||||
|
videoFullscreen: "landscape",
|
||||||
|
zIndex: -1,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
};
|
};
|
||||||
const initWebviewLayout = () => {
|
const initWebviewLayout = () => {
|
||||||
applyWebviewLayout();
|
applyWebviewLayout();
|
||||||
@ -150,7 +169,34 @@ const initWebviewLayout = () => {
|
|||||||
const onWindowResize = () => {
|
const onWindowResize = () => {
|
||||||
applyWebviewLayout();
|
applyWebviewLayout();
|
||||||
};
|
};
|
||||||
|
const addpoint=()=>{
|
||||||
|
console.log('添加积分1')
|
||||||
|
api.addBonusPointsN({
|
||||||
|
score_type:5
|
||||||
|
}).then(res=>{
|
||||||
|
console.log('添加积分2')
|
||||||
|
console.log(res)
|
||||||
|
if(res.code==200){
|
||||||
|
|
||||||
|
//uni.showToast({ title: "添加积分成功", icon: "none" });
|
||||||
|
}else{
|
||||||
|
|
||||||
|
//uni.showToast({ title: res.msg, icon: "none" });
|
||||||
|
}
|
||||||
|
}).catch(err=>{
|
||||||
|
uni.showModal({
|
||||||
|
title: "提示",
|
||||||
|
content: res.message,
|
||||||
|
showCancel: false,
|
||||||
|
success: (res) => {
|
||||||
|
if(res.confirm){
|
||||||
|
//uni.navigateBack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//uni.showToast({ title: err.msg, icon: "none" });
|
||||||
|
})
|
||||||
|
}
|
||||||
const getCollect = () => {
|
const getCollect = () => {
|
||||||
api
|
api
|
||||||
.getCollect({
|
.getCollect({
|
||||||
@ -294,7 +340,10 @@ const getKePuCollection = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
|
closeNativePopup();
|
||||||
|
closeSelectNativePopup();
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
|
delta: 1,
|
||||||
fail() {
|
fail() {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: "/pages/index/index",
|
url: "/pages/index/index",
|
||||||
@ -303,8 +352,56 @@ const goBack = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const webviewRef = ref(null);
|
const webviewRef = ref(null);
|
||||||
|
const createAppPlusWebview = (url) => {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
try {
|
||||||
|
if (!url) return;
|
||||||
|
const pages = getCurrentPages();
|
||||||
|
const page = pages[pages.length - 1];
|
||||||
|
const currentWebview = page && page.$getAppWebview ? page.$getAppWebview() : null;
|
||||||
|
if (!currentWebview) return;
|
||||||
|
if (appPlusWebview.value && appPlusWebview.value.close) {
|
||||||
|
appPlusWebview.value.close();
|
||||||
|
appPlusWebview.value = null;
|
||||||
|
}
|
||||||
|
const wv = plus.webview.create("", "webview-class-content", {
|
||||||
|
top: `${webviewTopPx.value}px`,
|
||||||
|
bottom: `${webviewBottomPx.value}px`,
|
||||||
|
scalable: true,
|
||||||
|
videoFullscreen: "landscape",
|
||||||
|
zIndex: -1,
|
||||||
|
});
|
||||||
|
wv.loadURL(url);
|
||||||
|
currentWebview.append(wv);
|
||||||
|
appPlusWebview.value = wv;
|
||||||
|
} catch (error) {
|
||||||
|
console.log("createAppPlusWebview error:", error);
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
};
|
||||||
|
const addGroupSendMsg4YunXin=async()=>{
|
||||||
|
const res=await api.addGroupSendMsg4YunXin({
|
||||||
|
patient_user_uuid: selectedPatients.value.map(item => item.uuid).join(','),
|
||||||
|
msg_content: uuid.value,
|
||||||
|
msg_type:3,
|
||||||
|
});
|
||||||
|
if(res.code==200){
|
||||||
|
uni.showToast({ title: "推荐成功", icon: "none" });
|
||||||
|
|
||||||
|
}else{
|
||||||
|
uni.showToast({ title: res.msg, icon: "none" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
uni.$on('selectedChatPatientsSingle',(data)=>{
|
||||||
|
console.log('监听数据')
|
||||||
|
console.log(data)
|
||||||
|
selectedPatients.value = data.patients;
|
||||||
|
if(type.value == 'huanjiao') {
|
||||||
|
addGroupSendMsg4YunXin()
|
||||||
|
}
|
||||||
|
});
|
||||||
initWebviewLayout();
|
initWebviewLayout();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
@ -329,6 +426,9 @@ onLoad((query) => {
|
|||||||
mask: true,
|
mask: true,
|
||||||
});
|
});
|
||||||
initWebviewLayout();
|
initWebviewLayout();
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
usePlusWebview.value = true;
|
||||||
|
// #endif
|
||||||
if (typeof uni.onWindowResize === "function") {
|
if (typeof uni.onWindowResize === "function") {
|
||||||
uni.onWindowResize(onWindowResize);
|
uni.onWindowResize(onWindowResize);
|
||||||
}
|
}
|
||||||
@ -435,10 +535,12 @@ onLoad((query) => {
|
|||||||
// });
|
// });
|
||||||
// 创建并展示原生弹窗
|
// 创建并展示原生弹窗
|
||||||
createNativePopup();
|
createNativePopup();
|
||||||
|
createAppPlusWebview(safeUrl.value);
|
||||||
|
|
||||||
// #endif
|
// #endif
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
safeUrl.value = raw;
|
safeUrl.value = raw;
|
||||||
|
createAppPlusWebview(safeUrl.value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const shareRef = ref(null);
|
const shareRef = ref(null);
|
||||||
@ -472,6 +574,23 @@ const closeShare = () => {
|
|||||||
const nativeMaskView = ref(null);
|
const nativeMaskView = ref(null);
|
||||||
const nativePopupView = ref(null);
|
const nativePopupView = ref(null);
|
||||||
const popupShowing = ref(false);
|
const popupShowing = ref(false);
|
||||||
|
const shareActionLocked = ref(false);
|
||||||
|
const nativeSelectMaskView = ref(null);
|
||||||
|
const nativeSelectPopupView = ref(null);
|
||||||
|
const selectPopupShowing = ref(false);
|
||||||
|
const selectActionLocked = ref(false);
|
||||||
|
const selectNavigateLocked = ref(false);
|
||||||
|
const lastSelectNavigateAt = ref(0);
|
||||||
|
const selectPopupInfo = ref({
|
||||||
|
screenW: 0,
|
||||||
|
screenH: 0,
|
||||||
|
panelW: 0,
|
||||||
|
panelH: 0,
|
||||||
|
panelLeft: 0,
|
||||||
|
panelTop: 0,
|
||||||
|
titleH: 0,
|
||||||
|
itemH: 0,
|
||||||
|
});
|
||||||
// 保存弹窗尺寸信息,供事件处理使用
|
// 保存弹窗尺寸信息,供事件处理使用
|
||||||
const popupInfo = ref({
|
const popupInfo = ref({
|
||||||
screenW: 0,
|
screenW: 0,
|
||||||
@ -578,10 +697,16 @@ function createNativePopup() {
|
|||||||
weight: "500",
|
weight: "500",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const items = [
|
const showPatientShare = type.value === "huanjiao";
|
||||||
|
const items = showPatientShare
|
||||||
|
? [
|
||||||
|
{ id: "it-patient", text: "患者" },
|
||||||
|
{ id: "it-wechat", text: "微信" },
|
||||||
|
{ id: "it-moments", text: "朋友圈" },
|
||||||
|
]
|
||||||
|
: [
|
||||||
{ id: "it-wechat", text: "微信" },
|
{ id: "it-wechat", text: "微信" },
|
||||||
{ id: "it-moments", text: "朋友圈" },
|
{ id: "it-moments", text: "朋友圈" },
|
||||||
// { id: 'it-weibo', text: '微博' }
|
|
||||||
];
|
];
|
||||||
// 三个分享项区域(使用图标)
|
// 三个分享项区域(使用图标)
|
||||||
const itemW = screenW / items.length;
|
const itemW = screenW / items.length;
|
||||||
@ -597,10 +722,15 @@ function createNativePopup() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 图标文件名映射(直接使用文件名,避免路径转换问题)
|
// 图标文件名映射(直接使用文件名,避免路径转换问题)
|
||||||
const iconFiles = [
|
const iconFiles = showPatientShare
|
||||||
|
? [
|
||||||
|
"info_icon_1.png", // 患者
|
||||||
|
"share_weixin.png", // 微信
|
||||||
|
"share_wxc.png", // 朋友圈
|
||||||
|
]
|
||||||
|
: [
|
||||||
"share_weixin.png", // 微信
|
"share_weixin.png", // 微信
|
||||||
"share_wxc.png", // 朋友圈
|
"share_wxc.png", // 朋友圈
|
||||||
"share_sina.png", // 微博
|
|
||||||
];
|
];
|
||||||
|
|
||||||
items.forEach((it, idx) => {
|
items.forEach((it, idx) => {
|
||||||
@ -747,12 +877,22 @@ function createNativePopup() {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
// 事件处理函数
|
// 事件处理函数
|
||||||
|
const lockShareAction = () => {
|
||||||
|
if (shareActionLocked.value) return false;
|
||||||
|
shareActionLocked.value = true;
|
||||||
|
setTimeout(() => {
|
||||||
|
shareActionLocked.value = false;
|
||||||
|
}, 300);
|
||||||
|
return true;
|
||||||
|
};
|
||||||
const handleMaskClick = () => {
|
const handleMaskClick = () => {
|
||||||
|
if (!lockShareAction()) return;
|
||||||
console.log("遮罩被点击");
|
console.log("遮罩被点击");
|
||||||
closeNativePopup();
|
closeNativePopup();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handlePanelClick = (e) => {
|
const handlePanelClick = (e) => {
|
||||||
|
if (!lockShareAction()) return;
|
||||||
console.log("面板被点击", e);
|
console.log("面板被点击", e);
|
||||||
const info = popupInfo.value;
|
const info = popupInfo.value;
|
||||||
|
|
||||||
@ -837,9 +977,9 @@ function createNativePopup() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (relativeY >= shareAreaTop && relativeY <= shareAreaBottom) {
|
if (relativeY >= shareAreaTop && relativeY <= shareAreaBottom) {
|
||||||
// 计算点击的是第几个分享项(0:微信, 1:朋友圈, 2:微博)
|
// 计算点击的是第几个分享项
|
||||||
const itemWidth = info.screenW / items.length;
|
const itemWidth = info.screenW / items.length;
|
||||||
const idx = Math.min(2, Math.max(0, Math.floor(relativeX / itemWidth)));
|
const idx = Math.min(items.length - 1, Math.max(0, Math.floor(relativeX / itemWidth)));
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
"点击了分享项:",
|
"点击了分享项:",
|
||||||
@ -850,6 +990,21 @@ function createNativePopup() {
|
|||||||
itemWidth
|
itemWidth
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (showPatientShare) {
|
||||||
|
if (idx === 0) {
|
||||||
|
console.log("执行患者选择");
|
||||||
|
closeNativePopup();
|
||||||
|
showSelectNativePopup();
|
||||||
|
} else if (idx === 1) {
|
||||||
|
console.log("执行微信分享");
|
||||||
|
shareToWechat();
|
||||||
|
closeNativePopup();
|
||||||
|
} else if (idx === 2) {
|
||||||
|
console.log("执行朋友圈分享");
|
||||||
|
shareToMoments();
|
||||||
|
closeNativePopup();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (idx === 0) {
|
if (idx === 0) {
|
||||||
console.log("执行微信分享");
|
console.log("执行微信分享");
|
||||||
shareToWechat();
|
shareToWechat();
|
||||||
@ -858,10 +1013,7 @@ function createNativePopup() {
|
|||||||
console.log("执行朋友圈分享");
|
console.log("执行朋友圈分享");
|
||||||
shareToMoments();
|
shareToMoments();
|
||||||
closeNativePopup();
|
closeNativePopup();
|
||||||
} else if (idx === 2) {
|
}
|
||||||
console.log("执行微博分享");
|
|
||||||
// shareToWeibo();
|
|
||||||
// closeNativePopup();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
console.log(
|
||||||
@ -875,12 +1027,8 @@ function createNativePopup() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 同时监听 click 和 touchstart 事件
|
// 仅监听 touchend,避免 click/touchstart/touchend 重复触发
|
||||||
nativeMaskView.value.addEventListener("click", handleMaskClick, false);
|
nativeMaskView.value.addEventListener("touchend", handleMaskClick, false);
|
||||||
nativeMaskView.value.addEventListener("touchstart", handleMaskClick, false);
|
|
||||||
|
|
||||||
nativePopupView.value.addEventListener("click", handlePanelClick, false);
|
|
||||||
nativePopupView.value.addEventListener("touchstart", handlePanelClick, false);
|
|
||||||
nativePopupView.value.addEventListener("touchend", handlePanelClick, false);
|
nativePopupView.value.addEventListener("touchend", handlePanelClick, false);
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
@ -905,9 +1053,199 @@ function closeNativePopup() {
|
|||||||
popupShowing.value = false;
|
popupShowing.value = false;
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
function createSelectNativePopup() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
if (nativeSelectMaskView.value || nativeSelectPopupView.value) return;
|
||||||
|
const screenW = plus.screen.resolutionWidth;
|
||||||
|
const screenH = plus.screen.resolutionHeight;
|
||||||
|
const panelW = Math.round(uni.upx2px(650));
|
||||||
|
const titleH = Math.round(uni.upx2px(96));
|
||||||
|
const itemH = Math.round(uni.upx2px(110));
|
||||||
|
const panelH = titleH + itemH * 2 + 2;
|
||||||
|
const panelLeft = Math.round((screenW - panelW) / 2);
|
||||||
|
const panelTop = Math.round((screenH - panelH) / 2);
|
||||||
|
|
||||||
|
selectPopupInfo.value = {
|
||||||
|
screenW,
|
||||||
|
screenH,
|
||||||
|
panelW,
|
||||||
|
panelH,
|
||||||
|
panelLeft,
|
||||||
|
panelTop,
|
||||||
|
titleH,
|
||||||
|
itemH,
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeSelectMaskView.value = new plus.nativeObj.View(
|
||||||
|
"native-select-mask",
|
||||||
|
{
|
||||||
|
left: "0px",
|
||||||
|
top: "0px",
|
||||||
|
width: `${screenW}px`,
|
||||||
|
height: `${screenH}px`,
|
||||||
|
zindex: 99998,
|
||||||
|
touchable: true,
|
||||||
|
interceptTouchEvent: true,
|
||||||
|
},
|
||||||
|
[
|
||||||
|
{
|
||||||
|
tag: "rect",
|
||||||
|
id: "mask",
|
||||||
|
position: {
|
||||||
|
left: "0px",
|
||||||
|
top: "0px",
|
||||||
|
width: `${screenW}px`,
|
||||||
|
height: `${screenH}px`,
|
||||||
|
},
|
||||||
|
color: "rgba(0,0,0,0.6)",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
nativeSelectPopupView.value = new plus.nativeObj.View(
|
||||||
|
"native-select-panel",
|
||||||
|
{
|
||||||
|
left: `${panelLeft}px`,
|
||||||
|
top: `${panelTop}px`,
|
||||||
|
width: `${panelW}px`,
|
||||||
|
height: `${panelH}px`,
|
||||||
|
zindex: 99999,
|
||||||
|
touchable: true,
|
||||||
|
interceptTouchEvent: true,
|
||||||
|
},
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
|
const radius = Math.round(uni.upx2px(16));
|
||||||
|
nativeSelectPopupView.value.drawRect(
|
||||||
|
{ color: "#FFFFFF", radius, rectStyles: {} },
|
||||||
|
{ left: "0px", top: "0px", width: `${panelW}px`, height: `${panelH}px` }
|
||||||
|
);
|
||||||
|
nativeSelectPopupView.value.drawText(
|
||||||
|
"温馨提示",
|
||||||
|
{ left: "0px", top: "0px", width: `${panelW}px`, height: `${titleH}px` },
|
||||||
|
{
|
||||||
|
size: `${Math.round(uni.upx2px(34))}px`,
|
||||||
|
color: "#8B2316",
|
||||||
|
align: "center",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
weight: "500",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
nativeSelectPopupView.value.drawRect(
|
||||||
|
{ color: "#EEEEEE" },
|
||||||
|
{ left: "0px", top: `${titleH}px`, width: `${panelW}px`, height: "1px" }
|
||||||
|
);
|
||||||
|
nativeSelectPopupView.value.drawText(
|
||||||
|
"单独选择",
|
||||||
|
{ left: "0px", top: `${titleH}px`, width: `${panelW}px`, height: `${itemH}px` },
|
||||||
|
{
|
||||||
|
size: `${Math.round(uni.upx2px(30))}px`,
|
||||||
|
color: "#333333",
|
||||||
|
align: "center",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
nativeSelectPopupView.value.drawRect(
|
||||||
|
{ color: "#EEEEEE" },
|
||||||
|
{ left: "0px", top: `${titleH + itemH}px`, width: `${panelW}px`, height: "1px" }
|
||||||
|
);
|
||||||
|
nativeSelectPopupView.value.drawText(
|
||||||
|
"分组选择",
|
||||||
|
{ left: "0px", top: `${titleH + itemH}px`, width: `${panelW}px`, height: `${itemH}px` },
|
||||||
|
{
|
||||||
|
size: `${Math.round(uni.upx2px(30))}px`,
|
||||||
|
color: "#333333",
|
||||||
|
align: "center",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const navigateFromSelectPopup = (url) => {
|
||||||
|
const now = Date.now();
|
||||||
|
if (selectNavigateLocked.value) return;
|
||||||
|
if (now - Number(lastSelectNavigateAt.value || 0) < 800) return;
|
||||||
|
selectNavigateLocked.value = true;
|
||||||
|
lastSelectNavigateAt.value = now;
|
||||||
|
uni.navigateTo({
|
||||||
|
url,
|
||||||
|
complete: () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
selectNavigateLocked.value = false;
|
||||||
|
}, 500);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const lockSelectAction = () => {
|
||||||
|
if (selectActionLocked.value) return false;
|
||||||
|
selectActionLocked.value = true;
|
||||||
|
setTimeout(() => {
|
||||||
|
selectActionLocked.value = false;
|
||||||
|
}, 300);
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
const handleMaskClick = () => {
|
||||||
|
if (!lockSelectAction()) return;
|
||||||
|
closeSelectNativePopup();
|
||||||
|
};
|
||||||
|
const handlePanelClick = (e) => {
|
||||||
|
if (!lockSelectAction()) return;
|
||||||
|
const info = selectPopupInfo.value;
|
||||||
|
let x = 0;
|
||||||
|
let y = 0;
|
||||||
|
if (e.clientX !== undefined && e.clientY !== undefined) {
|
||||||
|
x = e.clientX;
|
||||||
|
y = e.clientY;
|
||||||
|
} else if (e.pageX !== undefined && e.pageY !== undefined) {
|
||||||
|
x = e.pageX;
|
||||||
|
y = e.pageY;
|
||||||
|
} else if (e.touches && e.touches.length > 0) {
|
||||||
|
x = e.touches[0].clientX || e.touches[0].pageX || 0;
|
||||||
|
y = e.touches[0].clientY || e.touches[0].pageY || 0;
|
||||||
|
} else if (e.changedTouches && e.changedTouches.length > 0) {
|
||||||
|
x = e.changedTouches[0].clientX || e.changedTouches[0].pageX || 0;
|
||||||
|
y = e.changedTouches[0].clientY || e.changedTouches[0].pageY || 0;
|
||||||
|
}
|
||||||
|
if (!x || !y) return;
|
||||||
|
const relativeY = y > info.panelH ? y - info.panelTop : y;
|
||||||
|
if (relativeY >= info.titleH && relativeY < info.titleH + info.itemH) {
|
||||||
|
closeSelectNativePopup();
|
||||||
|
navigateFromSelectPopup("/pages_app/selectPatient/selectPatient?from=patientVideo");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (relativeY >= info.titleH + info.itemH && relativeY < info.titleH + info.itemH * 2) {
|
||||||
|
closeSelectNativePopup();
|
||||||
|
navigateFromSelectPopup("/pages_chat/patientGroup/patientGroup?from=patientVideo");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeSelectMaskView.value.addEventListener("touchend", handleMaskClick, false);
|
||||||
|
nativeSelectPopupView.value.addEventListener("touchend", handlePanelClick, false);
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
function showSelectNativePopup() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
if (selectPopupShowing.value) return;
|
||||||
|
if (!nativeSelectMaskView.value || !nativeSelectPopupView.value) {
|
||||||
|
createSelectNativePopup();
|
||||||
|
}
|
||||||
|
nativeSelectMaskView.value && nativeSelectMaskView.value.show();
|
||||||
|
nativeSelectPopupView.value && nativeSelectPopupView.value.show();
|
||||||
|
selectPopupShowing.value = true;
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
function closeSelectNativePopup() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
if (!selectPopupShowing.value) return;
|
||||||
|
nativeSelectMaskView.value && nativeSelectMaskView.value.hide();
|
||||||
|
nativeSelectPopupView.value && nativeSelectPopupView.value.hide();
|
||||||
|
selectPopupShowing.value = false;
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
|
||||||
// 分享到微信
|
// 分享到微信
|
||||||
const shareToWechat = () => {
|
const shareToWechat = () => {
|
||||||
|
addpoint();
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// 使用系统分享
|
// 使用系统分享
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
@ -926,7 +1264,9 @@ const shareToWechat = () => {
|
|||||||
href: safeUrl.value,
|
href: safeUrl.value,
|
||||||
imageUrl: res2.tempFilePath,
|
imageUrl: res2.tempFilePath,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
|
console.log('分享微信成功')
|
||||||
console.log("success:" + JSON.stringify(res));
|
console.log("success:" + JSON.stringify(res));
|
||||||
|
|
||||||
},
|
},
|
||||||
fail: function (err) {
|
fail: function (err) {
|
||||||
console.log("fail:" + JSON.stringify(err));
|
console.log("fail:" + JSON.stringify(err));
|
||||||
@ -991,25 +1331,40 @@ const shareToWechat = () => {
|
|||||||
onHide(() => {
|
onHide(() => {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
closeNativePopup();
|
closeNativePopup();
|
||||||
|
closeSelectNativePopup();
|
||||||
// #endif
|
// #endif
|
||||||
});
|
});
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
try {
|
try {
|
||||||
|
appPlusWebview.value &&
|
||||||
|
appPlusWebview.value.close &&
|
||||||
|
appPlusWebview.value.close();
|
||||||
nativeMaskView.value &&
|
nativeMaskView.value &&
|
||||||
nativeMaskView.value.close &&
|
nativeMaskView.value.close &&
|
||||||
nativeMaskView.value.close();
|
nativeMaskView.value.close();
|
||||||
nativePopupView.value &&
|
nativePopupView.value &&
|
||||||
nativePopupView.value.close &&
|
nativePopupView.value.close &&
|
||||||
nativePopupView.value.close();
|
nativePopupView.value.close();
|
||||||
|
nativeSelectMaskView.value &&
|
||||||
|
nativeSelectMaskView.value.close &&
|
||||||
|
nativeSelectMaskView.value.close();
|
||||||
|
nativeSelectPopupView.value &&
|
||||||
|
nativeSelectPopupView.value.close &&
|
||||||
|
nativeSelectPopupView.value.close();
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
nativeMaskView.value = null;
|
nativeMaskView.value = null;
|
||||||
nativePopupView.value = null;
|
nativePopupView.value = null;
|
||||||
|
nativeSelectMaskView.value = null;
|
||||||
|
nativeSelectPopupView.value = null;
|
||||||
|
appPlusWebview.value = null;
|
||||||
popupShowing.value = false;
|
popupShowing.value = false;
|
||||||
|
selectPopupShowing.value = false;
|
||||||
// #endif
|
// #endif
|
||||||
});
|
});
|
||||||
// 分享到朋友圈
|
// 分享到朋友圈
|
||||||
const shareToMoments = () => {
|
const shareToMoments = () => {
|
||||||
|
addpoint();
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: shareImg.value,
|
url: shareImg.value,
|
||||||
@ -1028,6 +1383,7 @@ const shareToMoments = () => {
|
|||||||
imageUrl: res2.tempFilePath,
|
imageUrl: res2.tempFilePath,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log("success:" + JSON.stringify(res));
|
console.log("success:" + JSON.stringify(res));
|
||||||
|
//addpoint();
|
||||||
},
|
},
|
||||||
fail: function (err) {
|
fail: function (err) {
|
||||||
console.log("fail:" + JSON.stringify(err));
|
console.log("fail:" + JSON.stringify(err));
|
||||||
@ -1254,6 +1610,12 @@ const shareToWeibo = () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
.back-hit {
|
||||||
|
height: 44px;
|
||||||
|
padding: 0 12px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
|||||||
@ -126,7 +126,7 @@
|
|||||||
<view class="bottom-bar" @click="openModal">
|
<view class="bottom-bar" @click="openModal">
|
||||||
<view class="btn-primary" >群发消息</view>
|
<view class="btn-primary" >群发消息</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 弹窗与遮罩 -->
|
<!-- 选择弹窗 -->
|
||||||
<view v-if="showModal" class="mask" @click="closeModal"></view>
|
<view v-if="showModal" class="mask" @click="closeModal"></view>
|
||||||
<view v-if="showModal" class="center-modal">
|
<view v-if="showModal" class="center-modal">
|
||||||
<view class="modal-title">温馨提示</view>
|
<view class="modal-title">温馨提示</view>
|
||||||
|
|||||||
@ -171,13 +171,16 @@ const selectedPatientCount = computed(() => {
|
|||||||
|
|
||||||
// 合计数量:只计算去重后的患者数量
|
// 合计数量:只计算去重后的患者数量
|
||||||
const totalSelectedCount = computed(() => selectedPatientCount.value);
|
const totalSelectedCount = computed(() => selectedPatientCount.value);
|
||||||
|
const from = ref('');
|
||||||
onLoad(() => {
|
onLoad((options) => {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
mask: true
|
mask: true
|
||||||
});
|
});
|
||||||
fetchGroupList();
|
fetchGroupList();
|
||||||
|
if(options.from){
|
||||||
|
from.value = options.from;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchGroupList = async () => {
|
const fetchGroupList = async () => {
|
||||||
@ -311,6 +314,10 @@ const confirmGroup = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if(from.value){
|
||||||
|
uni.$emit('selectedChatPatientsSingle', { patients: dedupPatients });
|
||||||
|
uni.navigateBack();
|
||||||
|
}else{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages_chat/groupSend/groupSend',
|
url: '/pages_chat/groupSend/groupSend',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
@ -322,6 +329,8 @@ const confirmGroup = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('跳转失败', e);
|
console.error('跳转失败', e);
|
||||||
uni.showToast({ title: '跳转失败,请重试', icon: 'none' });
|
uni.showToast({ title: '跳转失败,请重试', icon: 'none' });
|
||||||
|
|||||||
BIN
static/info_icon_1.png
Normal file
BIN
static/info_icon_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
@ -184,6 +184,8 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
|
|||||||
|
|
||||||
}else if(res.data.code==106){
|
}else if(res.data.code==106){
|
||||||
e(res.data)
|
e(res.data)
|
||||||
|
}else if(res.data.code==202){
|
||||||
|
e(res.data)
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.data.message,
|
title: res.data.message,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user