From 3dcbd186c42c598c0c08d1cd37034cf2baa09e54 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 30 十二月 2019 15:47:51 +0800 Subject: [PATCH] 合并了代码 --- ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs index 5395cca..8998b82 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs @@ -184,7 +184,17 @@ } else { - btnPhone.Text = "+" + UserCenterResourse.UserInfo.AreaCode + " " + UserCenterResourse.UserInfo.Phone; + string phoneNum = UserCenterResourse.UserInfo.Phone; + if (phoneNum.Length >= 11) + { + phoneNum = phoneNum.Substring(0, 3) + "".PadLeft(phoneNum.Length - 7, '*') + phoneNum.Substring(phoneNum.Length - 4, 4); + } + else if (phoneNum.Length >= 5) + { + //鎴栬杩欐槸鍥藉鐨勬墜鏈哄惂 + phoneNum = phoneNum.Substring(0, 3) + "".PadLeft(phoneNum.Length - 5, '*') + phoneNum.Substring(phoneNum.Length - 2, 2); + } + btnPhone.Text = "+" + UserCenterResourse.UserInfo.AreaCode + " " + phoneNum; } rowPhone.ButtonClickEvent += (sender, e) => { -- Gitblit v1.8.0