From b73d5b4f9d70e997690121a04a8e93e40327d10a Mon Sep 17 00:00:00 2001
From: wk
Date: 星期二, 13 八月 2024 16:01:19 +0800
Subject: [PATCH] feta:货代改为承运商

---
 pages/customer-page/customer-my/customer-my.vue |   83 +++++++++++++++++++++++++++++++++++------
 1 files changed, 70 insertions(+), 13 deletions(-)

diff --git a/pages/customer-page/customer-my/customer-my.vue b/pages/customer-page/customer-my/customer-my.vue
index 35ea4b4..89df8e2 100644
--- a/pages/customer-page/customer-my/customer-my.vue
+++ b/pages/customer-page/customer-my/customer-my.vue
@@ -62,7 +62,7 @@
 			<view class="personal-information-block">
 				<view class="block-main">
 					<view class="huodai">
-						<combined-title title="鎴戠殑璐т唬"
+						<combined-title title="鎴戠殑鎵胯繍鍟�"
 							@rightText="addHuoDai">
 							<template v-slot:rightText>
 								<text>娣诲姞</text>
@@ -139,6 +139,9 @@
 			<view class="logout"><u-button text="閫�鍑虹櫥褰�"
 					type="primary"
 					@click="logout()"></u-button></view>
+			<view class="logout"><u-button text="鑱旂郴鎴戜滑"
+					type="primary"
+					@click="contactUs()"></u-button></view>
 		</view>
 		<u-toast ref="uToast"></u-toast>
 		<!-- 鏂板缓杞﹂槦寮瑰嚭妗� -->
@@ -171,8 +174,7 @@
 						@click="addNewGroupClick"></u-button></view>
 			</u-popup>
 		</view>
-
-		<!-- 鍒犻櫎璐т唬妯℃�佹 -->
+		<!-- 鍒犻櫎鎵胯繍鍟嗘ā鎬佹 -->
 		<view class="deleteHuoDaiModal">
 			<u-modal :show="deleteHuoDaiShow"
 				:title="deleteHuoDaiTitle"
@@ -209,6 +211,7 @@
 </template>
 
 <script>
+	import { BaseUrl } from '@/api/publicInterface.js'
 	import combinedTitle from '@/components/combined-title/combined-title.vue';
 	import { customerId, redirectLogin } from '@/utils/status';
 	export default {
@@ -231,8 +234,8 @@
 				options1: [{
 					text: '鍒犻櫎'
 				}],
-				// 鍒犻櫎璐т唬妯℃�佹
-				deleteHuoDaiId: null, // 鍒犻櫎璐т唬id
+				// 鍒犻櫎鎵胯繍鍟嗘ā鎬佹
+				deleteHuoDaiId: null, // 鍒犻櫎鎵胯繍鍟唅d
 				deleteHuoDaiShow: false,
 				deleteHuoDaiTitle: '',
 				deleteHuoDaiContent: '',
@@ -249,7 +252,8 @@
 				userEntity: {},
 				initPwdShow: false,
 				modifyPwdShow: false,
-				passwordModified: ''
+				passwordModified: '',
+				phoneList:[]
 			};
 		},
 		computed: {
@@ -266,6 +270,40 @@
 				this.getAllHuoDaiByCustomerId();
 				this.getFleet();
 				this.getUserEntity();
+				uni.request({
+					url:  `${BaseUrl}/admin/dict/page`,
+					method: 'GET',
+					data: {
+						dictType:'phone'
+					},
+					header: {
+						Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'),
+						clientToc: 'Y',
+						'CLIENT_TOC': 'Y',
+					},
+					success: res => {
+						let dictId=res.data.data?.records[0].id
+						uni.request({
+							url:  `${BaseUrl}/admin/dict/item/page`,
+							method: 'GET',
+							data: {
+								dictId:dictId
+							},
+							header: {
+								Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'),
+								clientToc: 'Y',
+								'CLIENT_TOC': 'Y',
+							},
+							success: res => {
+								this.phoneList=res.data.data.records
+							},
+							fail: err => {
+							}
+						})
+					},
+					fail: err => {
+					}
+					})
 			},
 			getUserEntity() {
 				uni.showLoading({
@@ -285,7 +323,7 @@
 					this.BuyCardData = res.data;
 				});
 			},
-			// 鑾峰彇璐т唬鍒楄〃
+			// 鑾峰彇鎵胯繍鍟嗗垪琛�
 			getAllHuoDaiByCustomerId() {
 				uni.showLoading({
 					title: '鍔犺浇涓�...'
@@ -305,10 +343,10 @@
 					this.fleetData = res.data;
 				});
 			},
-			// 娣诲姞璐т唬
+			// 娣诲姞鎵胯繍鍟�
 			addHuoDai() {
 				uni.navigateTo({
-					url: '/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver?role=1' // 1浠h〃鐨勬槸璐т唬
+					url: '/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver?role=1' // 1浠h〃鐨勬槸鎵胯繍鍟�
 				});
 			},
 			// 娣诲姞璐拱璇�
@@ -355,14 +393,14 @@
 					});
 				this.updateGroupShow = false;
 			},
-			// 鍒犻櫎璐т唬
+			// 鍒犻櫎鎵胯繍鍟�
 			deleteHuoDaiClick(args) {
-				console.log(args, '璐т唬id');
+				console.log(args, '鎵胯繍鍟唅d');
 				this.deleteHuoDaiId = args.name;
 				this.deleteHuoDaiShow = true;
 				this.huoDaiData.forEach(item => {
 					if (item.userId == this.deleteHuoDaiId) {
-						this.deleteHuoDaiContent = '纭鍒犻櫎璐т唬' + item.name + '鍚楋紵';
+						this.deleteHuoDaiContent = '纭鍒犻櫎鎵胯繍鍟�' + item.name + '鍚楋紵';
 					}
 				});
 			},
@@ -426,7 +464,7 @@
 						this.getFleet();
 					});
 			},
-			// 璐т唬璇︽儏
+			// 鎵胯繍鍟嗚鎯�
 			toFreightForwarderDetails(userId) {
 				uni.navigateTo({
 					url: `/pages/customer-page/freight-forwarder-details/freight-forwarder-details?userId=${userId}`
@@ -441,6 +479,25 @@
 			logout() {
 				this.logoutShow = true;
 			},
+			contactUs(){
+				let data=[]
+				this.phoneList.map(item=>{
+					item.value.split(',').map(ite=>{
+						data.push(ite)
+					})
+				})
+				uni.showActionSheet({
+				itemList: Array.from(new Set(data)),
+				success: (res) => {
+					uni.makePhoneCall({
+						phoneNumber:Array.from(new Set(data))[res.tapIndex + 1]
+					})
+				},
+				fail: (err) => {
+					console.log('寮圭獥鍙栨秷');
+				}
+				});
+			},
 			logoutConfirm() {
 				redirectLogin();
 				this.$store.commit('changeisLogin', false)

--
Gitblit v1.9.1