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();