zhaoxiaohai 3 năm trước cách đây
mục cha
commit
2626391890

+ 1 - 1
pages/annunciate/index.js

@@ -16,7 +16,7 @@ Page({
         pageNumber: 1, //获取页码
         pageTotal: 1, //总页码
         /* 圆角按钮tabs列表 */
-        roundedList: ["家纺城通告", "合作商通告", "团队通告"],
+        roundedList: ["全部通告", "家纺城通告", "合作商通告", "团队通告"],
     },
 
     /**

+ 1 - 1
pages/annunciate/index.wxml

@@ -14,7 +14,7 @@
     <view class="ann-box" wx:for="{{annunciateList}}" data-index="{{index}}" catchtap="toDetails">
         <view class="ann-img">
             <image wx:if="{{item.attinfos[0].fobsurl}}" src="{{item.attinfos[0].fobsurl}}" mode="aspectFill"></image>
-            <image src="/static/tacitly-approve/MRproduct.png" mode="aspectFill"></image>
+            <image src="/static/annunciate/cover.png" mode="aspectFill"></image>
         </view>
         <view class="ann-text ls">
             <view class="ann-text-title  u-line-1">{{item.ftitle}}</view>

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

@@ -1,5 +1,5 @@
 <view wx:if="{{isGroup}}" style="margin-bottom: 40rpx;">
-    <GambitMsgBubble itemData='{{groupData}}' role="{{false}}" isShowBottom="false" isShowBottom='{{false}}' />
+    <GambitMsgBubble itemData='{{groupData}}' role="{{role=='you'?false:true}}" isShowBottom="false" isShowBottom='{{false}}' />
 </view>
 <block wx:else="">
     <!-- 对方 -->

+ 10 - 7
pages/chatRoom/dialogbox.js

@@ -36,7 +36,7 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
-        //app.initSocket();链接websocket 用于测试
+        //app.initSocket(); 链接websocket 用于测试
         const that = this;
         this.setData({
             timdialogid: options.id,
@@ -357,7 +357,7 @@ Page({
                         "content": {
                             "tsupplyanddemandid": that.data.ownerid,
                             "fstatus": "已解决",
-                            "tenterprise_userid": that.data.initiator,
+                            "tenterprise_userid": that.data.fimuserid,
                             "timdialogid": that.data.timdialogid
                         }
                     }).then(res => {
@@ -368,7 +368,7 @@ Page({
                             icon: "none"
                         })
                         if (res.msg == '成功') that.setData({
-                            joinHands: false
+                            fdatastatus: 1
                         })
                     })
                 }
@@ -400,7 +400,7 @@ Page({
                             icon: "none"
                         })
                         if (res.msg == '成功') that.setData({
-                            joinHands: false
+                            fdatastatus: 0
                         })
                     })
                 }
@@ -655,7 +655,6 @@ Page({
             this.setData({
                 headerTitle,
                 ownerid: res.data[0].ownerid,
-                initiator: res.data[0].fimuserid,
                 joinHands,
                 fimuserid: res.data[0].fimuserid,
                 fimdialogtype: res.data[0].fimdialogtype
@@ -691,11 +690,15 @@ Page({
             //res  接收websocket onMessage事件返回的数据
             let objs = JSON.parse(res.data),
                 unreadCount = that.data.unreadCount; /* triggered */
-            that.data.socketMsgQueue.push(objs)
+            console.log('接收', objs)
+            if (objs.message) {
+                if (objs.message.timdialogid != that.data.timdialogid) return;
+            }
+            that.data.socketMsgQueue.push(objs);
+            /* 接受信息 */
             that.setData({
                 socketMsgQueue: that.data.socketMsgQueue
             })
-            console.log(objs.message.sendfrom)
             if (objs.message.sendfrom) that.setData({
                 sendfrom: objs.message.sendfrom
             })

+ 6 - 0
pages/chatRoom/dialogbox.wxml

@@ -5,6 +5,12 @@
         <van-button custom-class='head-bot-class head-bot-l' catchtap="refuseToCooperate">暂不合作</van-button>
         <van-button custom-class='head-bot-class head-bot-r' catchtap="confirmTheCooperation">确认合作</van-button>
     </view>
+    <view class="header_botton gxtips" style="color:#FF1A2E;" wx:if="{{joinHands&&fdatastatus==0}}">
+        <van-icon name="clear" /> 已拒绝合作
+    </view>
+    <view class="header_botton gxtips" style="color:#74C041;" wx:if="{{joinHands&&fdatastatus==1}}">
+        <van-icon name="checked" /> 已达成合作
+    </view>
     <view class="header_botton" wx:if="{{fimdialogtype=='话题'&&fimuserid==userid}}">
         <van-button custom-class='compile' catchtap="toCreate">
             <image src="/static/icon-19.png" style="width: 16rpx;height: 20rpx;"></image>

+ 6 - 0
pages/chatRoom/dialogbox.wxss

@@ -3,6 +3,12 @@ page {
     padding: 0;
 }
 
+.gxtips {
+    font-size: 24rpx;
+    font-family: PingFangSC-Medium, PingFang SC;
+    margin-right: 20rpx;
+}
+
 .header {
     position: fixed;
     top: 0;

+ 8 - 0
pages/chatRoom/index.js

@@ -111,11 +111,19 @@ Page({
                 discussionGroupList = [];
             for (let i = 0; i < res.data.length; i++) {
                 if (res.data[i].fimdialogtype == '话题') {
+                    res.data[i].user = res.data[i].users[0]
                     discussionGroupList.push(res.data[i])
                 } else {
                     relationList.push(res.data[i])
                 }
             }
+            for (let i = 0; i < relationList.length; i++) {
+                if (relationList[i].users[0].tenterprise_userid == wx.getStorageSync('userData').userid) {
+                    relationList[i].user = relationList[i].users[1]
+                } else {
+                    relationList[i].user = relationList[i].users[0]
+                }
+            }
             this.setData({
                 relationList,
                 relationListCopy: relationList,

+ 3 - 3
pages/chatRoom/index.wxml

@@ -15,13 +15,13 @@
     <view class="msg-box">
         <navigator url="#" wx:for="{{relationList}}" wx:key="index" data-item="{{item}}" bindtap="enterTheDialogue">
             <view class="msgImg">
-                <image wx:if="{{item.latestnews[0].message.sendfrom.headpic}}" src="{{item.latestnews[0].message.sendfrom.headpic}}"></image>
+                <image wx:if="{{item.user.headportraiturl}}" src="{{item.user.headportraiturl}}"></image>
                 <image wx:else src="https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/userCenter/userImg.png"></image>
             </view>
             <view class="borTop">
                 <view class="msgText">
                     <!-- latestnews[0].fname -->
-                    <view class="title u-line-1">{{item.fimdialogname}}</view>
+                    <view class="title u-line-1">{{item.user.fname}}</view>
                     <view class="msg u-line-1">{{item.latestnews[0].message.ftype=='file'?'[图片]':item.latestnews[0].message.data.fcontent}}</view>
                 </view>
                 <view class="msgCount">
@@ -40,7 +40,7 @@
     <view class="msg-box">
         <navigator url="#" wx:for="{{discussionGroupList}}" wx:key="index" data-item="{{item}}" bindtap="enterTheDialogue">
             <view class="msgImg">
-                <image wx:if="{{item.latestnews[0].message.sendfrom.headpic}}" src="{{item.latestnews[0].message.sendfrom.headpic}}"></image>
+                <image wx:if="{{item.user.headportraiturl}}" src="{{item.user.headportraiturl}}"></image>
                 <image wx:else src="/static/userCenter/group-img.png"></image>
             </view>
             <view class="borTop">

+ 1 - 1
pages/tabbar-pages/home/index.wxml

@@ -25,7 +25,7 @@
     <view class="ann-box" wx:for="{{annunciateList}}" style="margin-top: {{index==0?0:28}}rpx;" data-index="{{index}}" catchtap="toDetails">
         <view class="ann-img">
             <image wx:if="{{item.attinfos[0].fobsurl}}" src="{{item.attinfos[0].fobsurl}}" mode="aspectFill"></image>
-            <image src="/static/tacitly-approve/MRproduct.png" mode="aspectFill"></image>
+            <image src="/static/annunciate/cover.png" mode="aspectFill"></image>
         </view>
         <view class="ann-text">
             <view class="ann-text-title  u-line-1">{{item.ftitle}}</view>

+ 1 - 1
pages/tabbar-pages/message/index.wxml

@@ -2,7 +2,7 @@
 <My_navBar></My_navBar>
 <!-- 信息 -->
 <van-tabs active="{{ tabsActive }}" color='#4DC2D4' title-active-color="#4DC2D4" title-inactive-color='rgba(0,0,0,.3)' tab-active-class='tab-active-class' tab-class="tab-class" nav-class='' line-width='60rpx' line-height='6rpx' swipeable bind:change="tabsOnChange">
-    <van-tab title="公共消息">
+    <van-tab title="系统消息">
     </van-tab>
     <van-tab title="商户消息">
     </van-tab>

+ 5 - 2
pages/tabbar-pages/supplyAndDemand/index.js

@@ -55,10 +55,10 @@ Page({
             res.data.unshift({
                 ftype: "全部",
                 attinfos: [{
-                    fobsurl: "https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/supplyAndDemand/all-icon.png",
+                    fobsurl: "/static/supplyAndDemand/all.png",
                     ftype: "default"
                 }, {
-                    fobsurl: "https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/supplyAndDemand/acAll-icon.png",
+                    fobsurl: "/static/supplyAndDemand/all-c.png",
                     ftype: "click"
                 }]
             });
@@ -78,6 +78,9 @@ Page({
             timdialogid,
             fdatastatus
         } = e.currentTarget.dataset;
+        this.setData({
+            ifShowCommunicationOfNumber: false
+        })
         wx.navigateTo({
             url: '/pages/chatRoom/dialogbox?id=' + timdialogid + '&fdatastatus=' + fdatastatus,
         })

+ 0 - 1
pages/tabbar-pages/supplyAndDemand/particulars.js

@@ -109,7 +109,6 @@ Page({
                 "tsupplyanddemandid": tsupplyanddemandid
             }
         }).then(res => {
-            console.log("创建聊天", res)
             if (res.msg != '成功') return wx.showToast({
                 title: res.data,
                 icon: "none"

BIN
static/annunciate/cover.png


BIN
static/supplyAndDemand/all-c.png


BIN
static/supplyAndDemand/all.png