Browse Source

fix: 文档路径更新

master
xsx 2 years ago
parent
commit
9f7a3d4970
  1. 2
      im-ui/src/view/Login.vue
  2. 21
      im-uniapp/components/chat-record/chat-record.vue

2
im-ui/src/view/Login.vue

@ -20,7 +20,7 @@
<li>web端音视频功能优化:支持语音呼叫会话中加入通话状态消息</li> <li>web端音视频功能优化:支持语音呼叫会话中加入通话状态消息</li>
<li>uniapp端支持音视频通话并与web端打通</li> <li>uniapp端支持音视频通话并与web端打通</li>
<li>uniapp端音视频源码通话源码暂未开源需付费获取: <li>uniapp端音视频源码通话源码暂未开源需付费获取:
<a href="https://www.yuque.com/u1475064/oncgyg/vi7engzluty594s2" target="_blank">uniapp端音视频通源码购买说明</a> <a href="https://www.yuque.com/u1475064/mufu2a/vi7engzluty594s2" target="_blank">uniapp端音视频通源码购买说明</a>
</li> </li>
</ul> </ul>
</div> </div>

21
im-uniapp/components/chat-record/chat-record.vue

@ -1,7 +1,10 @@
<template> <template>
<view class="chat-record"> <view class="chat-record">
<view class="chat-record-bar" id="chat-record-bar" :style="recordBarStyle" @touchstart="onStartRecord" <view class="chat-record-bar" id="chat-record-bar" :style="recordBarStyle"
@touchmove="onTouchMove" @touchend.prevent="onEndRecord">{{recording?'正在录音':'长按 说话'}}</view> @click.stop=""
@touchstart.prevent="onStartRecord"
@touchmove.prevent="onTouchMove"
@touchend.prevent="onEndRecord">{{recording?'正在录音':'长按 说话'}}</view>
<view v-if="recording" class="chat-record-window" :style="recordWindowStyle"> <view v-if="recording" class="chat-record-window" :style="recordWindowStyle">
<view class="rc-wave"> <view class="rc-wave">
<text class="note" style="--d: 0"></text> <text class="note" style="--d: 0"></text>
@ -13,7 +16,7 @@
<text class="note" style="--d: 6"></text> <text class="note" style="--d: 6"></text>
</view> </view>
<view class="rc-tip">{{recordTip}}</view> <view class="rc-tip">{{recordTip}}</view>
<view class="cancel-btn"> <view class="cancel-btn" @click="onCancel">
<uni-icons :class="moveToCancel?'red':'black'" type="clear" <uni-icons :class="moveToCancel?'red':'black'" type="clear"
:size="moveToCancel?45:40"></uni-icons> :size="moveToCancel?45:40"></uni-icons>
</view> </view>
@ -40,7 +43,19 @@
const moveY = e.touches[0].clientY; const moveY = e.touches[0].clientY;
this.moveToCancel = moveY < this.recordBarTop-40; this.moveToCancel = moveY < this.recordBarTop-40;
}, },
onCancel(){
if(this.recording){
this.moveToCancel = true;
this.onEndRecord();
}
},
onStartRecord() { onStartRecord() {
/* 使@touchend
一直处于录音状态这里允许用户再次点击发送语音并结束录音 */
if(this.recording){
this.onEndRecord();
return;
}
console.log("开始录音") console.log("开始录音")
this.moveToCancel = false; this.moveToCancel = false;
this.initRecordBar(); this.initRecordBar();

Loading…
Cancel
Save