Browse Source

功能修改

twt 2 months ago
parent
commit
36f528bd8e

+ 4 - 7
manifest.json

@@ -1,21 +1,18 @@
 {
-    "name" : "goeasy-chat-demo-uni",
-    "appid" : "__UNI__D911515",
+    "name" : "66im",
+    "appid" : "__UNI__EEE07F1",
     "description" : "",
     "versionName" : "1.0.0",
     "versionCode" : "100",
     "transformPx" : false,
     "h5" : {
-        "publicPath" : "/",
+        
         "devServer" : {
             "port" : 9003,
             "disableHostCheck" : true,
             "https" : false
-        },
-        "router" : {
-            "mode" : "history",
-            "base" : "/"
         }
+       
     },
     "app-plus" : {
         "usingComponents" : true,

+ 11 - 2
pages.json

@@ -53,6 +53,15 @@
 	    "enablePullDownRefresh": true
 	  }
 	},
+	{
+	  "path": "pages/inquiry",
+	  "style": {
+	    /* "navigationBarTitleText": "询价",
+	    "navigationBarBackgroundColor": "#F1F1F1", */
+		"navigationStyle": "custom",
+	    "enablePullDownRefresh": true
+	  }
+	},
 	{
 	  "path": "pages/ck",
 	  "style": {
@@ -192,11 +201,11 @@
         "iconPath": "static/images/msg.png",
         "selectedIconPath": "static/images/msg-active.png"
       },
-      {
+     /* {
         "pagePath": "pages/contacts",
         "iconPath": "static/images/contacts.png",
         "selectedIconPath": "static/images/contacts-active.png"
-      },
+      }, */
       {
         "pagePath": "pages/mine",
         "iconPath": "static/images/mine.png",

+ 133 - 18
pages/ck.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="content">
-		<view class="top">
+		<view class="top" v-if="info">
 			<view class="topLeft">
-				<image src="/static/images/wx.png" mode="" class="carLogo"></image>
+				<image :src="info.carModelInfo.logo" mode="" class="carLogo"></image>
 			</view>
 			<view class="topRight">
 				<view class="brand">{{info.carModelInfo.brand}}</view>
@@ -10,15 +10,14 @@
 			</view>
 		</view>
 		
-		<view class="cont">
+		<view class="cont" v-if="info">
 			<view class="line" v-for="(item,index) in info.supplierlist">
-				<view class="lineLeft">
+				<view class="lineLeft" @click="ckItem(item)">
 					<view class="lineCK">
-						<checkbox-group>
-							<label>
-								<checkbox value="cb" :checked="true" />
-							</label>
-						</checkbox-group>
+						
+						<image class="ckiMg" src="/static/img/cky.png" mode="" v-if="item.ck"></image>
+						<image class="ckiMg" src="/static/img/ckn.png" mode="" v-if="!item.ck"></image>
+						
 					</view>
 					<view class="nameBox">
 						<view class="name">{{item.supplierName}}</view>
@@ -27,7 +26,7 @@
 				</view>
 				<view class="lineRgiht">
 					<view>
-						<image class="lineRgihtIMg" src="/static/images/icon_phone@2x.png" mode=""></image>
+						<image @click="call(item.mobilePhone)" class="lineRgihtIMg" src="/static/images/icon_phone@2x.png" mode=""></image>
 					</view>
 					<view>
 						<image @click="goIm(item)"  class="lineRgihtIMg" src="/static/images/chat.png" mode=""></image>
@@ -36,6 +35,23 @@
 			</view>
 		
 		</view>
+		<view style="height: 200rpx;"></view>
+		
+		<!-- 选择车型 -->
+		<view class="ckcarBox" v-if="ckCarShow" >
+			<view class="ckcar" @click.stop="">
+				<view class="ckcarTop flex">
+					<view class="ckcarTitle">请选择车型</view>
+					<image src="../static/img/icon_quxiao.png" mode="" class="ckcarClose" @click="ckcarClose"></image>
+				</view>
+				<view class="ckcarlineBox"  v-for="(item,index) in moreVinList" @click="gobyItem(item)">
+					<view class="ckcarline flex">
+						<view class="ckcarLeft">{{item.title}}</view>
+						<image src="../static/img/icon_arrow.png" mode="" class="ckcarJtimg"></image>
+					</view>
+				</view>
+			</view>
+		</view>
 		
 		<view class="qunfa" @click="qunfa">
 			一键群发
@@ -58,22 +74,62 @@
 	export default {
 		data() {
 			return {
-				vin: 'JHMCM56557C404453',
+				//vin: 'JHMCM56557C404453',
+				//vin:'LFV3A28K3D3000001',
+				vin:'',
 				list:[],
 				info:'',
 				currentUser:'',
+				token:'',
+				moreVinList:[],
+				ckCarShow:false,
 			}
 		},
 		onLoad(opt) {
 		  var token=opt.token
+		  this.vin=opt.vin
+		  this.token=token
 		  console.log(token)
-		   uni.setStorageSync('token', token);
+		  uni.setStorageSync('token', token);
           this.vinSupplier()
 		  this.imLoginUrl()
 		},
 		methods: {
+		   ckItem(item){
+			   console.log(item.ck)
+			   if(item.ck){
+				    //this.$set(item,"ck", false)
+				    item.ck=false
+			   }else{
+				   //this.$set(item,"ck", true)
+				   item.ck=true
+			   }
+			
+		   },
+		   call(num){
+			   uni.makePhoneCall({
+			     phoneNumber: num
+			   })
+		   },
+		   gobyItem(item){
+			   item.supplierlist.forEach(item=>{
+			   	item.ck=true
+			   })
+			   this.info= JSON.parse(JSON.stringify(item)) ;
+			 
+			   this.ckCarShow=false
+		   },
+		   ckcarClose(){
+		   	 this.ckCarShow=false;
+		   },
 		   qunfa(){
-			   uni.setStorageSync('supplierlist', this.info.supplierlist);
+			   var supplierlist=[]
+			   this.info.supplierlist.forEach(item=>{
+				   if(item.ck){
+					   supplierlist.push(item)
+				   }
+			   })
+			   uni.setStorageSync('supplierlist', supplierlist);
 			   uni.navigateTo({
 			   	url:'qunfa'
 			   })
@@ -93,8 +149,19 @@
 			   this.$http('imSys/vinSupplier', {
 			      vin:this.vin,
 			     },'GET').then(res => {
-			    	  //console.log(res)	
-			   		  this.info=res.data[0]	  
+			    	  console.log(res.data.length)	
+			   		  //this.info=res.data[0]	 
+					   if(res.data.length>1){
+						   this.ckCarShow=true
+						   this.moreVinList=res.data
+						   console.log(this.moreVinList)
+					   }else{
+						   res.data[0].supplierlist.forEach(item=>{
+								item.ck=true
+							})
+						    this.info=res.data[0]	
+							//this.info
+					   }
 			     }) 
 		   },
 		   imLoginUrl(){
@@ -114,7 +181,7 @@
 		   },
 		   connectGoEasy(){
 			   console.log(this.currentUser)
-			   this.currentUser.id="2C3E3A5C-D449-4439-842F-8E1C5C9EF91E"
+			   this.currentUser.id="1292F5DA-793B-4549-844E-C5F606869D0C"
 			   uni.setStorageSync('currentUser', this.currentUser);
 			   GoEasy.connect({
 			     id: this.currentUser.id,
@@ -169,6 +236,7 @@
 .cont{
 	margin-top: 20rpx;
 	background: #FFF;
+	
 }
 .line{
 	display: flex;justify-content: space-between;
@@ -200,7 +268,54 @@
 	color: #ffffff;
 	font-size: 30rpx;
 	border-radius: 10rpx;
-	margin: 0 auto;
-	margin-top: 100rpx;
+	position: fixed;
+	bottom: 100rpx;
+	left: 50rpx;
+}
+.ckcarJtimg{
+	width: 26rpx;height: 26rpx;margin-top: 4rpx;
+}
+.ckcarlineBox{
+  padding:24rpx ;	
+  border-bottom: 1px solid #EEEEEE;
+}
+.ckcarLeft{
+	font-weight: 400;line-height: 36rpx;
+	color: #1A1A1A;font-size: 26rpx;
+}
+.ckcarBox{
+	width: 100vw;height: 100vh;
+	background:rgba(0, 0, 0, 0.4) ;
+	position: fixed;top: 0;left: 0;
+	z-index: 111;
+}
+.ckcar{
+	width: 750rpx;
+	height: 772rpx;
+	background: #FFFFFF;
+	border-radius: 24rpx 24rpx 0rpx 0rpx;
+	position: absolute;
+	left: 0;
+	bottom: 0;
+}
+.ckcarClose{
+	width: 30rpx;height: 30rpx;
+}
+.ckcarTitle{
+	font-weight: 500;font-size: 28rpx;
+	color: #1A1A1A;
+	line-height: 40rpx;
+}
+.ckcarTop{
+	padding: 40rpx 26rpx 20rpx 24rpx;
+}
+.flex{
+	display: flex;justify-content: space-between;
+}
+.ckcarClose{
+	width: 30rpx;height: 30rpx;
+}
+.ckiMg{
+	width: 40rpx;height: 40rpx;
 }
 </style>

+ 2 - 2
pages/conversations.vue

@@ -237,8 +237,8 @@
           './privateChat?to=' + conversation.userId :
           './groupChat?to=' + conversation.groupId;
 		  var friend={
-			  ID:conversation.userId,
-			  Name:conversation.data.name,
+			  id:conversation.userId,
+			  supplierName:conversation.data.name,
 			  avatar:conversation.data.avatar,
 		  }
 		  uni.setStorage({

+ 416 - 0
pages/inquiry.vue

@@ -0,0 +1,416 @@
+<template>
+  <scroll-view class="conversations" scroll-y="true">
+    <view v-if="conversations.length > 0">
+      <view class="scroll-item" v-for="(conversation, key) in conversations" :key="key">
+        <view class="item-head">
+          <image :src="conversation.data.avatar" class="head-icon"></image>
+          <view class="item-head_unread" v-if="conversation.unread">{{ conversation.unread }}</view>
+        </view>
+        <view class="scroll-item_info" @click="chat(conversation)">
+          <view class="item-info-top">
+            <text class="item-info-top_name">{{ conversation.data.name }}</text>
+            <view class="item-info-top_time">{{ formatDate(conversation.lastMessage.timestamp) }}</view>
+          </view>
+          <view class="item-info-bottom">
+            <view class="item-info-bottom-item">
+              <view class="item-info-top_content" v-if="!conversation.lastMessage.recalled">
+                <text class="unread-text">
+                  {{ conversation.lastMessage.read === false && conversation.lastMessage.senderId === currentUser.id ? '[未读]' : '' }}
+                </text>
+
+                <text v-if="conversation.lastMessage.senderId === currentUser.id">我: </text>
+                <text v-else>{{ conversation.type === 'group' ? conversation.lastMessage.senderData.name : conversation.data.name }}: </text>
+                <text v-if="conversation.lastMessage.type === 'text'">{{ conversation.lastMessage.payload.text }}</text>
+                <text v-else-if="conversation.lastMessage.type === 'video'">[视频消息]</text>
+                <text v-else-if="conversation.lastMessage.type === 'audio'">[语音消息]</text>
+                <text v-else-if="conversation.lastMessage.type === 'image'">[图片消息]</text>
+                <text v-else-if="conversation.lastMessage.type === 'file'">[文件消息]</text>
+                <text v-else-if="conversation.lastMessage.type === 'order'">[自定义消息:订单]</text>
+                <text v-else-if="conversation.lastMessage.type === 'pic'">[图片消息]</text>
+				<text v-else>[[未识别内容]]</text>
+              </view>
+              <view class="item-info-top_content" v-else>
+                <text>
+                  {{conversation.lastMessage.recaller.id === currentUser.id ? '你' : conversation.lastMessage.recaller.data.name}}撤回了一条消息
+                </text>
+              </view>
+              <view class="item-info-bottom_action" @click.stop="showAction(conversation)"></view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="no-conversation" v-else>当前没有会话</view>
+    <view class="action-container" v-if="actionPopup.visible">
+      <view class="layer" @click="actionPopup.visible = false"></view>
+      <view class="action-box">
+        <view class="action-item" @click="topConversation">
+          {{ actionPopup.conversation.top ? '取消置顶' : '置顶聊天' }}
+        </view>
+        <view class="action-item" @click="deleteConversation">删除聊天</view>
+      </view>
+    </view>
+  </scroll-view>
+</template>
+
+<script>
+  import {formatDate} from '../lib/utils';
+  import restApi from '../lib/restapi';
+
+  const GoEasy = uni.$GoEasy;
+  const GRTC = uni.$GRTC;
+  export default {
+    name: 'conversation',
+    data() {
+      return {
+        conversations: [],
+
+        actionPopup: {
+          conversation: null,
+          visible: false
+        },
+        currentUser: null
+      }
+    },
+    onShow() {
+	
+      uni.$currentUser = uni.getStorageSync('currentUser');
+      this.currentUser = uni.$currentUser;
+	  console.log(this.currentUser)
+      if (!this.currentUser) {
+        uni.navigateTo({ url: './login' });
+        return;
+      }
+      if (GoEasy.getConnectionStatus() === 'disconnected') {
+        this.connectGoEasy(); //连接goeasy
+        this.subscribeGroup(); //建立连接后,就应该订阅群聊消息,避免漏掉
+      }
+      this.loadConversations(); //加载会话列表
+      this.initGoEasyListeners();
+    },
+    onHide() {
+      if (GoEasy.getConnectionStatus() === 'disconnected') {
+        return
+      }
+      GoEasy.im.off(GoEasy.IM_EVENT.CONVERSATIONS_UPDATED, this.renderConversations);
+    },
+    methods: {
+      formatDate,
+      connectGoEasy() {
+        uni.showLoading();
+        GoEasy.connect({
+          id: this.currentUser.id,
+          data: {
+            name: this.currentUser.name,
+            avatar: this.currentUser.avatar
+          },
+          onSuccess: () => {
+            console.log('GoEasy connect successfully.')
+          },
+          onFailed: (error) => {
+            console.log('Failed to connect GoEasy, code:' + error.code + ',error:' + error.content);
+          },
+          onProgress: (attempts) => {
+            console.log('GoEasy is connecting', attempts);
+          }
+        });
+      },
+      initGoEasyListeners() {
+        GoEasy.im.on(GoEasy.IM_EVENT.CONVERSATIONS_UPDATED, this.renderConversations); //监听会话列表变化
+        GoEasy.im.off(GoEasy.IM_EVENT.CONVERSATIONS_UPDATED, this.setUnreadAmount); // 移除之前的设置角标回调,防止重复回调
+        GoEasy.im.on(GoEasy.IM_EVENT.CONVERSATIONS_UPDATED, this.setUnreadAmount); // 设置角标
+        // #ifdef APP-PLUS || H5
+        GRTC.off(GRTC.EVENT.RING, this.onRing); //移除之前的监听来电事件,防止重复回调
+        GRTC.on(GRTC.EVENT.RING, this.onRing); //监听来电事件
+        // #endif
+      },
+      onRing() {
+        const currentCall = GRTC.currentCall();
+        if (currentCall.groupId) {
+          uni.navigateTo({
+            url: `./rtc/group/ring`,
+          })
+        } else {
+          uni.navigateTo({
+            url: `./rtc/private/ring`,
+          })
+        }
+      },
+
+      // 加载最新的会话列表
+      loadConversations() {
+        GoEasy.im.latestConversations({
+          onSuccess: (result) => {
+            uni.hideLoading();
+            let content = result.content;
+            this.renderConversations(content);
+            this.setUnreadAmount(content);
+          },
+          onFailed: (error) => {
+            uni.hideLoading();
+            console.log('获取最新会话列表失败, error:', error);
+          }
+        });
+      },
+      renderConversations(content) {
+        this.conversations = content.conversations;
+		console.log("消息列表")
+		console.log(this.conversations)
+      },
+      setUnreadAmount(content) {
+        const unreadTotal = content.unreadTotal;
+        if(unreadTotal > 0) {
+          uni.setTabBarBadge({
+            index: 0,
+            text: unreadTotal.toString()
+          });
+        }else{
+          uni.removeTabBarBadge({index: 0});
+        }
+        // #ifdef APP-PLUS
+        GoEasy.setBadge({
+          badge: unreadTotal,
+          onSuccess: function () {
+            console.log("setBadge successfully.")
+          },
+          onFailed: function (error) {
+            console.log("Failed to setBadge,error:" + error);
+          }
+        });
+        // #endif
+      },
+      subscribeGroup() {
+        let groups = restApi.findGroups(this.currentUser);
+        let groupIds = groups.map(item => item.id);
+        GoEasy.im.subscribeGroup({
+          groupIds: groupIds,
+          onSuccess: function () {
+            console.log('订阅群消息成功');
+          },
+          onFailed: function (error) {
+            console.log('订阅群消息失败:', error);
+          }
+        });
+      },
+      topConversation() {  //会话置顶
+        this.actionPopup.visible = false;
+        let conversation = this.actionPopup.conversation;
+        let description = conversation.top ? '取消置顶' : '置顶';
+        GoEasy.im.topConversation({
+          conversation: conversation,
+          top: !conversation.top,
+          onSuccess: function () {
+            uni.showToast({
+              title: description + '成功',
+              icon: 'none'
+            });
+          },
+          onFailed: function (error) {
+            console.log(description, '失败:', error);
+          }
+        });
+      },
+      deleteConversation() {
+        uni.showModal({
+          content: '确认删除这条会话吗?',
+          success: (res) => {
+            if (res.confirm) {
+              let conversation = this.actionPopup.conversation;
+              this.actionPopup.visible = false;
+              GoEasy.im.removeConversation({
+                conversation: conversation,
+                onSuccess: function () {
+                  console.log('删除会话成功');
+                },
+                onFailed: function (error) {
+                  console.log(error);
+                },
+              });
+            } else {
+              this.actionPopup.visible = false;
+            }
+          },
+        })
+      },
+      chat(conversation) {
+        let path = conversation.type === GoEasy.IM_SCENE.PRIVATE ?
+          './privateChat?to=' + conversation.userId :
+          './groupChat?to=' + conversation.groupId;
+		  var friend={
+			  id:conversation.userId,
+			  supplierName:conversation.data.name,
+			  avatar:conversation.data.avatar,
+		  }
+		  uni.setStorage({
+		  		key: 'friend',
+		  		data: friend,
+		  		 success: function () {	
+		  				/* uni.navigateTo({
+		  				  url: './privateChat?to=' + friend.ID
+		  				});	 */
+						uni.navigateTo({ url: path });
+		  		 }
+		  });
+		  		
+        
+      },
+      showAction(conversation) {
+        this.actionPopup.conversation = conversation;
+        this.actionPopup.visible = true;
+      }
+    }
+  }
+</script>
+
+<style>
+  page {
+    height: 100%;
+  }
+
+  .conversations {
+    width: 750rpx;
+    overflow-x: hidden;
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+  }
+
+  .conversations .scroll-item {
+    height: 152rpx;
+    display: flex;
+    align-items: center;
+    padding-left: 32rpx;
+  }
+
+  .conversations .scroll-item .head-icon {
+    width: 100rpx;
+    height: 100rpx;
+    margin-right: 28rpx;
+  }
+
+  .conversations .scroll-item_info {
+    height: 151rpx;
+    width: 590rpx;
+    padding-right: 32rpx;
+    border-bottom: 1px solid #EFEFEF;
+  }
+
+  .conversations .scroll-item_info .item-info-top {
+    padding-top: 20rpx;
+    height: 60rpx;
+    line-height: 60rpx;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+
+  }
+
+  .conversations .item-info-top_name {
+    font-size: 34rpx;
+    color: #262628;
+  }
+
+  .conversations .item-info-top_time {
+    font-size: 34rpx;
+    color: rgba(179, 179, 179, 0.8);
+  }
+
+  .conversations .item-info-bottom {
+    height: 40rpx;
+    line-height: 40rpx;
+    overflow: hidden;
+  }
+
+  .conversations .item-info-bottom-item {
+    display: flex;
+    justify-content: space-between;
+  }
+
+  .item-info-bottom .item-info-top_content {
+    font-size: 34rpx;
+    color: #b3b3b3;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+
+  }
+
+  .item-info-bottom .item-info-bottom_action {
+    width: 50rpx;
+    height: 50rpx;
+    font-size: 34rpx;
+    background: url("../static/images/action.png") no-repeat center;
+    background-size: 28rpx 30rpx;
+  }
+
+  .no-conversation {
+    width: 100%;
+    text-align: center;
+    height: 80rpx;
+    line-height: 80rpx;
+    font-size: 34rpx;
+    color: #9D9D9D;
+  }
+
+  .item-head {
+    position: relative;
+  }
+
+  .item-head .item-head_unread {
+    padding: 6rpx;
+    background-color: #EE593C;
+    color: #FFFFFF;
+    font-size: 34rpx;
+    line-height: 28rpx;
+    border-radius: 24rpx;
+    min-width: 24rpx;
+    min-height: 24rpx;
+    text-align: center;
+    position: absolute;
+    top: 0;
+    right: 15rpx;
+  }
+
+  .action-container {
+    width: 100%;
+    height: 100%;
+    position: fixed;
+    top: 0;
+    left: 0;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+
+  .action-container .layer {
+    position: absolute;
+    top: 0;
+    left: 0;
+    background: rgba(51, 51, 51, 0.5);
+    width: 100%;
+    height: 100%;
+    z-index: 99;
+  }
+
+  .action-box {
+    width: 400rpx;
+    height: 240rpx;
+    background: #ffffff;
+    position: relative;
+    z-index: 100;
+    border-radius: 20rpx;
+    overflow: hidden;
+  }
+
+  .action-item {
+    text-align: center;
+    line-height: 120rpx;
+    font-size: 34rpx;
+    color: #262628;
+    border-bottom: 1px solid #EFEFEF;
+  }
+
+  .unread-text {
+    color: #d02129;
+  }
+</style>

+ 5 - 4
pages/privateChat.vue

@@ -28,8 +28,9 @@
             </view>
             <view class="message-item-content" :class="{'self' : message.senderId ===  currentUser.id}">
               <view class="avatar">
-                <image :src="message.senderId === currentUser.id? currentUser.avatar : friend.avatar"></image>
-              </view>
+                <!-- <image :src="message.senderId === currentUser.id? currentUser.avatar : friend.avatar"></image> -->
+                <image src="/static/img/touxiang.png"></image>
+			  </view>
 
               <view class="content" @click.right="showActionPopup(message)" @longpress="showActionPopup(message)">
                 <view class="message-payload">
@@ -128,14 +129,14 @@
           <image @click="sendVideoMessage()" class="operation-icon" src="/static/images/video.png"></image>
           <view class="operation-title">视频</view>
         </view>
-        <view class="more-icon">
+        <!-- <view class="more-icon">
           <image @click="showOrderMessageList()" class="operation-icon" src="/static/images/order.png"></image>
           <view class="operation-title">订单</view>
         </view>
         <view class="more-icon">
           <image @click="privateCall()" class="operation-icon" src="/static/images/rtc.png"></image>
           <view class="operation-title">视频通话</view>
-        </view>
+        </view> -->
       </view>
     </view>
     <view class="action-popup" @touchmove.stop.prevent v-if="actionPopup.visible">

+ 19 - 7
pages/qunfa.vue

@@ -8,8 +8,8 @@
       <!-- -->
 	  <view class="tbox">
 		  <view class="gongyingshangBox">
-		  		  正在与
-		  		  <span v-for="(item,index) in 4">供应商{{index}}</span>
+		  		  正在与供应商
+		  		  <span v-for="(item,index) in toList">{{item.supplierName}},</span>
 		  		  对话
 		  </view>
 		<!--  <view class="messageLine">
@@ -43,8 +43,9 @@
             </view>
             <view class="message-item-content" :class="{'self' : message.senderId ===  currentUser.id}">
               <view class="avatar">
-                <image :src="message.senderId === currentUser.id? currentUser.avatar : friend.avatar"></image>
-              </view>
+               <!-- <image :src="message.senderId === currentUser.id? currentUser.avatar : friend.avatar"></image> -->
+                <image src="/static/img/touxiang.png"></image>
+			  </view>
 
               <view class="content" @click.right="showActionPopup(message)" @longpress="showActionPopup(message)">
                 <view class="message-payload">
@@ -143,14 +144,14 @@
           <image @click="sendVideoMessage()" class="operation-icon" src="/static/images/video.png"></image>
           <view class="operation-title">视频</view>
         </view>
-        <view class="more-icon">
+        <!-- <view class="more-icon">
           <image @click="showOrderMessageList()" class="operation-icon" src="/static/images/order.png"></image>
           <view class="operation-title">订单</view>
         </view>
         <view class="more-icon">
           <image @click="privateCall()" class="operation-icon" src="/static/images/rtc.png"></image>
           <view class="operation-title">视频通话</view>
-        </view>
+        </view> -->
       </view>
     </view>
     <view class="action-popup" @touchmove.stop.prevent v-if="actionPopup.visible">
@@ -512,15 +513,26 @@
           }
 		 
 		  this.toList.forEach((item,index)=>{
+			  console.log(item.id)
+			  var to = {
+					id: item.id,
+					type: GoEasy.IM_SCENE.PRIVATE,
+					data: {
+					  name: item.supplierName,
+					  avatar: '/static/images/Avatar-1.png'
+					}
+				  };
 		  		this.to.id=item.id
+				console.log(this.to.id)
 		  		this.to.data.name=item.supplierName
 				var num=0
 				if(index == this.toList.length-1){
 					num=1
 				}
+				console.log(to)
 		  		GoEasy.im.createTextMessage({
 		  		  text: this.text,
-		  		  to: this.to,
+		  		  to: to,
 		  		  notification: {
 		  		    title: this.currentUser.name + '发来一段文字',
 		  		    body: body,

BIN
static/img/ckn.png


BIN
static/img/cky.png


BIN
static/img/icon_arrow.png


BIN
static/img/icon_quxiao.png


BIN
static/img/touxiang.png


+ 1 - 1
utils/request.js

@@ -13,7 +13,7 @@ const http = (url = '', date = {}, type = 'POST', header = {
 		//const wxOpenData = uni.getStorageSync("wxOpenData");
 		var imAccessToken= uni.getStorageSync("imAccessToken")
 		var token= uni.getStorageSync("token")
-		if(imAccessToken){
+		if(token){
 			header['token']=token;
 			//header['uid']=wxOpenData.loginInfo.uid; 
 		}