| xqd
@@ -35,20 +35,21 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view :class="InputBottom!=0?'cu-bar foot tab input cur':'cu-bar foot input'" :style="'bottom:'+InputBottom+'px'"
|
|
|
- v-show="sures">
|
|
|
+ <view :class="InputBottom!=0?'cu-bar foot tab input cur':'cu-bar foot input'" style="padding-bottom: 45rpx;padding-top: 45rpx;"
|
|
|
+ :style="'bottom:'+InputBottom+'px'" v-show="sures">
|
|
|
<view class="action" @click="sendvoice">
|
|
|
<text class="cuIcon-sound text-grey"></text>
|
|
|
</view>
|
|
|
<input v-if="!isvoice" v-model="keyword" class="solid-bottom" @focus="InputFocus" @blur="InputBlur" :disabled="isinput"
|
|
|
:adjust-position="false" :focus="false" maxlength="300" :placeholder="textinput" cursor-spacing="10"></input>
|
|
|
- <button class="flex-sub" style="font-size: 30rpx; height: 64rpx;padding: 0;" @touchstart.stop="onRecordStart"
|
|
|
+ <button class="flex-sub" style="font-size: 30rpx; height: 64rpx;padding: 0;" @longpress="onRecordStart"
|
|
|
@touchend.stop="onRecordEnd" v-else>{{audio.recording ? '松开发送':'按住发送语音'}}</button>
|
|
|
<view class="action" style="margin-right: 20rpx;" @click="sendImage">
|
|
|
<text class="cuIcon-picfill text-grey"></text>
|
|
|
</view>
|
|
|
<button class="cu-btn bg-green shadow" @click="sendMessage">发送</button>
|
|
|
</view>
|
|
|
+ <view class="record-loading" v-if="audio.recording"></view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
| xqd
@@ -67,7 +68,7 @@
|
|
|
onLoad: function(op) {
|
|
|
// this.messages = []
|
|
|
// this.self_messages = []
|
|
|
- console.log('聊天状态',op)
|
|
|
+ console.log('聊天状态', op)
|
|
|
if (op.type == 2) {
|
|
|
this.sures = false;
|
|
|
}
|
| xqd
@@ -127,7 +128,7 @@
|
|
|
},
|
|
|
onUnload() {
|
|
|
console.log("页面卸载")
|
|
|
- this.messages.splice(0,this.messages.length)
|
|
|
+ this.messages.splice(0, this.messages.length)
|
|
|
//退出聊天页面之前,清空页面传入的监听器
|
|
|
if (this.imService) {
|
|
|
this.imService.onNewPrivateMessageReceive = (friendId, message) => {};
|
| xqd
@@ -288,4 +289,17 @@
|
|
|
font-size: 20rpx;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
+ .record-loading {
|
|
|
+ position: fixed;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ width: 300rpx;
|
|
|
+ height: 300rpx;
|
|
|
+ margin: -150rpx -150rpx;
|
|
|
+ background: #262628;
|
|
|
+ background: url("https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/recording-loading.gif") no-repeat center;
|
|
|
+ background-size: 100%;
|
|
|
+ border-radius: 40rpx;
|
|
|
+ }
|
|
|
</style>
|