From ed5f8c5c228ae40ffc0fca8a701005b64bd96175 Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Tue, 19 Mar 2024 13:12:28 +0800 Subject: [PATCH] 3.19 --- .../component/SingleCall/SingleCall.js | 17 +++++++---------- TUICallKit/TUICallService/serve/callManager.ts | 2 ++ TUICallKit/utils/util.js | 14 ++++++++++++++ .../MessageElements/CustomMessage/index.js | 2 +- .../MessageElements/CustomMessage/index.wxml | 2 +- patient/pages/comment/comment.wxml | 12 ++++++------ patient/pages/expertDetail/expertDetail.js | 9 +++++++-- patient/pages/expertDetail/expertDetail.wxml | 10 +++++----- utils/config.js | 4 ++-- 9 files changed, 45 insertions(+), 27 deletions(-) create mode 100644 TUICallKit/utils/util.js diff --git a/TUICallKit/TUICallKit/component/SingleCall/SingleCall.js b/TUICallKit/TUICallKit/component/SingleCall/SingleCall.js index a200ebd..10282cb 100644 --- a/TUICallKit/TUICallKit/component/SingleCall/SingleCall.js +++ b/TUICallKit/TUICallKit/component/SingleCall/SingleCall.js @@ -1,4 +1,5 @@ import { TUICallKitServer } from "../../../TUICallService/index"; +import {throttle} from "../../../utils/util" const PATH = '../../../static'; Component({ properties: { @@ -49,8 +50,9 @@ Component({ //console.log('moved') }, detached(){ - console.log('detached') - this.reject() + //console.log('detached') + this.reject(); + this.hangup() } }, pageLifetimes: { @@ -58,12 +60,9 @@ Component({ }, hide() { - + this.hangup() }, - resize: function(size) { - // 页面尺寸变化 - } }, data:{ IMG_DEFAULT_AVATAR:`${PATH}/default_avatar.png`, @@ -80,13 +79,11 @@ Component({ doctorInfo:{} }, methods: { - accept() { + accept:throttle(async()=> { //延迟接听; - setTimeout(async()=>{ await TUICallKitServer.enableMuteMode(false); await TUICallKitServer.accept(); - },800) - }, + }), async hangup() { await TUICallKitServer.hangup(); }, diff --git a/TUICallKit/TUICallService/serve/callManager.ts b/TUICallKit/TUICallService/serve/callManager.ts index 3b1b361..634e443 100644 --- a/TUICallKit/TUICallService/serve/callManager.ts +++ b/TUICallKit/TUICallService/serve/callManager.ts @@ -66,8 +66,10 @@ export class CallManager { }; private _handleCallStatusToCalling() { + console.log(this._isPageRedirected); if (this._isPageRedirected) return; this._targetPagePath = this.getRoute().route; + console.log(`/${this._globalCallPagePath}`); // @ts-ignore wx.navigateTo({ url: `/${this._globalCallPagePath}`, diff --git a/TUICallKit/utils/util.js b/TUICallKit/utils/util.js new file mode 100644 index 0000000..b835d1f --- /dev/null +++ b/TUICallKit/utils/util.js @@ -0,0 +1,14 @@ +const throttle=function(fn,wait=1500){ + var flag = true; + var timer = null; + return function(){ + if(flag) { + fn.apply(this,arguments); + flag = false; + timer = setTimeout(() => { + flag = true + },wait) + } + } + } + export {throttle} \ No newline at end of file diff --git a/TUIService/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js b/TUIService/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js index e23fbea..c69f34e 100644 --- a/TUIService/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js +++ b/TUIService/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js @@ -367,7 +367,7 @@ Component({ params = params + key + '=' + options[key]; } }; - //console.log(url + "&fromType=" + redirectUrl + "?" + params) + // console.log(url + "&fromType=" + encodeURIComponent(redirectUrl + "?" + params)) app.method.navigateTo({ url: url + "&fromType=" + encodeURIComponent(redirectUrl + "?" + params) }) diff --git a/TUIService/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.wxml b/TUIService/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.wxml index 2ea5ec6..df47159 100644 --- a/TUIService/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.wxml +++ b/TUIService/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.wxml @@ -70,7 +70,7 @@ 处方已开具 diff --git a/patient/pages/comment/comment.wxml b/patient/pages/comment/comment.wxml index 517fe28..0dc5cb8 100644 --- a/patient/pages/comment/comment.wxml +++ b/patient/pages/comment/comment.wxml @@ -45,13 +45,13 @@ {{item.name_mask}} - + 图文 - + 视频 - + 疑难会诊 @@ -77,13 +77,13 @@ {{item.name_mask}} - + 图文 - + 视频 - + 疑难会诊 diff --git a/patient/pages/expertDetail/expertDetail.js b/patient/pages/expertDetail/expertDetail.js index 93fdf25..b6e58af 100644 --- a/patient/pages/expertDetail/expertDetail.js +++ b/patient/pages/expertDetail/expertDetail.js @@ -56,6 +56,8 @@ Page({ restNumber:0,//剩余名额 expertInquiry_price:'', freePrice:'', + freeAmount:0, + expertAmount:0, recieveStatus:0, commentList: [], hasVideoList:false, @@ -239,7 +241,7 @@ bindchange(e){ let order_inquiry_count=0; let order_type=type; for (let i = 0; i < arr.length; i++) { - if(arr[i].inquiry_type==type && arr[i].inquiry_mode==1){ + if(arr[i].inquiry_type==type && arr[i].inquiry_mode==1 ){ recieveStatus=arr[i].work_num_day-arr[i].order_inquiry_count; inquiry_mode=arr[i].inquiry_mode; inquiry_price=arr[i].inquiry_price; @@ -251,11 +253,13 @@ bindchange(e){ } //如果公益问诊 次数为0 则去看是否有专家问诊 if(type==3 && recieveStatus==0){ + console.log('222222222222221'); for (let i = 0; i < arr.length; i++) { - if(arr[i].inquiry_type==1){ + if(arr[i].inquiry_type==1 && arr[i].inquiry_mode==1 && arr[i].is_enable==1){ order_type=1; recieveStatus=arr[i].work_num_day-arr[i].order_inquiry_count; inquiry_mode=arr[i].inquiry_mode; + console.log(arr[i].inquiry_price) inquiry_price=arr[i].inquiry_price; duration=arr[i].duration; work_num_day=arr[i].work_num_day; @@ -264,6 +268,7 @@ bindchange(e){ } } } + console.log(inquiry_price) this.setData({ inquiry_type:order_type, inquiry_mode:inquiry_mode, diff --git a/patient/pages/expertDetail/expertDetail.wxml b/patient/pages/expertDetail/expertDetail.wxml index decb7f9..bb75930 100644 --- a/patient/pages/expertDetail/expertDetail.wxml +++ b/patient/pages/expertDetail/expertDetail.wxml @@ -78,12 +78,12 @@ - 仅剩{{restNumber>0?restNumber:0}}个名额 + 仅剩{{restNumber>0?restNumber:0}}个名额 图文问诊 ¥{{current_inquiry_config.inquiry_price}}/次 - ¥{{expertInquiry_price}}/次 + ¥{{expertInquiry_price}}/次 图文问诊 @@ -277,13 +277,13 @@ {{item.name_mask}} - + 图文 - + 视频 - + 疑难会诊 diff --git a/utils/config.js b/utils/config.js index bf05744..ef3ffe7 100644 --- a/utils/config.js +++ b/utils/config.js @@ -23,7 +23,7 @@ imghost= `${Hosts.img_dev}`; agreehost= `${Hosts.agree_dev}`; SECRETKEY='fc45ab469ca632a700166973d87b3a6f56a855cb92d7cffb54e4d37135c097da'; - SDKAPPID='1600022752'; + SDKAPPID='1600027911'; break; case 'trial': //体验版环境 // host =`${Hosts.host_prod}`; @@ -33,7 +33,7 @@ imghost=`${Hosts.img_dev}`; agreehost=`${Hosts.agree_dev}`; SECRETKEY='fc45ab469ca632a700166973d87b3a6f56a855cb92d7cffb54e4d37135c097da'; - SDKAPPID='1600022752'; + SDKAPPID='1600027911'; break; case 'release': host =`${Hosts.host_prod}`;