医生账户

This commit is contained in:
zoujiandong
2023-12-14 13:03:47 +08:00
parent c4d5df8782
commit d6421a78a1
2 changed files with 44 additions and 8 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ Page({
balance_account: response.data.balance_account,
amount_total_month: response.data.amount_total_month,
doctor_today_inquiry_total:response.data.doctor_today_inquiry_total,
doctor_day_completed_amount_total:response.data.doctor_today_inquiry_total,
doctor_day_completed_amount_total:response.data.doctor_day_completed_amount_total,
withdrawal_amount_month: response.data.withdrawal_amount_month,
bill: response.data.bill,
})
@@ -299,16 +299,52 @@ Component({
displayFlag: '',
});
},
openRecord(e,callback){
let THIS=this;
return new Promise((resolve, reject) => {
wx.getSetting({
success(res) {
if(!(res.authSetting['scope.record'])) { // 关闭订阅消息主按钮
return wx.showModal({
title: '提示',
content: '您已关闭麦克风权限,请点击“确认”按钮在设置中打开麦克风权限。',
success: function (res) {
if (res.confirm) {
wx.openSetting({
success(res) {
}
});
}
},
complete(){
}
});
} else { // 开放订阅消息主按钮
callback(e,THIS);
resolve()
}
},
complete(){
wx.hideLoading();
}
})
})
},
// 长按录音
handleLongPress(e) {
this.openRecord(e,this.recording)
},
recording(e,THIS){
wx.aegis.reportEvent({
name: 'messageType',
ext1: 'messageType-audio',
ext2: wx.$chat_reportType,
ext3: wx.$chat_SDKAppID,
});
this.recorderManager.start({
THIS.recorderManager.start({
duration: 60000, // 录音的时长,单位 ms,最大值 600000(10 分钟)
sampleRate: 44100, // 采样率
numberOfChannels: 1, // 录音通道数
@@ -316,16 +352,16 @@ Component({
format: 'aac', // 音频格式,选择此格式创建的音频消息,可以在即时通信 IM 全平台(Android、iOS、微信小程序和Web)互通
});
this.timer=setInterval(()=>{
if(this.data.recordtime>59){
clearInterval(this.timer)
THIS.timer=setInterval(()=>{
if(THIS.data.recordtime>59){
clearInterval(THIS.timer)
};
this.setData({
recordtime:this.data.recordtime+1
THIS.setData({
recordtime:THIS.data.recordtime+1
});
},1000)
this.setData({
THIS.setData({
startPoint: e.touches[0],
title: '正在录音',
// isRecording : true,