Commit e732a20e by tanghuan

手机号脱敏显示

1 parent fc5a9772
......@@ -63,7 +63,7 @@ class AccountPage extends StatelessWidget {
leading: Icon(Icons.mobile_friendly),
title: Text('手机号绑定'),
subtitle: Text(
state.phone != '' ? state.phone : '未绑定',
state.phone != '' ? '${state.phone.substring(0, 3)}****${state.phone.substring(7, 11)}' : '未绑定',
style: TextStyle(
fontSize: 14.0,
color: Colors.grey,
......
......@@ -27,13 +27,13 @@ class AccountPhonePage extends StatelessWidget {
color: Colors.white, // 设置返回图标按钮的颜色
),
),
body: state.phone == ''
body: state.phone != ''
? Center(
child: Column(children: [
SizedBox(height: 120),
Text('已绑定手机号'),
Text(
state.phone,
'${state.phone.substring(0, 3)}****${state.phone.substring(7, 11)}',
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!