智慧保安APP验收版本
shuishen
2021-12-03 5dd014eda15ef241f3a4384ff78e3054106e19ef
部分修改
3 files modified
49 ■■■■ changed files
components/submit/submit.vue 18 ●●●●● patch | view | raw | blame | history
pages/groupChat/chating.vue 29 ●●●●● patch | view | raw | blame | history
pages/videoCall/videoCall.nvue 2 ●●● patch | view | raw | blame | history
components/submit/submit.vue
@@ -76,7 +76,7 @@
    const recorderManager = uni.getRecorderManager()
    export default {
        props: ['names','callname'],
        props: ['names', 'callname'],
        data() {
            return {
                isrecord: false,
@@ -91,7 +91,6 @@
            };
        },
        mounted() {
            console.log(this.callname,1111)
        },
        components: {
            emoji,
@@ -114,11 +113,11 @@
                this.isrecord = !this.isrecord
                this.isemoji = false
                this.ismore = false
                setTimeout(() => {
                    this._getElementHeight()
                }, 10)
            },
            // 点击弹出表情
            emoji() {
@@ -183,7 +182,7 @@
                    message: msg,
                    types: type
                }
                this.$emit('inputs', data)
                setTimeout(() => {
                    this.msg = ''
@@ -273,10 +272,9 @@
            openAudio(val) { //Mains
                // console.log(this.names)
                // var socketOpen = false;
                uni.navigateTo({
                    url: '../videoCall/videoCall?state=' + val + '&type=audio'
                    url: '../videoCall/videoCall?state=' + val + '&type=audio' + '&myname=' + this.names[0] +
                    '&toname=' + this.names[1] + '&callname=' + this.callname
                });
            },
            //接收音频
@@ -307,8 +305,8 @@
                //     // }
                // }
                var url = '../videoCall/videoCall?state=' + val + '&type=video' + '&myname=' + this.names[0] +
                        '&toname=' + this.names[1] + '&callname=' + this.callname
            console.log(url)
                    '&toname=' + this.names[1] + '&callname=' + this.callname
                console.log(url)
                uni.navigateTo({
                    url: url
                });
pages/groupChat/chating.vue
@@ -3,12 +3,12 @@
        <!-- 头部 -->
        <u-navbar style="position: relative;" :is-fixed="false" :border-bottom="true" :is-back="true" :title="recName"
            back-icon-color="#fff" :background="{ background: '#0BB9C8' }" title-color="#fff">
            back-icon-color="#fff" :background="{ background: '#0BB9C8' }" :placeholder="true" title-color="#fff">
            <view slot='right'>
            <!--     <view slot='right'>
                <u-icon @click="chatMessageDetail" class="set-icon" name="more-dot-fill" color="#fff" size="28">
                </u-icon>
            </view>
            </view> -->
        </u-navbar>
@@ -36,7 +36,7 @@
                        </view>
                        <!-- voice -->
                        <view class="message" v-if="item.messageType == 2">
                            <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 50 + 'px'}"
                            <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 60 + 'px'}"
                                @tap="playVoice(item.postMessage)">
                                <image src="../../static/images/chatroom/sound.png" mode="" class="voice-img" />
@@ -66,7 +66,7 @@
                        </view>
                        <!-- voice -->
                        <view class="message" v-if="item.messageType == 2">
                            <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 50 + 'px'}"
                            <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 60 + 'px'}"
                                @tap="playVoice(item.postMessage)">
                                {{ item.postMessage.time }}"
                                <image src="@/static/images/chatroom/sound.png" mode="" class="voice-img" />
@@ -137,14 +137,17 @@
            this._getMsg(this.nowpage)
            // this.nextPage()
            var data = option.data
            option.data = option.data + `"}`
            if (this.isJSON(option.data) == true) {
                data = JSON.parse(option.data)
            }
                console.log(data)
            console.log(data, 55555555555555555555555)
            this.name = ['wo', option.chatID];
            if (typeof data.recipientName == "undefined") {
                this.callName = data.realName;
            } else {
@@ -157,7 +160,6 @@
            let that = this;
            uni.getSystemInfo({
                success(e) {
                    // console.log(e);
                    let {
                        windowWidth,
                        windowHeight,
@@ -174,6 +176,12 @@
                        .exec();
                }
            });
        },
        onUnload() {
            var innerAudioContext = this.innerAudioContext = uni.createInnerAudioContext()
            innerAudioContext.destroy()
        },
        methods: {
@@ -347,7 +355,6 @@
            },
            // 音频播放
            playVoice(e) {
                console.log(e, 'ok')
                var innerAudioContext = this.innerAudioContext = uni.createInnerAudioContext()
                // innerAudioContext.autoplay = false
@@ -361,9 +368,6 @@
            },
            // 接收输入内容
            inputs(e) {
                console.log(e, 999)
                var that = this;
                this.isanimation = true
                let len = this.msgs.length - 1
@@ -404,7 +408,6 @@
                    },
                    success: (res) => {
                        console.log(res, 89898)
                    }
                });
pages/videoCall/videoCall.nvue
@@ -227,6 +227,7 @@
        onLoad(option) {
            var that = this;
            console.log(option)
            that.toName = option.toname;
            that.callname = option.callname;
            console.log(option)
@@ -262,7 +263,6 @@
                        type: 'video'
                    },
                    success(res) {
                        console.log(res, 789)
                        // if(res.data.res == 0){
                        // }