zhaoxiaohai 3 lat temu
rodzic
commit
b592e60c8d

+ 1 - 1
pages/annunciate/glanceover.wxml

@@ -9,7 +9,7 @@
         <view class="row {{viewRowIndex==index?'active':''}}" wx:for="{{history}}" data-index="{{index}}" catchtap="viewRow">
             <view class="u-line-1" style="width: 155rpx;padding-left: 14rpx;">{{item.fname}}</view>
             <view class="u-line-1" style="width: 135rpx;">{{item.freadcount}}</view>
-            <view class="u-line-1" style="width: 135rpx;">{{item.freadtimes}}小时</view>
+            <view class="u-line-1" style="width: 135rpx;">{{item.freadtimes}}分钟</view>
             <view class="u-line-1" style="width: 225rpx;">{{item.ffirstreadtime}}</view>
         </view>
         <My_paging show="{{history.length>=1}}" count='{{pageNumber}}' bind:lifeClick='buttonLifeClick' bind:rightClick='buttonRightClick'></My_paging>

+ 3 - 3
pages/annunciate/newAndChange.js

@@ -159,7 +159,7 @@ Page({
                 "fcontent": this.data.fcontent,
             }
         }).then(res => {
-            console.log("新增", res)
+            console.log("新增或修改", res)
             if (res.msg != '成功') return wx.showToast({
                 title: res.data,
                 icon: "none"
@@ -198,7 +198,7 @@ Page({
                     body.content.tagentsid = deleteList;
                     if (deleteList.length >= 1) {
                         _Http.basic(body).then(res => {
-                            console.log("删除", res)
+                            console.log("删除范围", res)
                         });
                     }
                 }
@@ -288,7 +288,7 @@ Page({
     radioChange({
         detail
     }) {
-        let ftype = (detail.length!=0) ? detail : this.data.ftype;
+        let ftype = (detail.length != 0) ? detail : this.data.ftype;
         console.log(ftype)
         this.setData({
             ftype,

+ 1 - 1
pages/chatRoom/GambitMsgBubble/index.wxml

@@ -5,7 +5,7 @@
     <!-- 内容盒子 -->
     <view class="contents-box">
         <block wx:for="{{itemData.imsubjectcontent}}" wx:key="index">
-            <view class="msg-bubble">{{item.fcontent}}</view>
+            <view class="msg-bubble" wx:if="{{item.fcontent!=''}}">{{item.fcontent}}</view>
             <view class="msg-file" wx:if="{{item.attinfos.length>=1}}" wx:for="{{item.attinfos}}" wx:for-index="i" wx:for-item="it" wx:key="i">
                 <image class="{{it.ftype=='emoji'?'emoji':'image'}}" data-type="{{it.ftype}}" data-url="{{it.fobsurl}}" catchtap="preViewImage" src="{{it.fobsurl}}" mode="widthFix" />
             </view>

+ 2 - 0
pages/chatRoom/GambitMsgBubble/index.wxss

@@ -55,6 +55,8 @@
     padding: 20rpx;
     box-sizing: border-box;
     margin-bottom: 20rpx;
+    word-break: break-all;
+    white-space: pre-wrap;
 }
 
 .l .msg-bubble {

+ 32 - 27
pages/chatRoom/dialogbox.js

@@ -28,6 +28,7 @@ Page({
         timsubjectid: 0, //话题id
         timdialogid: 0, //对话框id
         gambitList: [], //话题列表
+        sendfrom: [],
     },
     /**
      * 生命周期函数--监听页面加载
@@ -135,7 +136,6 @@ Page({
                     "fcontent": ""
                 }
             }).then(res => {
-                console.log(res)
                 if (res.msg != '成功') return wx.showToast({
                     title: res.data,
                     icon: "none"
@@ -157,7 +157,9 @@ Page({
                             "ftype": "话题",
                         }
                     }),
-                    success(res) {}
+                    success(res) {
+                        console.log("sddf", res)
+                    }
                 })
             })
         } else {
@@ -231,7 +233,6 @@ Page({
                     }
                 }).then(async s => {
                     console.log("附件位置修改", s)
-
                     let id = [{
                             message: {
                                 data: {
@@ -241,17 +242,20 @@ Page({
                         }],
                         item = await this.querySubject(id)
                     list = this.data.gambitList;
-                    list[list.length - 1] = {};
-                    this.setData({
-                        gambitList: list
-                    })
+                    item[0].closedate = item[0].createdate;
+                    item[0].sendfrom = this.data.sendfrom;
                     list[list.length - 1] = item[0];
-                    console.log(item[0])
                     this.setData({
                         gambitList: list
                     })
+                    setTimeout(() => {
+                        this.setData({
+                            toView: 'bottom'
+                        })
+                    }, 300)
                 })
             } else {
+                if (content == '') return;
                 _Http.basic({
                     "accesstoken": wx.getStorageSync('userData').token,
                     "classname": "system.im.imdialog.imdialog",
@@ -261,13 +265,21 @@ Page({
                         "timsubjectid": this.data.timsubjectid,
                         "fcontent": content
                     }
-                }).then(res => {
-                    let list = this.data.gambitList;
+                }, false).then(res => {
+                    let list = this.data.gambitList,
+                        time = res.data[0].createdate.split(".");
+                    res.data[0].closedate = time[0];
+                    res.data[0].sendfrom = this.data.sendfrom;
                     list[list.length - 1] = res.data[0];
-                    console.log(res.data[0])
                     this.setData({
-                        gambitList: list
+                        gambitList: list,
+                        sendText: ''
                     })
+                    setTimeout(() => {
+                        this.setData({
+                            toView: 'bottom'
+                        })
+                    }, 300)
                 })
             }
         } else {
@@ -455,19 +467,10 @@ Page({
     },
     /* 发送表情 */
     sendMeme(e) {
-        if (this.data.fimdialogtype == '话题') {
-            if (this.data.timsubjectid == 0 || this.data.userid != this.data.fimuserid) {
-                return wx.showToast({
-                    title: '当前状态不可发送',
-                    icon: "none"
-                })
-            } else {
-                if (this.data.gambitList[this.data.gambitList.length - 1].imsubjectcontent.length < 1) return wx.showToast({
-                    title: '当前状态不可发送',
-                    icon: "none"
-                })
-            }
-        }
+        if (this.data.fimdialogtype == '话题') return wx.showToast({
+            title: '当前状态不可发送',
+            icon: "none"
+        })
         const {
             item
         } = e.currentTarget.dataset;
@@ -662,16 +665,18 @@ Page({
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-        var that = this
+        var that = this;
         app.globalData.callback = function (res) {
             //res  接收websocket onMessage事件返回的数据
             let objs = JSON.parse(res.data),
                 unreadCount = that.data.unreadCount; /* triggered */
             that.data.socketMsgQueue.push(objs)
-            console.log("发送消息", objs)
             that.setData({
                 socketMsgQueue: that.data.socketMsgQueue
             })
+            if (objs.message.sendfrom) that.setData({
+                sendfrom: objs.message.sendfrom
+            })
             that.toBotton()
             /* if (wx.getStorageSync('userData').userid == objs.message.sendfrom.userid) {
             } else {

+ 1 - 1
pages/chatRoom/stats.wxml

@@ -11,7 +11,7 @@
                 <image wx:if="{{item.headportraiturl}}" src="{{item.headportraiturl}}"></image>
                 <image wx:else src="https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/userCenter/userImg.png"></image>
                 <text class="u-line-1">{{item.fname}}</text>
-                {{item.ffirstreadtime}}
+                <view style="font-size: 28rpx;">{{item.ffirstreadtime}}</view>
             </view>
         </view>
     </view>

+ 7 - 1
pages/chatRoom/stats.wxss

@@ -45,6 +45,7 @@ page {
     display: flex;
     align-items: center;
     height: 70rpx;
+    line-height: 70rpx;
     margin-bottom: 30rpx;
     font-size: 32rpx;
     color: rgba(0, 0, 0, .7);
@@ -60,6 +61,11 @@ page {
 
 .list .item text {
     display: inline-block;
-    max-width: 400rpx;
+    max-width: 284rpx;
     margin-right: 15rpx;
+}
+
+.list .item view {
+    height: 70rpx;
+    line-height: 73rpx;
 }