Browse Source

优化修改资料逻辑,对接提现相关接口,优化用户详情展示,优化和测试登录逻辑

ios
王子贤 4 months ago
parent
commit
6e40453cce
17 changed files with 1643 additions and 304 deletions
  1. 212
      lib/controller/mine/edit_info_controller.dart
  2. 6
      lib/controller/mine/user_controller.dart
  3. 55
      lib/controller/mine/withdraw_controller.dart
  4. 43
      lib/controller/mine/withdraw_history_controller.dart
  5. 513
      lib/model/home/user_info_data.dart
  6. 157
      lib/model/mine/withdraw_audit_data.dart
  7. 28
      lib/model/mine/withdraw_data.dart
  8. 4
      lib/network/api_urls.dart
  9. 28
      lib/network/user_api.dart
  10. 140
      lib/network/user_api.g.dart
  11. 66
      lib/pages/home/user_information_page.dart
  12. 3
      lib/pages/mine/add_bankcard_page.dart
  13. 306
      lib/pages/mine/edit_info_page.dart
  14. 154
      lib/pages/mine/withdraw_history_page.dart
  15. 229
      lib/pages/mine/withdraw_page.dart
  16. 2
      pubspec.lock
  17. 1
      pubspec.yaml

212
lib/controller/mine/edit_info_controller.dart

@ -2,12 +2,14 @@ import 'dart:io';
import 'package:dating_touchme_app/controller/global.dart';
import 'package:dating_touchme_app/generated/assets.dart';
import 'package:dating_touchme_app/model/home/marriage_data.dart';
import 'package:dating_touchme_app/model/mine/address_data.dart';
import 'package:dating_touchme_app/model/mine/education_data.dart';
import 'package:dating_touchme_app/model/mine/occupation_data.dart';
import 'package:dating_touchme_app/model/mine/user_data.dart';
import 'package:dating_touchme_app/network/user_api.dart';
import 'package:dating_touchme_app/oss/oss_manager.dart';
import 'package:dating_touchme_app/pages/home/user_information_page.dart';
import 'package:dating_touchme_app/pages/mine/auth_center_page.dart';
import 'package:dating_touchme_app/pages/mine/my_wallet_page.dart';
import 'package:dating_touchme_app/pages/mine/rose_page.dart';
@ -17,7 +19,11 @@ import 'package:get/get.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get_storage/get_storage.dart';
import 'package:image_picker/image_picker.dart';
import 'package:image_picker_android/image_picker_android.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:image_picker_platform_interface/image_picker_platform_interface.dart';
import '../../model/home/user_info_data.dart';
class EditInfoController extends GetxController {
@ -40,6 +46,10 @@ class EditInfoController extends GetxController {
final height = ''.obs;
final heightController = TextEditingController().obs;
final heightList = [for (var i = 140; i <= 210; i++) "$i"].obs;
final heightSelect = (-1).obs;
final educationList = <EducationData>[].obs;
final incomeList = <EducationData>[].obs;
@ -80,10 +90,18 @@ class EditInfoController extends GetxController {
final propertySelect = (-1).obs;
final storage = GetStorage();
@override
void onInit() {
super.onInit();
final ImagePickerPlatform imagePickerImplementation =
ImagePickerPlatform.instance;
if (imagePickerImplementation is ImagePickerAndroid) {
imagePickerImplementation.useAndroidPhotoPicker = true;
}
_userApi = Get.find<UserApi>();
getEducationList();
@ -239,17 +257,58 @@ class EditInfoController extends GetxController {
imgList.value = userData.value?.photoList?.map((e){
return e.photoUrl;
}).toList() ?? [];
height.value = userData.value?.height.toString() ?? "";
heightController.value.value = TextEditingValue(
text: height.value,
selection: TextSelection.fromPosition(TextPosition(offset: height.value.length)),
);
heightSelect.value = heightList.indexWhere((e) => e == "${userData.value?.height}");
// height.value = userData.value?.height.toString() ?? "";
// heightController.value.value = TextEditingValue(
// text: height.value,
// selection: TextSelection.fromPosition(TextPosition(offset: height.value.length)),
// );
location.value = "${userData.value?.provinceName}-${userData.value?.cityName}-${userData.value?.districtName}";
locationValue.value = [userData.value?.provinceCode, userData.value?.cityCode, userData.value?.districtCode];
homeLocation.value = "${userData.value?.hometownProvinceName}-${userData.value?.hometownCityName}";
locationValue.value = [userData.value?.hometownProvinceCode, userData.value?.hometownCityCode];
homeLocationValue.value = [userData.value?.hometownProvinceCode, userData.value?.hometownCityCode];
}
goPreview() async {
try {
final response = await _userApi.getMarriageInformationDetailsById(miId: userData.value?.id ?? "");
if (response.data.isSuccess && response.data.data != null) {
final data = response.data.data;
Get.to(() => UserInformationPage(userData: MarriageData(
miId: data?.miId ?? "",
userId: data?.userId ?? "",
profilePhoto: data?.profilePhoto ?? "",
nickName: data?.nickName ?? "",
isRealNameCertified: data?.identityCard == null,
birthYear: data?.birthYear ?? "",
birthDate: data?.birthDate ?? "",
age: int.parse(data?.age.toString() ?? "0"),
provinceCode: int.parse(data?.provinceCode.toString() ?? "0"),
provinceName: data?.provinceName ?? "",
cityCode: int.parse(data?.cityCode.toString() ?? "0"),
cityName: data?.cityName ?? "",
districtCode: int.parse(data?.districtCode.toString() ?? "0"),
districtName: data?.districtName ?? "",
describeInfo: data?.describeInfo ?? "",
createTime: data?.createTime ?? "",
photoList: data!.photoList!.map((e){
return PhotoItem.fromJson(e.toJson());
}).toList(),
)));
} else {
//
throw Exception(response.data.message ?? '获取数据失败');
}
} catch(e){
print('收入列表获取失败: $e');
SmartDialog.showToast('收入列表获取失败');
rethrow;
}
}
int calculateAge(String birthdayStr) {
final birthday = DateTime.parse(birthdayStr); // 1996-1-20
final today = DateTime.now();
@ -335,6 +394,45 @@ class EditInfoController extends GetxController {
}
}
Future<void> handleMultiGallerySelection(int type) async {
try {
// /
// final ok = await _ensurePermission(
// Permission.photos,
// // Android photos storage/mediaLibrarypermission_handler
// denyToast: '相册权限被拒绝,请在设置中允许访问相册',
// );
// if (!ok) return;
//
final ImagePicker picker = ImagePicker();
final List<XFile>? image = await picker.pickMultiImage(limit: 9 - imgList.length);
if (image != null) {
for(int i = 0; i<image.length; i++){
await processSelectedMoreImage(File(image[i].path), type);
if(i == image.length - 1){
SmartDialog.dismiss();
SmartDialog.showToast('上传相册成功');
savaImgList();
}
}
}
} catch (e) {
print('选择图片失败: $e');
//
if (e.toString().contains('permission') || e.toString().contains('权限')) {
SmartDialog.showToast('相册权限被拒绝,请在设置中允许访问相册');
} else {
SmartDialog.showToast('选择图片失败,请重试');
}
}
}
//
Future<bool> _ensurePermission(Permission permission, {String? denyToast}) async {
var status = await permission.status;
@ -369,6 +467,7 @@ class EditInfoController extends GetxController {
avatarUrl.value = imageUrl;
SmartDialog.dismiss();
SmartDialog.showToast('头像上传成功');
saveAvatar();
} catch (e) {
SmartDialog.dismiss();
print('处理图片失败: $e');
@ -383,7 +482,10 @@ class EditInfoController extends GetxController {
print('上传成功,图片URL: $imageUrl');
imgList.add(imageUrl);
SmartDialog.dismiss();
SmartDialog.showToast('上传设置成功');
SmartDialog.showToast('相册上传成功');
savaImgList();
} catch (e) {
SmartDialog.dismiss();
print('处理图片失败: $e');
@ -391,44 +493,41 @@ class EditInfoController extends GetxController {
}
}
}
saveData() async {
if(avatarUrl.value == ""){
SmartDialog.showToast('请上传头像');
return;
}
if(imgList.isEmpty){
SmartDialog.showToast('请上传相册');
return;
}
if(locationValue.isEmpty){
SmartDialog.showToast('请选择所在地');
return;
}
if(homeLocationValue.isEmpty){
SmartDialog.showToast('请选择家乡');
return;
}
if(educationSelect.value == -1){
SmartDialog.showToast('请选择学历');
return;
}
if(incomeSelect.value == -1){
SmartDialog.showToast('请选择收入');
return;
}
if(maritalSelect.value == -1){
SmartDialog.showToast('请选择婚姻状况');
return;
}
if(occupationValue.isEmpty){
SmartDialog.showToast('请选择职业');
return;
}
if(propertySelect.value == -1){
SmartDialog.showToast('请选择房产状况');
return;
//
Future<void> processSelectedMoreImage(File imageFile, int type) async {
if(type == 1){
try {
//
SmartDialog.showLoading(msg: '上传头像中...');
String objectName = '${DateUtil.getNowDateMs()}.${imageFile.path.split('.').last}';
String imageUrl = await OSSManager.instance.uploadFile(imageFile.readAsBytesSync(), objectName);
print('上传成功,图片URL: $imageUrl');
avatarUrl.value = imageUrl;
SmartDialog.dismiss();
SmartDialog.showToast('头像上传成功');
saveAvatar();
} catch (e) {
SmartDialog.dismiss();
print('处理图片失败: $e');
SmartDialog.showToast('上传头像失败,请重试');
}
} else {
try {
//
SmartDialog.showLoading(msg: '上传相册中...');
String objectName = '${DateUtil.getNowDateMs()}.${imageFile.path.split('.').last}';
String imageUrl = await OSSManager.instance.uploadFile(imageFile.readAsBytesSync(), objectName);
print('上传成功,图片URL: $imageUrl');
imgList.add(imageUrl);
} catch (e) {
SmartDialog.dismiss();
print('处理图片失败: $e');
SmartDialog.showToast('上传相册失败,请重试');
}
}
}
saveAvatar() async {
try {
final avatarPayload = {
'miId': userData.value?.id ?? 0,
@ -450,9 +549,9 @@ class EditInfoController extends GetxController {
SmartDialog.showToast('头像提交审核失败,请重试');
return;
}
}
savaImgList() async {
try{
final imgPayload = {
'miId': userData.value?.id ?? 0,
@ -476,6 +575,9 @@ class EditInfoController extends GetxController {
return;
}
}
saveData() async {
try {
@ -489,7 +591,7 @@ class EditInfoController extends GetxController {
'districtCode': locationValue[2],
'districtName': location.value.split("-")[2],
"educationCode": educationList[educationSelect.value].value,
"height": height,
"height": heightList[heightSelect.value],
'hometownProvinceCode': homeLocationValue[0],
'hometownProvinceName': homeLocation.value.split("-")[0],
'hometownCityCode': homeLocationValue[1],
@ -507,7 +609,21 @@ class EditInfoController extends GetxController {
if (response.data.isSuccess) {
SmartDialog.showToast('保存成功');
Get.back();
final result = await _userApi.getMarriageInformationDetail();
// print(result.data);
if (result.data.isSuccess) {
final information = result.data.data!;
information.matchmakerFlag = userData.value?.matchmakerFlag ?? false;
information.realName = userData.value?.realName;
information.phone = userData.value?.phone;
GlobalData().userData = information;
await storage.write('userId', GlobalData().userId);
}
}
else{

6
lib/controller/mine/user_controller.dart

@ -2,6 +2,7 @@ import 'package:dating_touchme_app/im/im_manager.dart';
import 'package:dating_touchme_app/oss/oss_manager.dart';
import 'package:get/get.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get_storage/get_storage.dart';
import '../../model/mine/authentication_data.dart';
import '../../model/mine/user_data.dart';
import '../../network/user_api.dart';
@ -13,6 +14,7 @@ class UserController extends GetxController {
// UserApi实例
late UserApi _userApi;
final storage = GetStorage();
@override
void onInit() {
@ -100,6 +102,8 @@ class UserController extends GetxController {
information.realName = baseInfo.realName;
information.phone = baseInfo.phone;
GlobalData().userData = information;
await storage.write('userId', GlobalData().userId);
return;
}
final information = result.data.data!;
@ -107,6 +111,8 @@ class UserController extends GetxController {
information.realName = baseInfo.realName;
information.phone = baseInfo.phone;
GlobalData().userData = information;
await storage.write('userId', GlobalData().userId);
if (_checkInformation(information)) {
//
SmartDialog.showToast('转到完善信息');

55
lib/controller/mine/withdraw_controller.dart

@ -1,5 +1,7 @@
import 'package:dating_touchme_app/model/mine/bank_card_data.dart';
import 'package:dating_touchme_app/model/mine/withdraw_data.dart';
import 'package:dating_touchme_app/network/user_api.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:get/get_state_manager/src/simple/get_controllers.dart';
@ -14,6 +16,11 @@ class WithdrawController extends GetxController {
final nowBankCard = BankCardData().obs;
final withdrawMoney = ''.obs;
final withdrawMoneyController = TextEditingController().obs;
final serviceFeeData = WithdrawData().obs;
@override
void onInit() {
super.onInit();
@ -40,4 +47,52 @@ class WithdrawController extends GetxController {
rethrow;
}
}
getServiceFee() async {
try {
final response = await _userApi.calculateWithdrawServiceFee({
"withdrawAmount": withdrawMoney.value,
"withdrawType": 1
});
if (response.data.isSuccess && response.data.data != null) {
serviceFeeData.value = response.data.data ?? WithdrawData();
} else {
//
throw Exception(response.data.message ?? '获取数据失败');
}
} catch(e){
print('手续费获取失败: $e');
SmartDialog.showToast('手续费获取失败');
rethrow;
}
}
withdrawSubmit() async {
try {
final response = await _userApi.applyWalletAccountWithdraw({
"thirdPartyFields": [
{"key": 'bankCardId', "value": nowBankCard.value.id}
],
"withdrawAmount": withdrawMoney.value,
"withdrawType": 1
});
if (response.data.isSuccess) {
SmartDialog.showToast('提现审核提交成功');
Get.back();
Get.back();
} else {
//
throw Exception(response.data.message ?? '获取数据失败');
}
} catch(e){
print('提现审核提交失败: $e');
SmartDialog.showToast('提现审核提交失败');
rethrow;
}
}
}

43
lib/controller/mine/withdraw_history_controller.dart

@ -0,0 +1,43 @@
import 'package:dating_touchme_app/network/user_api.dart';
import 'package:get/get.dart';
import 'package:get/get_state_manager/src/simple/get_controllers.dart';
import '../../model/mine/withdraw_audit_data.dart';
class WithdrawHistoryController extends GetxController {
late UserApi _userApi;
final historyList = <Records>[].obs;
final page = 1.obs;
final hasMore = true.obs;
@override
void onInit() {
super.onInit();
_userApi = Get.find<UserApi>();
getHistoryList();
}
getHistoryList() async {try{
final response = await _userApi.pageWithdrawAudit(
pageNum: page.value,
pageSize: 10,
);
if (response.data.isSuccess && response.data.data != null) {
final data = response.data.data?.records ?? [];
historyList.addAll(data.toList());
} else {
//
throw Exception(response.data.message ?? '获取数据失败');
}
} catch(e) {
}
}
}

513
lib/model/home/user_info_data.dart

@ -0,0 +1,513 @@
class UserInfoData {
String? id;
bool? isDelete;
String? createTime;
String? updateTime;
Null? event;
String? accountId;
String? userId;
String? nickName;
String? name;
String? profilePhoto;
bool? hasUploadProfilePhoto;
bool? photoDisplay;
String? identityCard;
num? genderCode;
String? genderValue;
String? homeCountryCode;
String? homeCountry;
num? provinceCode;
String? provinceName;
num? cityCode;
String? cityName;
num? districtCode;
String? districtName;
String? birthYear;
String? birthDate;
num? constellationCode;
String? constellation;
num? chineseZodiacCode;
String? chineseZodiac;
num? height;
num? weight;
num? educationCode;
String? education;
num? maritalStatusCode;
String? maritalStatusName;
num? minimumIncome;
num? maximumIncome;
num? incomeCode;
String? income;
String? diplomaVerificationCode;
String? describeInfo;
num? identityType;
String? identityTypeName;
num? domicilePlaceProvinceCode;
String? domicilePlaceProvinceName;
num? domicilePlaceCityCode;
String? domicilePlaceCityName;
num? nationCode;
String? nation;
num? bodilyFormCode;
String? bodilyForm;
num? accountTypeCode;
String? accountTypeName;
num? nationalityCode;
String? nationality;
num? nativePlaceCode;
String? nativePlaceName;
num? industryCode;
String? industry;
num? occupationCode;
String? occupation;
num? onlyChild;
num? carPurchaseSituationCode;
String? carPurchaseSituation;
num? propertyPermitsCode;
String? propertyPermits;
String? wechatId;
num? hometownProvinceCode;
String? hometownProvinceName;
num? hometownCityCode;
String? hometownCityName;
bool? display;
num? displayStatus;
num? inLove;
bool? hasParentsPension;
AuditProfilePhoto? auditProfilePhoto;
List<PhotoList>? photoList;
num? describeAuditStatus;
String? describeAudit;
num? fillSerialNumber;
Null? demandMarriage;
num? mateDescriptionAuditStatus;
String? mateDescriptionAudit;
List<Null>? marriageSeekingContacts;
num? age;
bool? meLike;
num? miSessionType;
bool? consumeRight;
bool? vip;
num? dataScoring;
String? phone;
Null? guestMatchmaker;
String? miId;
bool? allowMatchmakerInviteBounty;
UserInfoData(
{this.id,
this.isDelete,
this.createTime,
this.updateTime,
this.event,
this.accountId,
this.userId,
this.nickName,
this.name,
this.profilePhoto,
this.hasUploadProfilePhoto,
this.photoDisplay,
this.identityCard,
this.genderCode,
this.genderValue,
this.homeCountryCode,
this.homeCountry,
this.provinceCode,
this.provinceName,
this.cityCode,
this.cityName,
this.districtCode,
this.districtName,
this.birthYear,
this.birthDate,
this.constellationCode,
this.constellation,
this.chineseZodiacCode,
this.chineseZodiac,
this.height,
this.weight,
this.educationCode,
this.education,
this.maritalStatusCode,
this.maritalStatusName,
this.minimumIncome,
this.maximumIncome,
this.incomeCode,
this.income,
this.diplomaVerificationCode,
this.describeInfo,
this.identityType,
this.identityTypeName,
this.domicilePlaceProvinceCode,
this.domicilePlaceProvinceName,
this.domicilePlaceCityCode,
this.domicilePlaceCityName,
this.nationCode,
this.nation,
this.bodilyFormCode,
this.bodilyForm,
this.accountTypeCode,
this.accountTypeName,
this.nationalityCode,
this.nationality,
this.nativePlaceCode,
this.nativePlaceName,
this.industryCode,
this.industry,
this.occupationCode,
this.occupation,
this.onlyChild,
this.carPurchaseSituationCode,
this.carPurchaseSituation,
this.propertyPermitsCode,
this.propertyPermits,
this.wechatId,
this.hometownProvinceCode,
this.hometownProvinceName,
this.hometownCityCode,
this.hometownCityName,
this.display,
this.displayStatus,
this.inLove,
this.hasParentsPension,
this.auditProfilePhoto,
this.photoList,
this.describeAuditStatus,
this.describeAudit,
this.fillSerialNumber,
this.demandMarriage,
this.mateDescriptionAuditStatus,
this.mateDescriptionAudit,
this.marriageSeekingContacts,
this.age,
this.meLike,
this.miSessionType,
this.consumeRight,
this.vip,
this.dataScoring,
this.phone,
this.guestMatchmaker,
this.miId,
this.allowMatchmakerInviteBounty});
UserInfoData.fromJson(Map<String, dynamic> json) {
id = json['id'];
isDelete = json['isDelete'];
createTime = json['createTime'];
updateTime = json['updateTime'];
event = json['event'];
accountId = json['accountId'];
userId = json['userId'];
nickName = json['nickName'];
name = json['name'];
profilePhoto = json['profilePhoto'];
hasUploadProfilePhoto = json['hasUploadProfilePhoto'];
photoDisplay = json['photoDisplay'];
identityCard = json['identityCard'];
genderCode = json['genderCode'];
genderValue = json['genderValue'];
homeCountryCode = json['homeCountryCode'];
homeCountry = json['homeCountry'];
provinceCode = json['provinceCode'];
provinceName = json['provinceName'];
cityCode = json['cityCode'];
cityName = json['cityName'];
districtCode = json['districtCode'];
districtName = json['districtName'];
birthYear = json['birthYear'];
birthDate = json['birthDate'];
constellationCode = json['constellationCode'];
constellation = json['constellation'];
chineseZodiacCode = json['chineseZodiacCode'];
chineseZodiac = json['chineseZodiac'];
height = json['height'];
weight = json['weight'];
educationCode = json['educationCode'];
education = json['education'];
maritalStatusCode = json['maritalStatusCode'];
maritalStatusName = json['maritalStatusName'];
minimumIncome = json['minimumIncome'];
maximumIncome = json['maximumIncome'];
incomeCode = json['incomeCode'];
income = json['income'];
diplomaVerificationCode = json['diplomaVerificationCode'];
describeInfo = json['describeInfo'];
identityType = json['identityType'];
identityTypeName = json['identityTypeName'];
domicilePlaceProvinceCode = json['domicilePlaceProvinceCode'];
domicilePlaceProvinceName = json['domicilePlaceProvinceName'];
domicilePlaceCityCode = json['domicilePlaceCityCode'];
domicilePlaceCityName = json['domicilePlaceCityName'];
nationCode = json['nationCode'];
nation = json['nation'];
bodilyFormCode = json['bodilyFormCode'];
bodilyForm = json['bodilyForm'];
accountTypeCode = json['accountTypeCode'];
accountTypeName = json['accountTypeName'];
nationalityCode = json['nationalityCode'];
nationality = json['nationality'];
nativePlaceCode = json['nativePlaceCode'];
nativePlaceName = json['nativePlaceName'];
industryCode = json['industryCode'];
industry = json['industry'];
occupationCode = json['occupationCode'];
occupation = json['occupation'];
onlyChild = json['onlyChild'];
carPurchaseSituationCode = json['carPurchaseSituationCode'];
carPurchaseSituation = json['carPurchaseSituation'];
propertyPermitsCode = json['propertyPermitsCode'];
propertyPermits = json['propertyPermits'];
wechatId = json['wechatId'];
hometownProvinceCode = json['hometownProvinceCode'];
hometownProvinceName = json['hometownProvinceName'];
hometownCityCode = json['hometownCityCode'];
hometownCityName = json['hometownCityName'];
display = json['display'];
displayStatus = json['displayStatus'];
inLove = json['inLove'];
hasParentsPension = json['hasParentsPension'];
auditProfilePhoto = json['auditProfilePhoto'] != null
? new AuditProfilePhoto.fromJson(json['auditProfilePhoto'])
: null;
if (json['photoList'] != null) {
photoList = <PhotoList>[];
json['photoList'].forEach((v) {
photoList!.add(new PhotoList.fromJson(v));
});
}
describeAuditStatus = json['describeAuditStatus'];
describeAudit = json['describeAudit'];
fillSerialNumber = json['fillSerialNumber'];
demandMarriage = json['demandMarriage'];
mateDescriptionAuditStatus = json['mateDescriptionAuditStatus'];
mateDescriptionAudit = json['mateDescriptionAudit'];
if (json['marriageSeekingContacts'] != null) {
marriageSeekingContacts = <Null>[];
// json['marriageSeekingContacts'].forEach((v) {
// marriageSeekingContacts!.add(new Null.fromJson(v));
// });
}
age = json['age'];
meLike = json['meLike'];
miSessionType = json['miSessionType'];
consumeRight = json['consumeRight'];
vip = json['vip'];
dataScoring = json['dataScoring'];
phone = json['phone'];
guestMatchmaker = json['guestMatchmaker'];
miId = json['miId'];
allowMatchmakerInviteBounty = json['allowMatchmakerInviteBounty'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['isDelete'] = this.isDelete;
data['createTime'] = this.createTime;
data['updateTime'] = this.updateTime;
data['event'] = this.event;
data['accountId'] = this.accountId;
data['userId'] = this.userId;
data['nickName'] = this.nickName;
data['name'] = this.name;
data['profilePhoto'] = this.profilePhoto;
data['hasUploadProfilePhoto'] = this.hasUploadProfilePhoto;
data['photoDisplay'] = this.photoDisplay;
data['identityCard'] = this.identityCard;
data['genderCode'] = this.genderCode;
data['genderValue'] = this.genderValue;
data['homeCountryCode'] = this.homeCountryCode;
data['homeCountry'] = this.homeCountry;
data['provinceCode'] = this.provinceCode;
data['provinceName'] = this.provinceName;
data['cityCode'] = this.cityCode;
data['cityName'] = this.cityName;
data['districtCode'] = this.districtCode;
data['districtName'] = this.districtName;
data['birthYear'] = this.birthYear;
data['birthDate'] = this.birthDate;
data['constellationCode'] = this.constellationCode;
data['constellation'] = this.constellation;
data['chineseZodiacCode'] = this.chineseZodiacCode;
data['chineseZodiac'] = this.chineseZodiac;
data['height'] = this.height;
data['weight'] = this.weight;
data['educationCode'] = this.educationCode;
data['education'] = this.education;
data['maritalStatusCode'] = this.maritalStatusCode;
data['maritalStatusName'] = this.maritalStatusName;
data['minimumIncome'] = this.minimumIncome;
data['maximumIncome'] = this.maximumIncome;
data['incomeCode'] = this.incomeCode;
data['income'] = this.income;
data['diplomaVerificationCode'] = this.diplomaVerificationCode;
data['describeInfo'] = this.describeInfo;
data['identityType'] = this.identityType;
data['identityTypeName'] = this.identityTypeName;
data['domicilePlaceProvinceCode'] = this.domicilePlaceProvinceCode;
data['domicilePlaceProvinceName'] = this.domicilePlaceProvinceName;
data['domicilePlaceCityCode'] = this.domicilePlaceCityCode;
data['domicilePlaceCityName'] = this.domicilePlaceCityName;
data['nationCode'] = this.nationCode;
data['nation'] = this.nation;
data['bodilyFormCode'] = this.bodilyFormCode;
data['bodilyForm'] = this.bodilyForm;
data['accountTypeCode'] = this.accountTypeCode;
data['accountTypeName'] = this.accountTypeName;
data['nationalityCode'] = this.nationalityCode;
data['nationality'] = this.nationality;
data['nativePlaceCode'] = this.nativePlaceCode;
data['nativePlaceName'] = this.nativePlaceName;
data['industryCode'] = this.industryCode;
data['industry'] = this.industry;
data['occupationCode'] = this.occupationCode;
data['occupation'] = this.occupation;
data['onlyChild'] = this.onlyChild;
data['carPurchaseSituationCode'] = this.carPurchaseSituationCode;
data['carPurchaseSituation'] = this.carPurchaseSituation;
data['propertyPermitsCode'] = this.propertyPermitsCode;
data['propertyPermits'] = this.propertyPermits;
data['wechatId'] = this.wechatId;
data['hometownProvinceCode'] = this.hometownProvinceCode;
data['hometownProvinceName'] = this.hometownProvinceName;
data['hometownCityCode'] = this.hometownCityCode;
data['hometownCityName'] = this.hometownCityName;
data['display'] = this.display;
data['displayStatus'] = this.displayStatus;
data['inLove'] = this.inLove;
data['hasParentsPension'] = this.hasParentsPension;
if (this.auditProfilePhoto != null) {
data['auditProfilePhoto'] = this.auditProfilePhoto!.toJson();
}
if (this.photoList != null) {
data['photoList'] = this.photoList!.map((v) => v.toJson()).toList();
}
data['describeAuditStatus'] = this.describeAuditStatus;
data['describeAudit'] = this.describeAudit;
data['fillSerialNumber'] = this.fillSerialNumber;
data['demandMarriage'] = this.demandMarriage;
data['mateDescriptionAuditStatus'] = this.mateDescriptionAuditStatus;
data['mateDescriptionAudit'] = this.mateDescriptionAudit;
if (this.marriageSeekingContacts != null) {
data['marriageSeekingContacts'] = [];
// this.marriageSeekingContacts!.map((v) => v.toJson()).toList();
}
data['age'] = this.age;
data['meLike'] = this.meLike;
data['miSessionType'] = this.miSessionType;
data['consumeRight'] = this.consumeRight;
data['vip'] = this.vip;
data['dataScoring'] = this.dataScoring;
data['phone'] = this.phone;
data['guestMatchmaker'] = this.guestMatchmaker;
data['miId'] = this.miId;
data['allowMatchmakerInviteBounty'] = this.allowMatchmakerInviteBounty;
return data;
}
}
class AuditProfilePhoto {
String? id;
bool? isDelete;
String? createTime;
String? updateTime;
Null? event;
String? miId;
num? photoType;
String? photoUrl;
String? auditImgId;
num? auditStatus;
AuditProfilePhoto(
{this.id,
this.isDelete,
this.createTime,
this.updateTime,
this.event,
this.miId,
this.photoType,
this.photoUrl,
this.auditImgId,
this.auditStatus});
AuditProfilePhoto.fromJson(Map<String, dynamic> json) {
id = json['id'];
isDelete = json['isDelete'];
createTime = json['createTime'];
updateTime = json['updateTime'];
event = json['event'];
miId = json['miId'];
photoType = json['photoType'];
photoUrl = json['photoUrl'];
auditImgId = json['auditImgId'];
auditStatus = json['auditStatus'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['isDelete'] = this.isDelete;
data['createTime'] = this.createTime;
data['updateTime'] = this.updateTime;
data['event'] = this.event;
data['miId'] = this.miId;
data['photoType'] = this.photoType;
data['photoUrl'] = this.photoUrl;
data['auditImgId'] = this.auditImgId;
data['auditStatus'] = this.auditStatus;
return data;
}
}
class PhotoList {
String? id;
bool? isDelete;
String? createTime;
Null? updateTime;
Null? event;
num? miId;
num? photoType;
String? photoUrl;
num? auditImgId;
num? auditStatus;
PhotoList(
{this.id,
this.isDelete,
this.createTime,
this.updateTime,
this.event,
this.miId,
this.photoType,
this.photoUrl,
this.auditImgId,
this.auditStatus});
PhotoList.fromJson(Map<String, dynamic> json) {
id = json['id'];
isDelete = json['isDelete'];
createTime = json['createTime'];
updateTime = json['updateTime'];
event = json['event'];
miId = json['miId'];
photoType = json['photoType'];
photoUrl = json['photoUrl'];
auditImgId = json['auditImgId'];
auditStatus = json['auditStatus'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['isDelete'] = this.isDelete;
data['createTime'] = this.createTime;
data['updateTime'] = this.updateTime;
data['event'] = this.event;
data['miId'] = this.miId;
data['photoType'] = this.photoType;
data['photoUrl'] = this.photoUrl;
data['auditImgId'] = this.auditImgId;
data['auditStatus'] = this.auditStatus;
return data;
}
}

157
lib/model/mine/withdraw_audit_data.dart

@ -0,0 +1,157 @@
class WithdrawAuditData {
List<Records>? records;
int? total;
int? size;
int? current;
int? pages;
WithdrawAuditData(
{this.records, this.total, this.size, this.current, this.pages});
WithdrawAuditData.fromJson(Map<String, dynamic> json) {
if (json['records'] != null) {
records = <Records>[];
json['records'].forEach((v) {
records!.add(new Records.fromJson(v));
});
}
total = json['total'];
size = json['size'];
current = json['current'];
pages = json['pages'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.records != null) {
data['records'] = this.records!.map((v) => v.toJson()).toList();
}
data['total'] = this.total;
data['size'] = this.size;
data['current'] = this.current;
data['pages'] = this.pages;
return data;
}
}
class Records {
String? id;
String? walletAccountUserId;
String? walletAccountOrgId;
num? identityType;
String? walletAccountUserName;
String? walletAccountId;
num? withdrawAmount;
num? withdrawServiceFee;
num? arrivalAmount;
num? status;
bool? remitStatus;
String? remitUrl;
String? remitDateTime;
String? applyTime;
num? withdrawType;
ExtDetailsInfo? extDetailsInfo;
String? auditRemark;
String? remitRemark;
Records(
{this.id,
this.walletAccountUserId,
this.walletAccountOrgId,
this.identityType,
this.walletAccountUserName,
this.walletAccountId,
this.withdrawAmount,
this.withdrawServiceFee,
this.arrivalAmount,
this.status,
this.remitStatus,
this.remitUrl,
this.remitDateTime,
this.applyTime,
this.withdrawType,
this.extDetailsInfo,
this.auditRemark,
this.remitRemark});
Records.fromJson(Map<String, dynamic> json) {
id = json['id'];
walletAccountUserId = json['walletAccountUserId'];
walletAccountOrgId = json['walletAccountOrgId'];
identityType = json['identityType'];
walletAccountUserName = json['walletAccountUserName'];
walletAccountId = json['walletAccountId'];
withdrawAmount = json['withdrawAmount'];
withdrawServiceFee = json['withdrawServiceFee'];
arrivalAmount = json['arrivalAmount'];
status = json['status'];
remitStatus = json['remitStatus'];
remitUrl = json['remitUrl'];
remitDateTime = json['remitDateTime'];
applyTime = json['applyTime'];
withdrawType = json['withdrawType'];
extDetailsInfo = json['extDetailsInfo'] != null
? new ExtDetailsInfo.fromJson(json['extDetailsInfo'])
: null;
auditRemark = json['auditRemark'];
remitRemark = json['remitRemark'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['walletAccountUserId'] = this.walletAccountUserId;
data['walletAccountOrgId'] = this.walletAccountOrgId;
data['identityType'] = this.identityType;
data['walletAccountUserName'] = this.walletAccountUserName;
data['walletAccountId'] = this.walletAccountId;
data['withdrawAmount'] = this.withdrawAmount;
data['withdrawServiceFee'] = this.withdrawServiceFee;
data['arrivalAmount'] = this.arrivalAmount;
data['status'] = this.status;
data['remitStatus'] = this.remitStatus;
data['remitUrl'] = this.remitUrl;
data['remitDateTime'] = this.remitDateTime;
data['applyTime'] = this.applyTime;
data['withdrawType'] = this.withdrawType;
if (this.extDetailsInfo != null) {
data['extDetailsInfo'] = this.extDetailsInfo!.toJson();
}
data['auditRemark'] = this.auditRemark;
data['remitRemark'] = this.remitRemark;
return data;
}
}
class ExtDetailsInfo {
String? cardNum;
String? ownerName;
String? bankName;
String? openingBank;
String? bankCardId;
ExtDetailsInfo(
{this.cardNum,
this.ownerName,
this.bankName,
this.openingBank,
this.bankCardId});
ExtDetailsInfo.fromJson(Map<String, dynamic> json) {
cardNum = json['cardNum'];
ownerName = json['ownerName'];
bankName = json['bankName'];
openingBank = json['openingBank'];
bankCardId = json['bankCardId'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['cardNum'] = this.cardNum;
data['ownerName'] = this.ownerName;
data['bankName'] = this.bankName;
data['openingBank'] = this.openingBank;
data['bankCardId'] = this.bankCardId;
return data;
}
}

28
lib/model/mine/withdraw_data.dart

@ -0,0 +1,28 @@
class WithdrawData {
num? withdrawAmount;
num? withdrawServiceFeePct;
num? withdrawServiceFee;
num? arrivalAmount;
WithdrawData(
{this.withdrawAmount,
this.withdrawServiceFeePct,
this.withdrawServiceFee,
this.arrivalAmount});
WithdrawData.fromJson(Map<String, dynamic> json) {
withdrawAmount = json['withdrawAmount'];
withdrawServiceFeePct = json['withdrawServiceFeePct'];
withdrawServiceFee = json['withdrawServiceFee'];
arrivalAmount = json['arrivalAmount'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['withdrawAmount'] = this.withdrawAmount;
data['withdrawServiceFeePct'] = this.withdrawServiceFeePct;
data['withdrawServiceFee'] = this.withdrawServiceFee;
data['arrivalAmount'] = this.arrivalAmount;
return data;
}
}

4
lib/network/api_urls.dart

@ -30,6 +30,10 @@ class ApiUrls {
static const String listBankCardByIndividual = 'dating-agency-mall/user/list/bank-card/by-individual';
static const String createBankCardByIndividual = 'dating-agency-mall/user/create/bank-card/by-individual';
static const String recognizeBankCard = 'dating-agency-uec/user/recognize/bank-card';
static const String calculateWithdrawServiceFee = 'dating-agency-mall/user/calculate/withdraw-service-fee';
static const String applyWalletAccountWithdraw = 'dating-agency-mall/user/apply/wallet-account/withdraw';
static const String pageWithdrawAudit = 'dating-agency-mall/user/page/withdraw-audit';
static const String getMarriageInformationDetailsById = 'dating-agency-service/user/get/marriage/information/details/byid';
//
static const String getMarriageList = 'dating-agency-service/user/page/dongwo/marriage-information';

28
lib/network/user_api.dart

@ -1,4 +1,5 @@
import 'package:dating_touchme_app/model/common/oss_data.dart';
import 'package:dating_touchme_app/model/home/user_info_data.dart';
import 'package:dating_touchme_app/model/mine/bank_card_data.dart';
import 'package:dating_touchme_app/model/mine/bank_card_ocr_data.dart';
import 'package:dating_touchme_app/model/mine/education_data.dart';
@ -9,6 +10,8 @@ import 'package:dating_touchme_app/model/mine/rose_history_data.dart';
import 'package:dating_touchme_app/model/mine/user_base_data.dart';
import 'package:dating_touchme_app/model/mine/user_data.dart';
import 'package:dating_touchme_app/model/mine/user_rose_data.dart';
import 'package:dating_touchme_app/model/mine/withdraw_audit_data.dart';
import 'package:dating_touchme_app/model/mine/withdraw_data.dart';
import 'package:dating_touchme_app/network/response_model.dart';
import 'package:dating_touchme_app/network/api_urls.dart';
import 'package:retrofit/retrofit.dart';
@ -133,4 +136,29 @@ abstract class UserApi {
Future<HttpResponse<BaseResponse<BankCardOcrData>>> recognizeBankCard(
@Body() Map<String, dynamic> data,
);
@POST(ApiUrls.calculateWithdrawServiceFee)
Future<HttpResponse<BaseResponse<WithdrawData>>> calculateWithdrawServiceFee(
@Body() Map<String, dynamic> data,
);
@POST(ApiUrls.applyWalletAccountWithdraw)
Future<HttpResponse<BaseResponse<dynamic>>> applyWalletAccountWithdraw(
@Body() Map<String, dynamic> data,
);
@GET(ApiUrls.pageWithdrawAudit)
Future<HttpResponse<BaseResponse<WithdrawAuditData>>> pageWithdrawAudit(
{
@Query('pageNum') required int pageNum,
@Query('pageSize') required int pageSize,
}
);
@GET(ApiUrls.getMarriageInformationDetailsById)
Future<HttpResponse<BaseResponse<UserInfoData>>> getMarriageInformationDetailsById(
{
@Query('miId') required String miId,
}
);
}

140
lib/network/user_api.g.dart

@ -874,6 +874,146 @@ class _UserApi implements UserApi {
return httpResponse;
}
@override
Future<HttpResponse<BaseResponse<WithdrawData>>> calculateWithdrawServiceFee(
Map<String, dynamic> data,
) async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(data);
final _options = _setStreamType<HttpResponse<BaseResponse<WithdrawData>>>(
Options(method: 'POST', headers: _headers, extra: _extra)
.compose(
_dio.options,
'dating-agency-mall/user/calculate/withdraw-service-fee',
queryParameters: queryParameters,
data: _data,
)
.copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)),
);
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
late BaseResponse<WithdrawData> _value;
try {
_value = BaseResponse<WithdrawData>.fromJson(
_result.data!,
(json) => WithdrawData.fromJson(json as Map<String, dynamic>),
);
} on Object catch (e, s) {
errorLogger?.logError(e, s, _options);
rethrow;
}
final httpResponse = HttpResponse(_value, _result);
return httpResponse;
}
@override
Future<HttpResponse<BaseResponse<dynamic>>> applyWalletAccountWithdraw(
Map<String, dynamic> data,
) async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(data);
final _options = _setStreamType<HttpResponse<BaseResponse<dynamic>>>(
Options(method: 'POST', headers: _headers, extra: _extra)
.compose(
_dio.options,
'dating-agency-mall/user/apply/wallet-account/withdraw',
queryParameters: queryParameters,
data: _data,
)
.copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)),
);
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
late BaseResponse<dynamic> _value;
try {
_value = BaseResponse<dynamic>.fromJson(
_result.data!,
(json) => json as dynamic,
);
} on Object catch (e, s) {
errorLogger?.logError(e, s, _options);
rethrow;
}
final httpResponse = HttpResponse(_value, _result);
return httpResponse;
}
@override
Future<HttpResponse<BaseResponse<WithdrawAuditData>>> pageWithdrawAudit({
required int pageNum,
required int pageSize,
}) async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{
r'pageNum': pageNum,
r'pageSize': pageSize,
};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _options =
_setStreamType<HttpResponse<BaseResponse<WithdrawAuditData>>>(
Options(method: 'GET', headers: _headers, extra: _extra)
.compose(
_dio.options,
'dating-agency-mall/user/page/withdraw-audit',
queryParameters: queryParameters,
data: _data,
)
.copyWith(
baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl),
),
);
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
late BaseResponse<WithdrawAuditData> _value;
try {
_value = BaseResponse<WithdrawAuditData>.fromJson(
_result.data!,
(json) => WithdrawAuditData.fromJson(json as Map<String, dynamic>),
);
} on Object catch (e, s) {
errorLogger?.logError(e, s, _options);
rethrow;
}
final httpResponse = HttpResponse(_value, _result);
return httpResponse;
}
@override
Future<HttpResponse<BaseResponse<UserInfoData>>>
getMarriageInformationDetailsById({required String miId}) async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{r'miId': miId};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _options = _setStreamType<HttpResponse<BaseResponse<UserInfoData>>>(
Options(method: 'GET', headers: _headers, extra: _extra)
.compose(
_dio.options,
'dating-agency-service/user/get/marriage/information/details/byid',
queryParameters: queryParameters,
data: _data,
)
.copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)),
);
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
late BaseResponse<UserInfoData> _value;
try {
_value = BaseResponse<UserInfoData>.fromJson(
_result.data!,
(json) => UserInfoData.fromJson(json as Map<String, dynamic>),
);
} on Object catch (e, s) {
errorLogger?.logError(e, s, _options);
rethrow;
}
final httpResponse = HttpResponse(_value, _result);
return httpResponse;
}
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
if (T != dynamic &&
!(requestOptions.responseType == ResponseType.bytes ||

66
lib/pages/home/user_information_page.dart

@ -93,7 +93,7 @@ class _UserInformationPageState extends State<UserInformationPage> {
Row(
children: [
Text(
widget.userData.nickName,
widget.userData.nickName,
style: TextStyle(
fontSize: 19.w,
color: const Color.fromRGBO(51, 51, 51, 1),
@ -406,40 +406,45 @@ class _UserInformationPageState extends State<UserInformationPage> {
Positioned(
left: 15.w,
top: 310.w,
child: Row(
children: [
...widget.userData.photoList.asMap().entries.map((entry){
return Container(
margin: EdgeInsets.only(right: 7.w),
child: InkWell(
onTap: (){
nowSelect = entry.key;
setState(() {
width: 345.w,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: [
...widget.userData.photoList.asMap().entries.map((entry){
return Container(
margin: EdgeInsets.only(right: 7.w),
child: InkWell(
onTap: (){
nowSelect = entry.key;
setState(() {
});
},
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(7.w)),
child: Container(
width: 40.w,
height: 40.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(7.w)),
border: nowSelect == entry.key ? Border.all(width: 2.w, color: Colors.white) : null
),
child: Center(
child: Image.network(
entry.value.photoUrl,
width: 38.w,
height: 38.w,
});
},
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(7.w)),
child: Container(
width: 40.w,
height: 40.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(7.w)),
border: nowSelect == entry.key ? Border.all(width: 2.w, color: Colors.white) : null
),
child: Center(
child: Image.network(
entry.value.photoUrl,
width: 38.w,
height: 38.w,
fit: BoxFit.cover,
),
),
),
),
),
),
);
}),
],
);
}),
],
),
),
),
],
@ -473,4 +478,3 @@ class TagItem extends StatelessWidget {
);
}
}

3
lib/pages/mine/add_bankcard_page.dart

@ -85,7 +85,6 @@ class AddBankcardPage extends StatelessWidget {
),
addItem(label: "持卡人", child: TextField(
controller: controller.usernameController.value,
keyboardType: TextInputType.number,
style: TextStyle(
fontSize: ScreenUtil().setWidth(13),
height: 1,
@ -159,7 +158,6 @@ class AddBankcardPage extends StatelessWidget {
})),
addItem(label: "所属银行", child: TextField(
controller: controller.bankNameController.value,
keyboardType: TextInputType.number,
style: TextStyle(
fontSize: ScreenUtil().setWidth(13),
height: 1,
@ -193,7 +191,6 @@ class AddBankcardPage extends StatelessWidget {
)),
addItem(label: "开户行", child: TextField(
controller: controller.openingBankController.value,
keyboardType: TextInputType.number,
style: TextStyle(
fontSize: ScreenUtil().setWidth(13),
height: 1,

306
lib/pages/mine/edit_info_page.dart

@ -4,13 +4,16 @@ 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:dating_touchme_app/generated/assets.dart';
import 'package:dating_touchme_app/model/home/marriage_data.dart';
import 'package:dating_touchme_app/model/mine/address_data.dart';
import 'package:dating_touchme_app/model/mine/occupation_data.dart';
import 'package:dating_touchme_app/pages/home/user_information_page.dart';
import 'package:dating_touchme_app/pages/mine/signature_page.dart';
import 'package:dating_touchme_app/pages/mine/tag_setting_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
@ -41,9 +44,9 @@ class _EditInfoPageState extends State<EditInfoPage> {
showCupertinoModalPopup(
context: Get.context!,
builder: (context) => CupertinoActionSheet(
title: const Text('选择头像'),
title: Text(type == 1 ? '选择头像' : "选择相册"),
actions: <Widget>[
CupertinoActionSheetAction(
if(type == 1) CupertinoActionSheetAction(
child: const Text('拍照'),
onPressed: () async {
Navigator.pop(context);
@ -54,7 +57,16 @@ class _EditInfoPageState extends State<EditInfoPage> {
child: const Text('从相册选择'),
onPressed: () async {
Navigator.pop(context);
await controller.handleGallerySelection(type);
if(type == 1 || 9 - controller.imgList.length == 1){
await controller.handleGallerySelection(type);
} else {
if(controller.imgList.length >= 9){
SmartDialog.showToast('超出数量限制,请先删除再尝试上传');
return;
}
await controller.handleMultiGallerySelection(type);
}
},
),
],
@ -75,11 +87,27 @@ class _EditInfoPageState extends State<EditInfoPage> {
init: EditInfoController(),
builder: (controller) {
return Scaffold(
appBar: PageAppbar(title: "编辑资料"),
appBar: PageAppbar(title: "编辑资料", right: Container(
margin: EdgeInsets.only(right: 14.w),
child: InkWell(
onTap: (){
// context.pushNamed(RouteNames.payHistory);
controller.goPreview();
},
child: Text(
"预览",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(144, 144, 144, 1),
),
),
),
),),
body: SingleChildScrollView(
child: Column(
children: [
Row(
if(false) Row(
children: [
Expanded(
child: InkWell(
@ -217,7 +245,7 @@ class _EditInfoPageState extends State<EditInfoPage> {
fit: BoxFit.cover,
),
),
Positioned(
if(controller.userData.value!.photoList![entry.key].auditStatus == 1 || controller.userData.value!.photoList![entry.key].auditStatus == null)Positioned(
right: 5.w,
top: 5.w,
child: Container(
@ -234,6 +262,31 @@ class _EditInfoPageState extends State<EditInfoPage> {
).onTap((){
controller.imgList.removeAt(entry.key);
}),
),
if(controller.userData.value!.photoList![entry.key].auditStatus == 0)Positioned(
top: 0,
right: 0,
child: Container(
width: 33.w,
height: 17.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topRight: Radius.circular(9.w),
bottomLeft: Radius.circular(9.w)
),
color: const Color.fromRGBO(0, 0, 0, .4)
),
child: Center(
child: Text(
"审核中",
style: TextStyle(
fontSize: 8.w,
color: Colors.white,
fontWeight: FontWeight.w500
),
),
),
),
)
],
);
@ -301,6 +354,14 @@ class _EditInfoPageState extends State<EditInfoPage> {
fontWeight: FontWeight.w500
)
),
TextSpan(
text: "*",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(224, 54, 54, 1),
fontWeight: FontWeight.w500
)
),
]
),
),
@ -375,61 +436,44 @@ class _EditInfoPageState extends State<EditInfoPage> {
],
),
),
SetItem(label: "身高", child: Expanded(
child: TextField(
controller: controller.heightController.value,
keyboardType: TextInputType.number,
textAlign: TextAlign.end,
style: TextStyle(
fontSize: ScreenUtil().setWidth(13),
height: 1
),
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(
vertical: 0,
horizontal: 0.w
),
hintText: "请输入身高",
hintStyle: TextStyle(
color: const Color.fromRGBO(191, 191, 191, 1)
),
InkWell(
onTap: () {
TDPicker.showMultiPicker(context, title: '',
initialIndexes: [30],
onConfirm: (selected) {
print(selected);
print(controller.heightList[selected[0]]);
controller.heightSelect.value = selected[0];
setState(() {
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)),
),
});
Navigator.of(context).pop();
controller.saveData();
}, data: [controller.heightList]);
},
child: SetItem(label: "身高", child: Text(
controller.heightSelect.value != -1 ? controller.heightList[controller.heightSelect.value] ?? "" : "请选择",
style: TextStyle(
fontSize: 13.w,
color: controller.heightSelect.value != -1 ? const Color.fromRGBO(51, 51, 51, 1) :const Color.fromRGBO(191, 191, 191, 1),
fontWeight: controller.heightSelect.value != -1 ? FontWeight.w500 : null
),
onChanged: (value){
controller.height.value = value;
setState(() {
),),
),
});
},
),
),),
SetItem(label: "所在地", child: InkWell(
InkWell(
onTap: () {
TDPicker.showMultiLinkedPicker(context, title: '',
onConfirm: (selected) {
print(selected);
controller.location.value = selected.join("-");
Map province = address.firstWhere(
(e) => e["label"] == selected[0],
(e) => e["label"] == selected[0],
orElse: () => <String, Object>{},
);
if(province.isNotEmpty){
Map city = province["children"].firstWhere(
(e) => e["label"] == selected[1],
(e) => e["label"] == selected[1],
orElse: () => <String, Object>{},
);
if(city.isNotEmpty){
@ -447,21 +491,23 @@ class _EditInfoPageState extends State<EditInfoPage> {
});
Navigator.of(context).pop();
controller.saveData();
},
data: controller.areaShowData,
columnNum: 3,
initialData:[]);
},
child: Text(
child: SetItem(label: "所在地", child: Text(
controller.location.value != "" ? controller.location.value :"请选择",
style: TextStyle(
fontSize: 13.w,
color: controller.location.value != "" ? const Color.fromRGBO(51, 51, 51, 1) : const Color.fromRGBO(191, 191, 191, 1),
fontSize: 13.w,
color: controller.location.value != "" ? const Color.fromRGBO(51, 51, 51, 1) : const Color.fromRGBO(191, 191, 191, 1),
fontWeight: controller.location.value != "" ? FontWeight.w500 : null,
),
),
),),
SetItem(label: "家乡", child: InkWell(
),),
),
InkWell(
onTap: () {
TDPicker.showMultiLinkedPicker(context, title: '',
onConfirm: (selected) {
@ -483,21 +529,24 @@ class _EditInfoPageState extends State<EditInfoPage> {
});
Navigator.of(context).pop();
controller.saveData();
},
data: controller.areaShowData,
columnNum: 2,
initialData:[]);
},
child: Text(
child: SetItem(label: "家乡", child: Text(
controller.homeLocation.value != "" ? controller.homeLocation.value :"请选择",
style: TextStyle(
fontSize: 13.w,
color: controller.homeLocation.value != "" ? const Color.fromRGBO(51, 51, 51, 1) : const Color.fromRGBO(191, 191, 191, 1),
fontWeight: controller.homeLocation.value != "" ? FontWeight.w500 : null,
),
),
),),
SetItem(label: "学历", child: InkWell(
)),
),
InkWell(
onTap: () {
TDPicker.showMultiPicker(context, title: '',
onConfirm: (selected) {
@ -508,28 +557,30 @@ class _EditInfoPageState extends State<EditInfoPage> {
});
Navigator.of(context).pop();
controller.saveData();
}, data: [controller.educationList.map((e) => e.desc ?? "").toList()]);
},
child: Text(
child: SetItem(label: "学历", child: Text(
controller.educationSelect.value != -1 ? controller.educationList[controller.educationSelect.value].desc ?? "" : "请选择",
style: TextStyle(
fontSize: 13.w,
color: controller.educationSelect.value != -1 ? const Color.fromRGBO(51, 51, 51, 1) :const Color.fromRGBO(191, 191, 191, 1),
fontWeight: controller.educationSelect.value != -1 ? FontWeight.w500 : null
fontSize: 13.w,
color: controller.educationSelect.value != -1 ? const Color.fromRGBO(51, 51, 51, 1) :const Color.fromRGBO(191, 191, 191, 1),
fontWeight: controller.educationSelect.value != -1 ? FontWeight.w500 : null
),
),
),),
SetItem(label: "职业", child: InkWell(
),),
),
InkWell(
onTap: () {
TDPicker.showMultiLinkedPicker(context, title: '',
onConfirm: (selected) {
print(selected);
controller.occupation.value = selected.join("-");
OccupationData first = controller.occupationList.firstWhere(
(e) => e.industry == selected[0],
(e) => e.industry == selected[0],
);
OccupationList second = first.occupationList?.firstWhere(
(e) => e.occupation == selected[1]
(e) => e.occupation == selected[1]
) ?? OccupationList();
print([first.industryCode, second.occupationCode]);
controller.occupationValue.value = [first.industryCode, second.occupationCode];
@ -537,22 +588,23 @@ class _EditInfoPageState extends State<EditInfoPage> {
});
Navigator.of(context).pop();
controller.saveData();
},
data: controller.occupationShowData,
columnNum: 2,
columnNum: 2,
initialData:[]);
},
child: Text(
child: SetItem(label: "职业", child: Text(
controller.occupation.value != "" ? controller.occupation.value : "请选择",
style: TextStyle(
fontSize: 13.w,
color: controller.occupation.value != "" ? const Color.fromRGBO(51, 51, 51, 1) : const Color.fromRGBO(191, 191, 191, 1),
fontWeight: controller.occupation.value != "" ? FontWeight.w500 : null
fontWeight: controller.occupation.value != "" ? FontWeight.w500 : null
),
),
),),
// SetItem(label: "公司", showRequired: false,),
SetItem(label: "月收入", child: InkWell(
),),
),
InkWell(
onTap: () {
TDPicker.showMultiPicker(context, title: '',
onConfirm: (selected) {
@ -563,18 +615,22 @@ class _EditInfoPageState extends State<EditInfoPage> {
});
Navigator.of(context).pop();
controller.saveData();
}, data: [controller.incomeList.map((e) => e.desc ?? "").toList()]);
},
child: Text(
child: SetItem(label: "月收入", child: Text(
controller.incomeSelect.value != -1 ? controller.incomeList[controller.incomeSelect.value].desc ?? "" :"请选择",
style: TextStyle(
fontSize: 13.w,
color: controller.incomeSelect.value != -1 ? const Color.fromRGBO(51, 51, 51, 1) : const Color.fromRGBO(191, 191, 191, 1),
fontWeight: controller.incomeSelect.value != -1 ? FontWeight.w500 : null
fontWeight: controller.incomeSelect.value != -1 ? FontWeight.w500 : null
),
),
),),
SetItem(label: "婚姻状况", child: InkWell(
),),
),
// SetItem(label: "公司", showRequired: false,),
InkWell(
onTap: () {
TDPicker.showMultiPicker(context, title: '',
onConfirm: (selected) {
@ -585,18 +641,20 @@ class _EditInfoPageState extends State<EditInfoPage> {
});
Navigator.of(context).pop();
controller.saveData();
}, data: [controller.maritalList.map((e) => e.desc ?? "").toList()]);
},
child: Text(
child: SetItem(label: "婚姻状况", child: Text(
controller.maritalSelect.value != -1 ? controller.maritalList[controller.maritalSelect.value].desc ?? "" :"请选择",
style: TextStyle(
fontSize: 13.w,
color: controller.maritalSelect.value != -1 ? const Color.fromRGBO(51, 51, 51, 1) : const Color.fromRGBO(191, 191, 191, 1),
fontWeight: controller.maritalSelect.value != -1 ? FontWeight.w500 : null
),
),
),),
SetItem(label: "有无房产", child: InkWell(
),),
),
InkWell(
onTap: () {
TDPicker.showMultiPicker(context, title: '',
onConfirm: (selected) {
@ -607,20 +665,24 @@ class _EditInfoPageState extends State<EditInfoPage> {
});
Navigator.of(context).pop();
controller.saveData();
}, data: [controller.propertyList.map((e) => e.desc ?? "").toList()]);
},
child: Text(
child: SetItem(label: "有无房产", child: Text(
controller.propertySelect.value != -1 ? controller.propertyList[controller.propertySelect.value].desc ?? "" :"请选择",
style: TextStyle(
fontSize: 13.w,
color: controller.propertySelect.value != -1 ? const Color.fromRGBO(51, 51, 51, 1) : const Color.fromRGBO(191, 191, 191, 1),
fontWeight: controller.propertySelect.value != -1 ? FontWeight.w500 : null
),
),
),),
),),
),
Container(
if(false) Container(
margin: EdgeInsets.symmetric(
vertical: 30.w
),
@ -645,79 +707,11 @@ class _EditInfoPageState extends State<EditInfoPage> {
controller.saveData();
}),
)
// SizedBox(height: 8.w,),
// InkWell(
// onTap: (){
// Get.to(() => SignaturePage());
// },
// child: Column(
// children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Text(
// "交友心声",
// style: TextStyle(
// fontSize: 13.w,
// color: const Color.fromRGBO(144, 144, 144, 1)
// ),
// ),
// Icon(
// Icons.keyboard_arrow_right,
// size: 13.w,
// color: const Color.fromRGBO(191, 191, 191, 1)
// )
// ],
// ),
// Container(
// margin: EdgeInsets.only(bottom: 3.w),
// padding: EdgeInsets.only(bottom: 12.w),
// decoration: BoxDecoration(
// border: Border(
// bottom: BorderSide(width: 1, color: const Color.fromRGBO(245, 245, 245, 1))
// )
// ),
// child: Text(
// "拒绝内耗,向阳而生,用热爱抵御岁月漫长,用真诚对待每一次相遇拒绝内耗,向阳而生,用热爱抵御岁月漫长,用真诚对待每一次相遇",
// style: TextStyle(
// fontSize: 13.w,
// fontWeight: FontWeight.w500,
// color: const Color.fromRGBO(51, 51, 51, 1)
// ),
// ),
// ),
// ],
// ),
// ),
// InkWell(
// onTap: (){
// Get.to(() => TagSettingPage());
// },
// child: SetItem(label: "个性标签", showRequired: false,),
// ),
// SizedBox(height: 8.w,),
// Row(
// children: [
// Text(
// "交友范围",
// style: TextStyle(
// fontSize: 13.w,
// color: const Color.fromRGBO(144, 144, 144, 1)
// ),
// )
// ],
// ),
// SizedBox(height: 2.w,),
// SetItem(label: "所在地", showRequired: false,),
// SetItem(label: "年龄", showRequired: false,),
// SetItem(label: "身高", showRequired: false,),
// SetItem(label: "最低学历", showRequired: false,),
// SetItem(label: "最低月收入", showRequired: false,),
],
),
),
],
if(controller.menuActive.value == 2) ...[
if(false && controller.menuActive.value == 2) ...[
Stack(
children: [
controller.imgList.length > 0 ? Image.network(

154
lib/pages/mine/withdraw_history_page.dart

@ -1,104 +1,129 @@
import 'package:dating_touchme_app/components/page_appbar.dart';
import 'package:dating_touchme_app/controller/mine/withdraw_history_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 WithdrawHistoryPage extends StatefulWidget {
const WithdrawHistoryPage({super.key});
import '../../model/mine/withdraw_audit_data.dart';
@override
State<WithdrawHistoryPage> createState() => _WithdrawHistoryPageState();
}
class WithdrawHistoryPage extends StatelessWidget {
const WithdrawHistoryPage({super.key});
class _WithdrawHistoryPageState extends State<WithdrawHistoryPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PageAppbar(title: "提现"),
body: SingleChildScrollView(
child: Container(
padding: EdgeInsetsGeometry.symmetric(
vertical: 11.w,
horizontal: 16.w
),
child: Column(
children: [
historyItem(),
historyItem(),
historyItem(),
historyItem(),
historyItem(),
historyItem(),
historyItem(),
historyItem(),
],
return GetX<WithdrawHistoryController>(
init: WithdrawHistoryController(),
builder: (controller){
return Scaffold(
appBar: PageAppbar(title: "提现"),
body: SingleChildScrollView(
child: Container(
padding: EdgeInsetsGeometry.symmetric(
vertical: 11.w,
horizontal: 16.w
),
child: Column(
children: [
...controller.historyList.map((e){
return historyItem(e, context);
}),
],
),
),
),
),
),
);
},
);
}
Widget historyItem() {
Widget historyItem(Records item, BuildContext context) {
return Container(
padding: EdgeInsets.only(
bottom: 12.w
bottom: 12.w
),
margin: EdgeInsets.only(
bottom: 16.w
bottom: 16.w
),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 1,
color: const Color.fromRGBO(238, 238, 238, 1)
border: Border(
bottom: BorderSide(
width: 1,
color: const Color.fromRGBO(238, 238, 238, 1)
)
)
)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
RichText(
text: TextSpan(
children: [
TextSpan(
text: "提现金额:",
style: TextStyle(
fontSize: 14.w,
fontWeight: FontWeight.w500,
color: const Color.fromRGBO(51, 51, 51, 1)
)
Row(
children: [
RichText(
text: TextSpan(
children: [
TextSpan(
text: "提现金额:",
style: TextStyle(
fontSize: 14.w,
fontWeight: FontWeight.w500,
color: const Color.fromRGBO(51, 51, 51, 1)
)
),
TextSpan(
text: "${item.withdrawAmount}",
style: TextStyle(
fontSize: 14.w,
fontWeight: FontWeight.w500,
color: const Color.fromRGBO(238, 129, 27, 1)
)
),
]
),
),
Container(
padding: EdgeInsets.symmetric(
vertical: 2.w,
horizontal: 4.w
),
TextSpan(
text: "680.00",
style: TextStyle(
fontSize: 14.w,
fontWeight: FontWeight.w500,
color: const Color.fromRGBO(238, 129, 27, 1)
)
margin: EdgeInsets.only(
left: 8.w
),
]
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(5.w)),
color: (item.remitStatus ?? false) ? const Color.fromRGBO(25, 114, 248, 1) : const Color.fromRGBO(238, 129, 27, 1)
),
child: Text(
(item.remitStatus ?? false) ? "提现成功" :"处理中",
style: TextStyle(
fontSize: 10.w,
color: Colors.white
),
),
)
],
),
SizedBox(height: 8.w,),
Text(
"提现到工商银行(2465)",
"${item.extDetailsInfo?.bankName}${item.extDetailsInfo?.cardNum!.substring(item.extDetailsInfo!.cardNum!.length - 4)}",
style: TextStyle(
fontSize: 12.w,
),
),
SizedBox(height: 8.w,),
Text(
"申请时间:2024-04-23 15:23:48",
"申请时间:${item.applyTime}",
style: TextStyle(
fontSize: 12.w,
color: const Color.fromRGBO(153, 153, 153, 1)
fontSize: 12.w,
color: const Color.fromRGBO(153, 153, 153, 1)
),
),
SizedBox(height: 8.w,),
Row(
if(item.remitStatus ?? false) Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"处理时间:2024-04-23 15:23:48",
"处理时间:${item.remitDateTime}",
style: TextStyle(
fontSize: 12.w,
color: const Color.fromRGBO(153, 153, 153, 1)
@ -107,10 +132,12 @@ class _WithdrawHistoryPageState extends State<WithdrawHistoryPage> {
Text(
"查看打款凭证",
style: TextStyle(
fontSize: 12.w,
color: const Color.fromRGBO(25, 114, 248, 1)
fontSize: 12.w,
color: const Color.fromRGBO(25, 114, 248, 1)
),
)
).onTap(() {
TDImageViewer.showImageViewer(context: context, images: [item.remitUrl]);
})
],
)
],
@ -118,3 +145,4 @@ class _WithdrawHistoryPageState extends State<WithdrawHistoryPage> {
);
}
}

229
lib/pages/mine/withdraw_page.dart

@ -7,7 +7,9 @@ import 'package:dating_touchme_app/pages/mine/add_bankcard_page.dart';
import 'package:dating_touchme_app/pages/mine/withdraw_history_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
class WithdrawPage extends StatelessWidget {
const WithdrawPage({super.key});
@ -180,7 +182,6 @@ class WithdrawPage extends StatelessWidget {
),
SizedBox(height: 12.w,),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"",
@ -189,6 +190,42 @@ class WithdrawPage extends StatelessWidget {
color: Colors.black,
fontWeight: FontWeight.w500
),
),
Expanded(
child: TextField(
controller: controller.withdrawMoneyController.value,
keyboardType: TextInputType.number,
style: TextStyle(
fontSize: ScreenUtil().setWidth(22),
height: 1
),
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(
vertical: 0,
horizontal: 0
),
hintText: "请输入提现金额",
hintStyle: TextStyle(
color: Colors.grey
),
border: const OutlineInputBorder(
borderSide: BorderSide.none, // //
),
// focusedBorder enabledBorder
focusedBorder: const OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.all(Radius.circular(4.0)),
),
enabledBorder: const OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.all(Radius.circular(4.0)),
),
),
onChanged: (value){
controller.withdrawMoney.value = value;
},
),
)
],
),
@ -213,7 +250,195 @@ class WithdrawPage extends StatelessWidget {
Get.to(() => WithdrawHistoryPage());
})
],
)
),
SizedBox(height: 40.w,),
Container(
width: 350.w,
height: 42.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(42.w)),
color: const Color.fromRGBO(117, 98, 249, 1)
),
child: Center(
child: Text(
"提现",
style: TextStyle(
fontSize: 14.w,
color: Colors.white,
fontWeight: FontWeight.w500
),
),
),
).onTap(() async {
if(controller.nowBankCard.value.id == null){
SmartDialog.showToast('请先选择到账银行卡');
return;
}
if(controller.withdrawMoney.value == ""){
SmartDialog.showToast('请输入提现金额');
return;
}
await controller.getServiceFee();
Navigator.of(context).push(
TDSlidePopupRoute(
slideTransitionFrom: SlideTransitionFrom.center,
builder: (context) {
return Obx((){
return Material(
borderRadius: BorderRadius.circular(TDTheme.of(context).radiusLarge),
child: Container(
decoration: BoxDecoration(
color: TDTheme.of(context).bgColorContainer,
borderRadius:
BorderRadius.circular(TDTheme.of(context).radiusLarge),
),
width: 287.w,
padding: EdgeInsets.all(12.w),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
"温馨提示",
style: TextStyle(
fontSize: 18.w,
fontWeight: FontWeight.w500
),
),
SizedBox(height: 12.w,),
Text(
"提现金额",
style: TextStyle(
fontSize: 14.w,
),
),
RichText(
text: TextSpan(
children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 14.w,
fontWeight: FontWeight.w700,
color: const Color.fromRGBO(51, 51, 51, 1)
)
),
TextSpan(
text: "${controller.serviceFeeData.value.withdrawAmount}",
style: TextStyle(
fontSize: 18.w,
fontWeight: FontWeight.w700,
color: const Color.fromRGBO(51, 51, 51, 1)
)
),
]
),
),
SizedBox(height: 12.w,),
RichText(
text: TextSpan(
children: [
TextSpan(
text: "到账银行卡:",
style: TextStyle(
fontSize: 14.w,
color: const Color.fromRGBO(51, 51, 51, .5)
)
),
TextSpan(
text: "${controller.nowBankCard.value.bankName}${controller.nowBankCard.value.cardNum!.substring(controller.nowBankCard.value.cardNum!.length - 4)}",
style: TextStyle(
fontSize: 14.w,
color: const Color.fromRGBO(51, 51, 51, 1)
)
),
]
),
),
SizedBox(height: 12.w,),
RichText(
text: TextSpan(
children: [
TextSpan(
text: "到账金额:",
style: TextStyle(
fontSize: 14.w,
color: const Color.fromRGBO(51, 51, 51, .5)
)
),
TextSpan(
text: "${controller.serviceFeeData.value.arrivalAmount}",
style: TextStyle(
fontSize: 14.w,
color: const Color.fromRGBO(51, 51, 51, 1)
)
),
]
),
),
SizedBox(height: 12.w,),
RichText(
text: TextSpan(
children: [
TextSpan(
text: "提现手续费:",
style: TextStyle(
fontSize: 14.w,
color: const Color.fromRGBO(51, 51, 51, .5)
)
),
TextSpan(
text: "${controller.serviceFeeData.value.withdrawServiceFee} ",
style: TextStyle(
fontSize: 14.w,
color: const Color.fromRGBO(51, 51, 51, 1)
)
),
TextSpan(
text: " 费率:",
style: TextStyle(
fontSize: 14.w,
color: const Color.fromRGBO(51, 51, 51, .5)
)
),
TextSpan(
text: "${controller.serviceFeeData.value.withdrawServiceFeePct}%",
style: TextStyle(
fontSize: 14.w,
color: const Color.fromRGBO(51, 51, 51, 1)
)
),
]
),
),
SizedBox(height: 40.w,),
Container(
width: 255.w,
height: 42.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(42.w)),
color: const Color.fromRGBO(117, 98, 249, 1)
),
child: Center(
child: Text(
"确认提现",
style: TextStyle(
fontSize: 14.w,
color: Colors.white,
fontWeight: FontWeight.w500
),
),
),
).onTap((){
controller.withdrawSubmit();
})
],
),
),
);
});
}),
);
})
],
),
)

2
pubspec.lock

@ -742,7 +742,7 @@ packages:
source: hosted
version: "1.1.2"
image_picker_android:
dependency: transitive
dependency: "direct main"
description:
name: image_picker_android
sha256: "317a5d961cec5b34e777b9252393f2afbd23084aa6e60fcf601dcf6341b9ebeb"

1
pubspec.yaml

@ -73,6 +73,7 @@ dependencies:
agora_token_generator: ^1.0.0
location_plugin:
path: location_plugin
image_picker_android: ^0.8.12+23
dev_dependencies:
flutter_test:

Loading…
Cancel
Save