From 54a0b7c1a758f958f7e6fd0b86fa8e0aecfeca75 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期一, 28 八月 2023 16:17:33 +0800
Subject: [PATCH] 呼叫客服增加选择呼叫类型

---
 pages/login/login.vue                                                            |    1 +
 manifest.json                                                                    |    3 +++
 pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue |   43 +++++++++++++++++++++++++++++++------------
 3 files changed, 35 insertions(+), 12 deletions(-)

diff --git a/manifest.json b/manifest.json
index b1f92f8..5370f28 100644
--- a/manifest.json
+++ b/manifest.json
@@ -57,6 +57,9 @@
 			},
 			"scope.userLocation": {
 				"desc": "浣犵殑浣嶇疆淇℃伅灏嗙敤浜庡皬绋嬪簭瀹氫綅"
+			},
+			"scope.makePhoneCall": {
+				"desc": "浣犵殑鐢佃瘽灏嗙敤浜庢嫧鎵撳鏈嶇數璇�"
 			}
 		},
 		"optimization": {
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
index fae8472..1c3474e 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -128,6 +128,14 @@
 				@confirm="completeOutSaleConfirm"
 				@cancel="completeOutSaleCancel"></u-modal>
 		</view>
+		<view class="serviece-customer">
+			<u-action-sheet :actions="list"
+				@select="selectClick"
+				@close='serviceClose'
+				title="鍛煎彨鏂瑰紡"
+				:show="servieceShow"
+				cancelText="鍙栨秷"></u-action-sheet>
+		</view>
 	</view>
 </template>
 
@@ -176,7 +184,8 @@
 				// 瀹㈡湇淇℃伅
 				serviceInfoObj: {
 					openId: null,
-					openName: ''
+					openName: '',
+					serviecePhone: ''
 				},
 				coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
 					'杩涘叆鍦洪櫌', '寮傚父瀹℃牳涓�'
@@ -210,8 +219,9 @@
 					clean: ""
 				},
 				completeOutSaleShow: false,
-				overTmWaixiao: null
-
+				overTmWaixiao: null,
+				list: [{ name: '鎵嬫満鍙�', subname: '1213456', id: 1 }, { name: '寰俊璇煶', id: 2 }], //鍛煎彨瀹㈡湇閫夐」
+				servieceShow: false
 			};
 		},
 		onHide() {
@@ -277,6 +287,8 @@
 					} else {
 						this.serviceInfoObj.openId = res.data.openId;
 						this.serviceInfoObj.openName = res.data.openName;
+						this.serviceInfoObj.serviecePhone = res.data.serviecePhone
+						this.$set(this.list[0], 'subname', this.serviceInfoObj.serviecePhone)
 						uni.setStorageSync('customeropenId', this.serviceInfoObj.openId);
 						uni.setStorageSync('customerName', this.serviceInfoObj.openName);
 					}
@@ -383,8 +395,23 @@
 				}&sendDate=${this.getYuYueDataParams.sendDate}`
 				});
 			},
-			// 鍛煎彨瀹㈡湇
 			callCustomerService() {
+				this.servieceShow = true
+			},
+			serviceClose() {
+				this.servieceShow = false
+			},
+			selectClick(v) {
+				if (v.id === 2) {
+					this.callCustomerServiceImpl()
+				} else if (v.id === 1) {
+					wx.makePhoneCall({
+						phoneNumber: this.serviceInfoObj.serviecePhone
+					})
+				}
+			},
+			// 鍛煎彨瀹㈡湇
+			callCustomerServiceImpl() {
 				// if (!this.serviceInfoObj.openId) {
 				// this.$u.toast('鏃犲鏈嶄俊鎭�');
 				// }
@@ -428,14 +455,6 @@
 						console.log('鑾峰彇澶辫触');
 					}
 				});
-			},
-			calling() {
-				// wx.join1v1Chat({
-				// 	caller: { nickname: this.name, openid: this.openid }, //oZjXk5RRmbroAfl1m5aZ6hRNvqh4
-				// 	listener: { nickname: this.serviceInfoObj.openName, openid: 'orutI5YT0yEvARVngdsTmBpisWmw' }, // 杩欓噷鐨刼penid鏄痜yy鐨勶紝鍏呭綋鍥哄畾鐨勫鏈峯penid
-				// 	backgroundType: 2,
-				// 	roomType: 'voice'
-				// });
 			},
 			// 绉伴噸
 			cengZhongClick() {
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 13aa2af..30df810 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -191,6 +191,7 @@
 				console.log('鎵撳紑浜�');
 			},
 			privacyConfirm() {
+				this.loginPopupShow = false
 				uni.navigateTo({
 					url: '/pages/register/register'
 				});

--
Gitblit v1.9.1