Merge branch 'dev' 4.8
This commit is contained in:
commit
bafde6e744
8
App.vue
8
App.vue
@ -1,4 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import version from '@/utils/version.js'
|
||||||
export default {
|
export default {
|
||||||
globalData: {
|
globalData: {
|
||||||
plAd: true,
|
plAd: true,
|
||||||
@ -20,6 +21,13 @@ export default {
|
|||||||
options.referrerInfo.extraData.token
|
options.referrerInfo.extraData.token
|
||||||
);
|
);
|
||||||
uni.setStorageSync("userInfo", options.referrerInfo.extraData.userInfo);
|
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;
|
//getApp({allowDefault: true}).globalData.apiHost = options.referrerInfo.extraData.apiHost;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
"name" : "肝胆相照专家版",
|
"name" : "肝胆相照专家版",
|
||||||
"appid" : "__UNI__89F511F",
|
"appid" : "__UNI__89F511F",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "4.2.6",
|
"versionName" : "4.2.7",
|
||||||
"versionCode" : 426,
|
"versionCode" : 427,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
|
|||||||
@ -949,12 +949,12 @@ const selectProvince = (province) => {
|
|||||||
|
|
||||||
// 播放视频
|
// 播放视频
|
||||||
const playVideo = (item) => {
|
const playVideo = (item) => {
|
||||||
uni.sendNativeEvent('noticeBack', {
|
// uni.sendNativeEvent('noticeBack', {
|
||||||
msg: 'go'
|
// msg: 'go'
|
||||||
}, ret => {
|
// }, ret => {
|
||||||
console.log('ret数据');
|
// console.log('ret数据');
|
||||||
console.log(ret);
|
// console.log(ret);
|
||||||
})
|
// })
|
||||||
if(item.status_code==1 || item.status_code==2 || item.status_code==4){
|
if(item.status_code==1 || item.status_code==2 || item.status_code==4){
|
||||||
let zhiboUrl=OTHER_HOST+'/hcp/setInfo';
|
let zhiboUrl=OTHER_HOST+'/hcp/setInfo';
|
||||||
let userInfo=uni.getStorageSync('userInfo');
|
let userInfo=uni.getStorageSync('userInfo');
|
||||||
@ -965,7 +965,7 @@ const playVideo = (item) => {
|
|||||||
const encoded = encodeURIComponent(tempUrl);
|
const encoded = encodeURIComponent(tempUrl);
|
||||||
let imgPath=encodeURIComponent(docUrl+item.liveimg);
|
let imgPath=encodeURIComponent(docUrl+item.liveimg);
|
||||||
uni.navigateTo({
|
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{
|
}else{
|
||||||
goDetail(item);
|
goDetail(item);
|
||||||
|
|||||||
@ -139,15 +139,15 @@
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "患教文库",
|
page_type: "患教文库",
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
})
|
})
|
||||||
// 分页相关状态
|
// 分页相关状态
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
|
|||||||
@ -242,20 +242,20 @@ const submit = () => {
|
|||||||
if (!/^1\d{10}$/.test(mobile.value)) return uni.showToast({ title: '请输入正确手机号', icon: 'none' })
|
if (!/^1\d{10}$/.test(mobile.value)) return uni.showToast({ title: '请输入正确手机号', icon: 'none' })
|
||||||
if (!regionText.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' })
|
if (!detail.value) return uni.showToast({ title: '请输入详细地址', icon: 'none' })
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "boint_jifengood",
|
event_nickname: "boint_jifengood",
|
||||||
// page_type: "积分商城",
|
page_type: "积分商城",
|
||||||
// resource_name:goodsName.value,
|
resource_name:goodsName.value,
|
||||||
// event_val:0,
|
event_val:0,
|
||||||
// event_unit:'积分',
|
event_unit:'积分',
|
||||||
// number:goodsNum.value,
|
number:goodsNum.value,
|
||||||
// belong:'U盘',
|
belong:'U盘',
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
saveAddress();
|
saveAddress();
|
||||||
api.createGoodsOrder({
|
api.createGoodsOrder({
|
||||||
goodsUuid: goodsUuid.value,
|
goodsUuid: goodsUuid.value,
|
||||||
|
|||||||
@ -385,19 +385,19 @@ const downLoad = (item) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "magazine_donwload",
|
event_nickname: "magazine_donwload",
|
||||||
// page_type: "诊疗指南",
|
page_type: "诊疗指南",
|
||||||
// resource_name:item.title,
|
resource_name:item.title,
|
||||||
// belong:title.value,
|
belong:title.value,
|
||||||
// number:1,
|
number:1,
|
||||||
// resource_option:item.tags
|
resource_option:item.tags
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
addDownloadTask({
|
addDownloadTask({
|
||||||
url: docUrl + item.path,
|
url: docUrl + item.path,
|
||||||
title: item.title,
|
title: item.title,
|
||||||
@ -421,17 +421,17 @@ const viewGuideline = (cell) => {
|
|||||||
downloadTasks.value.forEach(item => {
|
downloadTasks.value.forEach(item => {
|
||||||
if(item.id == cell.uuid) {
|
if(item.id == cell.uuid) {
|
||||||
|
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "detail_page",
|
event_nickname: "detail_page",
|
||||||
// page_type: "诊疗指南",
|
page_type: "诊疗指南",
|
||||||
// resource_name:cell.title,
|
resource_name:cell.title,
|
||||||
// resource_option:cell.tags
|
resource_option:cell.tags
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
// if(isAndroid){
|
// if(isAndroid){
|
||||||
plus.runtime.openFile(item.localPath, function(e) {
|
plus.runtime.openFile(item.localPath, function(e) {
|
||||||
console.log('打开成功');
|
console.log('打开成功');
|
||||||
|
|||||||
@ -82,12 +82,12 @@ onLoad((options) => {
|
|||||||
if (options.returnTo) {
|
if (options.returnTo) {
|
||||||
returnTo.value = decodeURIComponent(options.returnTo);
|
returnTo.value = decodeURIComponent(options.returnTo);
|
||||||
}
|
}
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "常用银行卡",
|
page_type: "常用银行卡",
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
getBankCardList();
|
getBankCardList();
|
||||||
|
|||||||
@ -178,14 +178,14 @@
|
|||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
msgList.value.forEach(item => {
|
msgList.value.forEach(item => {
|
||||||
if(item.id==id){
|
if(item.id==id){
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "read_message",
|
event_nickname: "read_message",
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
item.is_read=1;
|
item.is_read=1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -81,12 +81,12 @@ onLoad((options) => {
|
|||||||
if(options.from){
|
if(options.from){
|
||||||
from.value = options.from;
|
from.value = options.from;
|
||||||
}
|
}
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "我的账户",
|
page_type: "我的账户",
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
onBackPress(() => {
|
onBackPress(() => {
|
||||||
if(!from.value){
|
if(!from.value){
|
||||||
|
|||||||
@ -178,12 +178,12 @@ const goBack = () => {
|
|||||||
};
|
};
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
from.value = options.from;
|
from.value = options.from;
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "我的二维码",
|
page_type: "我的二维码",
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
// 页面显示时拉取用户信息,并尽量把图片转成 base64,避免 html2canvas 跨域污染
|
// 页面显示时拉取用户信息,并尽量把图片转成 base64,避免 html2canvas 跨域污染
|
||||||
|
|||||||
@ -128,12 +128,12 @@ onLoad((options) => {
|
|||||||
if(options.from){
|
if(options.from){
|
||||||
from.value = options.from;
|
from.value = options.from;
|
||||||
}
|
}
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "我的课件",
|
page_type: "我的课件",
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
onRefresh();
|
onRefresh();
|
||||||
|
|||||||
@ -91,12 +91,12 @@ onLoad((options) => {
|
|||||||
let userInfo= uni.getStorageSync('userInfo')
|
let userInfo= uni.getStorageSync('userInfo')
|
||||||
user_uuid.value = userInfo.uuid;
|
user_uuid.value = userInfo.uuid;
|
||||||
loadFirstTwoPages();
|
loadFirstTwoPages();
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "我的鲜花",
|
page_type: "我的鲜花",
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
onBackPress(() => {
|
onBackPress(() => {
|
||||||
if(!from.value){
|
if(!from.value){
|
||||||
|
|||||||
@ -208,12 +208,12 @@ onLoad((options) => {
|
|||||||
if(options.from){
|
if(options.from){
|
||||||
from.value = options.from;
|
from.value = options.from;
|
||||||
}
|
}
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "我的积分",
|
page_type: "我的积分",
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
import navTo from "@/utils/navTo.js";
|
import navTo from "@/utils/navTo.js";
|
||||||
import nosigninImg from "@/static/sign_day_false.png"
|
import nosigninImg from "@/static/sign_day_false.png"
|
||||||
@ -240,7 +240,8 @@ const showSign = ref(false)
|
|||||||
const signInfo=reactive({
|
const signInfo=reactive({
|
||||||
news:{
|
news:{
|
||||||
summary:'',
|
summary:'',
|
||||||
title:''
|
title:'',
|
||||||
|
tags:''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 分页相关数据 - 收益
|
// 分页相关数据 - 收益
|
||||||
@ -374,6 +375,11 @@ try {
|
|||||||
// 签到成功后刷新数据
|
// 签到成功后刷新数据
|
||||||
getMyBonusPoints();
|
getMyBonusPoints();
|
||||||
getBonusPointsList();
|
getBonusPointsList();
|
||||||
|
uni.sendNativeEvent("portraitReport",{
|
||||||
|
msg:{
|
||||||
|
event_nickname: "signin"
|
||||||
|
},
|
||||||
|
});
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
// title: '签到成功,获得'+res.bonuspoints+'积分',
|
// title: '签到成功,获得'+res.bonuspoints+'积分',
|
||||||
// icon: 'none'
|
// icon: 'none'
|
||||||
|
|||||||
@ -250,12 +250,12 @@
|
|||||||
if(options.from){
|
if(options.from){
|
||||||
from.value = options.from;
|
from.value = options.from;
|
||||||
}
|
}
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "我的福利",
|
page_type: "我的福利",
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
getWelfarePage();
|
getWelfarePage();
|
||||||
});
|
});
|
||||||
onHide(() => {
|
onHide(() => {
|
||||||
|
|||||||
@ -139,12 +139,12 @@
|
|||||||
});
|
});
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
from.value = options.from;
|
from.value = options.from;
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "利卡兑换",
|
page_type: "福利卡兑换",
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
})
|
})
|
||||||
const goWelfare = () => {
|
const goWelfare = () => {
|
||||||
uni.setStorageSync('lookWelfare', 'useWelfare');
|
uni.setStorageSync('lookWelfare', 'useWelfare');
|
||||||
|
|||||||
@ -153,15 +153,15 @@
|
|||||||
if(options.from){
|
if(options.from){
|
||||||
from.value = options.from;
|
from.value = options.from;
|
||||||
}
|
}
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "肝胆新闻",
|
page_type: "肝胆新闻",
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
onBackPress(() => {
|
onBackPress(() => {
|
||||||
if(!from.value){
|
if(!from.value){
|
||||||
|
|||||||
@ -225,15 +225,15 @@
|
|||||||
|
|
||||||
checkUser();
|
checkUser();
|
||||||
loadData(false);
|
loadData(false);
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "肝胆课件",
|
page_type: "肝胆课件",
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
})
|
})
|
||||||
const goSearch = () => {
|
const goSearch = () => {
|
||||||
uni.sendNativeEvent(
|
uni.sendNativeEvent(
|
||||||
|
|||||||
@ -924,8 +924,6 @@ function createNativePopup() {
|
|||||||
nativeMaskView.value.addEventListener('touchstart', handleMaskClick, false);
|
nativeMaskView.value.addEventListener('touchstart', handleMaskClick, false);
|
||||||
|
|
||||||
nativePopupView.value.addEventListener('click', handlePanelClick, false);
|
nativePopupView.value.addEventListener('click', handlePanelClick, false);
|
||||||
nativePopupView.value.addEventListener('touchstart', handlePanelClick, false);
|
|
||||||
nativePopupView.value.addEventListener('touchend', handlePanelClick, false);
|
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -992,17 +990,17 @@ const collection = () => {
|
|||||||
title: "收藏成功",
|
title: "收藏成功",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "collect",
|
event_nickname: "collect",
|
||||||
// page_type: "肝胆课件",
|
page_type: "肝胆课件",
|
||||||
// resource_name:shareTitle.value,
|
resource_name:shareTitle.value,
|
||||||
// resource_option: tags.value,
|
resource_option: tags.value,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
ganDanFileDetials();
|
ganDanFileDetials();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1191,20 +1189,20 @@ const downloadGanDanFile = (type) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
console.log('1218');
|
console.log('1218');
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "order_gdfile_download",
|
event_nickname: "order_gdfile_download",
|
||||||
// page_type: "肝胆课件",
|
page_type: "肝胆课件",
|
||||||
// resource_name:shareTitle.value,
|
resource_name:shareTitle.value,
|
||||||
// resource_option: tags.value,
|
resource_option: tags.value,
|
||||||
// event_val:event_val,
|
event_val:event_val,
|
||||||
// event_unit:'分',
|
event_unit:'分',
|
||||||
// number:1,
|
number:1,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
api.downloadGanDanFileV2({
|
api.downloadGanDanFileV2({
|
||||||
file_uuid: uuid.value,
|
file_uuid: uuid.value,
|
||||||
order_id: order_id,
|
order_id: order_id,
|
||||||
@ -1366,23 +1364,23 @@ const ganDanFileDetials = async (flag = false) => {
|
|||||||
order.value = res.data.order;
|
order.value = res.data.order;
|
||||||
let money = res.data.price/ 100;
|
let money = res.data.price/ 100;
|
||||||
price.value = money > 1 ? money.toFixed(1) : money.toFixed(2);
|
price.value = money > 1 ? money.toFixed(1) : money.toFixed(2);
|
||||||
// if(flag){
|
if(flag){
|
||||||
// try {
|
try {
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "detail_page",
|
event_nickname: "detail_page",
|
||||||
// page_type: "肝胆课件",
|
page_type: "肝胆课件",
|
||||||
// resource_name:res.data.name,
|
resource_name:res.data.name,
|
||||||
// resource_option: tags.value,
|
resource_option: tags.value,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
// } catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
downloadTasks.value.forEach(item => {
|
downloadTasks.value.forEach(item => {
|
||||||
if (item.id == uuid.value) {
|
if (item.id == uuid.value) {
|
||||||
uni.getSavedFileInfo({
|
uni.getSavedFileInfo({
|
||||||
@ -1534,17 +1532,17 @@ const resumeDownloadingTasks = () => {
|
|||||||
// ===== 分享到微信 =====
|
// ===== 分享到微信 =====
|
||||||
const shareToWechat = () => {
|
const shareToWechat = () => {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "share",
|
event_nickname: "share",
|
||||||
// page_type: "肝胆课件",
|
page_type: "肝胆课件",
|
||||||
// resource_name:shareTitle.value,
|
resource_name:shareTitle.value,
|
||||||
// resource_option: tags.value,
|
resource_option: tags.value,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: 'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
|
url: 'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
@ -1627,17 +1625,17 @@ const shareToWechat = () => {
|
|||||||
// ===== 分享到朋友圈 =====
|
// ===== 分享到朋友圈 =====
|
||||||
const shareToMoments = () => {
|
const shareToMoments = () => {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "share",
|
event_nickname: "share",
|
||||||
// page_type: "肝胆课件",
|
page_type: "肝胆课件",
|
||||||
// resource_name:shareTitle.value,
|
resource_name:shareTitle.value,
|
||||||
// resource_option: tags.value,
|
resource_option: tags.value,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: 'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
|
url: 'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
|
|||||||
@ -76,15 +76,18 @@ const addCommentV2=async()=>{
|
|||||||
comment:replyText.value+'||'+name.value+':'+comment_partent.value
|
comment:replyText.value+'||'+name.value+':'+comment_partent.value
|
||||||
})
|
})
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
|
uni.$emit('replySuccess',true);
|
||||||
|
console.log('replySuccess')
|
||||||
uni.showToast({ title: '回复成功', icon: 'none' })
|
uni.showToast({ title: '回复成功', icon: 'none' })
|
||||||
replyText.value = '';
|
replyText.value = '';
|
||||||
|
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
// 清理工作
|
// 清理工作
|
||||||
console.log('回复页面已卸载')
|
//console.log('回复页面已卸载')
|
||||||
})
|
})
|
||||||
|
|
||||||
// 方法
|
// 方法
|
||||||
|
|||||||
@ -435,15 +435,15 @@ onLoad((options) => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loadCategoryVideos("all");
|
loadCategoryVideos("all");
|
||||||
}, 500);
|
}, 500);
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "肝胆视频",
|
page_type: "肝胆视频",
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 加载轮播数据
|
// 加载轮播数据
|
||||||
@ -699,6 +699,8 @@ const switchTab = (tabIndex) => {
|
|||||||
// 播放视频
|
// 播放视频
|
||||||
const playVideo = (video) => {
|
const playVideo = (video) => {
|
||||||
const videoId = video.id || video.uuid;
|
const videoId = video.id || video.uuid;
|
||||||
|
console.log(222);
|
||||||
|
console.log(video.tags);
|
||||||
|
|
||||||
navTo({
|
navTo({
|
||||||
url: `/pages_app/videoDetail/videoDetail?id=${videoId}&tags=${video.tags}`,
|
url: `/pages_app/videoDetail/videoDetail?id=${videoId}&tags=${video.tags}`,
|
||||||
|
|||||||
@ -38,6 +38,9 @@
|
|||||||
id="myVideo"
|
id="myVideo"
|
||||||
object-fit="contain"
|
object-fit="contain"
|
||||||
:autoplay="false"
|
:autoplay="false"
|
||||||
|
@play="onVideoPlay"
|
||||||
|
@pause="onVideoPause"
|
||||||
|
@ended="onVideoEnded"
|
||||||
@error="onVideoError"
|
@error="onVideoError"
|
||||||
></video>
|
></video>
|
||||||
<!-- <sunny-video
|
<!-- <sunny-video
|
||||||
@ -252,7 +255,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, nextTick } from "vue";
|
import { ref, nextTick } from "vue";
|
||||||
//import uniVideo from "@/components/uniVideo/uniVideo.vue";
|
//import uniVideo from "@/components/uniVideo/uniVideo.vue";
|
||||||
import { onLoad, onShow,onReady,onUnload } from "@dcloudio/uni-app";
|
import { onLoad, onShow,onReady,onUnload,onHide } from "@dcloudio/uni-app";
|
||||||
import unidialog from "@/components/dialog/dialog.vue";
|
import unidialog from "@/components/dialog/dialog.vue";
|
||||||
import collectImg from "@/static/icon_book_collect_sel.png";
|
import collectImg from "@/static/icon_book_collect_sel.png";
|
||||||
import discollectImg from "@/static/icon_book_collect_nor.png";
|
import discollectImg from "@/static/icon_book_collect_nor.png";
|
||||||
@ -282,6 +285,9 @@ const notEnoughVisible = ref(false);
|
|||||||
const notEnoughContent = ref("");
|
const notEnoughContent = ref("");
|
||||||
const welfareNum = ref(0);
|
const welfareNum = ref(0);
|
||||||
const isPlaying = ref(false);
|
const isPlaying = ref(false);
|
||||||
|
const playTime = ref(0);
|
||||||
|
const timer = ref(null);
|
||||||
|
const hasPlay = ref(false);
|
||||||
// 删除弹窗相关
|
// 删除弹窗相关
|
||||||
const showDeleteModal = ref(false);
|
const showDeleteModal = ref(false);
|
||||||
const currentDeleteItem = ref(null);
|
const currentDeleteItem = ref(null);
|
||||||
@ -314,7 +320,29 @@ const onFullscreenChange = (e) => {
|
|||||||
};
|
};
|
||||||
const onVideoPlay = () => {
|
const onVideoPlay = () => {
|
||||||
isPlaying.value = true;
|
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 = () => {
|
// const playVideo = () => {
|
||||||
// videoContext.value.play();
|
// videoContext.value.play();
|
||||||
// };
|
// };
|
||||||
@ -473,20 +501,20 @@ const useWelfareNum = async () => {
|
|||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
uni.showToast({ title: "使用次数成功", icon: "none" });
|
uni.showToast({ title: "使用次数成功", icon: "none" });
|
||||||
welfareNum.value--;
|
welfareNum.value--;
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "viorder_deo_download",
|
event_nickname: "viorder_deo_download",
|
||||||
// page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
||||||
// resource_name:videoInfo.value.name,
|
resource_name:videoInfo.value.name,
|
||||||
// resource_option:tags.value?tags.value:'',
|
resource_option:tags.value?tags.value:'',
|
||||||
// event_unit:'分',
|
event_unit:'分',
|
||||||
// number:1,
|
number:1,
|
||||||
// event_val:0,
|
event_val:0,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
addDownloadTask({
|
addDownloadTask({
|
||||||
url: videoSrc.value,
|
url: videoSrc.value,
|
||||||
id: video_uuid.value,
|
id: video_uuid.value,
|
||||||
@ -506,22 +534,10 @@ const onVideoError = (e) => {
|
|||||||
const videoDetail = async (flag = false) => {
|
const videoDetail = async (flag = false) => {
|
||||||
const res = await api.videoDetail({ video_uuid: video_uuid.value });
|
const res = await api.videoDetail({ video_uuid: video_uuid.value });
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// if(flag) {
|
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
|
||||||
// msg:{
|
|
||||||
// event_nickname: "detail_page",
|
|
||||||
// page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
|
||||||
// resource_name:videoInfo.value.name,
|
|
||||||
// resource_option:tags.value?tags.value:''
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// (ret) => {
|
|
||||||
// console.log(ret);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
const userInfo = uni.getStorageSync("userInfo");
|
const userInfo = uni.getStorageSync("userInfo");
|
||||||
videoInfo.value = res.video;
|
videoInfo.value = res.video;
|
||||||
|
tags.value = res.video.tags;
|
||||||
//hasDownload.value = downLoadList.value.includes(video_uuid.value);
|
//hasDownload.value = downLoadList.value.includes(video_uuid.value);
|
||||||
let vid =res.video.polyv_uuid || extractPolyvVid(res.video.content);
|
let vid =res.video.polyv_uuid || extractPolyvVid(res.video.content);
|
||||||
console.log(222222);
|
console.log(222222);
|
||||||
@ -539,6 +555,24 @@ const videoDetail = async (flag = false) => {
|
|||||||
"/video/hcp_detial?share=1&uuid=" +
|
"/video/hcp_detial?share=1&uuid=" +
|
||||||
video_uuid.value +
|
video_uuid.value +
|
||||||
"&expertshare=videoshare&fromtype=doctor";
|
"&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 () => {
|
const collection = async () => {
|
||||||
@ -548,17 +582,17 @@ const collection = async () => {
|
|||||||
});
|
});
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.showToast({ title: "收藏成功", icon: "none" });
|
uni.showToast({ title: "收藏成功", icon: "none" });
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "collect",
|
event_nickname: "collect",
|
||||||
// page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
||||||
// resource_name:videoInfo.value.name,
|
resource_name:videoInfo.value.name,
|
||||||
// resource_option:tags.value?tags.value:'',
|
resource_option:tags.value?tags.value:'',
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
videoDetail();
|
videoDetail();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -646,8 +680,65 @@ const resumeDownloadingTasks = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
|
console.log('onUnload');
|
||||||
uni.$off('selectedChatPatientsSingle');
|
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(() => {
|
onShow(() => {
|
||||||
uni.$on('selectedChatPatientsSingle',(data)=>{
|
uni.$on('selectedChatPatientsSingle',(data)=>{
|
||||||
console.log(data)
|
console.log(data)
|
||||||
@ -656,6 +747,8 @@ onShow(() => {
|
|||||||
addGroupSendMsg4YunXin()
|
addGroupSendMsg4YunXin()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
uni.$off('replySuccess', handleReplySuccess);
|
||||||
|
uni.$on('replySuccess', handleReplySuccess);
|
||||||
hasDownload.value = false;
|
hasDownload.value = false;
|
||||||
downLoadStatus.value = 'start';
|
downLoadStatus.value = 'start';
|
||||||
console.log('onShow');
|
console.log('onShow');
|
||||||
@ -774,17 +867,17 @@ const shareToWechat = () => {
|
|||||||
addpoint();
|
addpoint();
|
||||||
}
|
}
|
||||||
|
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "share",
|
event_nickname: "share",
|
||||||
// page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
||||||
// resource_name:videoInfo.value.name,
|
resource_name:videoInfo.value.name,
|
||||||
// resource_option:tags.value?tags.value:'',
|
resource_option:tags.value?tags.value:'',
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// 使用系统分享
|
// 使用系统分享
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
@ -885,17 +978,17 @@ const shareToMoments = () => {
|
|||||||
if(type.value == 'patientVideo') {
|
if(type.value == 'patientVideo') {
|
||||||
addpoint();
|
addpoint();
|
||||||
}
|
}
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "share",
|
event_nickname: "share",
|
||||||
// page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
||||||
// resource_name:videoInfo.value.name,
|
resource_name:videoInfo.value.name,
|
||||||
// resource_option:tags.value?tags.value:'',
|
resource_option:tags.value?tags.value:'',
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: isAndroid?docUrl + videoInfo.value.imgpath:'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
|
url: isAndroid?docUrl + videoInfo.value.imgpath:'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
|
||||||
@ -1003,6 +1096,7 @@ const from = ref('');
|
|||||||
const type = ref('');
|
const type = ref('');
|
||||||
// 使用uni-app的onLoad生命周期
|
// 使用uni-app的onLoad生命周期
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
|
console.log(options);
|
||||||
if(options.type) {
|
if(options.type) {
|
||||||
type.value = options.type;
|
type.value = options.type;
|
||||||
}
|
}
|
||||||
@ -1015,11 +1109,12 @@ onLoad((options) => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log('enrtyVideoDetail');
|
console.log('enrtyVideoDetail');
|
||||||
|
//这个是处理关于滋滋声的问题,不能删掉
|
||||||
uni.sendNativeEvent('enrtyVideoDetail', {
|
uni.sendNativeEvent('enrtyVideoDetail', {
|
||||||
msg: 'enrtyVideoDetail'
|
msg: 'enrtyVideoDetail'
|
||||||
}, ret => {
|
}, ret => {
|
||||||
console.log(ret);
|
console.log(ret);
|
||||||
})
|
})
|
||||||
video_uuid.value = options.id;
|
video_uuid.value = options.id;
|
||||||
from.value = options.from;
|
from.value = options.from;
|
||||||
if(from.value != 'download') {
|
if(from.value != 'download') {
|
||||||
@ -1073,20 +1168,20 @@ const payVideoDownload = async () => {
|
|||||||
const res = await api.payVideoDownload({ video_uuid: video_uuid.value });
|
const res = await api.payVideoDownload({ video_uuid: video_uuid.value });
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "viorder_deo_download",
|
event_nickname: "viorder_deo_download",
|
||||||
// page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
||||||
// resource_name:videoInfo.value.name,
|
resource_name:videoInfo.value.name,
|
||||||
// resource_option:tags.value?tags.value:'',
|
resource_option:tags.value?tags.value:'',
|
||||||
// event_unit:'积分',
|
event_unit:'积分',
|
||||||
// number:1,
|
number:1,
|
||||||
// event_val:videoInfo.value.point,
|
event_val:videoInfo.value.point,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
addDownloadTask({
|
addDownloadTask({
|
||||||
url: videoSrc.value,
|
url: videoSrc.value,
|
||||||
id: video_uuid.value,
|
id: video_uuid.value,
|
||||||
@ -1168,17 +1263,17 @@ const addCommentV2 = async () => {
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.showToast({ title: "评论成功", icon: "none" });
|
uni.showToast({ title: "评论成功", icon: "none" });
|
||||||
commentText.value = "";
|
commentText.value = "";
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "comment",
|
event_nickname: "comment",
|
||||||
// page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
page_type: type.value == 'patientVideo' ? '患教视频' : "肝胆视频",
|
||||||
// resource_name:videoInfo.value.name,
|
resource_name:videoInfo.value.name,
|
||||||
// resource_option:tags.value?tags.value:'',
|
resource_option:tags.value?tags.value:'',
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
videoCommentListV2();
|
videoCommentListV2();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -76,6 +76,7 @@ const shareImg = ref("");
|
|||||||
const shareTitle = ref("");
|
const shareTitle = ref("");
|
||||||
const type = ref("");
|
const type = ref("");
|
||||||
const tags = ref("");
|
const tags = ref("");
|
||||||
|
const reportTitle = ref("");
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
fail() {
|
fail() {
|
||||||
@ -99,6 +100,7 @@ onHide(() => {
|
|||||||
// plus.screen.lockOrientation('landscape-primary');
|
// plus.screen.lockOrientation('landscape-primary');
|
||||||
});
|
});
|
||||||
onLoad((query) => {
|
onLoad((query) => {
|
||||||
|
console.log(query);
|
||||||
if (query.title) {
|
if (query.title) {
|
||||||
title.value = query.title;
|
title.value = query.title;
|
||||||
}
|
}
|
||||||
@ -130,19 +132,33 @@ onLoad((query) => {
|
|||||||
shareImg.value = query.imgPath?decodeURIComponent(query.imgPath):'https://doc.igandan.com/app/html/img/2016/20160714132557.png';
|
shareImg.value = query.imgPath?decodeURIComponent(query.imgPath):'https://doc.igandan.com/app/html/img/2016/20160714132557.png';
|
||||||
if (query.type == "live_yugao") {
|
if (query.type == "live_yugao") {
|
||||||
shareTitle.value = query.sharetitle;
|
shareTitle.value = query.sharetitle;
|
||||||
|
reportTitle.value = shareTitle.value;
|
||||||
summary.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") {
|
} else if (query.type == "live_old") {
|
||||||
shareTitle.value = query.sharetitle;
|
shareTitle.value = query.sharetitle;
|
||||||
summary.value = "分享一篇来自“肝胆相照”的历史会议:" + shareTitle.value;
|
summary.value = "分享一篇来自“肝胆相照”的历史会议:" + shareTitle.value;
|
||||||
} else if (query.type == "live") {
|
} else if (query.type == "live") {
|
||||||
shareTitle.value = "肝胆相照直播:" + query.sharetitle;
|
shareTitle.value = "肝胆相照直播:" + query.sharetitle;
|
||||||
|
reportTitle.value = query.sharetitle;
|
||||||
summary.value = shareTitle.value;
|
summary.value = shareTitle.value;
|
||||||
|
console.log(reportTitle.value);
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
// uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
// msg:{
|
||||||
// event_nickname: "detail_page",
|
// event_nickname: "detail_page",
|
||||||
// page_type: "会议直播",
|
// page_type: "会议直播",
|
||||||
// resource_name:shareTitle.value,
|
// resource_name:reportTitle.value,
|
||||||
// resource_option:tags.value,
|
// resource_option:tags.value,
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
@ -251,6 +267,15 @@ const closeShare = () => {
|
|||||||
const nativeMaskView = ref(null);
|
const nativeMaskView = ref(null);
|
||||||
const nativePopupView = ref(null);
|
const nativePopupView = ref(null);
|
||||||
const popupShowing = ref(false);
|
const popupShowing = ref(false);
|
||||||
|
/** 原生分享面板:防止同一次手势内重复触发(兜底) */
|
||||||
|
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({
|
const popupInfo = ref({
|
||||||
screenW: 0,
|
screenW: 0,
|
||||||
@ -597,7 +622,7 @@ function createNativePopup() {
|
|||||||
);
|
);
|
||||||
if (relativeY >= cancelTop) {
|
if (relativeY >= cancelTop) {
|
||||||
console.log("点击了取消按钮");
|
console.log("点击了取消按钮");
|
||||||
closeNativePopup();
|
tryCommitNativePanelAction(() => closeNativePopup());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -631,12 +656,16 @@ function createNativePopup() {
|
|||||||
|
|
||||||
if (idx === 0) {
|
if (idx === 0) {
|
||||||
console.log("执行微信分享");
|
console.log("执行微信分享");
|
||||||
|
tryCommitNativePanelAction(() => {
|
||||||
shareToWechat();
|
shareToWechat();
|
||||||
closeNativePopup();
|
closeNativePopup();
|
||||||
|
});
|
||||||
} else if (idx === 1) {
|
} else if (idx === 1) {
|
||||||
console.log("执行朋友圈分享");
|
console.log("执行朋友圈分享");
|
||||||
|
tryCommitNativePanelAction(() => {
|
||||||
shareToMoments();
|
shareToMoments();
|
||||||
closeNativePopup();
|
closeNativePopup();
|
||||||
|
});
|
||||||
} else if (idx === 2) {
|
} else if (idx === 2) {
|
||||||
console.log("执行微博分享");
|
console.log("执行微博分享");
|
||||||
// shareToWeibo();
|
// shareToWeibo();
|
||||||
@ -654,19 +683,17 @@ function createNativePopup() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 同时监听 click 和 touchstart 事件
|
// 仅监听 click:若同时绑定 touchstart/touchend,一次点击会触发多次,导致分享重复执行
|
||||||
nativeMaskView.value.addEventListener("click", handleMaskClick, false);
|
nativeMaskView.value.addEventListener("click", handleMaskClick, false);
|
||||||
nativeMaskView.value.addEventListener("touchstart", handleMaskClick, false);
|
|
||||||
|
|
||||||
nativePopupView.value.addEventListener("click", handlePanelClick, false);
|
nativePopupView.value.addEventListener("click", handlePanelClick, false);
|
||||||
nativePopupView.value.addEventListener("touchstart", handlePanelClick, false);
|
|
||||||
nativePopupView.value.addEventListener("touchend", handlePanelClick, false);
|
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
function showNativePopup() {
|
function showNativePopup() {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
if (popupShowing.value) return;
|
if (popupShowing.value) return;
|
||||||
|
nativePanelLastActionAt = 0;
|
||||||
if (!nativeMaskView.value || !nativePopupView.value) {
|
if (!nativeMaskView.value || !nativePopupView.value) {
|
||||||
createNativePopup();
|
createNativePopup();
|
||||||
}
|
}
|
||||||
@ -688,15 +715,15 @@ function closeNativePopup() {
|
|||||||
// 分享到微信
|
// 分享到微信
|
||||||
const shareToWechat = () => {
|
const shareToWechat = () => {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
if(type.value == "live"){
|
if(type.value == "live" || type.value == "live_yugao"){
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "share",
|
event_nickname: "share",
|
||||||
// page_type: "会议直播",
|
page_type: "会议直播",
|
||||||
// resource_name:shareTitle.value,
|
resource_name:reportTitle.value,
|
||||||
// resource_option:tags.value,
|
resource_option:tags.value,
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
// 使用系统分享
|
// 使用系统分享
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
@ -800,15 +827,15 @@ onUnload(() => {
|
|||||||
// 分享到朋友圈
|
// 分享到朋友圈
|
||||||
const shareToMoments = () => {
|
const shareToMoments = () => {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
if(type.value == "live"){
|
if(type.value == "live" || type.value == "live_yugao"){
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "share",
|
event_nickname: "share",
|
||||||
// page_type: "会议直播",
|
page_type: "会议直播",
|
||||||
// resource_name:shareTitle.value,
|
resource_name:reportTitle.value,
|
||||||
// resource_option:tags.value,
|
resource_option:tags.value,
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: shareImg.value,
|
url: shareImg.value,
|
||||||
|
|||||||
@ -226,17 +226,17 @@ const getCollect = () => {
|
|||||||
} else {
|
} else {
|
||||||
getKePuCollection();
|
getKePuCollection();
|
||||||
}
|
}
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "collect",
|
event_nickname: "collect",
|
||||||
// page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
|
page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
|
||||||
// resource_name:shareTitle.value,
|
resource_name:shareTitle.value,
|
||||||
// resource_option:tags.value,
|
resource_option:tags.value,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -291,17 +291,17 @@ const getAgree = () => {
|
|||||||
} else {
|
} else {
|
||||||
getKePuCollection();
|
getKePuCollection();
|
||||||
}
|
}
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "like",
|
event_nickname: "like",
|
||||||
// page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
|
page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
|
||||||
// resource_name:shareTitle.value,
|
resource_name:shareTitle.value,
|
||||||
// resource_option:tags.value,
|
resource_option:tags.value,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const getDisagree = () => {
|
const getDisagree = () => {
|
||||||
@ -340,17 +340,17 @@ const getNewsDetail = (flag=false) => {
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
tags.value = res.data.tags?res.data.tags:'';
|
tags.value = res.data.tags?res.data.tags:'';
|
||||||
if(flag){
|
if(flag){
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "detail_page",
|
event_nickname: "detail_page",
|
||||||
// page_type: "肝胆新闻",
|
page_type: "肝胆新闻",
|
||||||
// resource_name:shareTitle.value,
|
resource_name:shareTitle.value,
|
||||||
// resource_option:tags.value,
|
resource_option:tags.value,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
isCollection.value = res.data.isCollection;
|
isCollection.value = res.data.isCollection;
|
||||||
readnum.value = res.data.readnum;
|
readnum.value = res.data.readnum;
|
||||||
@ -376,17 +376,17 @@ const getKePuCollection = (flag=false) => {
|
|||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if(flag){
|
if(flag){
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "detail_page",
|
event_nickname: "detail_page",
|
||||||
// page_type: "患教文库",
|
page_type: "患教文库",
|
||||||
// resource_name:shareTitle.value,
|
resource_name:shareTitle.value,
|
||||||
// resource_option:tags.value,
|
resource_option:tags.value,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
isCollection.value = res.data.isCollection;
|
isCollection.value = res.data.isCollection;
|
||||||
readnum.value = res.data.readnum;
|
readnum.value = res.data.readnum;
|
||||||
@ -512,11 +512,7 @@ onLoad((query) => {
|
|||||||
|
|
||||||
backgroundColor.value = "linear-gradient(to bottom,'#fff' , '#398775')";
|
backgroundColor.value = "linear-gradient(to bottom,'#fff' , '#398775')";
|
||||||
}
|
}
|
||||||
if (type.value == "huanjiao_news") {
|
|
||||||
getNewsDetail(true);
|
|
||||||
} else {
|
|
||||||
getKePuCollection(true);
|
|
||||||
}
|
|
||||||
getOutRead();
|
getOutRead();
|
||||||
|
|
||||||
const raw =
|
const raw =
|
||||||
@ -556,6 +552,12 @@ onLoad((query) => {
|
|||||||
shareTitle.value = query.sharetitle;
|
shareTitle.value = query.sharetitle;
|
||||||
summary.value = query.summary;
|
summary.value = query.summary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type.value == "huanjiao_news") {
|
||||||
|
getNewsDetail(true);
|
||||||
|
} else {
|
||||||
|
getKePuCollection(true);
|
||||||
|
}
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// let wv = plus.webview.create("", "custom-webview", {
|
// let wv = plus.webview.create("", "custom-webview", {
|
||||||
// top: statusBarHeight + navHeight + "px",
|
// top: statusBarHeight + navHeight + "px",
|
||||||
@ -1359,17 +1361,17 @@ function closeSelectNativePopup() {
|
|||||||
const shareToWechat = () => {
|
const shareToWechat = () => {
|
||||||
addpoint();
|
addpoint();
|
||||||
|
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "share",
|
event_nickname: "share",
|
||||||
// page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
|
page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
|
||||||
// resource_name:shareTitle.value,
|
resource_name:shareTitle.value,
|
||||||
// resource_option:tags.value,
|
resource_option:tags.value,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// 使用系统分享
|
// 使用系统分享
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
@ -1488,17 +1490,17 @@ onUnload(() => {
|
|||||||
// 分享到朋友圈
|
// 分享到朋友圈
|
||||||
const shareToMoments = () => {
|
const shareToMoments = () => {
|
||||||
addpoint();
|
addpoint();
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "share",
|
event_nickname: "share",
|
||||||
// page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
|
page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
|
||||||
// resource_name:shareTitle.value,
|
resource_name:shareTitle.value,
|
||||||
// resource_option:tags.value,
|
resource_option:tags.value,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
|
|||||||
@ -424,15 +424,15 @@ onLoad(() => {
|
|||||||
loadGuideTypes();
|
loadGuideTypes();
|
||||||
loadSearchLibrary();
|
loadSearchLibrary();
|
||||||
loadGuideTags();
|
loadGuideTags();
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "诊疗指南",
|
page_type: "诊疗指南",
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
onShow(() => {});
|
onShow(() => {});
|
||||||
|
|
||||||
|
|||||||
@ -460,19 +460,19 @@ const downLoad = (item) => {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "magazine_donwload",
|
event_nickname: "magazine_donwload",
|
||||||
// page_type: "诊疗指南",
|
page_type: "诊疗指南",
|
||||||
// resource_name:item.title,
|
resource_name:item.title,
|
||||||
// belong:title.value,
|
belong:title.value,
|
||||||
// number:1,
|
number:1,
|
||||||
// resource_option:item.tags
|
resource_option:item.tags
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
addDownloadTask({
|
addDownloadTask({
|
||||||
url: docUrl + item.path,
|
url: docUrl + item.path,
|
||||||
title: item.title,
|
title: item.title,
|
||||||
@ -498,17 +498,17 @@ const viewGuideline = (cell) => {
|
|||||||
if(item.id == cell.uuid) {
|
if(item.id == cell.uuid) {
|
||||||
console.log(2222222222);
|
console.log(2222222222);
|
||||||
console.log(item.localPath);
|
console.log(item.localPath);
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "detail_page",
|
event_nickname: "detail_page",
|
||||||
// page_type: "诊疗指南",
|
page_type: "诊疗指南",
|
||||||
// resource_name:cell.title,
|
resource_name:cell.title,
|
||||||
// resource_option:cell.tags
|
resource_option:cell.tags
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// (ret) => {
|
(ret) => {
|
||||||
// console.log(ret);
|
console.log(ret);
|
||||||
// });
|
});
|
||||||
// if(isAndroid){
|
// if(isAndroid){
|
||||||
plus.runtime.openFile(item.localPath, function(e) {
|
plus.runtime.openFile(item.localPath, function(e) {
|
||||||
console.log('打开成功');
|
console.log('打开成功');
|
||||||
|
|||||||
@ -285,12 +285,12 @@ onLoad((options) => {
|
|||||||
shareLink.value = other_host+'/wxPatient/index.htm#/outPatient?link=share&expertUuid='+expertUuid+'&from=doctor'
|
shareLink.value = other_host+'/wxPatient/index.htm#/outPatient?link=share&expertUuid='+expertUuid+'&from=doctor'
|
||||||
SHARE_TITLE.value = userInfo.realName+'医生门诊详情'
|
SHARE_TITLE.value = userInfo.realName+'医生门诊详情'
|
||||||
|
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
uni.sendNativeEvent("portraitReport",{
|
||||||
// msg:{
|
msg:{
|
||||||
// event_nickname: "list_page",
|
event_nickname: "list_page",
|
||||||
// page_type: "出/停诊公告",
|
page_type: "出/停诊公告",
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -110,8 +110,8 @@ import unidialog from '@/components/dialog/dialog.vue';
|
|||||||
const freeVisible = ref(false)
|
const freeVisible = ref(false)
|
||||||
const freeContent = ref('')
|
const freeContent = ref('')
|
||||||
const goods_order_id = ref('')
|
const goods_order_id = ref('')
|
||||||
const goodsPoints=ref(0);
|
|
||||||
const points = ref(0)
|
const points = ref(0)
|
||||||
|
const goodsPoints=ref(0);
|
||||||
const freeClose = () => {
|
const freeClose = () => {
|
||||||
freeVisible.value = false
|
freeVisible.value = false
|
||||||
}
|
}
|
||||||
@ -125,6 +125,28 @@ const freeConfirm = () => {
|
|||||||
title: '兑换成功',
|
title: '兑换成功',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
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(() => {
|
setTimeout(() => {
|
||||||
navTo({
|
navTo({
|
||||||
@ -260,28 +282,6 @@ const submit = () => {
|
|||||||
address: regionText.value+detail.value
|
address: regionText.value+detail.value
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.code == 1 || res.code == 200){
|
if(res.code == 1 || res.code == 200){
|
||||||
let belong = '';
|
|
||||||
if(type.value == 1){
|
|
||||||
belong = 'U盘';
|
|
||||||
}else if(goodsName.value.indexOf('京东E卡') > -1){
|
|
||||||
belong = '京东E卡';
|
|
||||||
}else{
|
|
||||||
belong = '书籍';
|
|
||||||
}
|
|
||||||
// uni.sendNativeEvent("portraitReport",{
|
|
||||||
// msg:{
|
|
||||||
// event_nickname: "boint_jifengood",
|
|
||||||
// page_type: "积分商城",
|
|
||||||
// resource_name:goodsName.value,
|
|
||||||
// event_val:goodsPoints.value,
|
|
||||||
// event_unit:'积分',
|
|
||||||
// number:goodsNum.value,
|
|
||||||
// belong:belong,
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// (ret) => {
|
|
||||||
// console.log(ret);
|
|
||||||
// });
|
|
||||||
points.value = res.data.pionts;
|
points.value = res.data.pionts;
|
||||||
freeVisible.value = true
|
freeVisible.value = true
|
||||||
goods_order_id.value = res.data.goods_order_id
|
goods_order_id.value = res.data.goods_order_id
|
||||||
|
|||||||
@ -58,10 +58,12 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
|
|||||||
header['Authorization']='Bearer ' + token;
|
header['Authorization']='Bearer ' + token;
|
||||||
let userInfo= uni.getStorageSync('userInfo')
|
let userInfo= uni.getStorageSync('userInfo')
|
||||||
defaultData = {
|
defaultData = {
|
||||||
version: version,
|
mini_version: version,
|
||||||
|
version: uni.getStorageSync('app_version'),
|
||||||
user_uuid:userInfo.uuid,
|
user_uuid:userInfo.uuid,
|
||||||
client_type:client_type,
|
client_type:client_type,
|
||||||
timestamp:new Date().getTime()
|
timestamp:new Date().getTime(),
|
||||||
|
|
||||||
}
|
}
|
||||||
postData={
|
postData={
|
||||||
...data,
|
...data,
|
||||||
@ -75,7 +77,8 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
|
|||||||
let userInfo= uni.getStorageSync('userInfo')
|
let userInfo= uni.getStorageSync('userInfo')
|
||||||
console.log(userInfo)
|
console.log(userInfo)
|
||||||
defaultData = {
|
defaultData = {
|
||||||
version: version,
|
mini_version: version,
|
||||||
|
version: uni.getStorageSync('app_version'),
|
||||||
user_uuid:userInfo.uuid,
|
user_uuid:userInfo.uuid,
|
||||||
client_type:client_type,
|
client_type:client_type,
|
||||||
timestamp:new Date().getTime()+""
|
timestamp:new Date().getTime()+""
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
const version="4.2.4"
|
const version="4.2.7"
|
||||||
export default version
|
export default version
|
||||||
Loading…
x
Reference in New Issue
Block a user