优化视频通话
2
main.js
|
|
@ -29,7 +29,7 @@ export function createApp() {
|
|||
app.config.globalProperties.$system = plus.os.name;
|
||||
// #endif
|
||||
app.config.globalProperties.$systemInfo = systemInfo
|
||||
uni.setStorageSync('version', '1.0.6.sp13')
|
||||
uni.setStorageSync('version', '1.0.6.sp15')
|
||||
app.config.globalProperties.$version = uni.getStorageSync('version')
|
||||
app.use(globalMethods);
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
<template>
|
||||
<view class="shadow-up"></view>
|
||||
<view class="shadow-down"></view>
|
||||
<!-- 水印 -->
|
||||
<view v-if="$isVip()">
|
||||
<watermark dark="light" source="uni_alipay_other_videoChat" />
|
||||
|
|
@ -22,8 +24,8 @@
|
|||
</view>
|
||||
<view class="top-view">
|
||||
|
||||
<image style="height: 136rpx;width:136rpx;object-fit: cover;" :src="videoData.chat.other.avatar"
|
||||
mode="aspectFill">
|
||||
<image style="height: 136rpx;width:136rpx;object-fit: cover;border-radius: 12rpx;"
|
||||
:src="videoData.chat.other.avatar" mode="aspectFill">
|
||||
</image>
|
||||
<text class="nickname">{{ videoData.chat.other.name }}</text>
|
||||
<view class="dot-view">
|
||||
|
|
@ -72,35 +74,27 @@
|
|||
<!-- 麦克风 -->
|
||||
<view class="control-item">
|
||||
<image class="control-btn" :class="{ active: videoData.micOn }" @click="changeInfo('micOn')"
|
||||
:src="videoData.micOn ? '/static/image/other/video-call/mic-on.png' : '/static/image/other/video-call/mic-off.png'">
|
||||
:src="videoData.micOn ? '/static/image/other/video-call/mic-on.png' : '/static/image/other/video-call/unMic.png'">
|
||||
</image>
|
||||
<!-- <view class="" :class="{ active: videoData.micOn }" >
|
||||
|
||||
</view> -->
|
||||
<text class="control-label">{{ videoData.micOn ? '麦克风已开' : '麦克风已关' }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 摄像头 -->
|
||||
<view class="control-item">
|
||||
<image class="control-btn" :class="{ active: videoData.cameraOn }" @click="changeInfo('cameraOn')"
|
||||
:src="videoData.cameraOn ? '/static/image/other/video-call/camera-on.png' : '/static/image/other/video-call/camera-off.png'">
|
||||
:src="videoData.cameraOn ? '/static/image/other/video-call/camera-on.png' : '/static/image/other/video-call/unCamera.png'">
|
||||
</image>
|
||||
<!-- <view class="control-btn" :class="{ active: videoData.cameraOn }" @click="changeInfo('cameraOn')">
|
||||
|
||||
</view> -->
|
||||
<text class="control-label">{{ videoData.cameraOn ? '摄像头已开' : '摄像头已关' }}</text>
|
||||
</view>
|
||||
<!-- 背景模糊 -->
|
||||
<view class="control-item">
|
||||
<image class="control-btn" style="background: #00000080;"
|
||||
src="/static/image/other/video-call/xvnibeijing.png">
|
||||
<image class="control-btn" src="/static/image/other/video-call/xvnibeijing.png">
|
||||
</image>
|
||||
<text class="control-label">背景模糊</text>
|
||||
</view>
|
||||
<!-- 旋转摄像头 -->
|
||||
<view class="control-item">
|
||||
<image class="control-btn" style="background: #00000080;"
|
||||
src="/static/image/other/video-call/xuanzhuan.png">
|
||||
<image class="control-btn" src="/static/image/other/video-call/xuanzhuan.png">
|
||||
</image>
|
||||
<text class="control-label">翻转</text>
|
||||
</view>
|
||||
|
|
@ -112,8 +106,8 @@
|
|||
src="/static/image/other/video-call/hangup.png">
|
||||
</image>
|
||||
|
||||
<image class="hangup-btn" style="margin: 0; background: #00000080;"
|
||||
src="/static/image/other/video-call/jieting.png" @click="answerCall">
|
||||
<image class="hangup-btn" style="margin: 0;" src="/static/image/other/video-call/jieting.png"
|
||||
@click="answerCall">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -224,7 +218,7 @@
|
|||
<!-- 麦克风 -->
|
||||
<view class="control-item">
|
||||
<image class="control-btn" :class="{ active: videoData.micOn }" @click="changeInfo('micOn')"
|
||||
:src="videoData.micOn ? '/static/image/other/video-call/mic-on.png' : '/static/image/other/video-call/mic-off.png'">
|
||||
:src="videoData.micOn ? '/static/image/other/video-call/mic-on.png' : '/static/image/other/video-call/unMic.png'">
|
||||
</image>
|
||||
<!-- <view class="" :class="{ active: videoData.micOn }" >
|
||||
|
||||
|
|
@ -235,35 +229,27 @@
|
|||
<!-- 扬声器 -->
|
||||
<view class="control-item">
|
||||
<image class="control-btn" :class="{ active: videoData.speakerOn }" @click="changeInfo('speakerOn')"
|
||||
:src="videoData.speakerOn ? '/static/image/other/video-call/speaker-on.png' : '/static/image/other/video-call/speaker-off.png'">
|
||||
:src="videoData.speakerOn ? '/static/image/other/video-call/speaker-on.png' : '/static/image/other/video-call/unSpeaker.png'">
|
||||
</image>
|
||||
<!-- <view class="" :class="{ active: videoData.speakerOn }" @click="changeInfo('speakerOn')">
|
||||
|
||||
</view> -->
|
||||
<text class="control-label">{{ videoData.speakerOn ? '扬声器已开' : '扬声器已关' }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 摄像头 -->
|
||||
<view class="control-item">
|
||||
<image class="control-btn" :class="{ active: videoData.cameraOn }" @click="changeInfo('cameraOn')"
|
||||
:src="videoData.cameraOn ? '/static/image/other/video-call/camera-on.png' : '/static/image/other/video-call/camera-off.png'">
|
||||
:src="videoData.cameraOn ? '/static/image/other/video-call/camera-on.png' : '/static/image/other/video-call/unCamera.png'">
|
||||
</image>
|
||||
<!-- <view class="control-btn" :class="{ active: videoData.cameraOn }" @click="changeInfo('cameraOn')">
|
||||
|
||||
</view> -->
|
||||
<text class="control-label">{{ videoData.cameraOn ? '摄像头已开' : '摄像头已关' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="control-buttons" style="margin-bottom: 0;">
|
||||
<image class="hangup-btn" style="background: #00000080;"
|
||||
src="/static/image/other/video-call/xvnibeijing.png">
|
||||
<image class="hangup-btn" src="/static/image/other/video-call/xvnibeijing.png">
|
||||
</image>
|
||||
|
||||
<!-- 挂断按钮 -->
|
||||
<image class="hangup-btn" @click="hangup" src="/static/image/other/video-call/hangup.png"></image>
|
||||
|
||||
<image class="hangup-btn" style="background: #00000080;"
|
||||
src="/static/image/other/video-call/xuanzhuan.png">
|
||||
<image class="hangup-btn" src="/static/image/other/video-call/xuanzhuan.png">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -333,7 +319,7 @@
|
|||
<view style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<text
|
||||
style="font-size: 24rpx; color: #999; flex: 1; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; margin-right: 20rpx;">{{
|
||||
videoData.chat.me.videoUrl }}</text>
|
||||
getFileName(videoData.chat.me.videoUrl) }}</text>
|
||||
<button size="mini" style="margin: 0; background: #187AFF; color: #fff;"
|
||||
@click="uploadMedia('me', 'video')">上传</button>
|
||||
</view>
|
||||
|
|
@ -344,7 +330,7 @@
|
|||
<view style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<text
|
||||
style="font-size: 24rpx; color: #999; flex: 1; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; margin-right: 20rpx;">{{
|
||||
videoData.chat.other.videoUrl }}</text>
|
||||
getFileName(videoData.chat.other.videoUrl) }}</text>
|
||||
<button size="mini" style="margin: 0; background: #187AFF; color: #fff;"
|
||||
@click="uploadMedia('other', 'video')">上传</button>
|
||||
</view>
|
||||
|
|
@ -404,6 +390,13 @@ const getVideoUrl = (url) => {
|
|||
return url
|
||||
}
|
||||
|
||||
// 提取完整路径中的文件名
|
||||
const getFileName = (path) => {
|
||||
if (!path) return ''
|
||||
// 兼容处理正反斜杠
|
||||
return path.split('/').pop().split('\\').pop()
|
||||
}
|
||||
|
||||
const buttonGroup = computed(() => [
|
||||
{
|
||||
name: "编辑时间",
|
||||
|
|
@ -1390,7 +1383,6 @@ const stopTimer = () => {
|
|||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #4a4a4a;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
|
@ -1604,6 +1596,7 @@ const stopTimer = () => {
|
|||
width: 92rpx;
|
||||
height: 92rpx;
|
||||
position: absolute;
|
||||
border-radius: 12rpx;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
|
@ -1673,4 +1666,26 @@ const stopTimer = () => {
|
|||
height: 410rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.shadow-up {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 750rpx;
|
||||
height: 240rpx;
|
||||
background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.shadow-down {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 750rpx;
|
||||
height: 240rpx;
|
||||
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1027,7 +1027,6 @@ const stopTimer = () => {
|
|||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #4a4a4a;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</template>
|
||||
</nav-bar>
|
||||
<view class="content-box flex-column flex-cneter" @click="editPaymentInfo">
|
||||
<image v-if="paymetInfo.userImg" class="user-img" :src="paymetInfo.userImg"></image>
|
||||
<image v-if="paymetInfo.userImg" class="user-img" :src="paymetInfo.userImg" mode="aspectFill"></image>
|
||||
<text class="product-name">{{ paymetInfo.productName }}</text>
|
||||
<view class="money flex wx-font-medium" :style="{ 'margin-top': paymetInfo.userImg ? '78rpx' : '46rpx' }">
|
||||
<image class="symbol" src="/static/image/other/payment-success/symbol-yuan.png"></image>{{
|
||||
|
|
@ -140,13 +140,6 @@ const paymetInfo = ref({
|
|||
});
|
||||
|
||||
onShow(() => {
|
||||
const cachedInfo = storage.get('wx_payment_success_info');
|
||||
if (cachedInfo) {
|
||||
paymetInfo.value = cachedInfo;
|
||||
} else {
|
||||
paymetInfo.value = { productName: '王者荣耀', money: 168 };
|
||||
}
|
||||
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#FFFFFF')
|
||||
setTimeout(() => {
|
||||
|
|
@ -156,6 +149,12 @@ onShow(() => {
|
|||
})
|
||||
|
||||
onLoad(async () => {
|
||||
const cachedInfo = storage.get('wx_payment_success_info');
|
||||
if (cachedInfo) {
|
||||
paymetInfo.value = cachedInfo;
|
||||
} else {
|
||||
paymetInfo.value = { productName: '王者荣耀', money: 168 };
|
||||
}
|
||||
|
||||
// 微信支付成功页面埋点
|
||||
proxy.$apiUserEvent('all', {
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 871 B |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.4 KiB |