Browse Source

no message

ios
ZHR007 4 months ago
parent
commit
ce13d390a5
9 changed files with 63 additions and 41 deletions
  1. BIN
      assets/images/phone_checked.png
  2. BIN
      assets/images/photo_checked.png
  3. BIN
      assets/images/photo_uncheck.png
  4. BIN
      assets/images/real_checked.png
  5. BIN
      assets/images/real_uncheck.png
  6. 15
      lib/controller/mine/auth_controller.dart
  7. 5
      lib/generated/assets.dart
  8. 18
      lib/pages/mine/auth_center_page.dart
  9. 66
      lib/pages/mine/real_name_page.dart

BIN
assets/images/phone_checked.png

Before After
Width: 110  |  Height: 156  |  Size: 3.0 KiB

BIN
assets/images/photo_checked.png

Before After
Width: 146  |  Height: 146  |  Size: 4.3 KiB

BIN
assets/images/photo_uncheck.png

Before After
Width: 146  |  Height: 146  |  Size: 2.2 KiB

BIN
assets/images/real_checked.png

Before After
Width: 144  |  Height: 160  |  Size: 4.9 KiB

BIN
assets/images/real_uncheck.png

Before After
Width: 144  |  Height: 160  |  Size: 2.7 KiB

15
lib/controller/mine/auth_controller.dart

@ -1,6 +1,7 @@
import 'dart:async';
import 'package:get/get.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import '../../generated/assets.dart';
import '../../network/user_api.dart';
import '../global.dart';
@ -38,9 +39,9 @@ class AuthController extends GetxController {
}
}
dataList.assignAll([
AuthCard( title: '手机绑定', desc: '防止账号丢失', index: 1, authed: true),
AuthCard( title: '真实头像', desc: '提高交友成功率', index: 2, authed: checkPhoto),
AuthCard( title: '实名认证', desc: '提高交友成功率', index: 3, authed: realAuth),
AuthCard( title: '手机绑定', desc: '防止账号丢失', index: 1, authed: true, defaultIcon: Assets.imagesPhoneChecked, activeIcon: Assets.imagesPhoneChecked, width: 28,height: 40),
AuthCard( title: '真实头像', desc: '提高交友成功率', index: 2, authed: checkPhoto, defaultIcon: Assets.imagesPhotoUncheck, activeIcon: Assets.imagesPhotoChecked, width: 38,height: 37),
AuthCard( title: '实名认证', desc: '提高交友成功率', index: 3, authed: realAuth, defaultIcon: Assets.imagesRealUncheck, activeIcon: Assets.imagesRealChecked, width: 36,height: 40),
]);
} catch (e) {
SmartDialog.showToast('网络请求失败,请检查网络连接');
@ -128,11 +129,19 @@ class AuthCard {
final String desc;
final int index;
bool authed;
final String defaultIcon;
final String activeIcon;
final double height;
final double width;
AuthCard({
required this.desc,
required this.title,
required this.index,
required this.authed,
required this.defaultIcon,
required this.activeIcon,
required this.height,
required this.width,
});
}

5
lib/generated/assets.dart

@ -124,10 +124,15 @@ class Assets {
static const String imagesMore = 'assets/images/more.png';
static const String imagesMoreIcon = 'assets/images/more_icon.png';
static const String imagesOnlineIcon = 'assets/images/online_icon.png';
static const String imagesPhoneChecked = 'assets/images/phone_checked.png';
static const String imagesPhoto = 'assets/images/photo.png';
static const String imagesPhotoChecked = 'assets/images/photo_checked.png';
static const String imagesPhotoUncheck = 'assets/images/photo_uncheck.png';
static const String imagesPlayIcon = 'assets/images/play_icon.png';
static const String imagesPlayer = 'assets/images/player.png';
static const String imagesRealChecked = 'assets/images/real_checked.png';
static const String imagesRealName = 'assets/images/real_name.png';
static const String imagesRealUncheck = 'assets/images/real_uncheck.png';
static const String imagesRose = 'assets/images/rose.png';
static const String imagesRoseBanner = 'assets/images/rose_banner.png';
static const String imagesRoseGift = 'assets/images/rose_gift.png';

18
lib/pages/mine/auth_center_page.dart

@ -6,6 +6,7 @@ import 'package:get/get.dart';
import '../../controller/mine/auth_controller.dart';
import '../../extension/router_service.dart';
import '../../generated/assets.dart';
import 'edit_info_page.dart';
class AuthCenterPage extends StatelessWidget {
@ -50,14 +51,17 @@ class AuthCenterPage extends StatelessWidget {
children: [
//
Container(
width: 40,
height: 40,
width: 72,
height: 72,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Colors.blue[100],
image: DecorationImage(
image: NetworkImage('https://picsum.photos/40/40?random=$item.index'),
fit: BoxFit.cover,
borderRadius: BorderRadius.circular(72),
color: Color(0xFFF7F7F7),
),
child: Center(
child: Image.asset(
item.authed ? item.activeIcon : item.defaultIcon,
width: item.width,
height: item.height,
),
),
),

66
lib/pages/mine/real_name_page.dart

@ -21,40 +21,41 @@ class RealNamePage extends StatelessWidget {
body: Column(
children: [
Container(
height: 48,
decoration: BoxDecoration(color: Color(0xffE7E7E7)),
height: 56,
decoration: BoxDecoration(color: Color(0xffFFFFFF)),
padding: const EdgeInsets.only(left: 16),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center, //
children: [
Text(
'*请填写本人实名信息',
style: TextStyle(
fontSize: 14,
color: Colors.black87,
),
child: Center(
child: Text(
'*请填写本人实名信息',
style: TextStyle(
fontSize: 14,
color: Colors.black87,
),
],
),
),
),
// SizedBox(height: 12),
Container(
height: 56, //
width: MediaQuery.of(context).size.width - 40,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey[400]!,
width: 0.5,
),
),
border: Border.all(color: Colors.grey.shade300),
borderRadius: BorderRadius.circular(28),
// border: Border(
// bottom: BorderSide(
// color: Colors.grey[400]!,
// width: 0.5,
// ),
// ),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center, //
children: [
// - +
Container(
width: 100,
width: 108,
alignment: Alignment.centerLeft,
padding: const EdgeInsets.only(left: 16),
padding: const EdgeInsets.only(left: 24),
child: Text(
'姓名:',
style: TextStyle(
@ -63,7 +64,7 @@ class RealNamePage extends StatelessWidget {
),
),
),
SizedBox(width: 12),
// SizedBox(width: 4),
// - 使Expanded填充剩余空间
Expanded(
@ -90,25 +91,28 @@ class RealNamePage extends StatelessWidget {
],
),
),
// SizedBox(height: 30),
SizedBox(height: 24),
Container(
height: 56, //
width: MediaQuery.of(context).size.width - 40,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey[400]!,
width: 0.5,
),
),
border: Border.all(color: Colors.grey.shade300),
borderRadius: BorderRadius.circular(28),
// border: Border(
// bottom: BorderSide(
// color: Colors.grey[400]!,
// width: 0.5,
// ),
// ),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center, //
children: [
// - +
Container(
width: 100,
width: 108,
alignment: Alignment.centerLeft,
padding: const EdgeInsets.only(left: 16),
padding: const EdgeInsets.only(left: 24),
child: Text(
'身份证号:',
style: TextStyle(
@ -117,7 +121,7 @@ class RealNamePage extends StatelessWidget {
),
),
),
SizedBox(width: 12),
// SizedBox(width: 4),
// - 使Expanded填充剩余空间
Expanded(

Loading…
Cancel
Save