Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop
This commit is contained in:
@@ -5,5 +5,7 @@ npm 淘宝源下载 :npm config set registry https://registry.npmmirror.com
|
||||
npm config set registry http://25.12.10.69:8081/repository/aliyun-npm/
|
||||
|
||||
|
||||
npm install @dcloudio/uni-uts-v1 http://25.12.10.69:8081/repository/npm/
|
||||
|
||||
npm install --registry=https://registry.npmmirror.com
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
oneTimeRead()
|
||||
.then((res) => {
|
||||
data_list.value.forEach((item) => {
|
||||
item.isRead = '02';
|
||||
item.isMsg = 'N';
|
||||
});
|
||||
common.hideLoading();
|
||||
setTimeout(() => {
|
||||
|
||||
+15
-15
@@ -19,11 +19,11 @@
|
||||
{{ dataInfo.sceneDesc }}
|
||||
</view>
|
||||
<view class="close-btn" @click="closeTalking"></view>
|
||||
<canvas canvas-id="firstCanvas" style="width: 176px; height: 144px;"></canvas>
|
||||
<!-- <canvas canvas-id="firstCanvas" style="width: 176px; height: 144px;"></canvas> -->
|
||||
</view>
|
||||
<talk-microphone ref="talkMicrophoneRef" @noPermission="microphoneNoPermission"></talk-microphone>
|
||||
<talk-speaker ref="talkSpeakerRef" @playOver="playOver"></talk-speaker>
|
||||
<!-- <talk-camera ref="talkCameraRef" v-if="isVideo"></talk-camera> -->
|
||||
<talk-camera ref="talkCameraRef" v-if="isVideo"></talk-camera>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
@@ -43,7 +43,7 @@
|
||||
const { initConnection, close, send, isRecording } = useWebSocket();
|
||||
const isVideo = ref(false);
|
||||
const isVideoStyle = computed(() => dataInfo.traInterTyp === '03');
|
||||
const context = uni.createCanvasContext('firstCanvas');
|
||||
// const context = uni.createCanvasContext('firstCanvas');
|
||||
const dataInfo = reactive({
|
||||
traId: '',
|
||||
chaId: '',
|
||||
@@ -71,7 +71,7 @@
|
||||
});
|
||||
};
|
||||
const test = () => {
|
||||
// isVideo.value && talkCameraRef.value.switchCamera();
|
||||
isVideo.value && talkCameraRef.value.switchCamera();
|
||||
};
|
||||
const clearAutomaticEndTimeTimer = () => {
|
||||
if (automaticEndTimeTimer){
|
||||
@@ -83,7 +83,7 @@
|
||||
const destroy = (type = 0) => {
|
||||
clearAutomaticEndTimeTimer()
|
||||
if (type <= 0) {
|
||||
// isVideo.value && talkCameraRef.value.stopPreview();
|
||||
isVideo.value && talkCameraRef.value.stopPreview();
|
||||
talkMicrophoneRef.value.stop();
|
||||
talkSpeakerRef.value.close();
|
||||
}
|
||||
@@ -165,7 +165,7 @@
|
||||
// 当ws连接成功时候
|
||||
console.log('连接成功开始' + dataInfo.traInterTypDesc);
|
||||
isRecording.value = true;
|
||||
// isVideo.value && talkCameraRef.value.startPreview();
|
||||
isVideo.value && talkCameraRef.value.startPreview();
|
||||
if (timer) clearInterval(timer); // 清除旧的定时器,避免多个定时器叠加
|
||||
timer = setInterval(updateRemaining, 400);
|
||||
// 立即执行一次
|
||||
@@ -277,16 +277,16 @@
|
||||
onReady(() => {
|
||||
if (isVideo.value) {
|
||||
// const context = uni.createCanvasContext('firstCanvas');
|
||||
startCameraPreview((base64) => {
|
||||
context.drawImage(base64, 0, 0, 176, 144);
|
||||
context.draw(true);
|
||||
})
|
||||
// startCameraPreview((base64) => {
|
||||
// context.drawImage(base64, 0, 0, 176, 144);
|
||||
// context.draw(true);
|
||||
// })
|
||||
|
||||
// const instance = getCurrentInstance();
|
||||
// const componentProxy = instance.ctx;
|
||||
// nextTick(() => {
|
||||
// talkCameraRef.value.init(componentProxy);
|
||||
// });
|
||||
const instance = getCurrentInstance();
|
||||
const componentProxy = instance.ctx;
|
||||
nextTick(() => {
|
||||
talkCameraRef.value.init(componentProxy);
|
||||
});
|
||||
}
|
||||
});
|
||||
onUnmounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user