From bd46c57c77c276014db3192a4e2cc96e23c93202 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 21 二月 2020 13:08:47 +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