Browse Source

排版支付设置

master
王子贤 3 months ago
parent
commit
601053b5ad
2 changed files with 135 additions and 0 deletions
  1. 131
      lib/pages/setting/charge_setting.dart
  2. 4
      lib/pages/setting/setting_page.dart

131
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<ChargeSetting> createState() => _ChargeSettingState();
}
class _ChargeSettingState extends State<ChargeSetting> {
@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<ChargeItem> createState() => _ChargeItemState();
}
class _ChargeItemState extends State<ChargeItem> {
@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玫瑰/分钟"]],
);
});
}
}

4
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());
},),

Loading…
Cancel
Save