From faa8070ec3eb0c3498fba57e2eb35f56f3a94d3e Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Fri, 1 Mar 2024 13:42:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=82=A3=E8=80=85=203.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MessageElements/CustomMessage/index.js | 2 +- patient/pages/expertDetail/expertDetail.js | 22 +++++++++++-- utils/request.js | 31 +++++++++++-------- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/TUIService/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js b/TUIService/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js index a0ca95f..bef1cf0 100644 --- a/TUIService/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js +++ b/TUIService/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js @@ -268,7 +268,7 @@ Component({ return renderDom; } //13 赠送对话 - if (customMessage.message_type ===13){ + if (customMessage.message_type ===14 || customMessage.message_type ===13){ let data = customMessage.data; const renderDom = [{ type: 'send_talk', diff --git a/patient/pages/expertDetail/expertDetail.js b/patient/pages/expertDetail/expertDetail.js index 39aea13..83aec04 100644 --- a/patient/pages/expertDetail/expertDetail.js +++ b/patient/pages/expertDetail/expertDetail.js @@ -263,8 +263,6 @@ bindchange(e){ } } } - console.log('2222222222') - console.log(recieveStatus) this.setData({ inquiry_type:order_type, inquiry_mode:inquiry_mode, @@ -281,6 +279,25 @@ bindchange(e){ } }) }, + hasOtherInquiry(arr){ + if(arr){ + for (var i = 0; i < arr.length; ++i) { + if(arr[i].is_enable==1 && arr[i].inquiry_type==1 && arr[i].inquiry_mode==2){ + this.setData({ + canVideo:true, + videoPrice:arr[i].inquiry_price + }) + }; + if(arr[i].is_enable==1 && arr[i].inquiry_type==1 && arr[i].inquiry_mode==6){ + this.setData({ + canDiffcult:true, + yinanPrice:arr[i].inquiry_price + }) + } + + } + } + }, formatInquiryStatus(arr){ var a='3'; if(arr){ @@ -351,6 +368,7 @@ bindchange(e){ console.log("inquiryType:"+inquiryType) if(inquiryType==1){ this.loopArr(doctor_inquiry_config,3); + this.hasOtherInquiry(doctor_inquiry_config) this.setData({ canTuwen:true }); diff --git a/utils/request.js b/utils/request.js index c74a735..8fff92a 100644 --- a/utils/request.js +++ b/utils/request.js @@ -9,10 +9,10 @@ let host=hostConfig().host; function request(url, method, data, loding = false) { if(isLock) return; if (loding) { - wx.showLoading({ - title: '加载中', - mask: true - }) + // wx.showLoading({ + // title: '加载中', + // mask: true + // }) } let token = wx.getStorageSync('AUTH_TOKEN'); if (!token) { @@ -36,13 +36,16 @@ function request(url, method, data, loding = false) { 'Authorization': 'Bearer ' + token } return new Promise((resolve, reject) => { + console.log('1111111111111111111'); + console.log(host + url) wx.request({ url: host + url, method: method, data: data, header: header, success: function (res) { - + console.log('-----------------------------'); + console.log(res); var Authorization_token = res.header.Authorization; if (Authorization_token) { wx.setStorageSync('AUTH_TOKEN', Authorization_token); //当token快过期时,服务器会返回新token,本地刷新 @@ -97,14 +100,16 @@ function request(url, method, data, loding = false) { } isLock=false; }, - // fail: function (res) { - // wx.showToast({ - // title: '网络错误,请稍后再试', - // icon: 'none', - // duration: 2000 - // }) - // reject(false) - // } + fail: function (res) { + console.log(res) + console.log(2222222222222222); + // wx.showToast({ + // title: '网络错误,请稍后再试', + // icon: 'none', + // duration: 2000 + // }) + // reject(false) + } }) })