From 601053b5adc898403481f22ce07e213454f97043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Wed, 24 Dec 2025 18:03:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E7=89=88=E6=94=AF=E4=BB=98=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/setting/charge_setting.dart | 131 ++++++++++++++++++++++++++ lib/pages/setting/setting_page.dart | 4 + 2 files changed, 135 insertions(+) create mode 100644 lib/pages/setting/charge_setting.dart diff --git a/lib/pages/setting/charge_setting.dart b/lib/pages/setting/charge_setting.dart new file mode 100644 index 0000000..203bf8d --- /dev/null +++ b/lib/pages/setting/charge_setting.dart @@ -0,0 +1,131 @@ +import 'package:dating_touchme_app/components/page_appbar.dart'; +import 'package:dating_touchme_app/extension/ex_widget.dart'; +import 'package:dating_touchme_app/generated/assets.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:tdesign_flutter/tdesign_flutter.dart'; + +class ChargeSetting extends StatefulWidget { + const ChargeSetting({super.key}); + + @override + State createState() => _ChargeSettingState(); +} + +class _ChargeSettingState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: PageAppbar(title: "收费设置"), + backgroundColor: const Color.fromRGBO(245, 245, 245, 1), + body: SingleChildScrollView( + child: Container( + padding: EdgeInsets.symmetric( + vertical: 15.w, + horizontal: 15.w + ), + child: Column( + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 15.w), + margin: EdgeInsets.only(bottom: 26.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(9.w)), + color: Colors.white + ), + child: Column( + children: [ + ChargeItem(title: "消息价格设置", subTitle: "35玫瑰/分钟",), + Container( + height: 1.w, + color: const Color.fromRGBO(245, 245, 245, 1), + ), + ChargeItem(title: "语音价格设置", subTitle: "35玫瑰/分钟",), + Container( + height: 1.w, + color: const Color.fromRGBO(245, 245, 245, 1), + ), + ChargeItem(title: "视频价格设置", subTitle: "35玫瑰/分钟",), + ], + ), + ), + SizedBox( + child: Text( + "收费设置说明:\n" + " 1.任何一方主动向对方搭讪(即发起会话),将按照对方设定的 免费/付费标准在后续文字会话中进行扣费\n" + " 2.双方互相关注后,互发消息不再扣费\n" + " 3.为保证平台用户体验,每天只能调整1次私信/视频语音价格", + style: TextStyle( + fontSize: 13.w, + color: const Color.fromRGBO(144, 144, 144, 1), + fontWeight: FontWeight.w500 + ), + ), + ) + ], + ), + ), + ), + ); + } +} + +class ChargeItem extends StatefulWidget { + final String title; + final String subTitle; + const ChargeItem({super.key, required this.title, required this.subTitle}); + + @override + State createState() => _ChargeItemState(); +} + +class _ChargeItemState extends State { + @override + Widget build(BuildContext context) { + return SizedBox( + height: 52.w, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + widget.title, + style: TextStyle( + fontSize: 13.w, + fontWeight: FontWeight.w500 + ), + ), + Row( + children: [ + Text( + widget.subTitle, + style: TextStyle( + fontSize: 11.w, + fontWeight: FontWeight.w500, + color: const Color.fromRGBO(144, 144, 144, 1) + ), + ), + SizedBox(width: 10.w,), + Image.asset( + Assets.imagesArrow, + width: 6.w, + ) + ], + ) + ], + ), + ).onTap((){ + TDPicker.showMultiPicker( + context, + title: "", + onConfirm: (selected) { + print(selected); + setState(() { + + }); + Navigator.of(context).pop(); + }, + data: [["35玫瑰/分钟"]], + ); + }); + } +} diff --git a/lib/pages/setting/setting_page.dart b/lib/pages/setting/setting_page.dart index d8c9e0d..84be696 100644 --- a/lib/pages/setting/setting_page.dart +++ b/lib/pages/setting/setting_page.dart @@ -4,6 +4,7 @@ import 'package:dating_touchme_app/controller/message/conversation_controller.da import 'package:dating_touchme_app/controller/mine/mine_controller.dart'; import 'package:dating_touchme_app/pages/mine/login_page.dart'; import 'package:dating_touchme_app/pages/mine/open_webview.dart'; +import 'package:dating_touchme_app/pages/setting/charge_setting.dart'; import 'package:dating_touchme_app/pages/setting/deactivate_page.dart'; import 'package:dating_touchme_app/pages/setting/teenager_mode_page.dart'; import 'package:flutter/material.dart'; @@ -67,6 +68,9 @@ class SettingPage extends StatelessWidget { TDCell(arrow: true, title: '隐私设置', onClick: (cell) { SmartDialog.showToast('功能暂未开放'); },), + TDCell(arrow: true, title: '支付设置', onClick: (cell) { + Get.to(() => ChargeSetting()); + },), TDCell(arrow: true, title: '青少年模式', onClick: (cell) { Get.to(() => TeenagerModePage()); },),