From 4b51dcf33bfd7b20f7a75fe0979e3be0a06ba30e Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Fri, 19 Apr 2024 14:47:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E9=86=92tip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TUIKit/components/TUIChat/index.js | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/TUIChatService/TUIKit/components/TUIChat/index.js b/TUIChatService/TUIKit/components/TUIChat/index.js index 61a7d70..9bb7488 100644 --- a/TUIChatService/TUIKit/components/TUIChat/index.js +++ b/TUIChatService/TUIKit/components/TUIChat/index.js @@ -39,8 +39,9 @@ Component({ order_inquiry_id: { type: String, value: '', - observer(){ + observer(val){ this.getAudioMsg(); + this.checkChuFang(val) } }, from:{ @@ -132,6 +133,7 @@ Component({ showTip:true }) } + //修改为组件传值 // this.getInquiryMessageBasic() // console.log("app.globalData.scene from TUIchat ready: ", app.globalData.scene); @@ -233,10 +235,30 @@ Component({ * 组件的方法列表 */ methods: { + checkChuFang(order_inquiry_id){ + api.getDoctorPrescriptionCheck({order_inquiry_id: order_inquiry_id}).then(response => { + let status = response.data.status + if(status == 2){ + wx.setStorageSync('hasYaoTip',true); + this.setData({ + showYaotip:true + }) + }else{ + wx.setStorageSync('hasYaoTip',false); + this.setData({ + showYaotip:false + }) + } + + }).catch(errors => { + console.error(errors); + }) + }, closeYaotip(){ this.setData({ showYaotip:true }) + wx.setStorageSync('hasYaoTip',true); }, openTime(){ this.selectComponent("#MessageInput").openTimePicker();