瀏覽代碼

新增联系电话

gcz 2 年之前
父節點
當前提交
563660f9a0
共有 1 個文件被更改,包括 21 次插入0 次删除
  1. 21 0
      center/center.vue

+ 21 - 0
center/center.vue

@@ -107,6 +107,7 @@
 				tools:[
 					// {name:'充值中心',url:'/center/recharge',ico:this.$commonConfig.staticUrl+'/img/tool-chongzhi.png'},
 					{name:'地址管理',url:'/center/addrlist',ico:this.$commonConfig.staticUrl+'/img/tool-map.png'},
+					{name:'客服电话',phone:'',ico:this.$commonConfig.staticUrl+'/img/tool-phone.png'},
 				]
 			}
 		},
@@ -129,7 +130,27 @@
 				})
 			},
 			toolsClick(item){
+				let that = this;
 				console.log('item',item);
+				if ('phone' in item) {
+					if(!that.memberInfo.customerMobile){
+						uni.showToast({
+							title:'电话号码为空',
+							icon:"none"
+						})
+						return
+					}
+				  uni.makePhoneCall({
+				  	phoneNumber: that.memberInfo.customerMobile,
+					success() {
+						console.log('success');
+					},
+					fail() {
+						console.log('fail');
+					}
+				  });
+				  return
+				}
 				uni.$u.route(item.url);
 			},
 			orderClick(item,index){