智慧保安APP验收版本
zengh
2021-12-06 886a9f2deb311453f12cb0302bcb882a9d331d7a
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)
               }
            });