From acb0ffd1da1ceaf8e18b9b60f5e104317308645d Mon Sep 17 00:00:00 2001 From: ZHR007 Date: Wed, 10 Dec 2025 11:43:04 +0800 Subject: [PATCH] no message --- lib/controller/setting/spread_controller.dart | 41 ++++++++++++------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/lib/controller/setting/spread_controller.dart b/lib/controller/setting/spread_controller.dart index f0fbd63..ca93e4c 100644 --- a/lib/controller/setting/spread_controller.dart +++ b/lib/controller/setting/spread_controller.dart @@ -22,6 +22,7 @@ class SpreadController extends GetxController with WidgetsBindingObserver { final matchmakerFlag = false.obs; final button = '去相亲'.obs; bool canApply = false; + String paymentOrderId = ''; final revenue = [ {'icon': '1', 'desc': '礼物收益范围15%-30%,嘉宾消费的分成3%;'}, {'icon': '2', 'desc': '每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;'}, @@ -37,6 +38,8 @@ class SpreadController extends GetxController with WidgetsBindingObserver { if(matchmakerFlag.value){ if(activePay.value > enableIndex.value){ button.value = '立即升级'; + } else if(activePay.value == 0){ + button.value = '去直播'; } else { button.value = '立即续费'; } @@ -102,23 +105,30 @@ class SpreadController extends GetxController with WidgetsBindingObserver { // 开始倒计时 void startCountdown() async { try{ - final response = await _userApi.getAuditMatchmaker(); - if (response.data.isSuccess && response.data.data != null) { - bool audit = response.data.data['needAudit']; - if(audit){ - Future.delayed(const Duration(milliseconds: 300), () { - if (countdownSeconds.value > 0) { - countdownSeconds.value--; - startCountdown(); - } - }); - } else { - countdownSeconds.value = 0; - GlobalData().userData!.matchmakerFlag = true; - GlobalData().userData!.matchmakerType = roseList[activePay.value].subCategory; - Get.back(result: 1); + bool audit = false; + if(matchmakerFlag.value){ + // 如果是红娘,那么就要检测支付单是否支付成功, + + } else { + // 如果是不是红娘,那么就要检测用户是否变成了红娘, + final response = await _userApi.getAuditMatchmaker(); + if (response.data.isSuccess && response.data.data != null) { + audit = response.data.data['needAudit']; } } + if(audit){ + Future.delayed(const Duration(milliseconds: 300), () { + if (countdownSeconds.value > 0) { + countdownSeconds.value--; + startCountdown(); + } + }); + } else { + countdownSeconds.value = 0; + GlobalData().userData!.matchmakerFlag = true; + GlobalData().userData!.matchmakerType = roseList[activePay.value].subCategory; + Get.back(result: 1); + } } catch (e) { print('87$e'); } @@ -191,6 +201,7 @@ class SpreadController extends GetxController with WidgetsBindingObserver { GlobalData().userData!.matchmakerType = roseList[activePay.value].subCategory; Get.back(result: 1); } else { + paymentOrderId = data.paymentOrderId!; fluwx.open(target: MiniProgram( username: 'gh_9ea8d46add6f', path: "pages/index/index?amount=${roseList[activePay.value].unitSellingPrice}&paymentOrderId=${data.paymentOrderId}&url=match-fee",