From 42e5ea86f7edc9361227edd979a8ae1952713161 Mon Sep 17 00:00:00 2001
From: Liuyi <candymxq888@outlook.com>
Date: 星期六, 19 十月 2024 16:19:16 +0800
Subject: [PATCH] 添加共享列表,修改共享功能相关代码

---
 pages/station/index.vue |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/pages/station/index.vue b/pages/station/index.vue
index cbe1f70..0e93cd8 100644
--- a/pages/station/index.vue
+++ b/pages/station/index.vue
@@ -23,6 +23,7 @@
 									<text>{{item.distanceValue}}km</text>
 								</view>
 							</view>
+							<view class="info-phone" @click="toCall(item.phone)">电话:{{ item.phone}}</view>
 						</view>
 					</view>
 				</block>
@@ -43,6 +44,7 @@
 									<text>{{item.distanceValue}}km</text>
 								</view>
 							</view>
+							<view class="info-phone" @click="toCall(item.phone)">电话:{{ item.phone}}</view>
 						</view>
 					</view>
 				</block>
@@ -95,6 +97,19 @@
 			scale:18
 		})
 	}
+	function toCall(phone){
+		   // #ifdef MP-WEIXIN
+			wx.makePhoneCall({
+				phoneNumber: phone,
+				success: function() {
+					console.log("拨打电话成功!")
+				},
+				fail: function() {
+					console.log("拨打电话失败!")
+				}
+			})
+		   // #endif
+	}
 	onMounted(async() =>{
 		userLocation.value = JSON.parse(uni.getStorageSync('userLocation'))
 		await getSiteList()
@@ -143,26 +158,28 @@
 			   padding:0 32rpx;
 			   box-sizing: border-box;
 			   .item{
-			   	height:200rpx;
+			   	height:230rpx;
 			   	width:100%;
 			   	background-color: #FFFFFF;
 			   	border-radius: 24rpx;
-			   	padding:0 20rpx;
+			   	padding:36rpx 20rpx;
 			   	margin-bottom:20rpx;
 			   	box-sizing: border-box;
 			   	display: flex;
 			   	align-items:center;
 			   	.item-img{
 			   		image{
-			   			width:130rpx;
-			   			height: 130rpx;
+			   			width:140rpx;
+			   			height: 140rpx;
 			   		}
 			   	}
 			   	.item-info{
+					height:100%;
 			   		display: flex;
 			   		flex-direction: column;
 			   		margin-left:20rpx;
 			   		justify-content: space-between;
+					overflow: hidden;
 			   		.info-name{
 			   			color:#222c35;
 			   		}
@@ -190,6 +207,10 @@
 			   				}
 			   			}
 			   		}
+					.info-phone{
+						font-size:26rpx;
+						color: #778bce;
+					}
 			   	}
 			   }
 		   }

--
Gitblit v1.9.3