Ver Fonte

联系客服

wkyy há 2 anos atrás
pai
commit
ec5efe2fbe
1 ficheiros alterados com 41 adições e 6 exclusões
  1. 41 6
      pages/user/contactService.vue

+ 41 - 6
pages/user/contactService.vue

@@ -1,13 +1,13 @@
 <template>
 	<view>
 		<ujp-navbar title="联系客服" ></ujp-navbar>
-		<view class="service">
+		<view class="service" @click="servicePhone">
 			<view class="left">
 				<view class="text">
 					平台服务
 				</view>
 				<view class="tel">
-					400-8899-619
+					{{telephone.serviceNumber}}
 				</view>
 			</view>
 			<view class="img-box">
@@ -15,13 +15,13 @@
 			</view>
 		</view>
 		
-		<view class="service breakdown">
+		<view class="service breakdown" @click="breakdownPhone">
 			<view class="left">
 				<view class="text">
 					故障反馈
 				</view>
 				<view class="tel">
-					15607217777
+					{{telephone.breakdownNumber}}
 				</view>
 			</view>
 			<view class="img-box">
@@ -29,13 +29,13 @@
 			</view>
 		</view>
 		
-		<view class="service after-sale">
+		<view class="service after-sale" @click="afterPhone">
 			<view class="left">
 				<view class="text">
 					售后处理
 				</view>
 				<view class="tel">
-					15607217777
+					{{telephone.afterNumber}}
 				</view>
 			</view>
 			<view class="img-box">
@@ -50,6 +50,11 @@
 			</view>
 			<u-button class="oldTextjp2" oldstyle="font-size: 18px;" @click="feedback">意见反馈</u-button>
 		</view>
+		
+		<view>
+			<u-modal v-model="show" @confirm="confirmPhone" :confirm-text="confirmText" confirm-color="#606266" :show-cancel-button="true" ref="uModal" 
+				:asyncClose="true" :title="title" :content="content" :content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
+		</view>
 	</view>
 </template>
 
@@ -57,7 +62,16 @@
 	export default {
 		data() {
 			return {
+				telephone: {
+					serviceNumber: '400-8899-619',
+					breakdownNumber: '15607217777',
+					afterNumber: '15607217777',
+				},
 				userId: '',
+				show: false,
+				title: '',
+				content: '',
+				confirmText: '拨打电话',
 			}
 		},
 		onShow() {
@@ -66,6 +80,27 @@
 			}
 		},
 		methods: {
+			servicePhone() {
+				this.title = '平台服务';
+				this.content = this.telephone.serviceNumber;
+				this.show = true;
+			},
+			breakdownPhone() {
+				this.title = '故障反馈';
+				this.content = this.telephone.breakdownNumber;
+				this.show = true;
+			},
+			afterPhone() {
+				this.title = '售后处理';
+				this.content = this.telephone.afterNumber;
+				this.show = true;
+			},
+			confirmPhone(){
+				this.show = false;
+				uni.makePhoneCall({
+					phoneNumber:this.content //仅为示例
+				});
+			},
 			feedback() {
 				if(this.userId) {
 					uni.navigateTo({