Browse Source

Merge branch 'dev-2.0' of http://git.qniao.cn/dating-agency/dating_touchme_app into dev-2.0

dev-2.0
王子贤 2 months ago
parent
commit
4f7eeb7ac4
6 changed files with 60 additions and 50 deletions
  1. 10
      lib/components/page_appbar.dart
  2. 27
      lib/controller/discover/room_controller.dart
  3. 46
      lib/controller/mine/mine_controller.dart
  4. 5
      lib/pages/discover/visitor_list_page.dart
  5. 20
      lib/pages/mine/mine_page.dart
  6. 2
      lib/pages/setting/match_spread_page.dart

10
lib/components/page_appbar.dart

@ -1,14 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
class PageAppbar extends StatelessWidget implements PreferredSizeWidget {
final Color? backgroundColor;
final Color? color;
final Color? iconColor;
final bool? bottom;
final String title;
final Widget? right;
const PageAppbar({super.key, required this.title, this.backgroundColor, this.color, this.right, this.bottom});
const PageAppbar({super.key, required this.title, this.iconColor,this.backgroundColor, this.color, this.right, this.bottom});
@override
Widget build(BuildContext context) {
@ -18,6 +20,10 @@ class PageAppbar extends StatelessWidget implements PreferredSizeWidget {
centerTitle: true,
foregroundColor: color,
actions: right != null ? [right ?? Container()] : null,
leading: IconButton(
icon: Icon( TDIcons.chevron_left, size: 30, color: iconColor ?? Colors.black),
onPressed: () => Get.back(),
),
title: Text(
title,
style: TextStyle(

27
lib/controller/discover/room_controller.dart

@ -8,6 +8,7 @@ import 'package:dating_touchme_app/model/rtc/link_mic_card_model.dart';
import 'package:dating_touchme_app/model/rtc/rtc_channel_data.dart';
import 'package:dating_touchme_app/model/rtc/rtc_channel_detail.dart';
import 'package:dating_touchme_app/network/network_service.dart';
import 'package:dating_touchme_app/pages/mine/edit_info_page.dart';
import 'package:dating_touchme_app/rtc/rtc_manager.dart';
import 'package:dating_touchme_app/rtc/rtm_manager.dart';
import 'package:dating_touchme_app/service/live_chat_message_service.dart';
@ -749,14 +750,30 @@ class RoomController extends GetxController with WidgetsBindingObserver {
}
void registerMatch() async {
if (GlobalData().userData!.identityCard != null &&
GlobalData().userData!.identityCard!.isNotEmpty) {
await Get.to(() => MatchSpreadPage());
} else {
if (GlobalData().userData!.auditProfilePhoto != null) {
showGeneralDialog(
context: Get.context!,
pageBuilder: (BuildContext buildContext, Animation<double> animation,
Animation<double> secondaryAnimation) {
return TDConfirmDialog(
title: '温馨提示',
content: '当前头像正在审核中,请稍候,如果长时间没有审核结果,请联系客服。',
);
},
);
return;
}
if (GlobalData().userData!.profilePhoto == null || GlobalData().userData!.profilePhoto!.isEmpty) {
SmartDialog.showToast('请先上传头像');
await Get.to(() => EditInfoPage());
return;
}
if(GlobalData().userData!.identityCard == null || GlobalData().userData!.identityCard!.isEmpty){
SmartDialog.showToast('请先进行实名认证');
await Get.to(() => RealNamePage(type: 1));
return;
}
print(455);
await Get.to(() => MatchSpreadPage());
matchmakerFlag.value = GlobalData().userData!.matchmakerFlag!;
}

46
lib/controller/mine/mine_controller.dart

@ -3,34 +3,21 @@ import 'package:dating_touchme_app/generated/assets.dart';
import 'package:dating_touchme_app/model/mine/user_count_data.dart';
import 'package:dating_touchme_app/network/user_api.dart';
import 'package:dating_touchme_app/pages/mine/auth_center_page.dart';
import 'package:dating_touchme_app/pages/mine/edit_info_page.dart';
import 'package:dating_touchme_app/pages/mine/my_wallet_page.dart';
import 'package:dating_touchme_app/pages/mine/real_name_page.dart';
import 'package:dating_touchme_app/pages/mine/rose_page.dart';
import 'package:dating_touchme_app/pages/mine/user_help_center_page.dart';
import 'package:dating_touchme_app/pages/setting/match_spread_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
import '../../pages/setting/setting_page.dart';
class MineController extends GetxController {
final blockList = <Map>[
{"icon": Assets.imagesRose, "title": "我的玫瑰", "subTitle": "新人限时福利", "path": () => RosePage()},
{"icon": Assets.imagesWallet, "title": "我的钱包", "subTitle": "提现无门槛", "path": () => MyWalletPage()},
// {"icon": Assets.imagesShop, "title": "商城中心", "subTitle": "不定期更新商品", "path": () => null},
{"icon": Assets.imagesCert, "title": "认证中心", "subTitle": GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null ? "未认证" : "已认证", "path": () => AuthCenterPage()},
{"icon": Assets.imagesMatchmaker, "title": "红娘等级", "subTitle": "实习红娘", "path": 'MatchSpreadPage'},
].obs;
final settingList = <Map>[
{"icon": Assets.imagesSetting, "title": "设置", "path": () => SettingPage()},
{"icon": Assets.imagesCustomer, "title": "联系客服", "path": () => null},
{"icon": Assets.imagesMail, "title": "意见反馈", "path": () => UserHelpCenterPage()},
].obs;
final userData = GlobalData().userData.obs;
final userId = GlobalData().userId.obs;
@ -38,8 +25,6 @@ class MineController extends GetxController {
late UserApi _userApi;
@override
void onInit() {
super.onInit();
@ -49,13 +34,30 @@ class MineController extends GetxController {
}
void registerMatch() async {
if (GlobalData().userData!.identityCard != null &&
GlobalData().userData!.identityCard!.isNotEmpty) {
await Get.to(() => MatchSpreadPage());
} else {
if (GlobalData().userData!.auditProfilePhoto != null) {
showGeneralDialog(
context: Get.context!,
pageBuilder: (BuildContext buildContext, Animation<double> animation,
Animation<double> secondaryAnimation) {
return TDConfirmDialog(
title: '温馨提示',
content: '当前头像正在审核中,请稍候,如果长时间没有审核结果,请联系客服。',
);
},
);
return;
}
if (GlobalData().userData!.profilePhoto == null || GlobalData().userData!.profilePhoto!.isEmpty) {
SmartDialog.showToast('请先上传头像');
await Get.to(() => EditInfoPage());
return;
}
if(GlobalData().userData!.identityCard == null || GlobalData().userData!.identityCard!.isEmpty){
SmartDialog.showToast('请先进行实名认证');
await Get.to(() => RealNamePage(type: 1));
return;
}
await Get.to(() => MatchSpreadPage());
}
}

5
lib/pages/discover/visitor_list_page.dart

@ -5,6 +5,7 @@ import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
import '../../controller/discover/visitor_controller.dart';
import '../../controller/global.dart';
@ -28,6 +29,10 @@ class _VisitorListPagePageState extends State<VisitorListPage> {
return Scaffold(
backgroundColor: Color(0xffF5F5F5),
appBar: AppBar(
leading: IconButton(
icon: Icon(TDIcons.chevron_left, size: 30, color: Colors.black),
onPressed: () => Get.back(),
),
title: Obx(() => Text(
'最近访客 (${visitorController.total.value})',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),

20
lib/pages/mine/mine_page.dart

@ -276,16 +276,6 @@ class _MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin{
],
),
SizedBox(height: 12.w,),
// ClipRRect(
// borderRadius: BorderRadius.all(Radius.circular(9.w)),
// child: Column(
// children: [
// ...controller.blockList.map((e){
// return BlockItem(item: e, showWaring: e["title"] == "认证中心" && (GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null), path: e["path"],);
// }),
// ],
// ),
// ),
TDCellGroup(
theme: TDCellGroupTheme.cardTheme,
@ -392,16 +382,6 @@ class _MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin{
),
],
),
// ClipRRect(
// borderRadius: BorderRadius.all(Radius.circular(9.w)),
// child: Column(
// children: [
// ...controller.settingList.map((e){
// return SettingItem(item: e, path: e["path"],);
// })
// ],
// ),
// ),
],
),
);

2
lib/pages/setting/match_spread_page.dart

@ -33,7 +33,7 @@ class MatchSpreadPage extends StatelessWidget {
),
child: controller.roseList.isNotEmpty ? Scaffold(
backgroundColor: Colors.transparent,
appBar: PageAppbar(title: "入驻加盟", backgroundColor: Colors.transparent, color: Colors.white),
appBar: PageAppbar(title: "入驻加盟", backgroundColor: Colors.transparent, color: Colors.white, iconColor: Colors.white),
body: SingleChildScrollView(
child: Container(
decoration: BoxDecoration(

Loading…
Cancel
Save