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 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
|
npm install --registry=https://registry.npmmirror.com
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
oneTimeRead()
|
oneTimeRead()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
data_list.value.forEach((item) => {
|
data_list.value.forEach((item) => {
|
||||||
item.isRead = '02';
|
item.isMsg = 'N';
|
||||||
});
|
});
|
||||||
common.hideLoading();
|
common.hideLoading();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
+15
-15
@@ -19,11 +19,11 @@
|
|||||||
{{ dataInfo.sceneDesc }}
|
{{ dataInfo.sceneDesc }}
|
||||||
</view>
|
</view>
|
||||||
<view class="close-btn" @click="closeTalking"></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>
|
</view>
|
||||||
<talk-microphone ref="talkMicrophoneRef" @noPermission="microphoneNoPermission"></talk-microphone>
|
<talk-microphone ref="talkMicrophoneRef" @noPermission="microphoneNoPermission"></talk-microphone>
|
||||||
<talk-speaker ref="talkSpeakerRef" @playOver="playOver"></talk-speaker>
|
<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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
const { initConnection, close, send, isRecording } = useWebSocket();
|
const { initConnection, close, send, isRecording } = useWebSocket();
|
||||||
const isVideo = ref(false);
|
const isVideo = ref(false);
|
||||||
const isVideoStyle = computed(() => dataInfo.traInterTyp === '03');
|
const isVideoStyle = computed(() => dataInfo.traInterTyp === '03');
|
||||||
const context = uni.createCanvasContext('firstCanvas');
|
// const context = uni.createCanvasContext('firstCanvas');
|
||||||
const dataInfo = reactive({
|
const dataInfo = reactive({
|
||||||
traId: '',
|
traId: '',
|
||||||
chaId: '',
|
chaId: '',
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const test = () => {
|
const test = () => {
|
||||||
// isVideo.value && talkCameraRef.value.switchCamera();
|
isVideo.value && talkCameraRef.value.switchCamera();
|
||||||
};
|
};
|
||||||
const clearAutomaticEndTimeTimer = () => {
|
const clearAutomaticEndTimeTimer = () => {
|
||||||
if (automaticEndTimeTimer){
|
if (automaticEndTimeTimer){
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
const destroy = (type = 0) => {
|
const destroy = (type = 0) => {
|
||||||
clearAutomaticEndTimeTimer()
|
clearAutomaticEndTimeTimer()
|
||||||
if (type <= 0) {
|
if (type <= 0) {
|
||||||
// isVideo.value && talkCameraRef.value.stopPreview();
|
isVideo.value && talkCameraRef.value.stopPreview();
|
||||||
talkMicrophoneRef.value.stop();
|
talkMicrophoneRef.value.stop();
|
||||||
talkSpeakerRef.value.close();
|
talkSpeakerRef.value.close();
|
||||||
}
|
}
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
// 当ws连接成功时候
|
// 当ws连接成功时候
|
||||||
console.log('连接成功开始' + dataInfo.traInterTypDesc);
|
console.log('连接成功开始' + dataInfo.traInterTypDesc);
|
||||||
isRecording.value = true;
|
isRecording.value = true;
|
||||||
// isVideo.value && talkCameraRef.value.startPreview();
|
isVideo.value && talkCameraRef.value.startPreview();
|
||||||
if (timer) clearInterval(timer); // 清除旧的定时器,避免多个定时器叠加
|
if (timer) clearInterval(timer); // 清除旧的定时器,避免多个定时器叠加
|
||||||
timer = setInterval(updateRemaining, 400);
|
timer = setInterval(updateRemaining, 400);
|
||||||
// 立即执行一次
|
// 立即执行一次
|
||||||
@@ -277,16 +277,16 @@
|
|||||||
onReady(() => {
|
onReady(() => {
|
||||||
if (isVideo.value) {
|
if (isVideo.value) {
|
||||||
// const context = uni.createCanvasContext('firstCanvas');
|
// const context = uni.createCanvasContext('firstCanvas');
|
||||||
startCameraPreview((base64) => {
|
// startCameraPreview((base64) => {
|
||||||
context.drawImage(base64, 0, 0, 176, 144);
|
// context.drawImage(base64, 0, 0, 176, 144);
|
||||||
context.draw(true);
|
// context.draw(true);
|
||||||
})
|
// })
|
||||||
|
|
||||||
// const instance = getCurrentInstance();
|
const instance = getCurrentInstance();
|
||||||
// const componentProxy = instance.ctx;
|
const componentProxy = instance.ctx;
|
||||||
// nextTick(() => {
|
nextTick(() => {
|
||||||
// talkCameraRef.value.init(componentProxy);
|
talkCameraRef.value.init(componentProxy);
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user