4.2提交
This commit is contained in:
parent
5f9a346960
commit
5d31c3658b
@ -2,8 +2,8 @@
|
||||
"name" : "肝胆相照专家版",
|
||||
"appid" : "__UNI__89F511F",
|
||||
"description" : "",
|
||||
"versionName" : "4.2.5",
|
||||
"versionCode" : 425,
|
||||
"versionName" : "4.2.6",
|
||||
"versionCode" : 426,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
/* 5+App特有相关 */
|
||||
|
||||
@ -949,12 +949,12 @@ const selectProvince = (province) => {
|
||||
|
||||
// 播放视频
|
||||
const playVideo = (item) => {
|
||||
uni.sendNativeEvent('noticeBack', {
|
||||
msg: 'go'
|
||||
}, ret => {
|
||||
console.log('ret数据');
|
||||
console.log(ret);
|
||||
})
|
||||
// uni.sendNativeEvent('noticeBack', {
|
||||
// msg: 'go'
|
||||
// }, ret => {
|
||||
// console.log('ret数据');
|
||||
// console.log(ret);
|
||||
// })
|
||||
if(item.status_code==1 || item.status_code==2 || item.status_code==4){
|
||||
let zhiboUrl=OTHER_HOST+'/hcp/setInfo';
|
||||
let userInfo=uni.getStorageSync('userInfo');
|
||||
|
||||
@ -374,6 +374,11 @@ try {
|
||||
// 签到成功后刷新数据
|
||||
getMyBonusPoints();
|
||||
getBonusPointsList();
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "signin"
|
||||
},
|
||||
});
|
||||
// uni.showToast({
|
||||
// title: '签到成功,获得'+res.bonuspoints+'积分',
|
||||
// icon: 'none'
|
||||
|
||||
@ -142,7 +142,7 @@
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "list_page",
|
||||
page_type: "利卡兑换",
|
||||
page_type: "福利卡兑换",
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
@ -924,8 +924,6 @@ function createNativePopup() {
|
||||
nativeMaskView.value.addEventListener('touchstart', handleMaskClick, false);
|
||||
|
||||
nativePopupView.value.addEventListener('click', handlePanelClick, false);
|
||||
nativePopupView.value.addEventListener('touchstart', handlePanelClick, false);
|
||||
nativePopupView.value.addEventListener('touchend', handlePanelClick, false);
|
||||
// #endif
|
||||
}
|
||||
|
||||
|
||||
@ -76,15 +76,18 @@ const addCommentV2=async()=>{
|
||||
comment:replyText.value+'||'+name.value+':'+comment_partent.value
|
||||
})
|
||||
if(res.code==200){
|
||||
uni.$emit('replySuccess',true);
|
||||
console.log('replySuccess')
|
||||
uni.showToast({ title: '回复成功', icon: 'none' })
|
||||
replyText.value = '';
|
||||
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
// 清理工作
|
||||
console.log('回复页面已卸载')
|
||||
//console.log('回复页面已卸载')
|
||||
})
|
||||
|
||||
// 方法
|
||||
|
||||
@ -699,6 +699,8 @@ const switchTab = (tabIndex) => {
|
||||
// 播放视频
|
||||
const playVideo = (video) => {
|
||||
const videoId = video.id || video.uuid;
|
||||
console.log(222);
|
||||
console.log(video.tags);
|
||||
|
||||
navTo({
|
||||
url: `/pages_app/videoDetail/videoDetail?id=${videoId}&tags=${video.tags}`,
|
||||
|
||||
@ -38,6 +38,9 @@
|
||||
id="myVideo"
|
||||
object-fit="contain"
|
||||
:autoplay="false"
|
||||
@play="onVideoPlay"
|
||||
@pause="onVideoPause"
|
||||
@ended="onVideoEnded"
|
||||
@error="onVideoError"
|
||||
></video>
|
||||
<!-- <sunny-video
|
||||
@ -252,7 +255,7 @@
|
||||
<script setup>
|
||||
import { ref, nextTick } from "vue";
|
||||
//import uniVideo from "@/components/uniVideo/uniVideo.vue";
|
||||
import { onLoad, onShow,onReady,onUnload } from "@dcloudio/uni-app";
|
||||
import { onLoad, onShow,onReady,onUnload,onHide } from "@dcloudio/uni-app";
|
||||
import unidialog from "@/components/dialog/dialog.vue";
|
||||
import collectImg from "@/static/icon_book_collect_sel.png";
|
||||
import discollectImg from "@/static/icon_book_collect_nor.png";
|
||||
@ -282,6 +285,9 @@ const notEnoughVisible = ref(false);
|
||||
const notEnoughContent = ref("");
|
||||
const welfareNum = ref(0);
|
||||
const isPlaying = ref(false);
|
||||
const playTime = ref(0);
|
||||
const timer = ref(null);
|
||||
const hasPlay = ref(false);
|
||||
// 删除弹窗相关
|
||||
const showDeleteModal = ref(false);
|
||||
const currentDeleteItem = ref(null);
|
||||
@ -314,7 +320,29 @@ const onFullscreenChange = (e) => {
|
||||
};
|
||||
const onVideoPlay = () => {
|
||||
isPlaying.value = true;
|
||||
hasPlay.value = true;
|
||||
timer.value = setInterval(() => {
|
||||
playTime.value++;
|
||||
}, 1000);
|
||||
};
|
||||
const onVideoPause = () => {
|
||||
isPlaying.value = false;
|
||||
if(timer.value) {
|
||||
clearInterval(timer.value);
|
||||
timer.value = null;
|
||||
}
|
||||
|
||||
};
|
||||
const onVideoEnded = () => {
|
||||
isPlaying.value = false;
|
||||
if(timer.value) {
|
||||
clearInterval(timer.value);
|
||||
timer.value = null;
|
||||
}
|
||||
};
|
||||
onHide(() => {
|
||||
|
||||
});
|
||||
// const playVideo = () => {
|
||||
// videoContext.value.play();
|
||||
// };
|
||||
@ -506,22 +534,10 @@ const onVideoError = (e) => {
|
||||
const videoDetail = async (flag = false) => {
|
||||
const res = await api.videoDetail({ video_uuid: video_uuid.value });
|
||||
if (res.code == 200) {
|
||||
if(flag) {
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "detail_page",
|
||||
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
||||
resource_name:videoInfo.value.name,
|
||||
resource_option:tags.value?tags.value:''
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
}
|
||||
|
||||
const userInfo = uni.getStorageSync("userInfo");
|
||||
videoInfo.value = res.video;
|
||||
|
||||
tags.value = res.video.tags;
|
||||
//hasDownload.value = downLoadList.value.includes(video_uuid.value);
|
||||
let vid =res.video.polyv_uuid || extractPolyvVid(res.video.content);
|
||||
console.log(222222);
|
||||
@ -539,6 +555,24 @@ const videoDetail = async (flag = false) => {
|
||||
"/video/hcp_detial?share=1&uuid=" +
|
||||
video_uuid.value +
|
||||
"&expertshare=videoshare&fromtype=doctor";
|
||||
console.log(videoInfo.value.name)
|
||||
if(flag) {
|
||||
try {
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "detail_page",
|
||||
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
||||
resource_name:videoInfo.value.name,
|
||||
resource_option:tags.value?tags.value:''
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
const collection = async () => {
|
||||
@ -646,8 +680,65 @@ const resumeDownloadingTasks = () => {
|
||||
});
|
||||
};
|
||||
onUnload(() => {
|
||||
console.log('onUnload');
|
||||
uni.$off('selectedChatPatientsSingle');
|
||||
uni.$off('replySuccess', handleReplySuccess);
|
||||
if(timer.value) {
|
||||
clearInterval(timer.value);
|
||||
timer.value = null;
|
||||
};
|
||||
if(hasPlay.value) {
|
||||
let id=videoInfo.value.polyv_uuid || extractPolyvVid(videoInfo.value.content);
|
||||
console.log(id);
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "watch_video",
|
||||
page_type:'',
|
||||
resource_name:id,
|
||||
resource_option:tags.value?tags.value:'',
|
||||
event_val:playTime.value,
|
||||
event_unit:'秒',
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
const replySuccessLocked = ref(false);
|
||||
const lastReplySuccessAt = ref(0);
|
||||
const runReplySuccessOnce = (action) => {
|
||||
const now = Date.now();
|
||||
if (replySuccessLocked.value) return false;
|
||||
if (now - Number(lastReplySuccessAt.value || 0) < 1000) return false;
|
||||
replySuccessLocked.value = true;
|
||||
lastReplySuccessAt.value = now;
|
||||
try {
|
||||
action && action();
|
||||
return true;
|
||||
} finally {
|
||||
setTimeout(() => {
|
||||
replySuccessLocked.value = false;
|
||||
}, 300);
|
||||
}
|
||||
};
|
||||
const handleReplySuccess = () => {
|
||||
runReplySuccessOnce(() => {
|
||||
console.log('reply-success');
|
||||
try {
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "comment",
|
||||
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
||||
resource_name:videoInfo.value.name,
|
||||
resource_option:tags.value?tags.value:'',
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
onShow(() => {
|
||||
uni.$on('selectedChatPatientsSingle',(data)=>{
|
||||
console.log(data)
|
||||
@ -656,6 +747,8 @@ onShow(() => {
|
||||
addGroupSendMsg4YunXin()
|
||||
}
|
||||
});
|
||||
uni.$off('replySuccess', handleReplySuccess);
|
||||
uni.$on('replySuccess', handleReplySuccess);
|
||||
hasDownload.value = false;
|
||||
downLoadStatus.value = 'start';
|
||||
console.log('onShow');
|
||||
@ -1003,6 +1096,7 @@ const from = ref('');
|
||||
const type = ref('');
|
||||
// 使用uni-app的onLoad生命周期
|
||||
onLoad((options) => {
|
||||
console.log(options);
|
||||
if(options.type) {
|
||||
type.value = options.type;
|
||||
}
|
||||
@ -1015,11 +1109,13 @@ onLoad((options) => {
|
||||
},
|
||||
});
|
||||
console.log('enrtyVideoDetail');
|
||||
// uni.sendNativeEvent('enrtyVideoDetail', {
|
||||
// msg: 'enrtyVideoDetail'
|
||||
// }, ret => {
|
||||
// console.log(ret);
|
||||
// })
|
||||
console.log(tags.value);
|
||||
//这个是处理关于滋滋声的问题,不能删掉
|
||||
uni.sendNativeEvent('enrtyVideoDetail', {
|
||||
msg: 'enrtyVideoDetail'
|
||||
}, ret => {
|
||||
console.log(ret);
|
||||
})
|
||||
video_uuid.value = options.id;
|
||||
from.value = options.from;
|
||||
if(from.value != 'download') {
|
||||
|
||||
@ -76,6 +76,7 @@ const shareImg = ref("");
|
||||
const shareTitle = ref("");
|
||||
const type = ref("");
|
||||
const tags = ref("");
|
||||
const reportTitle = ref("");
|
||||
const goBack = () => {
|
||||
uni.navigateBack({
|
||||
fail() {
|
||||
@ -99,6 +100,7 @@ onHide(() => {
|
||||
// plus.screen.lockOrientation('landscape-primary');
|
||||
});
|
||||
onLoad((query) => {
|
||||
console.log(query);
|
||||
if (query.title) {
|
||||
title.value = query.title;
|
||||
}
|
||||
@ -130,19 +132,33 @@ onLoad((query) => {
|
||||
shareImg.value = query.imgPath?decodeURIComponent(query.imgPath):'https://doc.igandan.com/app/html/img/2016/20160714132557.png';
|
||||
if (query.type == "live_yugao") {
|
||||
shareTitle.value = query.sharetitle;
|
||||
reportTitle.value = shareTitle.value;
|
||||
summary.value = "分享一篇来自“肝胆相照”的会议预告:" + shareTitle.value;
|
||||
console.log(reportTitle.value);
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "detail_page",
|
||||
page_type: "会议直播",
|
||||
resource_name:reportTitle.value,
|
||||
resource_option:tags.value,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
} else if (query.type == "live_old") {
|
||||
shareTitle.value = query.sharetitle;
|
||||
summary.value = "分享一篇来自“肝胆相照”的历史会议:" + shareTitle.value;
|
||||
} else if (query.type == "live") {
|
||||
shareTitle.value = "肝胆相照直播:" + query.sharetitle;
|
||||
reportTitle.value = query.sharetitle;
|
||||
summary.value = shareTitle.value;
|
||||
|
||||
console.log(reportTitle.value);
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "detail_page",
|
||||
page_type: "会议直播",
|
||||
resource_name:shareTitle.value,
|
||||
resource_name:reportTitle.value,
|
||||
resource_option:tags.value,
|
||||
},
|
||||
},
|
||||
@ -251,6 +267,15 @@ const closeShare = () => {
|
||||
const nativeMaskView = ref(null);
|
||||
const nativePopupView = ref(null);
|
||||
const popupShowing = ref(false);
|
||||
/** 原生分享面板:防止同一次手势内重复触发(兜底) */
|
||||
let nativePanelLastActionAt = 0;
|
||||
const NATIVE_PANEL_ACTION_GAP_MS = 400;
|
||||
function tryCommitNativePanelAction(fn) {
|
||||
const t = Date.now();
|
||||
if (t - nativePanelLastActionAt < NATIVE_PANEL_ACTION_GAP_MS) return;
|
||||
nativePanelLastActionAt = t;
|
||||
fn();
|
||||
}
|
||||
// 保存弹窗尺寸信息,供事件处理使用
|
||||
const popupInfo = ref({
|
||||
screenW: 0,
|
||||
@ -597,7 +622,7 @@ function createNativePopup() {
|
||||
);
|
||||
if (relativeY >= cancelTop) {
|
||||
console.log("点击了取消按钮");
|
||||
closeNativePopup();
|
||||
tryCommitNativePanelAction(() => closeNativePopup());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -631,12 +656,16 @@ function createNativePopup() {
|
||||
|
||||
if (idx === 0) {
|
||||
console.log("执行微信分享");
|
||||
tryCommitNativePanelAction(() => {
|
||||
shareToWechat();
|
||||
closeNativePopup();
|
||||
});
|
||||
} else if (idx === 1) {
|
||||
console.log("执行朋友圈分享");
|
||||
tryCommitNativePanelAction(() => {
|
||||
shareToMoments();
|
||||
closeNativePopup();
|
||||
});
|
||||
} else if (idx === 2) {
|
||||
console.log("执行微博分享");
|
||||
// shareToWeibo();
|
||||
@ -654,19 +683,17 @@ function createNativePopup() {
|
||||
}
|
||||
};
|
||||
|
||||
// 同时监听 click 和 touchstart 事件
|
||||
// 仅监听 click:若同时绑定 touchstart/touchend,一次点击会触发多次,导致分享重复执行
|
||||
nativeMaskView.value.addEventListener("click", 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);
|
||||
// #endif
|
||||
}
|
||||
|
||||
function showNativePopup() {
|
||||
// #ifdef APP-PLUS
|
||||
if (popupShowing.value) return;
|
||||
nativePanelLastActionAt = 0;
|
||||
if (!nativeMaskView.value || !nativePopupView.value) {
|
||||
createNativePopup();
|
||||
}
|
||||
@ -688,12 +715,12 @@ function closeNativePopup() {
|
||||
// 分享到微信
|
||||
const shareToWechat = () => {
|
||||
// #ifdef APP-PLUS
|
||||
if(type.value == "live"){
|
||||
if(type.value == "live" || type.value == "live_yugao"){
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "share",
|
||||
page_type: "会议直播",
|
||||
resource_name:shareTitle.value,
|
||||
resource_name:reportTitle.value,
|
||||
resource_option:tags.value,
|
||||
},
|
||||
});
|
||||
@ -800,12 +827,12 @@ onUnload(() => {
|
||||
// 分享到朋友圈
|
||||
const shareToMoments = () => {
|
||||
// #ifdef APP-PLUS
|
||||
if(type.value == "live"){
|
||||
if(type.value == "live" || type.value == "live_yugao"){
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "share",
|
||||
page_type: "会议直播",
|
||||
resource_name:shareTitle.value,
|
||||
resource_name:reportTitle.value,
|
||||
resource_option:tags.value,
|
||||
},
|
||||
});
|
||||
|
||||
@ -512,11 +512,7 @@ onLoad((query) => {
|
||||
|
||||
backgroundColor.value = "linear-gradient(to bottom,'#fff' , '#398775')";
|
||||
}
|
||||
if (type.value == "huanjiao_news") {
|
||||
getNewsDetail(true);
|
||||
} else {
|
||||
getKePuCollection(true);
|
||||
}
|
||||
|
||||
getOutRead();
|
||||
|
||||
const raw =
|
||||
@ -556,6 +552,12 @@ onLoad((query) => {
|
||||
shareTitle.value = query.sharetitle;
|
||||
summary.value = query.summary;
|
||||
}
|
||||
|
||||
if (type.value == "huanjiao_news") {
|
||||
getNewsDetail(true);
|
||||
} else {
|
||||
getKePuCollection(true);
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
// let wv = plus.webview.create("", "custom-webview", {
|
||||
// top: statusBarHeight + navHeight + "px",
|
||||
|
||||
@ -111,6 +111,7 @@ const freeVisible = ref(false)
|
||||
const freeContent = ref('')
|
||||
const goods_order_id = ref('')
|
||||
const points = ref(0)
|
||||
const goodsPoints=ref(0);
|
||||
const freeClose = () => {
|
||||
freeVisible.value = false
|
||||
}
|
||||
@ -124,6 +125,28 @@ const freeConfirm = () => {
|
||||
title: '兑换成功',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
let belong = '';
|
||||
if(goodsName.value.indexOf('U盘') > -1 || goodsName.value.indexOf('u盘') > -1){
|
||||
belong = 'U盘';
|
||||
}else if(goodsName.value.indexOf('京东E卡') > -1){
|
||||
belong = '京东E卡';
|
||||
}else{
|
||||
belong = '书籍';
|
||||
}
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "boint_jifengood",
|
||||
page_type: "积分商城",
|
||||
resource_name:goodsName.value,
|
||||
event_val:goodsPoints.value,
|
||||
event_unit:'积分',
|
||||
number:goodsNum.value,
|
||||
belong:belong,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
setTimeout(() => {
|
||||
navTo({
|
||||
@ -259,28 +282,6 @@ const submit = () => {
|
||||
address: regionText.value+detail.value
|
||||
}).then(res => {
|
||||
if(res.code == 1 || res.code == 200){
|
||||
let belong = '';
|
||||
if(type.value == 1){
|
||||
belong = 'U盘';
|
||||
}else if(goodsName.value.indexOf('京东E卡') > -1){
|
||||
belong = '京东E卡';
|
||||
}else{
|
||||
belong = '书籍';
|
||||
}
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "boint_jifengood",
|
||||
page_type: "积分商城",
|
||||
resource_name:goodsName.value,
|
||||
event_val:goodsPoints.value,
|
||||
event_unit:'积分',
|
||||
number:goodsNum.value,
|
||||
belong:belong,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
points.value = res.data.pionts;
|
||||
freeVisible.value = true
|
||||
goods_order_id.value = res.data.goods_order_id
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user