刘远航 4 лет назад
Родитель
Сommit
1efc7fdde6

+ 29 - 67
pages/conversation/call.vue

xqd xqd xqd
@@ -1,7 +1,7 @@
 <template class="bc#f6f6f6">
 	<view style="width: 100%;height: 100%;">
 		<u-gap height="30"></u-gap>
-		<view v-for="(item,index) in list" :key='index' style="height: 200rpx;padding: 0 30rpx;background-color: #FFFFFF;">
+		<view v-for="(item,index) in list" :key='index' @click="detail(item)" style="height: 200rpx;padding: 0 30rpx;background-color: #FFFFFF;">
 			<view class="flex" style="height: 199rpx;">
 				<!-- 头像 -->
 				<view style="width: 20%;" class="flex align-center">
@@ -12,13 +12,10 @@
 					<!-- 名字 -->
 					<view style="font-size: 34rpx;font-weight: bold;margin-bottom: 10rpx;">{{item.name}}</view>
 					<!-- 时间 -->
-					<view style="color: #a0a0a0;">拨入时间: {{item.date}}</view>
-					<!-- 时长 -->
-					<view style="color: #a0a0a0;">通话时长: {{item.Duration}}</view>
-				</view>
-				<view style="width: 35%;margin-top: 50rpx;color: #c0c0c0;font-size: 28rpx;">
-					订单号: {{item.orderID}}
+					<view style="color: #a0a0a0;">最近通话时间: {{item.date}}</view>
+		 
 				</view>
+			 
 			</view>
 			<u-line color="#f3f3f3" />
 		</view>
@@ -31,75 +28,40 @@
 
 		},
 		onLoad() {
-
+			this.getLists();
 		},
 		mounted() {
 
 		},
 		data() {
 			return {
-				list: [{
-					img: 'https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png', //头像
-					name: '渣渣宝', //名字
-					date: '9/25', //日期
-					time: '19.12.25', //时间
-					Duration: '00:05:32', //时长
-					orderID: '202000007' //订单号
-				}, {
-					img: 'https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png', //头像
-					name: '渣渣宝', //名字
-					date: '9/25', //日期
-					time: '19.12.25', //时间
-					Duration: '00:05:32', //时长
-					orderID: '202000007' //订单号
-				}, {
-					img: 'https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png', //头像
-					name: '渣渣宝', //名字
-					date: '9/25', //日期
-					time: '19.12.25', //时间
-					Duration: '00:05:32', //时长
-					orderID: '202000007' //订单号
-				}, {
-					img: 'https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png', //头像
-					name: '渣渣宝', //名字
-					date: '9/25', //日期
-					time: '19.12.25', //时间
-					Duration: '00:05:32', //时长
-					orderID: '202000007' //订单号
-				}, {
-					img: 'https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png', //头像
-					name: '渣渣宝', //名字
-					date: '9/25', //日期
-					time: '19.12.25', //时间
-					Duration: '00:05:32', //时长
-					orderID: '202000007' //订单号
-				}, {
-					img: 'https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png', //头像
-					name: '渣渣宝', //名字
-					date: '9/25', //日期
-					time: '19.12.25', //时间
-					Duration: '00:05:32', //时长
-					orderID: '202000007' //订单号
-				}, {
-					img: 'https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png', //头像
-					name: '渣渣宝', //名字
-					date: '9/25', //日期
-					time: '19.12.25', //时间
-					Duration: '00:05:32', //时长
-					orderID: '202000007' //订单号
-				}, {
-					img: 'https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png', //头像
-					name: '渣渣宝', //名字
-					date: '9/25', //日期
-					time: '19.12.25', //时间
-					Duration: '00:05:32', //时长
-					orderID: '202000007' //订单号
-				}]
+				list: []
 			}
 		},
 		methods: {
-
-
+			getLists:async function(){
+				let res = await this.$request.post("Doctor/user_call");
+				if(res.status==0){
+					if(res.data.length!=0){
+						let data = res.data;
+						for(let i=0;i<data.length;i++){
+							this.list.push({
+								img: data[i].user.avatar, //头像
+								name: data[i].user.nickname, //名字
+								date: data[i].user.dates, //日期
+								id: data[i].user.id, //日期
+							})
+						}
+					}
+				}
+				console.log(res);
+			},
+			detail(e){
+				let id = e.id;	
+				// uni.navigateTo({
+				// 	url:  "../conversation/calldetail?id=" + id;
+				// })
+			},
 		}
 	};
 </script>

+ 3 - 1
pages/conversation/conversation.vue

xqd
@@ -159,7 +159,9 @@
 			},
 
 			tonghua() {
-				console.log("点击了通话记录");
+				 uni.navigateTo({
+					url: "call"
+				 })
 				this.qiehuan = !this.qiehuan
 			},
 			goliaotian(e) {

+ 1 - 1
pages/conversation/conversationWindow.vue

xqd
@@ -141,7 +141,7 @@
 							// newList.push(res.data[i]);
 						}
 					}
-					
+					this.scrollToBottom()
 				}
 			},
 			renderMessageDate(message, index) {