Browse Source

no message

master
ZHR007 2 months ago
parent
commit
f07ec264af
4 changed files with 42 additions and 243 deletions
  1. 12
      lib/controller/mine/edit_info_controller.dart
  2. 3
      lib/controller/setting/spread_controller.dart
  3. 163
      lib/pages/mine/mine_page.dart
  4. 107
      lib/pages/mine/signature_page.dart

12
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;

3
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%(平台奖励)'},
];

163
lib/pages/mine/mine_page.dart

@ -409,18 +409,11 @@ class _MinePageState extends State<MinePage> 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<InfoItem> {
})
);
}
}
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<BlockItem> createState() => _BlockItemState();
}
class _BlockItemState extends State<BlockItem> {
@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<SettingItem> createState() => _SettingItemState();
}
class _SettingItemState extends State<SettingItem> {
@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,
)
],
),
),
);
}
}

107
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<EditInfoController>(
@ -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();
},
),
],
),
);
},
);

Loading…
Cancel
Save