删除nvue页面
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ ENV = 'development'
|
||||
|
||||
# VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
|
||||
|
||||
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7003'
|
||||
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
|
||||
|
||||
# VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
|
||||
+114
-87
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
export default {
|
||||
onLaunch: function () {
|
||||
onLaunch: function() {
|
||||
uni.onTabBarMidButtonTap(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/dialog',
|
||||
@@ -11,24 +11,24 @@
|
||||
plus.screen.lockOrientation('portrait-primary')
|
||||
// #endif
|
||||
},
|
||||
onShow: function () {
|
||||
|
||||
onShow: function() {
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
}
|
||||
onHide: function() {}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
||||
// @import "@/uni_modules/uview-ui/index.scss";
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'PingFangSC';
|
||||
src: url('@/static/font/PingFang-SC.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
view {
|
||||
box-sizing: border-box;
|
||||
font-family: 'PingFangSC';
|
||||
@@ -42,85 +42,6 @@
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.max_page {
|
||||
min-height: 100vh;
|
||||
}
|
||||
.mr-10 {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.mb-8 {
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.pt-8 {
|
||||
padding-top: 8rpx;
|
||||
}
|
||||
.mb-10 {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.mb-18 {
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
.mb-64 {
|
||||
margin-bottom: 64rpx;
|
||||
}
|
||||
.mb-30 {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.mb-36 {
|
||||
margin-bottom: 36rpx;
|
||||
}
|
||||
.mb-4 {
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
.fz-30 {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.fz-28 {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.fz-24 {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.w_100 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.h_100 {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
.flex-jcsb {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.flex-c-c {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tar {
|
||||
text-align: right;
|
||||
}
|
||||
.fw-600 {
|
||||
font-weight: 600;
|
||||
}
|
||||
.fw-400 {
|
||||
font-weight: 400;
|
||||
}
|
||||
.img_100 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.color-666{
|
||||
color: #666666;
|
||||
}
|
||||
.fl1 {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.font_pf {
|
||||
font-family: 'PingFangSC';
|
||||
}
|
||||
@@ -143,14 +64,120 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.max_page {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
|
||||
.mr-10 {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.mb-8 {
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.pt-8 {
|
||||
padding-top: 8rpx;
|
||||
}
|
||||
|
||||
.mb-10 {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.mb-18 {
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
.mb-64 {
|
||||
margin-bottom: 64rpx;
|
||||
}
|
||||
|
||||
.mb-30 {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.mb-36 {
|
||||
margin-bottom: 36rpx;
|
||||
}
|
||||
|
||||
.mb-4 {
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.fz-30 {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.fz-28 {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.fz-24 {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.w_100 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.h_100 {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.flex-jcsb {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.flex-c-c {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tar {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.fw-600 {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.fw-400 {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.img_100 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.color-666 {
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.fl1 {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.no-overflow {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.maoh{
|
||||
|
||||
.maoh {
|
||||
margin-right: 8rpx;
|
||||
margin-left: 2rpx;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -169,7 +169,6 @@ export class ProtocolCodec {
|
||||
// STRING 序列化:必须传入字符串(非 PING 消息已校验非空)
|
||||
serializedBody = textEncoder.encode(body as string);
|
||||
break;
|
||||
|
||||
case SerializationType.JSON:
|
||||
// 断言:body 是 string 或 object
|
||||
if (typeof body === 'string') {
|
||||
|
||||
@@ -22,8 +22,8 @@ const DEFAULT_AUTH_PARAMS = {
|
||||
user_id: '1001', // 默认用户ID(可从缓存/全局状态取)
|
||||
token: '', // 优先从缓存获取,避免硬编码
|
||||
name: '测试用户',
|
||||
device_id: uni.getSystemInfoSync().deviceId || '', // 设备ID(补充)
|
||||
timestamp: Date.now() // 时间戳(防篡改)
|
||||
// device_id: uni.getSystemInfoSync().deviceId || '', // 设备ID(补充)
|
||||
// timestamp: Date.now() // 时间戳(防篡改)
|
||||
};
|
||||
// const wsUrl = 'ws://127.0.0.1:8000/ws/audio'
|
||||
const url = '/trapractice/voiceCallSocket/voiceCall'
|
||||
@@ -44,6 +44,7 @@ export default function useWebSocket(aaas = null, options = {}) {
|
||||
...DEFAULT_AUTH_PARAMS,
|
||||
...authParams,
|
||||
};
|
||||
|
||||
ws.value = uni.connectSocket({
|
||||
url: wsUrl,
|
||||
fail: () => {
|
||||
@@ -54,15 +55,12 @@ export default function useWebSocket(aaas = null, options = {}) {
|
||||
}
|
||||
});
|
||||
ws.value.onOpen((res) => {
|
||||
console.log('onOpen', finalAuthParams);
|
||||
ws.value.send({
|
||||
data: ProtocolCodec.pack(MessageType.IDENTITY, finalAuthParams)
|
||||
});
|
||||
});
|
||||
ws.value.onError((err) => onError(err))
|
||||
|
||||
|
||||
|
||||
ws.value.onClose((err) => {
|
||||
console.log('onClose', err);
|
||||
onClose(err)
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
'traInterTyp': dataInfo.traInterTyp,
|
||||
'traId': dataInfo.traId,
|
||||
'chaId': dataInfo.chaId,
|
||||
'preview': true,
|
||||
'preview': true
|
||||
},
|
||||
onStartRecord: onStartRecord,
|
||||
playPcmCallback: (res) => talkSpeakerRef.value.playPCM(res),
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="cssss">
|
||||
<CameraPreview ref="CameraPreviewRef"></CameraPreview>
|
||||
</view>
|
||||
<view style="margin-top: 400rpx">
|
||||
<button class="btn" @click="startPreview">开启摄像头预览</button>
|
||||
<button class="btn" @click="stopPreview">关闭摄像头预览</button>
|
||||
<button class="btn" @click="switchCamera">切换摄像头</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import CameraPreview from './CameraPreview';
|
||||
import { onReady } from '@dcloudio/uni-app';
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
|
||||
const CameraPreviewRef = ref(null);
|
||||
|
||||
const instance = getCurrentInstance();
|
||||
const componentProxy = instance.ctx;
|
||||
const startPreview = () => {
|
||||
CameraPreviewRef.value.startPreview();
|
||||
};
|
||||
const stopPreview = () => {
|
||||
CameraPreviewRef.value.stopPreview();
|
||||
};
|
||||
const switchCamera = () => {
|
||||
CameraPreviewRef.value.switchCamera();
|
||||
};
|
||||
onReady(() => {
|
||||
CameraPreviewRef.value.init(componentProxy);
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user