修改报告bug

This commit is contained in:
zoujiandong 2023-08-29 14:31:02 +08:00
parent 26486d9d6d
commit d34a4c5b33
5 changed files with 32 additions and 11 deletions

View File

@ -1,4 +1,5 @@
import { API } from './../../../utils/network/api' import { API } from './../../../utils/network/api'
import debounce from './../../../utils/debounce'
let api = new API() let api = new API()
const app = getApp() const app = getApp()
Page({ Page({
@ -19,7 +20,11 @@ Page({
}) })
}, },
goReport(event){ goReport:debounce(function(event){
wx.showLoading({
mask:true,
title: '正在打开文件...',
})
const url=event.currentTarget.dataset.url; const url=event.currentTarget.dataset.url;
const randfile = new Date().getTime() + '检测报告'; const randfile = new Date().getTime() + '检测报告';
const newPath = `${wx.env.USER_DATA_PATH}/${randfile}`; const newPath = `${wx.env.USER_DATA_PATH}/${randfile}`;
@ -34,9 +39,11 @@ Page({
showMenu:true, showMenu:true,
filePath: newPath, filePath: newPath,
success: function (res) { success: function (res) {
console.log('打开文档成功') console.log('打开文档成功');
wx.hideLoading()
}, },
fail:function(error){ fail:function(error){
wx.hideLoading()
wx.showToast({ wx.showToast({
title:res, title:res,
icon:"none" icon:"none"
@ -52,7 +59,7 @@ Page({
} }
}) })
}, }),
formatImgList(){ formatImgList(){
let diagnose_images = this.data.case_detail.diagnose_images?this.data.case_detail.diagnose_images:[]; let diagnose_images = this.data.case_detail.diagnose_images?this.data.case_detail.diagnose_images:[];
let img_list = []; let img_list = [];

View File

@ -21,7 +21,7 @@
</view> </view>
<view class="item_img" wx:if="{{item.inquiry_type == 5}}"> <view class="item_img" wx:if="{{item.inquiry_type == 5}}">
<text style="margin-left: 10rpx;">糖组检测</text> <text style="margin-left: 10rpx;">糖组检测</text>
<van-image class="van_img" src="../../../static/images/yishi/tabbar_icon/check_sugar.png" fit="heightFix" height="54rpx" aria-label="qrcode" /> <van-image class="van_img" src="{{static_host}}/applet/doctor/static/images/yishi/service_notice/check_sugar.png" fit="heightFix" height="54rpx" aria-label="qrcode" />
</view> </view>
<view class="item_date">{{item.notice_send_time}}</view> <view class="item_date">{{item.notice_send_time}}</view>
</view> </view>

View File

@ -95,7 +95,7 @@ Page({
// console.log("app.globalData.unreadnnum_inter: ", app.globalData.unreadnnum_inter); // console.log("app.globalData.unreadnnum_inter: ", app.globalData.unreadnnum_inter);
}, },
onShow: function () { onShow: function () {
// console.log("onShow from wenzhen V2") //console.log("onShow from wenzhen V2")
if(this.data.hasOnShow){ if(this.data.hasOnShow){
wx.stopPullDownRefresh() wx.stopPullDownRefresh()
return; return;
@ -120,12 +120,16 @@ Page({
if(wx.$TUIKit){ if(wx.$TUIKit){
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this); console.log("1111");
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady); wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady);
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady, this); wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady, this);
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
}else{ }else{
console.log("222")
app.imInit().then(res => { app.imInit().then(res => {
// console.log("wenzhen onload imInit"); // console.log("wenzhen onload imInit");
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady, this);
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this); wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
}); });
} }
@ -170,7 +174,8 @@ Page({
}) })
}, },
onSDKReady(){ onSDKReady(){
console.log("onSDKReady from wenzhen") console.log("onSDKReady from wenzhen");
this.getConversationList();
}, },
getConversationList(){ getConversationList(){
// console.log("getConversationListgetConversationListgetConversationList"); // console.log("getConversationListgetConversationListgetConversationList");

View File

@ -1,5 +1,6 @@
import formateTime from '../../../../../utils/formate-time'; import formateTime from '../../../../../utils/formate-time';
import constant from '../../../../../utils/constant'; import constant from '../../../../../utils/constant';
import debounce from '../../../../../../utils/debounce';
const app = getApp() const app = getApp()
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
Component({ Component({
@ -189,6 +190,7 @@ Component({
const renderDom = [{ const renderDom = [{
type: 'sugar_check', type: 'sugar_check',
title:customMessage.title, title:customMessage.title,
detection_link:data.detection_link,
disease_class_names:data.disease_class_names disease_class_names:data.disease_class_names
}]; }];
return renderDom; return renderDom;
@ -253,7 +255,11 @@ Component({
} catch (error) { } catch (error) {
} }
}, },
goReport(event){ goReport:debounce(function(event){
wx.showLoading({
mask:true,
title: '正在打开文件...'
})
const url=event.currentTarget.dataset.url; const url=event.currentTarget.dataset.url;
const randfile = new Date().getTime() + '检测报告'; const randfile = new Date().getTime() + '检测报告';
const newPath = `${wx.env.USER_DATA_PATH}/${randfile}`; const newPath = `${wx.env.USER_DATA_PATH}/${randfile}`;
@ -268,9 +274,11 @@ Component({
showMenu:true, showMenu:true,
filePath: newPath, filePath: newPath,
success: function (res) { success: function (res) {
wx.hideLoading();
console.log('打开文档成功') console.log('打开文档成功')
}, },
fail:function(error){ fail:function(error){
wx.hideLoading();
wx.showToast({ wx.showToast({
title:res, title:res,
icon:"none" icon:"none"
@ -286,7 +294,7 @@ Component({
} }
}) })
}, }),
goSick(event){ goSick(event){
const url=event.currentTarget.dataset.url; const url=event.currentTarget.dataset.url;
console.log(url); console.log(url);

View File

@ -37,7 +37,7 @@
<image class="tui-navigatorbar-back" bindtap="goBack" src="../../static/assets/ic_back_black.svg" /> <image class="tui-navigatorbar-back" bindtap="goBack" src="../../static/assets/ic_back_black.svg" />
<view class="conversation-title">{{conversationName}}</view> <view class="conversation-title">{{conversationName}}</view>
</view> --> </view> -->
<view class="list-box {{ showTips && 'list-box-notips'}} || {{ showGroupTips && 'list-box-group'}} || {{ showAll && 'list-box-group-notips'}}" style="height: calc(100vh {{baseInfo.inquiry_status==4?'- 197rpx':'- 97px'}} - 100rpx - {{navbar_height}}px);"><!-- 100vh -input-area高度 - info高度 -navbar高度 --> <view class="list-box {{ showTips && 'list-box-notips'}} || {{ showGroupTips && 'list-box-group'}} || {{ showAll && 'list-box-group-notips'}}" style="height: calc(100vh {{baseInfo.inquiry_status==4?'- 197rpx':'- 196rpx'}} - 100rpx - {{navbar_height}}px);"><!-- 100vh -input-area高度 - info高度 -navbar高度 -->
<!-- <view wx:if="{{showTips}}" class="safetytips-box"> --> <!-- <view wx:if="{{showTips}}" class="safetytips-box"> -->
<!-- <view class="safetytips"> <!-- <view class="safetytips">
<text>【安全提示】本 APP 仅用于体验腾讯云即时通信 IM 产品功能,不可用于业务洽谈与拓展。请勿轻信汇款、中奖等涉及钱款等信息,勿轻易拨打陌生电话,谨防上当受骗。</text> <text>【安全提示】本 APP 仅用于体验腾讯云即时通信 IM 产品功能,不可用于业务洽谈与拓展。请勿轻信汇款、中奖等涉及钱款等信息,勿轻易拨打陌生电话,谨防上当受骗。</text>
@ -64,7 +64,8 @@
bind:handleCall="handleCall" message_rounds="{{message_rounds}}"></MessageInput> bind:handleCall="handleCall" message_rounds="{{message_rounds}}"></MessageInput>
</view> </view>
</view> </view>
<view style="height: 40px;position: fixed;bottom: 0;width: 100%;background-color: #fff;z-index: 1;" wx:if="{{baseInfo.inquiry_status==4}}"> <!-- wx:if="{{baseInfo.inquiry_status==4}}" -->
<view style="height: 40px;position: fixed;bottom: 0;width: 100%;background-color: #fff;z-index: 1;" >
</view> </view>
</view> </view>