Commit 8fbef6c9 by wxl

fix

parent 98db7c48
...@@ -49,15 +49,16 @@ export function useVideoConference() { ...@@ -49,15 +49,16 @@ export function useVideoConference() {
/** 切换视频与音频通讯 */ /** 切换视频与音频通讯 */
const [mode, setMode] = useState<'video' | 'audio'>('video') const [mode, setMode] = useState<'video' | 'audio'>('video')
const switchVideoOrAudio = () => { const switchVideoOrAudio = () => {
streamList.value.forEach( stream => { // streamList.value.forEach( stream => {
if(mode.value === 'video'){
muteRemoteStream(stream.uid, 'video'); // })
muteLocalStream('video') if(mode.value === 'video'){
} else { // muteRemoteStream(stream.uid, 'video');
unmuteRemoteStream(stream.uid, 'video'); muteLocalStream('video')
unmuteLocalStream('video'); } else {
} // unmuteRemoteStream(stream.uid, 'video');
}) unmuteLocalStream('video');
}
setMode(mode.value === 'video' ? 'audio' : 'video'); setMode(mode.value === 'video' ? 'audio' : 'video');
} }
......
...@@ -23,11 +23,12 @@ export function useContacts() { ...@@ -23,11 +23,12 @@ export function useContacts() {
}) })
const roleContacts = computed( () => { const roleContacts = computed( () => {
const contactHome = {} as {[props: string]: UserData[]} const contactHome = [] as UserData[][]
contacts.value?.forEach( item => { contacts.value?.forEach( item => {
if(['3','4'].includes(item.permission) ) { if(['3','4'].includes(item.permission) ) {
if(!contactHome[item.group_name]) contactHome[item.group_name] = []; if(!contactHome[0]) contactHome[0] = [];
contactHome[item.group_name].push(item); if(!contactHome[1]) contactHome[1] = [];
contactHome[item.permission === '3' ? 0 : 1].push(item);
}; };
}) })
return contactHome return contactHome
...@@ -35,11 +36,13 @@ export function useContacts() { ...@@ -35,11 +36,13 @@ export function useContacts() {
const freeContacts = computed( () => { const freeContacts = computed( () => {
const list = contacts.value.filter( item => item.is_calling === '0' && item.is_signin === '1'); const list = contacts.value.filter( item => item.is_calling === '0' && item.is_signin === '1');
const frees = {} as {[props: string]: UserData[]} // const frees = {} as {[props: string]: UserData[]}
const frees = [] as UserData[][]
list?.forEach( item => { list?.forEach( item => {
if(['3','4'].includes(item.permission) ) { if(['3','4'].includes(item.permission) ) {
if(!frees[item.group_name]) frees[item.group_name] = []; if(!frees[0]) frees[0] = [];
frees[item.group_name].push(item); if(!frees[1]) frees[1] = [];
frees[item.permission === '3' ? 0 : 1].push(item);
}; };
}) })
return frees return frees
......
...@@ -30,8 +30,8 @@ export default { ...@@ -30,8 +30,8 @@ export default {
{ {
"pagePath": "pages/task/index", "pagePath": "pages/task/index",
"text": "任务", "text": "任务",
"iconPath": "assets/Task@3x.png", "iconPath": "assets/task-1@3x.png",
"selectedIconPath": "assets/Task-Check@3x.png" "selectedIconPath": "assets/Task@3x.png"
}, },
{ {
"pagePath": "pages/mine/index", "pagePath": "pages/mine/index",
......
src/assets/Task.png

440 Bytes | W: | H:

src/assets/Task.png

421 Bytes | W: | H:

src/assets/Task.png
src/assets/Task.png
src/assets/Task.png
src/assets/Task.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/Task@2x.png

731 Bytes | W: | H:

src/assets/Task@2x.png

689 Bytes | W: | H:

src/assets/Task@2x.png
src/assets/Task@2x.png
src/assets/Task@2x.png
src/assets/Task@2x.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/Task@3x.png

967 Bytes | W: | H:

src/assets/Task@3x.png

1.16 KB | W: | H:

src/assets/Task@3x.png
src/assets/Task@3x.png
src/assets/Task@3x.png
src/assets/Task@3x.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -33,11 +33,11 @@ ...@@ -33,11 +33,11 @@
:autoPauseIfOpenNative="false" :autoPauseIfOpenNative="false"
:backgroundMute="true" :backgroundMute="true"
waitingImage="https://webdemo.agora.io/away.png" waitingImage="https://webdemo.agora.io/away.png"
v-show="mode === 'video' && !stream.videoPause" v-show="!stream.videoPause"
/> />
<view class="cover" v-if="contact"> <view class="cover" v-if="contact">
<text class="name">{{contact.nickname}}</text> <text class="name">{{contact.nickname}}</text>
<image v-if="mode==='audio' || stream.videoPause" class="avatar" :src="contact.avatar" mode="widthFix"/> <image v-if="stream.videoPause" class="avatar" :src="contact.avatar" mode="widthFix"/>
</view> </view>
</view> </view>
</template> </template>
......
...@@ -2,7 +2,8 @@ import { HTTP_OPTIONS, RequestOptions } from "vue-vulcan"; ...@@ -2,7 +2,8 @@ import { HTTP_OPTIONS, RequestOptions } from "vue-vulcan";
export function useRequestOption(): RequestOptions { export function useRequestOption(): RequestOptions {
return { return {
baseUrl: 'https://devserver.anyremote.cn/index.php/api/common', // baseUrl: 'https://devserver.anyremote.cn/index.php/api/common',
baseUrl: 'https://platserver.anyremote.cn/index.php/api/common',
method: 'POST' method: 'POST'
} }
} }
......
...@@ -39,9 +39,9 @@ ...@@ -39,9 +39,9 @@
<template> <template>
<view class="contact-list"> <view class="contact-list">
<view class="contact-role-group" v-for="(group, key, index) in roleContacts" :key="index"> <view class="contact-role-group" v-for="(group, key) in roleContacts" :key="key">
<view class="role-name pd-2" :class="{hide: hideConfig[index]}" @tap="toggleHideByIndex(index)">{{key}}</view> <view class="role-name pd-2" :class="{hide: hideConfig[key]}" @tap="toggleHideByIndex(key)">{{key===0 ? '维修员' : '专家'}}</view>
<view class="white-box" :style="{display: hideConfig[index] ? 'none' : 'block'}"> <view class="white-box" :style="{display: hideConfig[key] ? 'none' : 'block'}">
<view class="contact-item" v-for="(item, i) in group" :key="i" @tap="gotoDetail(item.id)"> <view class="contact-item" v-for="(item, i) in group" :key="i" @tap="gotoDetail(item.id)">
<image class="avatar" :src="item.avatar" /> <image class="avatar" :src="item.avatar" />
<view class="info"> <view class="info">
......
...@@ -22,7 +22,7 @@ import { nextTick } from '@tarojs/taro'; ...@@ -22,7 +22,7 @@ import { nextTick } from '@tarojs/taro';
const isFocus = ref(false); const isFocus = ref(false);
const onScroll = useThrottle((event: any) => { const onScroll = useThrottle((event: any) => {
setShowLogo(event.detail.deltaY >= 0); if(event.detail.deltaY >= 0) setShowLogo(true);
}, 500) }, 500)
const showInput = (show: boolean) => { const showInput = (show: boolean) => {
......
<script setup> <script setup>
import { computed, onMounted, watch } from 'vue'; import { computed, onMounted, watch } from 'vue';
import { navigateTo, navigateBack, showModal, showToast, hideHomeButton, redirectTo, switchTab } from '@tarojs/taro'; import { navigateTo, navigateBack, showModal, showToast, hideHomeButton, redirectTo, switchTab, showLoading, hideToast, hideLoading } from '@tarojs/taro';
import { useLogin } from '../../../any-hooks/auth/useLogin'; import { useLogin } from '../../../any-hooks/auth/useLogin';
import { useInjector, useRequest } from 'vue-vulcan'; import { useInjector, useRequest } from 'vue-vulcan';
import { useNetSocketStore } from 'any-hooks/communication/useNetSocketStore'; import { useNetSocketStore } from 'any-hooks/communication/useNetSocketStore';
...@@ -35,9 +35,11 @@ ...@@ -35,9 +35,11 @@
} }
}) })
} else { } else {
showLoading({title: '登录中'})
submitLogin().then( r => { submitLogin().then( r => {
initConnect(r); initConnect(r);
switchTab({url: '/pages/index/index'}) switchTab({url: '/pages/index/index'});
hideLoading();
}) })
} }
}) })
......
...@@ -32,9 +32,9 @@ import { useCallCenter } from "any-hooks/communication/useCallCenter"; ...@@ -32,9 +32,9 @@ import { useCallCenter } from "any-hooks/communication/useCallCenter";
<template> <template>
<scroll-view :scrollY="true" class="invite-container page" :style="{top: topDistance+'px'}" > <scroll-view :scrollY="true" class="invite-container page" :style="{top: topDistance+'px'}" >
<view class="contact-role-group" v-for="(group, key, index) in freeContacts" :key="index"> <view class="contact-role-group" v-for="(group, key) in freeContacts" :key="key">
<view class="role-name pd-2" :class="{hide: hideConfig[index]}" @tap="toggleHideByIndex(index)">{{key}}</view> <view class="role-name pd-2" :class="{hide: hideConfig[key]}" @tap="toggleHideByIndex(key)">{{key}}</view>
<view class="white-box" :style="{display: hideConfig[index] ? 'none' : 'block'}"> <view class="white-box" :style="{display: hideConfig[key] ? 'none' : 'block'}">
<view v-for="(item, i) in group" :key="i" > <view v-for="(item, i) in group" :key="i" >
<view class="contact-item" v-if="![authData.id].includes(item?.id)"> <view class="contact-item" v-if="![authData.id].includes(item?.id)">
<image class="avatar" :src="item.avatar" /> <image class="avatar" :src="item.avatar" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment