QAQ
This commit is contained in:
6
.idea/misc.xml
generated
6
.idea/misc.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
85
.idea/workspace.xml
generated
85
.idea/workspace.xml
generated
@@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="fcbd9e13-46ae-4871-b6a6-f9012cc02ac4" name="更改" comment="1">
|
||||
<change beforePath="$PROJECT_DIR$/App.vue" beforeDir="false" afterPath="$PROJECT_DIR$/App.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/TUIKit/components/TUIChat/message-input-toolbar/call-view/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/TUIKit/components/TUIChat/message-input-toolbar/call-view/index.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/manifest.json" beforeDir="false" afterPath="$PROJECT_DIR$/manifest.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pages.json" beforeDir="false" afterPath="$PROJECT_DIR$/pages.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/stores/user.js" beforeDir="false" afterPath="$PROJECT_DIR$/stores/user.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/uni_modules/RongCloud-CallWrapper/lib/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/uni_modules/RongCloud-CallWrapper/lib/index.js" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="PUSH_TAGS">
|
||||
<GitPushTagMode>
|
||||
<option name="argument" value="--tags" />
|
||||
<option name="title" value="All" />
|
||||
</GitPushTagMode>
|
||||
</option>
|
||||
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
||||
<map>
|
||||
<entry key="$PROJECT_DIR$" value="master" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="MarkdownSettingsMigration">
|
||||
<option name="stateVersion" value="1" />
|
||||
</component>
|
||||
<component name="ProjectId" id="39CgkMFHilJz3KjB9U6uRRYi97V" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"ts.external.directory.path": "D:\\Software\\developTool\\IntelliJ IDEA 2023.1\\plugins\\javascript-impl\\jsLanguageServicesImpl\\external",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="默认任务">
|
||||
<changelist id="fcbd9e13-46ae-4871-b6a6-f9012cc02ac4" name="更改" comment="" />
|
||||
<created>1770205618468</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1770205618468</updated>
|
||||
<workItem from="1770205619734" duration="172000" />
|
||||
<workItem from="1770207280751" duration="89000" />
|
||||
<workItem from="1770218245313" duration="141000" />
|
||||
<workItem from="1770218395615" duration="626000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="1">
|
||||
<created>1770218264881</created>
|
||||
<option name="number" value="00001" />
|
||||
<option name="presentableId" value="LOCAL-00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1770218264881</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="2" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="1" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="1" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,125 +1,138 @@
|
||||
<script setup lang="ts">
|
||||
import * as CallLib from '@/uni_modules/RongCloud-CallWrapper/lib/index.esm'
|
||||
import ToolbarItemContainer from '../toolbar-item-container/index.vue'
|
||||
import custom from '../../../../assets/icon/telephone-icon.svg'
|
||||
import videoIcon from '../../../../assets/icon/video-icon.svg'
|
||||
import { isUniFrameWork } from '../../../../utils/env'
|
||||
import { computed, ref } from 'vue'
|
||||
import { type IConversationModel } from '@tencentcloud/chat-uikit-engine-lite'
|
||||
// import * as CallLib from '@/uni_modules/RongCloud-CallWrapper/lib/index.esm'
|
||||
import ToolbarItemContainer from '../toolbar-item-container/index.vue'
|
||||
import custom from '../../../../assets/icon/telephone-icon.svg'
|
||||
import videoIcon from '../../../../assets/icon/video-icon.svg'
|
||||
import { isUniFrameWork } from '../../../../utils/env'
|
||||
import { computed, ref } from 'vue'
|
||||
import { type IConversationModel } from '@tencentcloud/chat-uikit-engine-lite'
|
||||
|
||||
// CallLib.init({});
|
||||
// CallLib.init({});
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
/** 通话状态: 0 语音 1 视频 */
|
||||
type ?: '0' | '1'
|
||||
/** 信息数据 */
|
||||
currentConversation ?: IConversationModel
|
||||
}>(),
|
||||
{
|
||||
type: '0',
|
||||
currentConversation: () => ({} as IConversationModel)
|
||||
}
|
||||
)
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
/** 通话状态: 0 语音 1 视频 */
|
||||
type?: '0' | '1'
|
||||
/** 信息数据 */
|
||||
currentConversation?: IConversationModel
|
||||
}>(),
|
||||
{
|
||||
type: '0',
|
||||
currentConversation: () => ({} as IConversationModel)
|
||||
}
|
||||
)
|
||||
|
||||
/** 语音通话状态 */
|
||||
const isType = computed(() => props.type === '0')
|
||||
/** 语音通话状态 */
|
||||
const isType = computed(() => props.type === '0')
|
||||
|
||||
const evaluateIcon = isType.value ? custom : videoIcon
|
||||
const evaluateIcon = isType.value ? custom : videoIcon
|
||||
|
||||
const emits = defineEmits(['onDialogPopupShowOrHide'])
|
||||
const emits = defineEmits(['onDialogPopupShowOrHide'])
|
||||
|
||||
const container = ref()
|
||||
const closeDialog = () => {
|
||||
container?.value?.toggleDialogDisplay(false)
|
||||
}
|
||||
const container = ref()
|
||||
const closeDialog = () => {
|
||||
container?.value?.toggleDialogDisplay(false)
|
||||
}
|
||||
|
||||
const onDialogShow = () => {
|
||||
console.log('弹出窗口', isType.value)
|
||||
console.log("弹出窗口", props.currentConversation)
|
||||
let targetId = props.currentConversation.userProfile.userID
|
||||
// emits('onDialogPopupShowOrHide', true)
|
||||
callOut('single', isType.value ? 'audio' : 'video', targetId)
|
||||
}
|
||||
const onDialogShow = () => {
|
||||
console.log('弹出窗口', isType.value)
|
||||
console.log('弹出窗口', props.currentConversation)
|
||||
let targetId = props.currentConversation.userProfile.userID
|
||||
// emits('onDialogPopupShowOrHide', true)
|
||||
callOut('single', isType.value ? 'audio' : 'video', targetId)
|
||||
}
|
||||
|
||||
function callOut(callSelect, mediaSelect, targetId) {
|
||||
console.log('callSelect: ',callSelect);
|
||||
console.log('mediaSelect: ',mediaSelect);
|
||||
console.log('targetId: ',targetId);
|
||||
//单聊音频
|
||||
if (callSelect === 'single' && mediaSelect === 'audio') {
|
||||
if (targetId === '') {
|
||||
uni.showToast({
|
||||
title: "请输入对方ID",
|
||||
icon: "error",
|
||||
duration: 2000
|
||||
})
|
||||
return;
|
||||
}
|
||||
callMsg(mediaSelect, targetId, callSelect);
|
||||
} else if (callSelect === 'single' && mediaSelect === 'video') {
|
||||
if (targetId === '') {
|
||||
uni.showToast({
|
||||
title: "请输入对方ID",
|
||||
icon: "error",
|
||||
duration: 2000
|
||||
})
|
||||
return;
|
||||
}
|
||||
//单聊视频
|
||||
callMsg(mediaSelect, targetId, callSelect);
|
||||
}
|
||||
}
|
||||
function callOut(callSelect, mediaSelect, targetId) {
|
||||
console.log('callSelect: ', callSelect)
|
||||
console.log('mediaSelect: ', mediaSelect)
|
||||
console.log('targetId: ', targetId)
|
||||
//单聊音频
|
||||
if (callSelect === 'single' && mediaSelect === 'audio') {
|
||||
if (targetId === '') {
|
||||
uni.showToast({
|
||||
title: '请输入对方ID',
|
||||
icon: 'error',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
callMsg(mediaSelect, targetId, callSelect)
|
||||
} else if (callSelect === 'single' && mediaSelect === 'video') {
|
||||
if (targetId === '') {
|
||||
uni.showToast({
|
||||
title: '请输入对方ID',
|
||||
icon: 'error',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
//单聊视频
|
||||
callMsg(mediaSelect, targetId, callSelect)
|
||||
}
|
||||
}
|
||||
|
||||
function callMsg(mediaSelect,targetId,callSelect){
|
||||
console.log(targetId)
|
||||
console.log(mediaSelect)
|
||||
uni.setStorageSync('room-parameters', {
|
||||
callType: 'out',
|
||||
mediaType: mediaSelect,
|
||||
targetId: targetId,
|
||||
callSelect:callSelect
|
||||
});
|
||||
uni.navigateTo({
|
||||
url:'/pages/room/room'
|
||||
});
|
||||
}
|
||||
function callMsg(mediaSelect, targetId, callSelect) {
|
||||
console.log(targetId)
|
||||
console.log(mediaSelect)
|
||||
uni.setStorageSync('room-parameters', {
|
||||
callType: 'out',
|
||||
mediaType: mediaSelect,
|
||||
targetId: targetId,
|
||||
callSelect: callSelect
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: '/pages/room/room'
|
||||
})
|
||||
}
|
||||
|
||||
const onDialogClose = () => {
|
||||
console.log('关闭窗口')
|
||||
emits('onDialogPopupShowOrHide', false)
|
||||
}
|
||||
|
||||
const onDialogClose = () => {
|
||||
console.log('关闭窗口')
|
||||
emits('onDialogPopupShowOrHide', false)
|
||||
}
|
||||
|
||||
const onDial = () => {
|
||||
const data = props.currentConversation.userProfile
|
||||
// data.userID
|
||||
CallLib.enableMicrophone(true)
|
||||
CallLib.startSingleCall(data.userID, 0, '邀请您进行语音通话')
|
||||
}
|
||||
const onDial = () => {
|
||||
const data = props.currentConversation.userProfile
|
||||
// data.userID
|
||||
CallLib.enableMicrophone(true)
|
||||
CallLib.startSingleCall(data.userID, 0, '邀请您进行语音通话')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ToolbarItemContainer ref="container" needBottomPopup :iconFile="evaluateIcon"
|
||||
:iconWidth="isUniFrameWork ? '34px' : '20px'" :iconHeight="isUniFrameWork ? '34px' : '20px'"
|
||||
:title="isType ? '语音通话' : '视频通话'" @onDialogShow="onDialogShow" @onDialogClose="onDialogClose">
|
||||
<view class="box-index">
|
||||
<view class="top-icon">
|
||||
<uni-icons type="back" color="#ffffff" size="42rpx" @click.stop="closeDialog"></uni-icons>
|
||||
</view>
|
||||
<ToolbarItemContainer
|
||||
ref="container"
|
||||
needBottomPopup
|
||||
:iconFile="evaluateIcon"
|
||||
:iconWidth="isUniFrameWork ? '34px' : '20px'"
|
||||
:iconHeight="isUniFrameWork ? '34px' : '20px'"
|
||||
:title="isType ? '语音通话' : '视频通话'"
|
||||
@onDialogShow="onDialogShow"
|
||||
@onDialogClose="onDialogClose"
|
||||
>
|
||||
<view class="box-index">
|
||||
<view class="top-icon">
|
||||
<uni-icons
|
||||
type="back"
|
||||
color="#ffffff"
|
||||
size="42rpx"
|
||||
@click.stop="closeDialog"
|
||||
></uni-icons>
|
||||
</view>
|
||||
|
||||
<button @click.stop="onDial">拨打</button>
|
||||
<button @click.stop="onDial">拨打</button>
|
||||
|
||||
<button @click.stop="
|
||||
<button
|
||||
@click.stop="
|
||||
() => {
|
||||
CallLib.enableMicrophone(true)
|
||||
CallLib.accept()
|
||||
}
|
||||
">
|
||||
接听
|
||||
</button>
|
||||
</view>
|
||||
</ToolbarItemContainer>
|
||||
"
|
||||
>
|
||||
接听
|
||||
</button>
|
||||
</view>
|
||||
</ToolbarItemContainer>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss" src="./style/index.scss"></style>
|
||||
<style scoped lang="scss" src="./style/index.scss"></style>
|
||||
|
||||
@@ -214,6 +214,9 @@
|
||||
* @param data
|
||||
*/
|
||||
const onConfirm = async (state, item) => {
|
||||
if (state == 1 && selectedList.value.length == 0) {
|
||||
return
|
||||
}
|
||||
const show = await showDialog(
|
||||
'提示',
|
||||
`确定分享${props.type == 1 ? '直播间' : '商品'}吗?`
|
||||
|
||||
@@ -73,7 +73,14 @@
|
||||
class="action-btn"
|
||||
src="/static/images/fengxiang.png"
|
||||
style="width: 72rpx; height: 72rpx;"
|
||||
@click="shareDialog = true"
|
||||
@click="navigateTo('/pages/shop-together/user', {
|
||||
type: 1,
|
||||
id: currentLive.liveID,
|
||||
text: currentLive.liveName,
|
||||
cover: currentLive.coverUrl,
|
||||
avatarUrl: currentLive.liveOwner.avatarUrl
|
||||
title: currentLive.liveOwner.title
|
||||
})"
|
||||
/>
|
||||
<Like />
|
||||
</view>
|
||||
@@ -102,17 +109,10 @@
|
||||
<ActionSheet v-model="isShowCoGuestSheet" :title="coGuestSheetTitle" :itemList="coGuestSheetItems"
|
||||
@select="onCoGuestSheetSelect" />
|
||||
|
||||
<share-popup
|
||||
v-model:show="shareDialog"
|
||||
:id="currentLive.liveId"
|
||||
:text="currentLive.liveName"
|
||||
:cover="currentLive.coverUrl"
|
||||
:userLiveData="currentLive.liveOwner"
|
||||
type="1"
|
||||
></share-popup>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { navigateTo } from '@/utils/router'
|
||||
import { imDataEndLive, getLiveActivityDetail, getLiveActivityRecord } from '@/api/tui-kit'
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { ref, onMounted, computed, onUnmounted, watch, nextTick } from 'vue';
|
||||
|
||||
@@ -91,12 +91,11 @@
|
||||
></image>
|
||||
</template>
|
||||
<template #right>
|
||||
<!-- shareDialog = true navigateTo -->
|
||||
<image
|
||||
src="/static/images/public/share-icon.png"
|
||||
mode="heightFix"
|
||||
class="right-icon"
|
||||
@click="navigateTo('/pages/shop-together/user')"
|
||||
@click="shareDialog = true"
|
||||
></image>
|
||||
</template>
|
||||
</nav-bar>
|
||||
|
||||
@@ -18,7 +18,17 @@
|
||||
type: '2',
|
||||
id: '',
|
||||
/** 分享文本 */
|
||||
text: ''
|
||||
text: '',
|
||||
/** 封面图 */
|
||||
cover: '',
|
||||
/** 多少钱 */
|
||||
price: '',
|
||||
/** 直播用户数据 */
|
||||
userLiveData: {},
|
||||
/** 直播用户头像 */
|
||||
avatarUrl: '',
|
||||
/** 直播用户名称 */
|
||||
title: ''
|
||||
})
|
||||
|
||||
/** 多选状态 */
|
||||
@@ -32,7 +42,6 @@
|
||||
|
||||
const topBack = () => {
|
||||
if (!isMultiple.value) {
|
||||
console.log('返回')
|
||||
navigateBack()
|
||||
} else {
|
||||
selectedList.value = []
|
||||
@@ -47,7 +56,7 @@
|
||||
|
||||
/** 获取好友列表 */
|
||||
const onFriendListUpdated = list => {
|
||||
friendList.value = friendList.value.map(v => {
|
||||
friendList.value = list.map(v => {
|
||||
return {
|
||||
...v,
|
||||
...(v?.profile || {})
|
||||
@@ -113,26 +122,30 @@
|
||||
to = item.id.split('C2C')[1]
|
||||
isGroup = false
|
||||
}
|
||||
|
||||
const payload = {
|
||||
data: JSON.stringify(
|
||||
props.type == 1
|
||||
propsData.type == 1
|
||||
? {
|
||||
id: props.id,
|
||||
id: propsData.id,
|
||||
businessID: CHAT_MSG_CUSTOM_TYPE.LIVE,
|
||||
title: props.text,
|
||||
cover: props.cover,
|
||||
userLiveData: props.userLiveData
|
||||
title: propsData.text,
|
||||
cover: propsData.cover,
|
||||
userLiveData: {
|
||||
avatarUrl: propsData.avatarUrl,
|
||||
title: propsData.title
|
||||
}
|
||||
}
|
||||
: {
|
||||
id: props.id,
|
||||
id: propsData.id,
|
||||
businessID: CHAT_MSG_CUSTOM_TYPE.GOODS,
|
||||
title: props.text,
|
||||
cover: props.cover,
|
||||
price: props.price
|
||||
title: propsData.text,
|
||||
cover: propsData.cover,
|
||||
price: propsData.price
|
||||
}
|
||||
),
|
||||
description: props.text,
|
||||
extension: props.text
|
||||
description: propsData.text,
|
||||
extension: propsData.text
|
||||
}
|
||||
const options = {
|
||||
to,
|
||||
@@ -153,6 +166,7 @@
|
||||
hideLoading()
|
||||
await showToast('分享成功', 'success')
|
||||
isShow.value = false
|
||||
navigateBack()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,9 +175,12 @@
|
||||
* @param data
|
||||
*/
|
||||
const onConfirm = async (state, item) => {
|
||||
if (state == 1 && selectedList.value.length == 0) {
|
||||
return
|
||||
}
|
||||
const show = await showDialog(
|
||||
'提示',
|
||||
`确定分享${props.type == 1 ? '直播间' : '商品'}吗?`
|
||||
`确定分享${propsData.type == 1 ? '直播间' : '商品'}吗?`
|
||||
)
|
||||
if (!show) {
|
||||
return
|
||||
@@ -176,10 +193,12 @@
|
||||
hideLoading()
|
||||
await showToast('分享成功', 'success')
|
||||
isShow.value = false
|
||||
navigateBack()
|
||||
}
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
onLoad(e => {
|
||||
console.log('===', e)
|
||||
TUIStore.watch(StoreName.GRP, {
|
||||
groupList: onGroupListUpdated
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user