This commit is contained in:
zoujiandong 2024-03-19 13:12:28 +08:00
parent 43153c15a7
commit ed5f8c5c22
9 changed files with 45 additions and 27 deletions

View File

@ -1,4 +1,5 @@
import { TUICallKitServer } from "../../../TUICallService/index"; import { TUICallKitServer } from "../../../TUICallService/index";
import {throttle} from "../../../utils/util"
const PATH = '../../../static'; const PATH = '../../../static';
Component({ Component({
properties: { properties: {
@ -49,8 +50,9 @@ Component({
//console.log('moved') //console.log('moved')
}, },
detached(){ detached(){
console.log('detached') //console.log('detached')
this.reject() this.reject();
this.hangup()
} }
}, },
pageLifetimes: { pageLifetimes: {
@ -58,12 +60,9 @@ Component({
}, },
hide() { hide() {
this.hangup()
}, },
resize: function(size) {
// 页面尺寸变化
}
}, },
data:{ data:{
IMG_DEFAULT_AVATAR:`${PATH}/default_avatar.png`, IMG_DEFAULT_AVATAR:`${PATH}/default_avatar.png`,
@ -80,13 +79,11 @@ Component({
doctorInfo:{} doctorInfo:{}
}, },
methods: { methods: {
accept() { accept:throttle(async()=> {
//延迟接听; //延迟接听;
setTimeout(async()=>{
await TUICallKitServer.enableMuteMode(false); await TUICallKitServer.enableMuteMode(false);
await TUICallKitServer.accept(); await TUICallKitServer.accept();
},800) }),
},
async hangup() { async hangup() {
await TUICallKitServer.hangup(); await TUICallKitServer.hangup();
}, },

View File

@ -66,8 +66,10 @@ export class CallManager {
}; };
private _handleCallStatusToCalling() { private _handleCallStatusToCalling() {
console.log(this._isPageRedirected);
if (this._isPageRedirected) return; if (this._isPageRedirected) return;
this._targetPagePath = this.getRoute().route; this._targetPagePath = this.getRoute().route;
console.log(`/${this._globalCallPagePath}`);
// @ts-ignore // @ts-ignore
wx.navigateTo({ wx.navigateTo({
url: `/${this._globalCallPagePath}`, url: `/${this._globalCallPagePath}`,

14
TUICallKit/utils/util.js Normal file
View File

@ -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}

View File

@ -367,7 +367,7 @@ Component({
params = params + key + '=' + options[key]; params = params + key + '=' + options[key];
} }
}; };
//console.log(url + "&fromType=" + redirectUrl + "?" + params) // console.log(url + "&fromType=" + encodeURIComponent(redirectUrl + "?" + params))
app.method.navigateTo({ app.method.navigateTo({
url: url + "&fromType=" + encodeURIComponent(redirectUrl + "?" + params) url: url + "&fromType=" + encodeURIComponent(redirectUrl + "?" + params)
}) })

View File

@ -70,7 +70,7 @@
</view> </view>
<view wx:if="{{renderDom[0].type==='msg_prescribe'}}" <view wx:if="{{renderDom[0].type==='msg_prescribe'}}"
class="gdxz_custom_order_prescribe_message" class="gdxz_custom_order_prescribe_message"
data-url="/pages/prescriptDetail/prescriptDetail?order_prescription_id={{renderDom[0].order_prescription_id}}" data-url="/patient/pages/prescriptDetail/prescriptDetail?order_prescription_id={{renderDom[0].order_prescription_id}}"
bindtap="goPrescriptDetail"> bindtap="goPrescriptDetail">
<view class="prescribe_title"> <view class="prescribe_title">
处方已开具 处方已开具

View File

@ -45,13 +45,13 @@
<view class="namebox"> <view class="namebox">
<view class="namebox1"> <view class="namebox1">
<view class="name">{{item.name_mask}}</view> <view class="name">{{item.name_mask}}</view>
<view class="comemntType" wx:if="item.inquiry_mode==1"> <view class="comemntType" wx:if="{{item.inquiry_mode==1}}">
图文 图文
</view> </view>
<view class="comemntType video" wx:elif="item.inquiry_mode==2 && item.inquiry_type==1"> <view class="comemntType video" wx:elif="{{item.inquiry_mode==2 && item.inquiry_type==1}}">
视频 视频
</view> </view>
<view class="comemntType yinan" wx:elif="item.inquiry_mode==6 && item.inquiry_type==1"> <view class="comemntType yinan" wx:elif="{{item.inquiry_mode==6 && item.inquiry_type==1}}">
疑难会诊 疑难会诊
</view> </view>
</view> </view>
@ -77,13 +77,13 @@
<view class="namebox"> <view class="namebox">
<view class="namebox1"> <view class="namebox1">
<view class="name">{{item.name_mask}}</view> <view class="name">{{item.name_mask}}</view>
<view class="comemntType" wx:if="item.inquiry_mode==1"> <view class="comemntType" wx:if="{{item.inquiry_mode==1}}">
图文 图文
</view> </view>
<view class="comemntType video" wx:elif="item.inquiry_mode==2 && item.inquiry_type==1"> <view class="comemntType video" wx:elif="{{item.inquiry_mode==2 && item.inquiry_type==1}}">
视频 视频
</view> </view>
<view class="comemntType yinan" wx:elif="item.inquiry_mode==6 && item.inquiry_type==1"> <view class="comemntType yinan" wx:elif="{{item.inquiry_mode==6 && item.inquiry_type==1}}">
疑难会诊 疑难会诊
</view> </view>
</view> </view>

View File

@ -56,6 +56,8 @@ Page({
restNumber:0,//剩余名额 restNumber:0,//剩余名额
expertInquiry_price:'', expertInquiry_price:'',
freePrice:'', freePrice:'',
freeAmount:0,
expertAmount:0,
recieveStatus:0, recieveStatus:0,
commentList: [], commentList: [],
hasVideoList:false, hasVideoList:false,
@ -251,11 +253,13 @@ bindchange(e){
} }
//如果公益问诊 次数为0 则去看是否有专家问诊 //如果公益问诊 次数为0 则去看是否有专家问诊
if(type==3 && recieveStatus==0){ if(type==3 && recieveStatus==0){
console.log('222222222222221');
for (let i = 0; i < arr.length; i++) { 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; order_type=1;
recieveStatus=arr[i].work_num_day-arr[i].order_inquiry_count; recieveStatus=arr[i].work_num_day-arr[i].order_inquiry_count;
inquiry_mode=arr[i].inquiry_mode; inquiry_mode=arr[i].inquiry_mode;
console.log(arr[i].inquiry_price)
inquiry_price=arr[i].inquiry_price; inquiry_price=arr[i].inquiry_price;
duration=arr[i].duration; duration=arr[i].duration;
work_num_day=arr[i].work_num_day; work_num_day=arr[i].work_num_day;
@ -264,6 +268,7 @@ bindchange(e){
} }
} }
} }
console.log(inquiry_price)
this.setData({ this.setData({
inquiry_type:order_type, inquiry_type:order_type,
inquiry_mode:inquiry_mode, inquiry_mode:inquiry_mode,

View File

@ -78,7 +78,7 @@
<image wx:elif="{{currentData==0 && !canTuwen}}" src="{{img_host+'/tuwen_disable_on.png'}}" alt="" class="tabbg on" ></image> <image wx:elif="{{currentData==0 && !canTuwen}}" src="{{img_host+'/tuwen_disable_on.png'}}" alt="" class="tabbg on" ></image>
<image wx:elif="{{currentData!=0 && canTuwen}}" src="{{img_host+'/tuwen.png'}}" alt="" class="tabbg" ></image> <image wx:elif="{{currentData!=0 && canTuwen}}" src="{{img_host+'/tuwen.png'}}" alt="" class="tabbg" ></image>
<image wx:else src="{{img_host+'/tuwen_disable.png'}}" alt="" class="tabbg" ></image> <image wx:else src="{{img_host+'/tuwen_disable.png'}}" alt="" class="tabbg" ></image>
<view class="restNumber" wx:if="{{canTuwen && expertInquiry_price && current_inquiry_config.inquiry_type==3 }}">仅剩{{restNumber>0?restNumber:0}}个名额</view> <view class="restNumber" wx:if="{{canTuwen && expertInquiry_price && current_inquiry_config.inquiry_type==3 && restNumber!=0}}">仅剩{{restNumber>0?restNumber:0}}个名额</view>
<view class="typebox" wx:if="{{canTuwen}}"> <view class="typebox" wx:if="{{canTuwen}}">
<view class="name">图文问诊</view> <view class="name">图文问诊</view>
@ -277,13 +277,13 @@
<view class="namebox"> <view class="namebox">
<view class="namebox"> <view class="namebox">
<view class="name">{{item.name_mask}}</view> <view class="name">{{item.name_mask}}</view>
<view class="comemntType" wx:if="item.inquiry_mode==1"> <view class="comemntType" wx:if="{{item.inquiry_mode==1}}">
图文 图文
</view> </view>
<view class="comemntType video" wx:elif="item.inquiry_mode==2 && item.inquiry_type==1"> <view class="comemntType video" wx:elif="{{item.inquiry_mode==2 && item.inquiry_type==1}}">
视频 视频
</view> </view>
<view class="comemntType yinan" wx:elif="item.inquiry_mode==6 && item.inquiry_type==1"> <view class="comemntType yinan" wx:elif="{{item.inquiry_mode==6 && item.inquiry_type==1}}">
疑难会诊 疑难会诊
</view> </view>
</view> </view>

View File

@ -23,7 +23,7 @@
imghost= `${Hosts.img_dev}`; imghost= `${Hosts.img_dev}`;
agreehost= `${Hosts.agree_dev}`; agreehost= `${Hosts.agree_dev}`;
SECRETKEY='fc45ab469ca632a700166973d87b3a6f56a855cb92d7cffb54e4d37135c097da'; SECRETKEY='fc45ab469ca632a700166973d87b3a6f56a855cb92d7cffb54e4d37135c097da';
SDKAPPID='1600022752'; SDKAPPID='1600027911';
break; break;
case 'trial': //体验版环境 case 'trial': //体验版环境
// host =`${Hosts.host_prod}`; // host =`${Hosts.host_prod}`;
@ -33,7 +33,7 @@
imghost=`${Hosts.img_dev}`; imghost=`${Hosts.img_dev}`;
agreehost=`${Hosts.agree_dev}`; agreehost=`${Hosts.agree_dev}`;
SECRETKEY='fc45ab469ca632a700166973d87b3a6f56a855cb92d7cffb54e4d37135c097da'; SECRETKEY='fc45ab469ca632a700166973d87b3a6f56a855cb92d7cffb54e4d37135c097da';
SDKAPPID='1600022752'; SDKAPPID='1600027911';
break; break;
case 'release': case 'release':
host =`${Hosts.host_prod}`; host =`${Hosts.host_prod}`;