Compare commits

...
11 Commits
Author SHA1 Message Date
zoujiandong c7dbbfda16 4.7提交 2026-04-07 14:32:00 +08:00
zoujiandong fd78b504a6 4.3提交 2026-04-03 17:32:25 +08:00
zoujiandong a26fc1a4a7 4.2 2026-04-02 14:49:21 +08:00
zoujiandong 5d31c3658b 4.2提交 2026-04-02 11:30:39 +08:00
zoujiandong 5f9a346960 3.31画像提交 2026-03-31 13:07:16 +08:00
zoujiandong 7180e176eb 3.30解决bug 2026-03-30 16:12:38 +08:00
zoujiandong e3a852cb43 3.30提交 2026-03-30 09:45:55 +08:00
zoujiandong 0a51901807 3.26 2026-03-26 17:34:15 +08:00
zoujiandong 8a879df4b4 3.25提交 2026-03-25 17:33:54 +08:00
zoujiandong 18c7f7386d 3.18提交 2026-03-18 17:19:05 +08:00
zoujiandong b5cc11ddd3 3.17 2026-03-17 18:59:46 +08:00
48 changed files with 1895 additions and 240 deletions
+8
View File
@@ -1,4 +1,5 @@
<script>
import version from '@/utils/version.js'
export default {
globalData: {
plAd: true,
@@ -20,6 +21,13 @@ export default {
options.referrerInfo.extraData.token
);
uni.setStorageSync("userInfo", options.referrerInfo.extraData.userInfo);
if(process.env.UNI_PLATFORM =="mp-weixin"){
uni.setStorageSync("app_version",version);
}else{
let app_version=options.referrerInfo.extraData.app_version?options.referrerInfo.extraData.app_version:version;
uni.setStorageSync("app_version",app_version);
};
//getApp({allowDefault: true}).globalData.apiHost = options.referrerInfo.extraData.apiHost;
}
if (
+2 -2
View File
@@ -2,8 +2,8 @@
"name" : "肝胆相照专家版",
"appid" : "__UNI__89F511F",
"description" : "",
"versionName" : "4.2.5",
"versionCode" : 425,
"versionName" : "4.2.7",
"versionCode" : 427,
"transformPx" : false,
"app-plus" : {
/* 5+App特有相关 */
+20 -8
View File
@@ -305,6 +305,15 @@ onUnload (() => {
from.value=options.from;
}
// #ifdef APP-PLUS
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "会议直播",
},
},
(ret) => {
console.log(ret);
});
permissionListener.value=uni.createRequestPermissionListener();
console.log('放在onLoad执行');
console.log(permissionListener.value);
@@ -379,6 +388,7 @@ const generateMonthList = () => {
console.log("生成的月份列表:", monthList.value);
};
const goDetail = (item) => {
console.log(item);
// uni.sendNativeEvent('noticeBack', {
// msg: 'go'
// }, ret => {
@@ -388,7 +398,7 @@ const goDetail = (item) => {
const encoded = encodeURIComponent(item.path);
let imgPath=encodeURIComponent('https://doc.igandan.com/app/html/img/2016/20160714132557.png');
uni.navigateTo({
url: `/pages_app/webview/webview?url=${encoded}&sharetitle=${item.title}&bg=1&type=live_yugao&imgPath=${imgPath}&share=1&title=会议详情`,
url: `/pages_app/webview/webview?url=${encoded}&sharetitle=${item.title}&bg=1&type=live_yugao&imgPath=${imgPath}&share=1&title=会议详情&tags=${item.tags}`,
});
};
const goBack = () => {
@@ -631,6 +641,7 @@ const meetingListBySearch = async (isRefresh = false) => {
poster: item.liveimg, // 使用 liveimg 作为海报
time: timeStr,
location: item.location || "线上",
tags: item.tags || '',
status: getStatusText(item.status),
// 保留原始数据用于其他功能
originalData: item,
@@ -744,6 +755,7 @@ const getMeetingList = async (isRefresh = false) => {
liveurl: item.liveurl,
spareurl: item.spareurl,
path: item.path,
tags: item.tags || '',
status_code: item.status,
};
});
@@ -937,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');
@@ -953,7 +965,7 @@ const playVideo = (item) => {
const encoded = encodeURIComponent(tempUrl);
let imgPath=encodeURIComponent(docUrl+item.liveimg);
uni.navigateTo({
url: `/pages_app/webview/webview?url=${encoded}&sharetitle=${item.title}&bg=1&type=live&imgPath=${imgPath}&share=1&title=会议直播`,
url: `/pages_app/webview/webview?url=${encoded}&sharetitle=${item.title}&bg=1&type=live&imgPath=${imgPath}&share=1&title=会议直播&tags=${item.tags}`,
});
}else{
goDetail(item);
+13 -4
View File
@@ -122,7 +122,7 @@
<script setup>
import { ref } from 'vue';
import { onShow } from "@dcloudio/uni-app";
import {onShow,onLoad,onBackPress } from "@dcloudio/uni-app";
import CustomTabbar from '@/components/tabBar/tabBar.vue';
import upImg from "@/static/cb_up.png"
import downImg from "@/static/cb_up.png"
@@ -131,7 +131,6 @@
import api from "@/api/api.js"
import docUrl from '@/utils/docUrl.js';
import navTo from '@/utils/navTo.js';
import {onBackPress} from '@dcloudio/uni-app';
import navBar from "@/components/navBar/navBar.vue"
import formatNumber from '@/utils/formatNumber.js';
const type=ref(1)
@@ -139,7 +138,17 @@
plus.runtime.quit();
return true;
});
onLoad(() => {
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "患教文库",
},
},
(ret) => {
console.log(ret);
});
})
// 分页相关状态
const currentPage = ref(1);
const pageSize = ref(10);
@@ -288,7 +297,7 @@
// 跳转到详情页
if (article.path) {
uni.navigateTo({
url: `/pages_app/webview/webviewClass?url=${encodeURIComponent(docUrl+article.path+'?fromtype=doctor')}&title=患教详情&uuid=${article.uuid}&sharetitle=${article.title}&summary=${article.summary}&type=huanjiao&imgPath=${encodeURIComponent(article.image)}`
url: `/pages_app/webview/webviewClass?url=${encodeURIComponent(docUrl+article.path+'?fromtype=doctor')}&title=患教详情&uuid=${article.uuid}&sharetitle=${article.title}&summary=${article.summary}&type=huanjiao&imgPath=${encodeURIComponent(article.image)}&tags=${article.tags}`
});
}
};
+17 -1
View File
@@ -104,6 +104,7 @@ import unidialog from '@/components/dialog/dialog.vue';
const freeVisible = ref(false)
const freeContent = ref('')
const goods_order_id = ref('')
const goodsName = ref('');
import navTo from '@/utils/navTo';
const freeClose = () => {
freeVisible.value = false
@@ -210,7 +211,8 @@ onLoad((opts) => {
console.log(22);
console.log(opts);
goodsUuid.value = opts.goodsUuid
goodsNum.value = opts.goodsNum
goodsNum.value = opts.goodsNum;
goodsName.value = opts.goodsName;
getAddress()
})
@@ -240,6 +242,20 @@ const submit = () => {
if (!/^1\d{10}$/.test(mobile.value)) return uni.showToast({ title: '请输入正确手机号', icon: 'none' })
if (!regionText.value) return uni.showToast({ title: '请选择地址', icon: 'none' })
if (!detail.value) return uni.showToast({ title: '请输入详细地址', icon: 'none' })
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "boint_jifengood",
page_type: "积分商城",
resource_name:goodsName.value,
event_val:0,
event_unit:'积分',
number:goodsNum.value,
belong:'U盘',
},
},
(ret) => {
console.log(ret);
});
saveAddress();
api.createGoodsOrder({
goodsUuid: goodsUuid.value,
+1 -1
View File
@@ -105,7 +105,7 @@
// TODO: 调用兑换接口
navTo({
url:'/pages_app/buyUpan/address?goodsUuid='+goodsUuid.value+'&goodsNum='+quantity.value
url:'/pages_app/buyUpan/address?goodsUuid='+goodsUuid.value+'&goodsNum='+quantity.value+'&goodsName='+goodsInfo.value.name
})
};
+26
View File
@@ -384,6 +384,20 @@ const downLoad = (item) => {
});
return;
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "magazine_donwload",
page_type: "诊疗指南",
resource_name:item.title,
belong:title.value,
number:1,
resource_option:item.tags
},
},
(ret) => {
console.log(ret);
});
addDownloadTask({
url: docUrl + item.path,
title: item.title,
@@ -406,6 +420,18 @@ const viewGuideline = (cell) => {
console.log(downloadTasks.value);
downloadTasks.value.forEach(item => {
if(item.id == cell.uuid) {
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "detail_page",
page_type: "诊疗指南",
resource_name:cell.title,
resource_option:cell.tags
},
},
(ret) => {
console.log(ret);
});
// if(isAndroid){
plus.runtime.openFile(item.localPath, function(e) {
console.log('打开成功');
+13 -2
View File
@@ -24,7 +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>
@@ -82,6 +82,12 @@ onLoad((options) => {
if (options.returnTo) {
returnTo.value = decodeURIComponent(options.returnTo);
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "常用银行卡",
},
});
});
onShow(() => {
getBankCardList();
@@ -140,7 +146,9 @@ const bankLogoMap = {
};
const getBankLogoImg = (bankName) => {
return bankLogoMap[bankName] || '';
let name1=bankName.split(',')[0];
let name2=bankName.split(',')[1];
return bankLogoMap[name1] || bankLogoMap[name2];
};
const handleDeleteBankCard = (card) => {
@@ -232,6 +240,9 @@ const getBankLogo = (bankName) => {
:deep(.uni-nav-bar-right-text) {
font-size: 32rpx;
}
:deep(.uni-swipe){
margin-bottom: 20rpx!important;
}
}
/* 银行卡列表样式 */
+23 -1
View File
@@ -178,6 +178,14 @@
if(res.code==200){
msgList.value.forEach(item => {
if(item.id==id){
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "read_message",
},
},
(ret) => {
console.log(ret);
});
item.is_read=1;
}
});
@@ -192,7 +200,17 @@
if (res.confirm) {
api.appMesageRead().then(res => {
console.log(res);
getUnReadList();
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "clear_message",
},
},
(ret) => {
console.log(ret);
});
});
}
@@ -226,8 +244,12 @@
navTo({
url: url
})
}else if(msg.extra.type==18){
let url=`/pages_app/myFlower/myFlower?from=msg`
navTo({
url: url
})
}
}else{
let url="";
if(msg.extra.module==1 && msg.extra.type==36){
+1 -1
View File
@@ -26,7 +26,7 @@
<text class="value amount" :class="amountClass">{{ detail.accountStr || '-' }}元</text>
</view>
<view class="detail-row">
<text class="label">患者:</text>
<text class="label">用户:</text>
<text class="value">{{ detail.userName || '-' }}</text>
</view>
<view class="detail-row">
+4 -4
View File
@@ -292,7 +292,7 @@ onMounted(() => {
&.user {
flex: 1;
text-align: center;
color: #ff0000;
color: #8B2316;
}
&.date-amount {
@@ -304,7 +304,7 @@ onMounted(() => {
.date {
font-size: 24rpx;
color: #666;
color: #999;
margin-bottom: 4rpx;
}
@@ -312,11 +312,11 @@ onMounted(() => {
font-size: 24rpx;
&.positive {
color: #ff0000;
color: #000;
}
&.negative {
color: #666;
color: #000;
}
}
}
+6
View File
@@ -81,6 +81,12 @@ onLoad((options) => {
if(options.from){
from.value = options.from;
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "我的账户",
},
});
});
onBackPress(() => {
if(!from.value){
+6
View File
@@ -178,6 +178,12 @@ const goBack = () => {
};
onLoad((options) => {
from.value = options.from;
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "我的二维码",
},
});
})
// 页面显示时拉取用户信息,并尽量把图片转成 base64,避免 html2canvas 跨域污染
+23 -8
View File
@@ -66,21 +66,21 @@
<view class="courseware-item" v-for="(item, index) in coursewareList" :key="index" @click="onItemClick(item)">
<view class="item-content">
<view class="courseware-provider" v-if="activeTab === 'share'">
<text class="label">下载医生:</text>
<text class="value">{{ item.providername }}</text>
<text class="label">下载医生</text>
<text class="value">:{{ item.providername }}</text>
</view>
<view class="courseware-name">
<text class="label">课件名称:</text>
<text class="value">{{ item.name }}</text>
<text class="label">课件名称</text>
<text class="value">:{{ item.name }}</text>
</view>
<view class="courseware-time">
<text class="label">时间:</text>
<text class="value">{{ item.time }}</text>
<text class="label">时间</text>
<text class="value">:{{ item.time }}</text>
</view>
<view class="courseware-status" v-if="activeTab === 'download'">
<text class="label">状态:</text>
<text class="value status-paid">{{item.status}}</text>
<text class="label">状态</text>
<text class="value status-paid">:{{item.status}}</text>
</view>
</view>
</view>
@@ -128,6 +128,12 @@ onLoad((options) => {
if(options.from){
from.value = options.from;
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "我的课件",
},
});
});
onMounted(() => {
onRefresh();
@@ -400,6 +406,15 @@ const onLoadMore = () => {
width: 120rpx;
color: #8B2316;
font-size: 28rpx;
display: inline-block;
text-align: justify;
text-align-last: justify;
text-justify: inter-ideograph;
}
.label::after {
content: '';
display: inline-block;
width: 100%;
}
.value {
+6
View File
@@ -91,6 +91,12 @@ onLoad((options) => {
let userInfo= uni.getStorageSync('userInfo')
user_uuid.value = userInfo.uuid;
loadFirstTwoPages();
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "我的鲜花",
},
});
});
onBackPress(() => {
if(!from.value){
+4 -4
View File
@@ -23,8 +23,8 @@
<view class="request-text">{{ item.content }}</view>
<view class="action-buttons">
<button class="reject-btn" @click="applyListOperate(item.uuid,3)">拒绝</button>
<button class="agree-btn" @click="applyListOperate(item.uuid,2,item.content)">同意</button>
<button class="reject-btn" @click="applyListOperate(item.uuid,3,item.content,item.patientUuid)">拒绝</button>
<button class="agree-btn" @click="applyListOperate(item.uuid,2,item.content,item.patientUuid)">同意</button>
</view>
</view>
</view>
@@ -172,7 +172,7 @@ const getApplyList = async () => { // 申请列表
});
}
};
const applyListOperate = async (uuid,status,content) => {
const applyListOperate = async (uuid,status,content,patientUuid) => {
let data = {
uuid: uuid,
status: status
@@ -190,7 +190,7 @@ const getApplyList = async () => { // 申请列表
getRelationRecordLately();
if(status == 2){
navTo({
url: `/pages_app/patientRemark/patientRemark?uuid=${uuid}&&nickname=${nickname}`
url: `/pages_app/patientRemark/patientRemark?uuid=${patientUuid}&&nickname=${nickname}`
})
}
}
+13 -1
View File
@@ -208,6 +208,12 @@ onLoad((options) => {
if(options.from){
from.value = options.from;
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "我的积分",
},
});
});
import navTo from "@/utils/navTo.js";
import nosigninImg from "@/static/sign_day_false.png"
@@ -234,7 +240,8 @@ const showSign = ref(false)
const signInfo=reactive({
news:{
summary:'',
title:''
title:'',
tags:''
}
})
// 分页相关数据 - 收益
@@ -368,6 +375,11 @@ try {
// 签到成功后刷新数据
getMyBonusPoints();
getBonusPointsList();
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "signin"
},
});
// uni.showToast({
// title: '签到成功,获得'+res.bonuspoints+'积分',
// icon: 'none'
+6
View File
@@ -250,6 +250,12 @@
if(options.from){
from.value = options.from;
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "我的福利",
},
});
getWelfarePage();
});
onHide(() => {
@@ -139,6 +139,12 @@
});
onLoad((options) => {
from.value = options.from;
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "福利卡兑换",
},
});
})
const goWelfare = () => {
uni.setStorageSync('lookWelfare', 'useWelfare');
+20 -1
View File
@@ -108,9 +108,12 @@
<view class="item-title">{{ news.title }}</view>
<view class="item-meta">
<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>
<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>
<text>{{ news.agreenum || 0 }}</text>
</view>
@@ -150,6 +153,15 @@
if(options.from){
from.value = options.from;
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "肝胆新闻",
},
},
(ret) => {
console.log(ret);
});
});
onBackPress(() => {
if(!from.value){
@@ -736,6 +748,8 @@
color: #999;
.item-date {
width:125rpx;
white-space: nowrap;
flex-shrink: 0;
}
@@ -743,10 +757,15 @@
display: flex;
align-items: center;
text {
margin-left: 8rpx;
}
}
.middel {
width:95rpx;
text-align: left;
}
}
}
}
+10 -6
View File
@@ -16,7 +16,7 @@
<view class="contentbox">
<view class="form-block">
<view class="label">备注</view>
<input class="input" v-model.trim="remark" :placeholder="groupInfo.nickname || '给患者添加备注名'" placeholder-class="ph" maxlength="20"/>
<input class="input" v-model.trim="remark" :placeholder="groupInfo.nickname || '给患者添加备注名'" placeholder-class="ph" maxlength="20" />
</view>
<view class="row" v-if="nickname">
<view class="left">申请消息为:我是{{ nickname }}</view>
@@ -25,10 +25,10 @@
</view>
</view>
<view class="form-block" @click="goGroup">
<view class="label">分组</view>
<view class="label" @click.stop="goGroup">分组</view>
<view class="iptbox readonly">
<input class="input readonly-input" v-model.trim="groupName" :placeholder="groupInfo.name || '通过分组给患者分类'" placeholder-class="ph" maxlength="20" readonly disabled/>
<uni-icons type="right" size="20" color="#666"></uni-icons>
<view class="input readonly-input" :class="{'ph':!groupInfo.name}" @click.stop="goGroup">{{groupInfo.name || '通过分组给患者分类'}}</view>
<uni-icons type="right" size="20" color="#666" @click.stop="goGroup"></uni-icons>
</view>
</view>
<view class="form-block">
@@ -60,6 +60,7 @@
const noteLength = computed(() => (note.value || '').length)
const isRemarkEmpty = computed(() => !(remark.value || '').trim())
const nickname = ref('')
const tempName=ref('')
const goBack = () => {
uni.navigateBack()
@@ -88,7 +89,7 @@
patientCardData.value = res
groupInfo.value = res.group || {}
// 初始化表单数据
remark.value = res.group?.nickname || ''
remark.value = res.group?.nickname || remark.value
note.value = res.group?.note || ''
groupName.value = res.group?.name || ''
}
@@ -179,7 +180,10 @@
color: #333;
&.readonly-input {
background: transparent;
color: #999;
color: #333;
}
&.ph{
color: #808080;
}
}
.textarea{
+1 -1
View File
@@ -399,7 +399,7 @@
const videoId = video.id || video.uuid;
navTo({
url: `/pages_app/videoDetail/videoDetail?id=${videoId}`
url: `/pages_app/videoDetail/videoDetail?id=${videoId}&type=patientVideo`
});
};
+9
View File
@@ -225,6 +225,15 @@
checkUser();
loadData(false);
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "肝胆课件",
},
},
(ret) => {
console.log(ret);
});
})
const goSearch = () => {
uni.sendNativeEvent(
+81 -5
View File
@@ -153,6 +153,7 @@ import isAndroid from "@/utils/platform.js";
const isFirstDownload = ref(false);
const path=ref('');
const from=ref('');
const tags = ref('');
const pptVisible = ref(false);
const nativeDownloadMaskView = ref(null);
const nativeDownloadPopupView = ref(null);
@@ -640,7 +641,7 @@ onShow(() => {
console.log('canDownload');
console.log(canDownload.value);
if(!canDownload.value){
ganDanFileDetials();
ganDanFileDetials(true);
}else{
if(!hasDownload.value){
downloadGanDanFile('auto');
@@ -923,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
}
@@ -990,6 +989,17 @@ const collection = () => {
uni.showToast({
title: "收藏成功",
icon: "none",
});
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "collect",
page_type: "肝胆课件",
resource_name:shareTitle.value,
resource_option: tags.value,
},
},
(ret) => {
console.log(ret);
});
ganDanFileDetials();
}
@@ -1154,19 +1164,45 @@ const downLoadByType=()=>{
const downloadGanDanFile = (type) => {
showPptDownloadTip();
let order_id='';
let event_val=0;
let event_unit='分';
if(type=='free'){
order_id='FREE';
event_val=0;
} else if(type=='welfare'){
order_id='USEWELFARENUM';
event_val=0;
}else if(type=='freeRecord'){
order_id='FREERECORD';
event_val=0;
}else if(type=="auto"){
order_id= orderId.value;
event_val=orderInfo.value.price;
}else if(type=="reDownload"){
order_id=orderInfo.value.order.order_id+"&R";
event_val=0;
}
console.log('1218');
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "order_gdfile_download",
page_type: "肝胆课件",
resource_name:shareTitle.value,
resource_option: tags.value,
event_val:event_val,
event_unit:'分',
number:1,
},
},
(ret) => {
console.log(ret);
});
api.downloadGanDanFileV2({
file_uuid: uuid.value,
order_id: order_id,
@@ -1310,11 +1346,13 @@ const base64ToFile=(base64Str, fileName, callback)=>{
const ganDanFileDetials = async () => {
const ganDanFileDetials = async (flag = false) => {
const res = await api.ganDanFileDetials({
file_uuid: uuid.value,
});
if (res.code == 200) {res.data
if (res.code == 200) {
tags.value = res.data.tags?res.data.tags:'';
orderInfo.value = res.data;
// 设置分享文案
shareTitle.value = res.data.name;
@@ -1326,7 +1364,23 @@ const ganDanFileDetials = async () => {
order.value = res.data.order;
let money = res.data.price/ 100;
price.value = money > 1 ? money.toFixed(1) : money.toFixed(2);
if(flag){
try {
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "detail_page",
page_type: "肝胆课件",
resource_name:res.data.name,
resource_option: tags.value,
},
},
(ret) => {
console.log(ret);
});
} catch (error) {
}
}
downloadTasks.value.forEach(item => {
if (item.id == uuid.value) {
uni.getSavedFileInfo({
@@ -1478,6 +1532,17 @@ const resumeDownloadingTasks = () => {
// ===== 分享到微信 =====
const shareToWechat = () => {
// #ifdef APP-PLUS
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "share",
page_type: "肝胆课件",
resource_name:shareTitle.value,
resource_option: tags.value,
},
},
(ret) => {
console.log(ret);
});
uni.downloadFile({
url: 'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
success: function (res) {
@@ -1560,6 +1625,17 @@ const shareToWechat = () => {
// ===== 分享到朋友圈 =====
const shareToMoments = () => {
// #ifdef APP-PLUS
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "share",
page_type: "肝胆课件",
resource_name:shareTitle.value,
resource_option: tags.value,
},
},
(ret) => {
console.log(ret);
});
uni.downloadFile({
url: 'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
success: function (res) {
+4 -1
View File
@@ -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('回复页面已卸载')
})
// 方法
@@ -0,0 +1,352 @@
<template>
<view class="select-page">
<view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left"
title="选择患者"
@clickLeft="goBack"
color="#8B2316"
:border="false"
backgroundColor="#eee"
>
<template #right>
<view class="confirm-btn" :class="{ active: selectedIds.length > 0 }" @click="confirmSelect">
<text class="confirm-text">确定({{ selectedIds.length }})</text>
</view>
</template>
</uni-nav-bar>
</view>
<!-- 搜索框 -->
<view class="search-bar">
<view class="input-wrap">
<input class="search-input" v-model.trim="keyword" placeholder="搜索患者的备注名、昵称或手机号" placeholder-class="ph" @input="$u.debounce(onSearch, 500)" />
</view>
<view class="search-btn" @click="onSearch">
<uni-icons type="search" size="50rpx" color="#999" />
</view>
</view>
<!-- 列表 -->
<scroll-view class="list" scroll-y @scrolltolower="onScrollToLower" :lower-threshold="100">
<view class="item" @click="toggle(p.uuid)" v-for="p in availablePatientList" :key="p.uuid">
<image class="avatar" :src="getAvatarSrc(p)" mode="aspectFill" @error="handleAvatarError(p)" />
<view class="name">{{ p.realName || p.nickname}}</view>
<view class="check" >
<view class="circle" :class="{ active: selectedIds.includes(p.uuid) }"></view>
</view>
</view>
</scroll-view>
<view class="bottom-actions">
<view class="select-all-btn" @click="toggleSelectAll">
{{ isAllSelected ? '全不选' : '全选' }}
</view>
</view>
</view>
</template>
<script setup>
import { ref, computed,nextTick} from 'vue'
import docUrl from '@/utils/docUrl.js'
import { onShow,onLoad} from "@dcloudio/uni-app";
import api from '@/api/api.js'
import navTo from '@/utils/navTo.js'
import defaultImg from "@/static/default.png"
const from = ref('');
const keyword = ref('')
const selectedIds = ref([])
const patientList = ref([])
const selectedDetail = ref([])
const availablePatientList = ref([])
const patientListPage = ref(1)
const patientListPageSize = ref(200)
const patientListHasMore = ref(true)
const patientListLoading = ref(false)
const patientListLoadingMore = ref(false)
const isAllSelected = computed(() => {
const total = patientList.value.length
return total > 0 && selectedIds.value.length === total
})
// 计算属性:显示所有患者,但标记已选中的状态
// const availablePatientList = computed(() => {
// return patientList.value
// })
const isApiSuccess = (res) => Number(res?.code) === 1 || Number(res?.code) === 200
const parsePagedPatients = (res) => {
const data = res?.data
if (Array.isArray(data)) {
return { list: data, total: undefined, pageNum: undefined, pages: undefined, isLastPage: undefined }
}
const list =
(Array.isArray(data?.list) && data.list) ||
(Array.isArray(data?.records) && data.records) ||
(Array.isArray(data?.rows) && data.rows) ||
(Array.isArray(data?.data) && data.data) ||
[]
const total = Number(data?.total ?? data?.count ?? data?.totalCount ?? undefined)
const pageNum = Number(data?.pageNum ?? data?.page ?? data?.current ?? undefined)
const pages = Number(data?.pages ?? data?.pageCount ?? undefined)
const isLastPage = typeof data?.isLastPage === 'boolean' ? data.isLastPage : undefined
return {
list,
total: Number.isFinite(total) ? total : undefined,
pageNum: Number.isFinite(pageNum) ? pageNum : undefined,
pages: Number.isFinite(pages) ? pages : undefined,
isLastPage
}
}
const mergePatientListUnique = (base = [], incoming = []) => {
if (!incoming.length) return base
const seen = new Set()
const merged = []
const pushUnique = (item) => {
const key = String(item?.uuid || item?.id || item?.mobile || '')
if (!key) {
merged.push(item)
return
}
if (seen.has(key)) return
seen.add(key)
merged.push(item)
}
base.forEach(pushUnique)
incoming.forEach(pushUnique)
return merged
}
const applyPatientList = (list = []) => {
patientList.value = list
onSearch()
}
const patientListByGBKPage = async ({ reset = false, showLoading = false } = {}) => {
if (patientListLoading.value || patientListLoadingMore.value) return
if (!reset && !patientListHasMore.value) return
if (reset) {
patientListLoading.value = true
patientListPage.value = 1
patientListHasMore.value = true
} else {
patientListLoadingMore.value = true
}
if (showLoading) {
uni.showLoading({ title: '加载中...', mask: true })
}
try {
const requestPage = patientListPage.value
const res = await api.patientListByGBKPage({
page: requestPage,
//pageNum: requestPage,
//current: requestPage,
pageSize: patientListPageSize.value,
//size: patientListPageSize.value
})
if (!isApiSuccess(res)) return
const { list, total, pageNum, pages, isLastPage } = parsePagedPatients(res)
const merged = reset ? list : mergePatientListUnique(patientList.value, list)
applyPatientList(merged)
if (typeof isLastPage === 'boolean') {
patientListHasMore.value = !isLastPage
} else if (typeof pages === 'number' && typeof pageNum === 'number') {
patientListHasMore.value = pageNum < pages
} else if (typeof total === 'number') {
patientListHasMore.value = merged.length < total
} else {
patientListHasMore.value = list.length >= patientListPageSize.value
}
if (patientListHasMore.value) {
patientListPage.value = typeof pageNum === 'number' ? pageNum + 1 : requestPage + 1
}
} finally {
patientListLoading.value = false
patientListLoadingMore.value = false
if (showLoading) {
nextTick(() => {
uni.hideLoading()
})
}
}
}
const onScrollToLower = () => {
void patientListByGBKPage({ reset: false, showLoading: false })
}
onLoad((options) => {
uni.showLoading({
title: '加载中...',
mask: true
})
if(options.from ){
from.value =options.from;
}
// 读取已选中的成员ID
try {
const preSelected = uni.getStorageSync('preSelectedIds')
if (Array.isArray(preSelected)) {
selectedIds.value = [...preSelected]
// 清理缓存
uni.removeStorageSync('preSelectedIds')
}
} catch (e) {}
void patientListByGBKPage({ reset: true, showLoading: true });
})
onShow(() => {
// 根据已选中的ID更新selectedDetail
updateSelectedDetail();
});
// 根据已选中的ID更新selectedDetail
const updateSelectedDetail = () => {
selectedDetail.value = selectedIds.value.map(id => {
const p = patientList.value.find(x => x.uuid === id)
return { uuid: id, realName: p?.realName || '', photo: p?.photo || '',nickName: p?.nickName || '' }
})
}
const toggle = (id) => {
const i = selectedIds.value.indexOf(id)
if (i > -1) {
// 如果已选中,则取消选中
selectedIds.value.splice(i, 1)
const di = selectedDetail.value.findIndex(it => it.uuid === id)
if (di > -1) selectedDetail.value.splice(di, 1)
} else {
// 如果未选中,则选中
selectedIds.value.push(id)
const p = patientList.value.find(x => x.uuid === id)
selectedDetail.value.push({ uuid: id, realName: p?.realName || '', photo: p?.photo || '',nickName: p?.nickName || '' })
}
}
const getAvatarSrc = (patient) => {
if (patient?._avatarLoadError) return defaultImg
return patient?.photo ? (docUrl + patient.photo) : defaultImg
}
const handleAvatarError = (patient) => {
if (!patient) return
patient._avatarLoadError = true
}
const toggleSelectAll = () => {
if (!patientList.value.length) return
if (isAllSelected.value) {
selectedIds.value = []
selectedDetail.value = []
return
}
selectedIds.value = patientList.value.map(item => item.uuid)
selectedDetail.value = patientList.value.map(item => ({
uuid: item.uuid,
realName: item?.realName || '',
photo: item?.photo || '',
nickName: item?.nickName || ''
}))
}
const onSearch = () => {
if(keyword.value.replace(/\s/g, "")){
availablePatientList.value = patientList.value.filter(p => p.realName.indexOf(keyword.value) !== -1 || (p.nickname && p.nickname.indexOf(keyword.value) !== -1) || p.mobile.indexOf(keyword.value) !== -1)
}else{
availablePatientList.value = patientList.value
}
}
const goBack = () => uni.navigateBack()
const confirmSelect = () => {
if(from.value == 'chatMsg' || from.value == 'videoDetail'){
if(selectedIds.value.length >200){
uni.showToast({
title: '选择人数不能超过200',
icon: 'none'
})
return;
}
}
const payload = { ids: selectedIds.value, list: selectedDetail.value }
// 通过事件通道回传
try {
const pages = getCurrentPages()
const curr = pages[pages.length - 1]
const ec = curr?.getOpenerEventChannel?.()
ec?.emit && ec.emit('onPatientsSelected', payload);
console.log(selectedDetail.value)
uni.$emit('selectedChatPatientsSingle', {patients: selectedDetail.value });
} catch (e) {}
// 兜底:使用本地存储
try {
uni.setStorageSync('patientsSelectedPayload', payload) } catch (e) {}
uni.setStorageSync('selectedChatPatientsSingle', {patients: selectedDetail.value })
if(from.value == 'chatMsg'){
navTo({
url: '/pages_chat/groupSend/groupSend?from=chatMsg'
})
}else{
uni.navigateBack()
}
}
</script>
<style lang="scss" scoped>
.select-page{
min-height: 100vh; background:#fefefe;overflow: hidden;
}
.confirm-text{ color:#fff; font-size: 28rpx;white-space: nowrap; }
.confirm-btn{ background:#7f7f7f; padding: 10rpx 18rpx; border-radius: 26rpx; }
.confirm-btn.active{ background:#8B2316; }
.search-bar{
border: 2rpx solid #eee;
margin: 0rpx 30rpx; display:flex;
margin-top: calc(var(--status-bar-height) + 64px);
align-items:center; gap: 16rpx;
.input-wrap{ flex:1; background:#fff; border-radius: 12rpx; padding: 16rpx 20rpx; }
.search-input{ font-size: 28rpx; color:#333; }
.ph{ color:#bfbfbf; }
.search-btn{
display: flex;
align-items: center;
justify-content: center;
width: 88rpx; height: 72rpx; background:#fff;
}
}
.list{
border-radius: 12rpx;
position: fixed;
left: 0;
right: 0;
top: calc(var(--status-bar-height) + 64px + 94rpx);
bottom: 130rpx;
}
.item{background:#fff; display:flex; align-items:center;padding: 24rpx 30rpx; border-bottom: 2rpx solid #eee; }
.avatar{ width: 96rpx; height:96rpx; border-radius: 16rpx; background:#ffe; }
.name{ flex:1; margin-left: 20rpx; font-size: 32rpx; color:#333; }
.check{ padding-left: 12rpx; }
.circle{ width: 40rpx; height: 40rpx; border-radius: 50%; border: 2rpx solid #cfcfcf; }
.circle.active{ background:#8B2316; border-color:#8B2316; position: relative; }
.circle.active::after{ content:''; position:absolute; left: 14rpx; top: 6rpx; width: 10rpx; height: 18rpx; border: 4rpx solid #fff; border-top: 0; border-left: 0; transform: rotate(45deg); }
.bottom-actions{
position: fixed;
left: 0;
right: 0;
bottom: 0;
background: #fff;
border-top: 1rpx solid #f0f0f0;
padding: 20rpx 30rpx 20rpx;
}
.select-all-btn{
height: 88rpx;
border-radius: 12rpx;
color: #8B2316;
background: #fff;
border: 2rpx solid #8B2316;
font-size: 30rpx;
display: flex;
align-items: center;
justify-content: center;
}
</style>
+6 -6
View File
@@ -136,10 +136,10 @@
const requestPage = patientListPage.value
const res = await api.patientListByGBKPage({
page: requestPage,
pageNum: requestPage,
current: requestPage,
//pageNum: requestPage,
//current: requestPage,
pageSize: patientListPageSize.value,
size: patientListPageSize.value
//size: patientListPageSize.value
})
if (!isApiSuccess(res)) return
const { list, total, pageNum, pages, isLastPage } = parsePagedPatients(res)
@@ -175,8 +175,8 @@
title: '加载中...',
mask: true
})
if(options.from == 'chatMsg'){
from.value = 'chatMsg';
if(options.from ){
from.value =options.from;
}
// 读取已选中的成员ID
try {
@@ -257,7 +257,7 @@
}
const goBack = () => uni.navigateBack()
const confirmSelect = () => {
if(from.value == 'chatMsg'){
if(from.value == 'chatMsg' || from.value == 'videoDetail'){
if(selectedIds.value.length >200){
uni.showToast({
title: '选择人数不能超过200',
+13 -2
View File
@@ -3,7 +3,7 @@
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left"
title="肝胆视频1"
title="肝胆视频"
@clickLeft="goBack"
color="#8B2316"
:border="false"
@@ -435,6 +435,15 @@ onLoad((options) => {
setTimeout(() => {
loadCategoryVideos("all");
}, 500);
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "肝胆视频",
},
},
(ret) => {
console.log(ret);
});
});
// 加载轮播数据
@@ -690,9 +699,11 @@ 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}`,
url: `/pages_app/videoDetail/videoDetail?id=${videoId}&tags=${video.tags}`,
});
};
+347 -6
View File
@@ -38,6 +38,9 @@
id="myVideo"
object-fit="contain"
:autoplay="false"
@play="onVideoPlay"
@pause="onVideoPause"
@ended="onVideoEnded"
@error="onVideoError"
></video>
<!-- <sunny-video
@@ -204,6 +207,12 @@
<view class="share-popup">
<view class="share-title">分享到</view>
<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-icon wechat-icon">
<image class="share-img" :src="wxImg" mode="aspectFill" />
@@ -228,12 +237,25 @@
</view>
</view>
</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>
<script setup>
import { ref, nextTick } from "vue";
//import uniVideo from "@/components/uniVideo/uniVideo.vue";
import { onLoad, onShow,onReady } 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";
@@ -245,13 +267,16 @@ import logoImg from "@/static/weiboShare.png";
import isAndroid from "@/utils/platform.js";
import avastarImg from "@/static/avastar.png";
import playImg from "@/static/play.png";
import paitientImg from "@/static/info_icon_1.png";
import api from "@/api/api";
import docUrl from "@/utils/docUrl";
import navTo from "@/utils/navTo";
const shareLink = ref("");
import otherHost from "@/utils/otherHost";
const selectedPatients = ref([]);
const video_uuid = ref("");
const videoInfo = ref({});
const tags = ref("");
const networkVisible = ref(false);
const networkContent = ref("");
const pointVisible = ref(false);
@@ -260,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);
@@ -270,6 +298,7 @@ const downLoadStatus = ref('start');
let downList = uni.getStorageSync("downLoadVideo") || [];
const downLoadList = ref(downList);
const isFullScreen = ref(false);
const showModal = ref(false);
//import DomVideoPlayer from 'uniapp-video-player'
//import sunnyVideo from "@/uni_modules/sunny-video/components/sunny-video/sunny-video.vue";
@@ -291,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();
// };
@@ -314,6 +365,7 @@ const startDownload = (index) => {
hasDownload.value = true;
isVideoDownloadRecord.value=true;
downLoadStatus.value = 'loading';
const task = uni.downloadFile({
url: taskItem.url,
success: (res1) => {
@@ -449,6 +501,20 @@ const useWelfareNum = async () => {
if (res.code == 1) {
uni.showToast({ title: "使用次数成功", icon: "none" });
welfareNum.value--;
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "viorder_deo_download",
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
resource_name:videoInfo.value.name,
resource_option:tags.value?tags.value:'',
event_unit:'分',
number:1,
event_val:0,
},
},
(ret) => {
console.log(ret);
});
addDownloadTask({
url: videoSrc.value,
id: video_uuid.value,
@@ -465,12 +531,13 @@ const onVideoError = (e) => {
// });
videoSrc.value= videoSrc.value.replace('.mp4', '.m3u8');
};
const videoDetail = async () => {
const videoDetail = async (flag = false) => {
const res = await api.videoDetail({ video_uuid: video_uuid.value });
if (res.code == 200) {
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);
@@ -488,6 +555,24 @@ const videoDetail = async () => {
"/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 () => {
@@ -497,9 +582,30 @@ const collection = async () => {
});
if (res.code == 200) {
uni.showToast({ title: "收藏成功", icon: "none" });
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "collect",
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
resource_name:videoInfo.value.name,
resource_option:tags.value?tags.value:'',
},
},
(ret) => {
console.log(ret);
});
videoDetail();
}
};
const addpoint=()=>{
api.addBonusPointsN({
score_type:5
}).then(res=>{
if(res.code==200){
}
})
}
const discollection = async () => {
const res = await api.discollection({
other_uuid: video_uuid.value,
@@ -573,8 +679,76 @@ 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)
selectedPatients.value = data.patients;
if(type.value == 'patientVideo') {
addGroupSendMsg4YunXin()
}
});
uni.$off('replySuccess', handleReplySuccess);
uni.$on('replySuccess', handleReplySuccess);
hasDownload.value = false;
downLoadStatus.value = 'start';
console.log('onShow');
@@ -614,18 +788,72 @@ onShow(() => {
if (activeTab.value == "comment") {
videoCommentListV2();
}
if(from.value != 'download') {
videoDetail();
if (from.value != "download") {
videoDetail(true);
}
uni.hideLoading();
});
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
const shareToggle = () => {
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 = () => {
@@ -634,6 +862,22 @@ const closeShare = () => {
// 分享到微信
const shareToWechat = () => {
if (!runShareActionOnce(() => {})) return;
if(type.value == 'patientVideo') {
addpoint();
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "share",
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
resource_name:videoInfo.value.name,
resource_option:tags.value?tags.value:'',
},
},
(ret) => {
console.log(ret);
});
// #ifdef APP-PLUS
// 使用系统分享
uni.downloadFile({
@@ -652,6 +896,7 @@ const shareToWechat = () => {
href: shareLink.value,
imageUrl: res2.tempFilePath,
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
@@ -729,6 +974,21 @@ const shareToWechat = () => {
// 分享到朋友圈
const shareToMoments = () => {
if (!runShareActionOnce(() => {})) return;
if(type.value == 'patientVideo') {
addpoint();
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "share",
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
resource_name:videoInfo.value.name,
resource_option:tags.value?tags.value:'',
},
},
(ret) => {
console.log(ret);
});
// #ifdef APP-PLUS
uni.downloadFile({
url: isAndroid?docUrl + videoInfo.value.imgpath:'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
@@ -746,6 +1006,7 @@ const shareToMoments = () => {
href: shareLink.value,
imageUrl: res2.tempFilePath,
success: function (res) {
//console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
@@ -783,6 +1044,7 @@ const shareToMoments = () => {
// 分享到新浪微博
const shareToWeibo = () => {
if (!runShareActionOnce(() => {})) return;
// #ifdef APP-PLUS
uni.share({
provider: "sinaweibo",
@@ -831,14 +1093,24 @@ const shareToWeibo = () => {
closeShare();
};
const from = ref('');
const type = ref('');
// 使用uni-app的onLoad生命周期
onLoad((options) => {
console.log(options);
if(options.type) {
type.value = options.type;
}
if(options.tags) {
tags.value = options.tags;
}
uni.getSystemInfo({
success: function (res) {
videoWidth.value = res.windowWidth; // 窗口宽度
},
});
console.log('enrtyVideoDetail');
console.log(tags.value);
//这个是处理关于滋滋声的问题,不能删掉
uni.sendNativeEvent('enrtyVideoDetail', {
msg: 'enrtyVideoDetail'
}, ret => {
@@ -897,6 +1169,20 @@ const payVideoDownload = async () => {
const res = await api.payVideoDownload({ video_uuid: video_uuid.value });
console.log(res);
if (res.code == 200) {
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "viorder_deo_download",
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
resource_name:videoInfo.value.name,
resource_option:tags.value?tags.value:'',
event_unit:'积分',
number:1,
event_val:videoInfo.value.point,
},
},
(ret) => {
console.log(ret);
});
addDownloadTask({
url: videoSrc.value,
id: video_uuid.value,
@@ -978,6 +1264,17 @@ const addCommentV2 = async () => {
if (res.code == 200) {
uni.showToast({ title: "评论成功", icon: "none" });
commentText.value = "";
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);
});
videoCommentListV2();
}
};
@@ -1503,6 +1800,50 @@ $theme-color: #8b2316;
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 {
position: fixed;
-2
View File
@@ -7,9 +7,7 @@
left-icon="left"
title="添加随访计划"
@clickLeft="goBack"
color="#8B2316"
:border="false"
backgroundColor="#eee"
>
+72 -5
View File
@@ -74,6 +74,9 @@ const summary = ref("");
const shareLink = ref("");
const shareImg = ref("");
const shareTitle = ref("");
const type = ref("");
const tags = ref("");
const reportTitle = ref("");
const goBack = () => {
uni.navigateBack({
fail() {
@@ -97,9 +100,16 @@ onHide(() => {
// plus.screen.lockOrientation('landscape-primary');
});
onLoad((query) => {
console.log(query);
if (query.title) {
title.value = query.title;
}
if (query.tags) {
tags.value = query.tags;
}
if (query.type) {
type.value = query.type;
}
if (query.share == 1) {
canShare.value = true;
}
@@ -122,13 +132,39 @@ 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:reportTitle.value,
// resource_option:tags.value,
// },
// },
// (ret) => {
// console.log(ret);
// });
}else if(query.type=='news'){
shareTitle.value = query.sharetitle;
summary.value ='';
@@ -231,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,
@@ -577,7 +622,7 @@ function createNativePopup() {
);
if (relativeY >= cancelTop) {
console.log("点击了取消按钮");
closeNativePopup();
tryCommitNativePanelAction(() => closeNativePopup());
return;
}
@@ -611,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();
@@ -634,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();
}
@@ -668,6 +715,16 @@ function closeNativePopup() {
// 分享到微信
const shareToWechat = () => {
// #ifdef APP-PLUS
if(type.value == "live" || type.value == "live_yugao"){
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "share",
page_type: "会议直播",
resource_name:reportTitle.value,
resource_option:tags.value,
},
});
}
// 使用系统分享
uni.downloadFile({
url: shareImg.value,
@@ -770,6 +827,16 @@ onUnload(() => {
// 分享到朋友圈
const shareToMoments = () => {
// #ifdef APP-PLUS
if(type.value == "live" || type.value == "live_yugao"){
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "share",
page_type: "会议直播",
resource_name:reportTitle.value,
resource_option:tags.value,
},
});
}
uni.downloadFile({
url: shareImg.value,
success: function (res) {
+553 -56
View File
@@ -2,16 +2,21 @@
<view class="container" :style="{ backgroundColor: backgroundColor }">
<!-- 分享弹窗 -->
<view class="navbox">
<view class="navbox" style="z-index: 9999999999999999999999999999999">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left"
:title="title"
@clickLeft="goBack"
@click-left="goBack"
color="#8B2316"
:border="false"
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>
<view class="nav-actions">
<view class="collect-img" @click="shareToggle" v-if="canShare">
@@ -27,7 +32,7 @@
</view>
</view>
<web-view
v-if="safeUrl"
v-if="safeUrl && !usePlusWebview"
:src="safeUrl"
:webview-styles="webviewStyles"
></web-view>
@@ -102,7 +107,8 @@ import docUrl from "@/utils/docUrl";
import likeImg from "@/static/argee_sure.png";
import dislikeImg from "@/static/argee_no.png";
import shareImgBottom from "@/static/icon_share.png";
import paitientImg from "@/static/info_icon_1.png";
const selectedPatients = ref([]);
const title = ref("新闻详情");
const type = ref("");
const safeUrl = ref("");
@@ -124,11 +130,14 @@ const NAV_BAR_HEIGHT_PX = 44;
const WEBVIEW_BOTTOM_PX = 55;
const webviewTopPx = ref(88);
const webviewBottomPx = ref(WEBVIEW_BOTTOM_PX);
const usePlusWebview = ref(false);
const appPlusWebview = ref(null);
const tags = ref('');
const webviewStyles = ref({
width: "100%",
top: `${webviewTopPx.value}px`,
bottom: `${webviewBottomPx.value}px`
top: webviewTopPx.value,
bottom: webviewBottomPx.value,
});
const applyWebviewLayout = () => {
const resInfo = uni.getSystemInfoSync();
@@ -140,9 +149,20 @@ const applyWebviewLayout = () => {
webviewBottomPx.value = Math.round(WEBVIEW_BOTTOM_PX + safeAreaBottom);
webviewStyles.value = {
width: "100%",
top: `${webviewTopPx.value}px`,
bottom: `${webviewBottomPx.value}px`
top: webviewTopPx.value,
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 = () => {
applyWebviewLayout();
@@ -150,18 +170,49 @@ const initWebviewLayout = () => {
const onWindowResize = () => {
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 = () => {
api
.getCollect({
other_uuid: uuid.value,
user_uuid: user_uuid.value,
type: type.value=='huanjiao_news'?1:2,
title:shareTitle.value,
path:safeUrl.value.replace(docUrl,''),
readnum:readnum.value,
imgpath:imgpath.value.indexOf('http')>-1?imgpath.value:docUrl+imgpath.value,
public_name:shareTitle.value,
type: type.value == "huanjiao_news" ? 1 : 2,
title: shareTitle.value,
path: safeUrl.value.replace(docUrl, ""),
readnum: readnum.value,
imgpath:
imgpath.value.indexOf("http") > -1
? imgpath.value
: docUrl + imgpath.value,
public_name: shareTitle.value,
})
.then((res) => {
if (res.code == 200) {
@@ -171,9 +222,21 @@ const getCollect = () => {
});
if (type.value == "huanjiao_news") {
getNewsDetail();
} else {
getKePuCollection();
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "collect",
page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
resource_name:shareTitle.value,
resource_option:tags.value,
},
},
(ret) => {
console.log(ret);
});
}
});
};
@@ -182,7 +245,7 @@ const getDiscollect = () => {
.getDiscollect({
other_uuid: uuid.value,
user_uuid: user_uuid.value,
type: type.value=='huanjiao_news'?1:2,
type: type.value == "huanjiao_news" ? 1 : 2,
})
.then((res) => {
console.log(res);
@@ -191,9 +254,9 @@ const getDiscollect = () => {
title: "取消收藏成功",
icon: "none",
});
if(type.value=='huanjiao_news'){
if (type.value == "huanjiao_news") {
getNewsDetail();
}else{
} else {
getKePuCollection();
}
}
@@ -219,14 +282,26 @@ const getAgree = () => {
.getAgree({
news_article_uuid: uuid.value,
user_uuid: user_uuid.value,
type: type.value=='huanjiao_news'?1:2,
type: type.value == "huanjiao_news" ? 1 : 2,
})
.then((res) => {
if(type.value=='huanjiao_news'){
if (type.value == "huanjiao_news") {
getNewsDetail();
}else{
} else {
getKePuCollection();
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "like",
page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
resource_name:shareTitle.value,
resource_option:tags.value,
},
},
(ret) => {
console.log(ret);
});
});
};
const getDisagree = () => {
@@ -234,13 +309,13 @@ const getDisagree = () => {
.getDisagree({
news_article_uuid: uuid.value,
user_uuid: user_uuid.value,
type: type.value=='huanjiao_news'?1:2,
type: type.value == "huanjiao_news" ? 1 : 2,
})
.then((res) => {
console.log(res);
if(type.value=='huanjiao_news'){
if (type.value == "huanjiao_news") {
getNewsDetail();
}else{
} else {
getKePuCollection();
}
});
@@ -255,7 +330,7 @@ const getOutRead = () => {
console.log(res);
});
};
const getNewsDetail = () => {
const getNewsDetail = (flag=false) => {
api
.getNewsDetail({
uuid: uuid.value,
@@ -263,6 +338,20 @@ const getNewsDetail = () => {
.then((res) => {
console.log(res);
if (res.code == 200) {
tags.value = res.data.tags?res.data.tags:'';
if(flag){
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "detail_page",
page_type: "肝胆新闻",
resource_name:shareTitle.value,
resource_option:tags.value,
},
},
(ret) => {
console.log(ret);
});
}
isCollection.value = res.data.isCollection;
readnum.value = res.data.readnum;
agreenum.value = res.data.agreenum;
@@ -271,13 +360,13 @@ const getNewsDetail = () => {
});
};
const fromatNumber = (number) => {
if(number < 10000){
if (number < 10000) {
return number;
}else{
return (number / 10000).toFixed(1) + 'w';
} else {
return (number / 10000).toFixed(1) + "w";
}
}
const getKePuCollection = () => {
};
const getKePuCollection = (flag=false) => {
api
.getKePuCollection({
uuid: uuid.value,
@@ -286,6 +375,19 @@ const getKePuCollection = () => {
.then((res) => {
console.log(res.data);
if (res.code == 200) {
if(flag){
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "detail_page",
page_type: "患教文库",
resource_name:shareTitle.value,
resource_option:tags.value,
},
},
(ret) => {
console.log(ret);
});
}
isCollection.value = res.data.isCollection;
readnum.value = res.data.readnum;
agreenum.value = res.data.agreenum;
@@ -294,7 +396,10 @@ const getKePuCollection = () => {
});
};
const goBack = () => {
closeNativePopup();
closeSelectNativePopup();
uni.navigateBack({
delta: 1,
fail() {
uni.redirectTo({
url: "/pages/index/index",
@@ -303,8 +408,58 @@ const goBack = () => {
});
};
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(() => {
uni.$on("selectedChatPatientsSingle", (data) => {
console.log("监听数据");
console.log(data);
selectedPatients.value = data.patients;
if (type.value == "huanjiao") {
addGroupSendMsg4YunXin();
}
});
initWebviewLayout();
setTimeout(() => {
uni.hideLoading();
@@ -325,10 +480,13 @@ onHide(() => {
});
onLoad((query) => {
uni.showLoading({
title: '加载中',
title: "加载中",
mask: true,
});
initWebviewLayout();
// #ifdef APP-PLUS
usePlusWebview.value = true;
// #endif
if (typeof uni.onWindowResize === "function") {
uni.onWindowResize(onWindowResize);
}
@@ -336,6 +494,9 @@ onLoad((query) => {
if (query.type) {
type.value = query.type;
}
if (query.tags) {
tags.value = query.tags;
}
user_uuid.value = userInfo.uuid;
if (query.title) {
title.value = query.title;
@@ -351,11 +512,7 @@ onLoad((query) => {
backgroundColor.value = "linear-gradient(to bottom,'#fff' , '#398775')";
}
if (type.value == "huanjiao_news") {
getNewsDetail();
} else {
getKePuCollection();
}
getOutRead();
const raw =
@@ -368,12 +525,13 @@ onLoad((query) => {
}
try {
safeUrl.value = decodeURIComponent(raw);
console.log( safeUrl.value);
console.log(safeUrl.value);
imgpath.value = decodeURIComponent(query.imgPath);
// 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";
shareImg.value =
"https://doc.igandan.com/app/html/img/2016/20160714132557.png";
console.log(shareImg.value);
if (query.type == "live_yugao") {
@@ -394,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",
@@ -435,10 +599,12 @@ onLoad((query) => {
// });
// 创建并展示原生弹窗
createNativePopup();
createAppPlusWebview(safeUrl.value);
// #endif
} catch (e) {
safeUrl.value = raw;
createAppPlusWebview(safeUrl.value);
}
});
const shareRef = ref(null);
@@ -472,6 +638,23 @@ const closeShare = () => {
const nativeMaskView = ref(null);
const nativePopupView = ref(null);
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({
screenW: 0,
@@ -578,10 +761,16 @@ function createNativePopup() {
weight: "500",
}
);
const items = [
const showPatientShare = false;//type.value === "huanjiao";
const items = showPatientShare
? [
// { id: "it-patient", text: "患者" },
{ id: "it-wechat", text: "微信" },
{ id: "it-moments", text: "朋友圈" },
]
: [
{ id: "it-wechat", text: "微信" },
{ id: "it-moments", text: "朋友圈" },
// { id: 'it-weibo', text: '微博' }
];
// 三个分享项区域(使用图标)
const itemW = screenW / items.length;
@@ -597,10 +786,15 @@ function createNativePopup() {
});
// 图标文件名映射(直接使用文件名,避免路径转换问题)
const iconFiles = [
const iconFiles = showPatientShare
? [
// "info_icon_1.png", // 患者
"share_weixin.png", // 微信
"share_wxc.png", // 朋友圈
]
: [
"share_weixin.png", // 微信
"share_wxc.png", // 朋友圈
"share_sina.png", // 微博
];
items.forEach((it, idx) => {
@@ -747,12 +941,22 @@ function createNativePopup() {
}
);
// 事件处理函数
const lockShareAction = () => {
if (shareActionLocked.value) return false;
shareActionLocked.value = true;
setTimeout(() => {
shareActionLocked.value = false;
}, 300);
return true;
};
const handleMaskClick = () => {
if (!lockShareAction()) return;
console.log("遮罩被点击");
closeNativePopup();
};
const handlePanelClick = (e) => {
if (!lockShareAction()) return;
console.log("面板被点击", e);
const info = popupInfo.value;
@@ -837,9 +1041,12 @@ function createNativePopup() {
);
if (relativeY >= shareAreaTop && relativeY <= shareAreaBottom) {
// 计算点击的是第几个分享项(0:微信, 1:朋友圈, 2:微博)
// 计算点击的是第几个分享项
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(
"点击了分享项:",
@@ -850,6 +1057,21 @@ function createNativePopup() {
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) {
console.log("执行微信分享");
shareToWechat();
@@ -858,10 +1080,7 @@ function createNativePopup() {
console.log("执行朋友圈分享");
shareToMoments();
closeNativePopup();
} else if (idx === 2) {
console.log("执行微博分享");
// shareToWeibo();
// closeNativePopup();
}
}
} else {
console.log(
@@ -875,12 +1094,8 @@ function createNativePopup() {
}
};
// 同时监听 click 和 touchstart 事件
nativeMaskView.value.addEventListener("click", handleMaskClick, false);
nativeMaskView.value.addEventListener("touchstart", handleMaskClick, false);
nativePopupView.value.addEventListener("click", handlePanelClick, false);
nativePopupView.value.addEventListener("touchstart", handlePanelClick, false);
// 仅监听 touchend,避免 click/touchstart/touchend 重复触发
nativeMaskView.value.addEventListener("touchend", handleMaskClick, false);
nativePopupView.value.addEventListener("touchend", handlePanelClick, false);
// #endif
}
@@ -905,9 +1120,258 @@ function closeNativePopup() {
popupShowing.value = false;
// #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;
if(url.includes('selectPatient')){
uni.sendNativeEvent(
"goSelectPatientPage",
{
msg: "goSelectPatientPage",
},
(ret) => {
console.log(ret);
setTimeout(() => {
selectNavigateLocked.value = false;
}, 500);
}
);
}else{
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 = () => {
addpoint();
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "share",
page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
resource_name:shareTitle.value,
resource_option:tags.value,
},
},
(ret) => {
console.log(ret);
});
// #ifdef APP-PLUS
// 使用系统分享
uni.downloadFile({
@@ -926,6 +1390,7 @@ const shareToWechat = () => {
href: safeUrl.value,
imageUrl: res2.tempFilePath,
success: function (res) {
console.log("分享微信成功");
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
@@ -991,25 +1456,52 @@ const shareToWechat = () => {
onHide(() => {
// #ifdef APP-PLUS
closeNativePopup();
closeSelectNativePopup();
// #endif
});
onUnload(() => {
// #ifdef APP-PLUS
try {
appPlusWebview.value &&
appPlusWebview.value.close &&
appPlusWebview.value.close();
nativeMaskView.value &&
nativeMaskView.value.close &&
nativeMaskView.value.close();
nativePopupView.value &&
nativePopupView.value.close &&
nativePopupView.value.close();
nativeSelectMaskView.value &&
nativeSelectMaskView.value.close &&
nativeSelectMaskView.value.close();
nativeSelectPopupView.value &&
nativeSelectPopupView.value.close &&
nativeSelectPopupView.value.close();
} catch (e) {}
nativeMaskView.value = null;
nativePopupView.value = null;
nativeSelectMaskView.value = null;
nativeSelectPopupView.value = null;
appPlusWebview.value = null;
popupShowing.value = false;
selectPopupShowing.value = false;
// #endif
});
// 分享到朋友圈
const shareToMoments = () => {
addpoint();
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "share",
page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
resource_name:shareTitle.value,
resource_option:tags.value,
},
},
(ret) => {
console.log(ret);
});
// #ifdef APP-PLUS
uni.downloadFile({
url: shareImg.value,
@@ -1028,6 +1520,7 @@ const shareToMoments = () => {
imageUrl: res2.tempFilePath,
success: function (res) {
console.log("success:" + JSON.stringify(res));
//addpoint();
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
@@ -1118,8 +1611,6 @@ const shareToWeibo = () => {
</script>
<style>
.bottom-box {
position: fixed;
bottom: 0;
@@ -1254,6 +1745,12 @@ const shareToWeibo = () => {
display: flex;
align-items: center;
}
.back-hit {
height: 44px;
padding: 0 12px;
display: flex;
align-items: center;
}
.container {
height: 100vh;
+34 -22
View File
@@ -22,7 +22,7 @@
<view class="divider"></view>
<view class="filter-item" @click="showFilterPopup">
<text :class="{active: keywords}">筛选</text>
<text :class="{ active: keywords }">筛选</text>
<up-image
:src="keywords ? filterOn : filter"
width="36rpx"
@@ -51,10 +51,18 @@
:lazy-load="true"
>
<template #error>
<image :src="lazyImg" class="category-icon" mode="widthFix"></image>
<image
:src="lazyImg"
class="category-icon"
mode="widthFix"
></image>
</template>
<template v-slot:loading>
<image :src="lazyImg" class="category-icon" mode="widthFix"></image>
<image
:src="lazyImg"
class="category-icon"
mode="widthFix"
></image>
</template>
</up-image>
</view>
@@ -293,7 +301,7 @@
<script setup>
import { ref, onMounted } from "vue";
import { onShow, onBackPress,onLoad} from "@dcloudio/uni-app";
import { onShow, onBackPress, onLoad } from "@dcloudio/uni-app";
import upImg from "@/static/cb_up.png";
import downImg from "@/static/cb_up.png";
import filter from "@/static/cb_screen_no.png";
@@ -341,9 +349,7 @@ onBackPress(() => {
return true;
});
// 页面加载
onMounted(() => {
});
onMounted(() => {});
const showFilter = ref(false);
// 筛选弹窗相关方法
const showFilterPopup = () => {
@@ -395,32 +401,40 @@ const confirmFilter = throttle(() => {
isFilterActive.value = true;
hideFilterPopup();
const selectedTags = filterTags.value.filter((tag) => tag.selected);
let words="";
let words = "";
console.log("选中的筛选标签:", selectedTags);
for (let i = 0; i < selectedTags.length; i++) {
if (words) {
words += "," + selectedTags[i].NAME;
} else {
words= selectedTags[i].NAME;
words = selectedTags[i].NAME;
}
}
keywords.value=words;
if(!keywords.value) return;
keywords.value = words;
if (!keywords.value) return;
console.log(1111111);
console.log('看看执行了几次');
console.log("看看执行了几次");
navTo({
url: "/pages_app/hot/hot?keywords="+encodeURIComponent(keywords.value)
url: "/pages_app/hot/hot?keywords=" + encodeURIComponent(keywords.value),
});
// 根据选中的标签重新加载数据
},1000);
}, 1000);
onLoad(() => {
loadGuideTypes();
loadSearchLibrary();
loadGuideTags();
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "诊疗指南",
},
},
(ret) => {
console.log(ret);
});
});
onShow(() => {
});
onShow(() => {});
// 加载指南分类(guideType)
const loadGuideTypes = async () => {
@@ -465,7 +479,6 @@ const loadGuideTags = async () => {
...tag,
selected: false,
}));
}
} catch (e) {
console.error("加载指南标签失败:", e);
@@ -670,7 +683,7 @@ $accent-color: #4a90e2;
gap: 5px;
.search-text {
font-size:36rpx;
font-size: 36rpx;
color: $gray-medium;
}
}
@@ -690,13 +703,12 @@ $accent-color: #4a90e2;
gap: 3px;
font-size: 36rpx;
color: #999;
text{
margin-top:-1rpx;
text {
margin-top: -1rpx;
&.active {
color: #8b2316;
}
}
}
}
@@ -1159,7 +1171,7 @@ $accent-color: #4a90e2;
padding: 8rpx 0; /* 去掉左右padding,仅保留上下 */
border-radius: 30rpx;
font-size: 26rpx;
margin:8rpx 5rpx;
margin: 8rpx 5rpx;
border: 2rpx solid #efefef;
transition: all 0.3s ease;
width: 152rpx; /* 固定宽度 */
+24
View File
@@ -460,6 +460,19 @@ const downLoad = (item) => {
});
return;
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "magazine_donwload",
page_type: "诊疗指南",
resource_name:item.title,
belong:title.value,
number:1,
resource_option:item.tags
},
},
(ret) => {
console.log(ret);
});
addDownloadTask({
url: docUrl + item.path,
title: item.title,
@@ -485,6 +498,17 @@ const viewGuideline = (cell) => {
if(item.id == cell.uuid) {
console.log(2222222222);
console.log(item.localPath);
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "detail_page",
page_type: "诊疗指南",
resource_name:cell.title,
resource_option:cell.tags
},
},
(ret) => {
console.log(ret);
});
// if(isAndroid){
plus.runtime.openFile(item.localPath, function(e) {
console.log('打开成功');
+1 -1
View File
@@ -126,7 +126,7 @@
<view class="bottom-bar" @click="openModal">
<view class="btn-primary" >群发消息</view>
</view>
<!-- 弹窗与遮罩 -->
<!-- 选择弹窗 -->
<view v-if="showModal" class="mask" @click="closeModal"></view>
<view v-if="showModal" class="center-modal">
<view class="modal-title">温馨提示</view>
+1
View File
@@ -243,6 +243,7 @@ const addOutPatient=async()=>{
}
}
const updateOutPatient=async()=>{
const res = await api.updateOutPatient({
uuid: uuid.value,
+50 -19
View File
@@ -15,7 +15,8 @@
>
<template #right>
<view class="nav-right">
<up-icon name="share" color="#8B2316" size="24" @click="shareToggle"></up-icon>
<up-image :src="shareIcon" width="36rpx" height="36rpx" @click="shareToggle"></up-image>
<!-- <up-icon name="share" color="#8B2316" size="24" @click="shareToggle"></up-icon> -->
<up-image :src="siteImg" width="36rpx" height="36rpx" @click="goSite"></up-image>
</view>
</template>
@@ -199,6 +200,7 @@ import empty from '@/components/empty/empty.vue'
import sendImg from '@/static/send_feed.png'
import dateBg from '@/static/data_sign.png'
import editImg from '@/static/edit_icon.png'
import shareIcon from '@/static/icon_share.png'
import unidialog from '@/components/dialog/dialog.vue'
import deleteImg from '@/static/delete_icon.png'
import sinaImg from "@/static/share_sina.png"
@@ -218,32 +220,45 @@ const addressList = ref([]);
const shareRef = ref()
const shareLink = ref('')
const patient_user_uuid = ref('');
const isLock=ref(true)
// 响应式数据
const from = ref('');
const currentTab = ref('suspension')
const remarks = ref('')
const note = ref('')
const patientList = ref([]);
const outpatientSchedules = ref([])
const outPatientList = ref([]);
const patientListByGBK=()=>{
api.patientListByGBK().then(res=>{
if(res.code==1){
isLock.value = false;
patientList.value = res.data;
console.log(res.data)
for(let i=0;i<res.data.length;i++){
if(patient_user_uuid.value){
patient_user_uuid.value += res.data[i].uuid+',';
}else{
patient_user_uuid.value += res.data[i].uuid;
}
}
}
})
}
const noticeConfirm = () => {
noticeVisible.value = false;
if(patientList.value.length >= 200 || isLock.value){
uni.sendNativeEvent(
"goGroupMessagePage",
{
msg: "goGroupMessagePage",
},
(ret) => {
console.log(ret);
}
);
// navTo({
// url:'/pages_chat/groupMessage/groupMessage?from=outPatient'
// })
}else{
publishOutPatient();
}
}
const noticeCancel=()=>{
noticeVisible.value = false;
@@ -269,6 +284,13 @@ onLoad((options) => {
const expertUuid = userInfo.uuid;
shareLink.value = other_host+'/wxPatient/index.htm#/outPatient?link=share&expertUuid='+expertUuid+'&from=doctor'
SHARE_TITLE.value = userInfo.realName+'医生门诊详情'
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "出/停诊公告",
},
});
} catch (error) {
console.log(error)
}
@@ -344,10 +366,18 @@ const goSite = () => {
})
}
const publishOutPatient = async (uuid) => {
let uuids='';
for(let i=0;i<patientList.value.length;i++){
if(uuids){
uuids+=','+patientList.value[i].uuid;
}else{
uuids += patientList.value[i].uuid;
}
}
const res = await api.publishOutPatient({
msg_type:'5',
msg_content:'',
patient_user_uuid:patient_user_uuid.value
patient_user_uuid:uuids
})
if(!from.value){
plus.runtime.quit();
@@ -1029,8 +1059,9 @@ bottom: 152rpx;
align-items: flex-start;
}
.schedule-left {
height: 200rpx;
border-right: 2rpx solid #f0f0f0;
min-height: 200rpx;
padding:20rpx 0;
display: flex;
flex-direction: column;
justify-content: center;
@@ -1050,8 +1081,10 @@ bottom: 152rpx;
}
.schedule-right {
border-left: 2rpx solid #f0f0f0;
flex: 1;
height: 200rpx;
min-height: 200rpx;
padding:20rpx 0;
margin-left: 30prx;
display: flex;
flex-direction: column;
@@ -1077,13 +1110,10 @@ bottom: 152rpx;
color: #333;
}
.location-info {
display: flex;
align-items: center;
gap: 15rpx;
}
.location {
display: inline-block;
font-size: 28rpx;
color: #666;
}
@@ -1106,9 +1136,10 @@ bottom: 152rpx;
border: 2rpx solid #8B2316;
border-radius: 20rpx;
padding:2rpx 16rpx;
white-space: nowrap;
font-size: 20rpx;
color: #8B2316;
display: flex;
display: inline-flex;
align-items: center;
justify-content: center;
}
+11 -2
View File
@@ -171,13 +171,16 @@ const selectedPatientCount = computed(() => {
// 合计数量:只计算去重后的患者数量
const totalSelectedCount = computed(() => selectedPatientCount.value);
onLoad(() => {
const from = ref('');
onLoad((options) => {
uni.showLoading({
title: '加载中...',
mask: true
});
fetchGroupList();
if(options.from){
from.value = options.from;
}
});
const fetchGroupList = async () => {
@@ -311,6 +314,10 @@ const confirmGroup = () => {
}
try {
if(from.value){
uni.$emit('selectedChatPatientsSingle', { patients: dedupPatients });
uni.navigateBack();
}else{
uni.navigateTo({
url: '/pages_chat/groupSend/groupSend',
success: (res) => {
@@ -322,6 +329,8 @@ const confirmGroup = () => {
}
}
});
}
} catch (e) {
console.error('跳转失败', e);
uni.showToast({ title: '跳转失败,请重试', icon: 'none' });
+27 -1
View File
@@ -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({
@@ -141,7 +164,8 @@ const email = ref('')
const editingId = ref(null)
const goodsUuid = ref('')
const type = ref(1)
const goodsNum = ref(1)
const goodsNum = ref(1);
const goodsName = ref('');
const goBack = () => uni.navigateBack()
// 省市区数据(适配树形数组:[{code,label,value,children:[...] }...])
@@ -213,6 +237,8 @@ onLoad((opts) => {
goodsUuid.value = opts.goodsUuid
goodsNum.value = opts.goodsNum;
type.value = opts.type;
goodsName.value = opts.goodsName;
goodsPoints.value = opts.goodsPoints;
getAddress()
})
const saveAddress = () => {
+1 -1
View File
@@ -146,7 +146,7 @@ const goAddress = () => {
freeVisible.value = true
}else{
uni.navigateTo({
url: '/pages_goods/exchange/address?goodsUuid='+id.value+'&type='+type.value+'&goodsNum='+qty.value
url: '/pages_goods/exchange/address?goodsUuid='+id.value+'&type='+type.value+'&goodsNum='+qty.value+'&goodsName='+title.value+'&goodsPoints='+needPoints.value
})
}
+9
View File
@@ -263,6 +263,15 @@ onBackPress(() => {
if(opts.name){
name.value = opts.name;
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "list_page",
page_type: "积分商城",
},
},
(ret) => {
console.log(ret);
});
});
// 方法
const goBack = () => {
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

+1 -1
View File
@@ -32,7 +32,7 @@
"**/*.vue",
"**/*.js",
"**/*.jsx"
],
, "pages_app/patientMsg/patientMsg.nvue", "pages_app/patientMsg/patientMsg.nvue", "pages_app/patientMsg/patientMsg.nvue" ],
"exclude": [
"node_modules",
"dist",
+2 -2
View File
@@ -1,4 +1,4 @@
let BASE_URL='https://dev-app.igandan.com/app';
//let BASE_URL='https://app.igandan.com/app'
//let BASE_URL='https://dev-app.igandan.com/app';
let BASE_URL='https://app.igandan.com/app'
export default BASE_URL
+2 -2
View File
@@ -1,5 +1,5 @@
let DOC_URL='https://dev-doc.igandan.com/app/';
//let DOC_URL='https://doc.igandan.com/app/'
//let DOC_URL='https://dev-doc.igandan.com/app/';
let DOC_URL='https://doc.igandan.com/app/'
// if(app.globalData.apiHost.indexOf('dev')>-1){
// DOC_URL='https://dev-doc.igandan.com/app/'
// }else{
+2 -2
View File
@@ -1,5 +1,5 @@
let OTHER_HOST='https://dev-wx.igandan.com'
//let OTHER_HOST='https://wx.igandan.com'
//let OTHER_HOST='https://dev-wx.igandan.com'
let OTHER_HOST='https://wx.igandan.com'
//const app = getApp({allowDefault: true});
// if(app.globalData.apiHost && app.globalData.apiHost.indexOf('dev')>-1){
// OTHER_HOST='https://dev-wx.igandan.com'
+8 -3
View File
@@ -58,10 +58,12 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
header['Authorization']='Bearer ' + token;
let userInfo= uni.getStorageSync('userInfo')
defaultData = {
version: version,
mini_version: version,
version: uni.getStorageSync('app_version'),
user_uuid:userInfo.uuid,
client_type:client_type,
timestamp:new Date().getTime()
timestamp:new Date().getTime(),
}
postData={
...data,
@@ -75,7 +77,8 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
let userInfo= uni.getStorageSync('userInfo')
console.log(userInfo)
defaultData = {
version: version,
mini_version: version,
version: uni.getStorageSync('app_version'),
user_uuid:userInfo.uuid,
client_type:client_type,
timestamp:new Date().getTime()+""
@@ -184,6 +187,8 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
}else if(res.data.code==106){
e(res.data)
}else if(res.data.code==202){
e(res.data)
}else{
uni.showToast({
title: res.data.message,
+1 -1
View File
@@ -1,2 +1,2 @@
const version="4.2.2"
const version="4.2.7"
export default version