From cc0d80c7d86c6d0167269b3408c4b30c24ce84e9 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 23 三月 2020 16:55:37 +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