3.25提交

This commit is contained in:
zoujiandong
2026-03-25 17:33:54 +08:00
parent 18c7f7386d
commit 8a879df4b4
32 changed files with 571 additions and 64 deletions
+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:1,
},
},
(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('打开成功');
+6
View File
@@ -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();
+18
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);
});
});
}
+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 跨域污染
+6
View File
@@ -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();
+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){
+6
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"
+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');
+9
View File
@@ -153,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){
+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(
+77 -3
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');
@@ -991,6 +992,17 @@ const collection = () => {
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 +1166,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;
event_unit='FREE';
} else if(type=='welfare'){
order_id='USEWELFARENUM';
event_val=0;
event_unit='USEWELFARENUM';
}else if(type=='freeRecord'){
order_id='FREERECORD';
event_val=0;
event_unit='FREERECORD';
}else if(type=="auto"){
order_id= orderId.value;
event_val=orderInfo.value.price;
event_unit='分';
}else if(type=="reDownload"){
order_id=orderInfo.value.order.order_id+"&R";
event_val=0;
event_unit='REDOWNLOAD';
}
console.log('1218');
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "order_gdfile_download",
page_type: "肝胆课件",
resource_name:shareTitle.value,
resource_option: tags.value,
event_val:0,
event_unit:'',
number:1,
},
},
(ret) => {
console.log(ret);
});
api.downloadGanDanFileV2({
file_uuid: uuid.value,
order_id: order_id,
@@ -1310,11 +1348,25 @@ 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:'';
if(flag){
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "detail_page",
page_type: "肝胆课件",
resource_name:res.data.name,
resource_option: tags.value,
},
},
(ret) => {
console.log(ret);
});
}
orderInfo.value = res.data;
// 设置分享文案
shareTitle.value = res.data.name;
@@ -1478,6 +1530,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 +1623,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) {
+11 -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);
});
});
// 加载轮播数据
@@ -692,7 +701,7 @@ const playVideo = (video) => {
const videoId = video.id || video.uuid;
navTo({
url: `/pages_app/videoDetail/videoDetail?id=${videoId}`,
url: `/pages_app/videoDetail/videoDetail?id=${videoId}&tags=${video.tags}`,
});
};
+94 -4
View File
@@ -273,6 +273,7 @@ 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);
@@ -336,6 +337,7 @@ const startDownload = (index) => {
hasDownload.value = true;
isVideoDownloadRecord.value=true;
downLoadStatus.value = 'loading';
const task = uni.downloadFile({
url: taskItem.url,
success: (res1) => {
@@ -471,6 +473,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: "肝胆视频",
resource_name:videoInfo.value.name,
resource_option:tags.value?tags.value:'',
event_unit:'免费次数',
number:1,
event_val:1,
},
},
(ret) => {
console.log(ret);
});
addDownloadTask({
url: videoSrc.value,
id: video_uuid.value,
@@ -487,9 +503,22 @@ 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) {
if(flag) {
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "detail_page",
page_type: "肝胆视频",
resource_name:videoInfo.value.name,
resource_option:tags.value?tags.value:''
},
},
(ret) => {
console.log(ret);
});
}
const userInfo = uni.getStorageSync("userInfo");
videoInfo.value = res.video;
@@ -519,6 +548,17 @@ const collection = async () => {
});
if (res.code == 200) {
uni.showToast({ title: "收藏成功", icon: "none" });
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "collect",
page_type: "肝胆视频",
resource_name:videoInfo.value.name,
resource_option:tags.value?tags.value:'',
},
},
(ret) => {
console.log(ret);
});
videoDetail();
}
};
@@ -655,11 +695,10 @@ onShow(() => {
if (activeTab.value == "comment") {
videoCommentListV2();
}
if(from.value != 'download') {
videoDetail();
if (from.value != "download") {
videoDetail(true);
}
uni.hideLoading();
});
const shareRef = ref();
@@ -734,6 +773,18 @@ const shareToWechat = () => {
if(type.value == 'patientVideo') {
addpoint();
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "share",
page_type: "肝胆视频",
resource_name:videoInfo.value.name,
resource_option:tags.value?tags.value:'',
},
},
(ret) => {
console.log(ret);
});
// #ifdef APP-PLUS
// 使用系统分享
uni.downloadFile({
@@ -834,6 +885,17 @@ const shareToMoments = () => {
if(type.value == 'patientVideo') {
addpoint();
}
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "share",
page_type: "肝胆视频",
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',
@@ -944,6 +1006,9 @@ onLoad((options) => {
if(options.type) {
type.value = options.type;
}
if(options.tags) {
tags.value = options.tags;
}
uni.getSystemInfo({
success: function (res) {
videoWidth.value = res.windowWidth; // 窗口宽度
@@ -1008,6 +1073,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: "肝胆视频",
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,
@@ -1089,6 +1168,17 @@ const addCommentV2 = async () => {
if (res.code == 200) {
uni.showToast({ title: "评论成功", icon: "none" });
commentText.value = "";
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "comment",
page_type: "肝胆视频",
resource_name:videoInfo.value.name,
resource_option:tags.value?tags.value:'',
},
},
(ret) => {
console.log(ret);
});
videoCommentListV2();
}
};
+40
View File
@@ -74,6 +74,8 @@ const summary = ref("");
const shareLink = ref("");
const shareImg = ref("");
const shareTitle = ref("");
const type = ref("");
const tags = ref("");
const goBack = () => {
uni.navigateBack({
fail() {
@@ -100,6 +102,12 @@ onLoad((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;
}
@@ -129,6 +137,18 @@ onLoad((query) => {
} else if (query.type == "live") {
shareTitle.value = "肝胆相照直播:" + query.sharetitle;
summary.value = shareTitle.value;
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "detail_page",
page_type: "会议直播",
resource_name:shareTitle.value,
resource_option:tags.value,
},
},
(ret) => {
console.log(ret);
});
}else if(query.type=='news'){
shareTitle.value = query.sharetitle;
summary.value ='';
@@ -668,6 +688,16 @@ function closeNativePopup() {
// 分享到微信
const shareToWechat = () => {
// #ifdef APP-PLUS
if(type.value == "live"){
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "share",
page_type: "会议直播",
resource_name:shareTitle.value,
resource_option:tags.value,
},
});
}
// 使用系统分享
uni.downloadFile({
url: shareImg.value,
@@ -770,6 +800,16 @@ onUnload(() => {
// 分享到朋友圈
const shareToMoments = () => {
// #ifdef APP-PLUS
if(type.value == "live"){
uni.sendNativeEvent("portraitReport",{
msg:{
event_nickname: "share",
page_type: "会议直播",
resource_name:shareTitle.value,
resource_option:tags.value,
},
});
}
uni.downloadFile({
url: shareImg.value,
success: function (res) {
+83 -4
View File
@@ -132,6 +132,7 @@ 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%",
@@ -221,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);
});
}
});
};
@@ -274,9 +287,21 @@ const getAgree = () => {
.then((res) => {
if (type.value == "huanjiao_news") {
getNewsDetail();
} 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 = () => {
@@ -305,7 +330,7 @@ const getOutRead = () => {
console.log(res);
});
};
const getNewsDetail = () => {
const getNewsDetail = (flag=false) => {
api
.getNewsDetail({
uuid: uuid.value,
@@ -313,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;
@@ -327,7 +366,7 @@ const fromatNumber = (number) => {
return (number / 10000).toFixed(1) + "w";
}
};
const getKePuCollection = () => {
const getKePuCollection = (flag=false) => {
api
.getKePuCollection({
uuid: uuid.value,
@@ -336,6 +375,19 @@ const getKePuCollection = () => {
.then((res) => {
console.log(res.data);
if (res.code == 200) {
if(flg){
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;
@@ -442,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;
@@ -458,9 +513,9 @@ onLoad((query) => {
backgroundColor.value = "linear-gradient(to bottom,'#fff' , '#398775')";
}
if (type.value == "huanjiao_news") {
getNewsDetail();
getNewsDetail(true);
} else {
getKePuCollection();
getKePuCollection(true);
}
getOutRead();
@@ -1303,6 +1358,18 @@ function closeSelectNativePopup() {
// 分享到微信
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({
@@ -1421,6 +1488,18 @@ onUnload(() => {
// 分享到朋友圈
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,
+46 -34
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"
@@ -50,12 +50,20 @@
:errorIcon="lazyImg"
:lazy-load="true"
>
<template #error>
<image :src="lazyImg" class="category-icon" mode="widthFix"></image>
</template>
<template v-slot:loading>
<image :src="lazyImg" class="category-icon" mode="widthFix"></image>
</template>
<template #error>
<image
:src="lazyImg"
class="category-icon"
mode="widthFix"
></image>
</template>
<template v-slot:loading>
<image
:src="lazyImg"
class="category-icon"
mode="widthFix"
></image>
</template>
</up-image>
</view>
<view class="item-content">
@@ -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;
console.log(1111111);
console.log('看看执行了几次');
navTo({
url: "/pages_app/hot/hot?keywords="+encodeURIComponent(keywords.value)
});
keywords.value = words;
if (!keywords.value) return;
console.log(1111111);
console.log("看看执行了几次");
navTo({
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 () => {
@@ -458,14 +472,13 @@ const loadGuideTags = async () => {
const res = await api.guideTag({
type: 3,
});
if (res && res.code === 200 && res.data) {
// 将API返回的标签数据转换为筛选标签格式
filterTags.value = res.data.map((tag) => ({
...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;
color: #8b2316;
}
}
}
}
}
@@ -1148,7 +1160,7 @@ $accent-color: #4a90e2;
.filter-tags {
display: flex;
flex-wrap: wrap;
margin-bottom: 60rpx;
max-height: 65vh;
overflow-y: auto;
@@ -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('打开成功');