Bladeren bron

更新热线电话

zhuxiuping 3 jaren geleden
bovenliggende
commit
5d0a9da87c
3 gewijzigde bestanden met toevoegingen van 63 en 14 verwijderingen
  1. 18 2
      pages/index/index.vue
  2. 33 2
      pages/myself/myself.vue
  3. 12 10
      pages/order_mark/order_mark.vue

+ 18 - 2
pages/index/index.vue

@@ -6,9 +6,15 @@
 		</view>
 		<!-- 第一层公寓名称卡片 -->
 		<uni-card style="margin-top: -40px;margin-bottom:0px; width:660rpx;height: 254rpx;" title="墨轩湖姬子公寓(南昌交通学院)" sub-title="2021年装修 | 智能门锁 | 房间wifi | 免费停车" extra="设施/详情>" @click="navigateToXiangqing">
-			<text class="uni-body">宜春市靖安县北高速路口什么路899号</text>
+			<!-- <text class="uni-body">宜春市靖安县北高速路口什么路899号</text>
 			<image class="uni-phone" src="../../static/index/index_phone.svg"></image>
 			<image class="uni-map" src="../../static/index/index_map.svg"></image>
+			<br><text class="uni-body2">距离我520km</text> -->
+		</uni-card>
+		<uni-card style="margin-top: -21px;margin-bottom:0px; width:660rpx;height: 254rpx;">
+			<text class="uni-body">宜春市靖安县北高速路口什么路899号</text>
+			<image class="uni-phone" @click="telphone(phone)" src="../../static/index/index_phone.svg"></image>
+			<image class="uni-map" src="../../static/index/index_map.svg"></image>
 			<br><text class="uni-body2">距离我520km</text>
 		</uni-card>
 		<!-- 第二层工具 -->
@@ -125,7 +131,8 @@
 						srcUrl:room2,
 						name: '图2'
 					},
-				]
+				],
+				phone:'15079248859',//电话
 			}
 		},
 		onLoad() {
@@ -206,6 +213,9 @@
 			},
 			confirm(e) {
 				console.log('confirm 返回:', e)
+			},
+			change(e) {
+				console.log('1change 返回:', e)
 				// 模拟动态打卡
 				if (this.info.selected.length > 5) return
 				this.info.selected.push({
@@ -213,6 +223,12 @@
 					info: '打卡'
 				})
 			},
+			//拨打电话
+			telphone(phone){
+				uni.makePhoneCall({ 
+					phoneNumber: phone ,
+				}) // 传参带入号码即可
+			}
 		}
 	}
 </script>

+ 33 - 2
pages/myself/myself.vue

@@ -42,7 +42,7 @@
 		<view class="my_help">
 			<view class="help_title">我的服务</view>
 			<view class="item-list">
-			  <view class="item-list-one" @click="navigateToXuzhi">
+			  <view class="item-list-one" @click="telphone(phone)">
 			    <image src="../../static/my/person_phone.svg" class="img-btn"></image>
 			    <text class="list-txt">人工热线</text>
 			  </view>
@@ -74,7 +74,8 @@
 					{id:4,list:'拖鞋'},
 					{id:5,list:'电水壶'},
 					{id:6,list:'免费瓶装水'},
-				]
+				],
+				phone:'15079248859',//电话
 			}
 		},
 		onLoad() {
@@ -140,6 +141,36 @@
 					fail: () => {console.log("调用失败")},
 					complete: () => {console.log("调用完成")}
 				})
+			},
+			//拨打人工热线
+			telphone(phone){
+				uni.makePhoneCall({ phoneNumber: phone }) // 传参带入号码即可
+				// 获取设备平台
+				// let platform = uni.getSystemInfoSync().platform
+				// switch (platform) {
+				// 	case 'android':
+				// 		uni.showActionSheet({
+				// 		    itemList: [phone,'呼叫'],
+				// 		    success:function(res){
+				// 				console.log(res);
+				// 				if(res.tapIndex==1){
+				// 					plus.device.dial(phone,true)        
+				// 				}
+				// 		    },
+				// 		    complete: function(res) {
+				// 		       console.log("安卓失败",res)
+				// 		    }
+				// 		})
+				// 		break;
+				// 	case 'ios':
+				// 		// 使用uni-app提供的借口
+				// 		uni.makePhoneCall({
+				// 			phoneNumber: phone
+				// 		})
+				// 		break;
+				// 	default:
+					// 调试器工具
+				// }
 			}
 		}
 	}

+ 12 - 10
pages/order_mark/order_mark.vue

@@ -53,17 +53,17 @@
 				],
 			}
 		},
-		onShow() {
-			// 模拟从后台拿到的数据
-			var orderList = [
-				{id:1,orderTitle:'预定成功 / 等待您的支付',allPrice:'¥20.00',orderMenshi:'门市价',menshiPrice:'¥160',orderFuli:'教师福利',fuliPrice:'¥160',orderYufukuan:'预付款',yufukuanPrice:'¥20',types:1},
-				{id:4,orderTitle:'预定成功 / 等待您的入住',allPrice:'¥20.00',orderMenshi:'门市价',menshiPrice:'¥160',orderFuli:'教师福利',fuliPrice:'¥160',orderYufukuan:'预付款',yufukuanPrice:'¥20',types:2},
-				{id:2,orderTitle:'订单已取消 / 期待您再次光临',allPrice:'¥20.00',orderMenshi:'门市价',menshiPrice:'¥160',orderFuli:'教师福利',fuliPrice:'¥160',orderYufukuan:'预付款',yufukuanPrice:'¥20',types:4},
-				{id:3,orderTitle:'订单已完成 / 期待您再次光临',allPrice:'¥10.00',orderMenshi:'门市价',shuidianPrice:'¥10',orderShuidian:'水电扣除',types:6}
-			]
-		},
+		// onShow() {
+		// 	// 模拟从后台拿到的数据
+		// 	var orderList = [
+		// 		{id:1,orderTitle:'预定成功 / 等待您的支付',allPrice:'¥20.00',orderMenshi:'门市价',menshiPrice:'¥160',orderFuli:'教师福利',fuliPrice:'¥160',orderYufukuan:'预付款',yufukuanPrice:'¥20',types:1},
+		// 		{id:4,orderTitle:'预定成功 / 等待您的入住',allPrice:'¥20.00',orderMenshi:'门市价',menshiPrice:'¥160',orderFuli:'教师福利',fuliPrice:'¥160',orderYufukuan:'预付款',yufukuanPrice:'¥20',types:2},
+		// 		{id:2,orderTitle:'订单已取消 / 期待您再次光临',allPrice:'¥20.00',orderMenshi:'门市价',menshiPrice:'¥160',orderFuli:'教师福利',fuliPrice:'¥160',orderYufukuan:'预付款',yufukuanPrice:'¥20',types:4},
+		// 		{id:3,orderTitle:'订单已完成 / 期待您再次光临',allPrice:'¥10.00',orderMenshi:'门市价',shuidianPrice:'¥10',orderShuidian:'水电扣除',types:6}
+		// 	]
+		// },
 		onload(option){
-			console.log('返回')
+			// console.log('返回')
 			console.log(option.ids)
 			console.log(this.orderList)
 			// var arr =[]
@@ -74,6 +74,8 @@
 			// })
 			// this.orderList=arr
 		},
+		mounted() {
+		},
 		methods:{
 			
 		}