From f07ec264af9cb582c4de7ce6cd2eaf40f48d714d Mon Sep 17 00:00:00 2001 From: ZHR007 Date: Mon, 12 Jan 2026 16:35:12 +0800 Subject: [PATCH] no message --- lib/controller/mine/edit_info_controller.dart | 12 +- lib/controller/setting/spread_controller.dart | 3 +- lib/pages/mine/mine_page.dart | 163 ------------------ lib/pages/mine/signature_page.dart | 107 ++++-------- 4 files changed, 42 insertions(+), 243 deletions(-) diff --git a/lib/controller/mine/edit_info_controller.dart b/lib/controller/mine/edit_info_controller.dart index 4fbcfd0..c64a737 100644 --- a/lib/controller/mine/edit_info_controller.dart +++ b/lib/controller/mine/edit_info_controller.dart @@ -607,11 +607,10 @@ class EditInfoController extends GetxController { savaDescribeInfo() async { try{ - - final originImg = userData.value!.photoList!.map((e) => e.photoUrl).toSet(); - final result = imgList - .where((e) => !originImg.contains(e)) - .toList(); + if(message.value.isEmpty){ + SmartDialog.showToast("请输入交友心声"); + return; + } final imgPayload = { 'miId': userData.value?.id ?? 0, 'authenticationCode': '7', @@ -624,15 +623,12 @@ class EditInfoController extends GetxController { realDescribe.value = message.value; getInfo(); SmartDialog.showToast("交友心声已提交审核"); - Get.back(); } else{ SmartDialog.showToast(imgAuditResp.data.message); - return; } } catch(e){ - print('相册提交审核失败: $e'); SmartDialog.showToast('交友心声提交审核失败,请重试'); return; diff --git a/lib/controller/setting/spread_controller.dart b/lib/controller/setting/spread_controller.dart index ca93e4c..a915015 100644 --- a/lib/controller/setting/spread_controller.dart +++ b/lib/controller/setting/spread_controller.dart @@ -65,7 +65,8 @@ class SpreadController extends GetxController with WidgetsBindingObserver { ]; } else if(roseList[activePay.value].subCategory == 88802){ revenue.value = [ - {'icon': '1', 'desc': '礼物收益固定40%,邀请嘉宾,嘉宾消费的分成10%'}, + {'icon': '1', 'desc': '礼物收益范围15%-30%,嘉宾消费的分成3%;'}, + {'icon': '2', 'desc': '每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;'}, {'icon': '3', 'desc': '红娘推荐的嘉宾成为红娘,赚取入驻费的20%分成;'}, {'icon': '4', 'desc': '新徒弟首月收益的10%(平台奖励)'}, ]; diff --git a/lib/pages/mine/mine_page.dart b/lib/pages/mine/mine_page.dart index 35a8e3d..b8d0355 100644 --- a/lib/pages/mine/mine_page.dart +++ b/lib/pages/mine/mine_page.dart @@ -409,18 +409,11 @@ class _MinePageState extends State with AutomaticKeepAliveClientMixin{ ); } - @override // TODO: implement wantKeepAlive bool get wantKeepAlive => true; } - - - - - - class InfoItem extends StatefulWidget { final Map item; final Function getUserCount; @@ -491,160 +484,4 @@ class _InfoItemState extends State { }) ); } -} - -class BlockItem extends StatefulWidget { - final Map item; - final bool showWaring; - final Function path; - const BlockItem({super.key, required this.item, this.showWaring = false, required this.path}); - - @override - State createState() => _BlockItemState(); -} - -class _BlockItemState extends State { - @override - Widget build(BuildContext context) { - return InkWell( - onTap: (){ - // context.pushNamed(widget.path); - if(widget.path() == 'MatchSpreadPage'){ - - } else if(widget.path() != null){ - Get.to(widget.path)?.then((e){ - setState(() { - - }); - }); - } else { - - SmartDialog.showToast('功能暂未开放'); - } - // RouteGuardService.to.toWithAuth(widget.path, null); - }, - child: Container( - height: 48.w, - padding: EdgeInsets.only(left: 16.w), - decoration: BoxDecoration( - color: Colors.white - ), - child: Container( - padding: EdgeInsets.only(right: 16.w), - decoration: BoxDecoration( - border: widget.item["title"] != "红娘等级" ? Border( - bottom: BorderSide(width: 1, color: const Color.fromRGBO(238, 238, 238, 1)) - ) : null - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Image.asset( - widget.item["icon"], - height: 22.w, - width: 22.w, - ), - SizedBox(width: 16.w,), - Text( - widget.item["title"], - style: TextStyle( - fontSize: 14.w, - color: Colors.black, - fontWeight: FontWeight.w500 - ), - ) - ], - ), - Row( - children: [ - if(widget.showWaring) Container( - width: 5.w, - height: 5.w, - margin: EdgeInsets.only(right: 4.w), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(5.w)), - color: const Color.fromRGBO(255, 87, 51, 1) - ), - ), - if(widget.item["title"] == "认证中心") Text( - widget.item["subTitle"], - style: TextStyle( - fontSize: 11.w, - color: const Color.fromRGBO(166, 166, 166, 1) - ), - ), - SizedBox(width: 10.w,), - Image.asset( - Assets.imagesArrow, - width: 4.w, - ) - ], - ) - ], - ), - ), - ), - ); - } -} - -class SettingItem extends StatefulWidget { - final Map item; - final Function path; - const SettingItem({super.key, required this.item, required this.path}); - - @override - State createState() => _SettingItemState(); -} - -class _SettingItemState extends State { - @override - Widget build(BuildContext context) { - return InkWell( - onTap: (){ - if(widget.path() == null){ - SmartDialog.showToast('功能暂未开放'); - return; - } - // context.pushNamed(widget.path); - Get.to(widget.path); - // RouteGuardService.to.toWithAuth(widget.path, null); - }, - child: Container( - height: 48.w, - padding: EdgeInsets.symmetric(horizontal: 16.w), - color: Colors.white, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Image.asset( - widget.item["icon"], - width: 24.w, - height: 24.w, - ), - SizedBox(width: 14.w,), - Text( - widget.item["title"], - style: TextStyle( - fontSize: 14.w, - fontWeight: FontWeight.w500, - color: Colors.black - ), - ) - ], - ), - Image.asset( - Assets.imagesArrow, - width: 4.w, - height: 8.w, - ) - ], - ), - ), - ); - } } \ No newline at end of file diff --git a/lib/pages/mine/signature_page.dart b/lib/pages/mine/signature_page.dart index 04849f8..0c66e4a 100644 --- a/lib/pages/mine/signature_page.dart +++ b/lib/pages/mine/signature_page.dart @@ -1,14 +1,12 @@ import 'package:dating_touchme_app/components/page_appbar.dart'; import 'package:dating_touchme_app/controller/mine/edit_info_controller.dart'; -import 'package:dating_touchme_app/extension/ex_widget.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'; class SignaturePage extends StatelessWidget { const SignaturePage({super.key}); - @override Widget build(BuildContext context) { return GetX( @@ -16,75 +14,42 @@ class SignaturePage extends StatelessWidget { builder: (controller) { return Scaffold( appBar: PageAppbar(title: "交友心声",), - body: Container( - padding: EdgeInsets.all(17.w), - child: TextField( - controller: controller.messageController.value, - maxLength: 50, // 上限 - minLines: 5, // 多行 - maxLines: 5, // 自适应高度 - style: TextStyle( - fontSize: ScreenUtil().setWidth(13), - height: 1 - ), - decoration: InputDecoration( - contentPadding: EdgeInsets.symmetric( - vertical: 0, - horizontal: 0 - ), - hintText: "请输入交友心声", - - border: const OutlineInputBorder( - borderSide: BorderSide.none, // 这将移除边框 // 可选:设置圆角 - ), - // 如果你希望聚焦时和未聚焦时都没有边框,也可以设置 focusedBorder 和 enabledBorder - focusedBorder: const OutlineInputBorder( - borderSide: BorderSide.none, - borderRadius: BorderRadius.all(Radius.circular(8.0)), - ), - enabledBorder: const OutlineInputBorder( - borderSide: BorderSide.none, - borderRadius: BorderRadius.all(Radius.circular(8.0)), - ), - ), - onChanged: (value){ - controller.message.value = value; - print(value); - }, - ), - ), - bottomNavigationBar: Container( - margin: EdgeInsets.only(bottom: 30.w), - child: Container( - width: 350.w, - height: 45.w, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(45.w)), - gradient: LinearGradient( - begin: Alignment.centerLeft, // 90deg: 从左到右 - end: Alignment.centerRight, - colors: [ - Color.fromRGBO(131, 89, 255, 1), // 起点颜色 - Color.fromRGBO(77, 127, 231, 1), // 中间颜色 - Color.fromRGBO(61, 138, 224, 1), // 终点颜色 - ], - stops: [0.0, 0.7753, 1.0], // 对应 0%、77.53%、100% - ), - ), - child: Center( - child: Text( - "保存", - style: TextStyle( - fontSize: 18.w, - color: Colors.white, - fontWeight: FontWeight.w500 + body: Column( + children: [ + TDTextarea( + controller: controller.messageController.value, + hintText: '请输入交友心声', + maxLines: 5, + minLines: 5, + maxLength: 80, + indicator: true, + layout: TDTextareaLayout.vertical, + bordered: true, + onChanged: (value) { + controller.message.value = value; + }, ), - ), - ), - ).onTap(() async { - controller.savaDescribeInfo(); - }), - ), + const SizedBox(height: 48), + TDButton( + text: '保存', + width: MediaQuery.of(context).size.width - 50, + size: TDButtonSize.large, + type: TDButtonType.fill, + shape: TDButtonShape.round, + style: TDButtonStyle( + textColor: Colors.white, + backgroundColor: Color(0xFF7562F9), + ), + activeStyle: TDButtonStyle( + textColor: Colors.white, + backgroundColor: Color(0xC37562F9), + ), + onTap: (){ + controller.savaDescribeInfo(); + }, + ), + ], + ), ); }, );