From 408d4a3ce1da43f5d9643b3703ad17da3532d87b Mon Sep 17 00:00:00 2001 From: ZHR007 Date: Wed, 3 Dec 2025 17:14:19 +0800 Subject: [PATCH] no message --- lib/controller/setting/spread_controller.dart | 16 ++++++-- lib/network/api_urls.dart | 2 + lib/network/user_api.dart | 5 +++ lib/network/user_api.g.dart | 37 +++++++++++++++++++ .../live/live_room_notice_chat_panel.dart | 2 +- 5 files changed, 58 insertions(+), 4 deletions(-) diff --git a/lib/controller/setting/spread_controller.dart b/lib/controller/setting/spread_controller.dart index 6cc856b..989c64f 100644 --- a/lib/controller/setting/spread_controller.dart +++ b/lib/controller/setting/spread_controller.dart @@ -174,8 +174,18 @@ class SpreadController extends GetxController with WidgetsBindingObserver { return; } try { - final response = await _userApi.submitOrder({ - "productSpecId": roseList[activePay.value].productSpecId + var matchmakerOrderType = 1; + var matchmakerType = roseList[activePay.value].subCategory; + if(GlobalData().userData!.matchmakerFlag!){ + if(matchmakerType != GlobalData().userData!.matchmakerType){ + matchmakerOrderType = 2; + } else { + matchmakerOrderType = 3; + } + } + final response = await _userApi.submitMatchmakerOrder({ + "productSpecId": roseList[activePay.value].productSpecId, + "matchmakerOrderType": matchmakerOrderType }); if (response.data.isSuccess && response.data.data != null) { final data = response.data.data; @@ -188,7 +198,7 @@ class SpreadController extends GetxController with WidgetsBindingObserver { } else { fluwx.open(target: MiniProgram( username: 'gh_9ea8d46add6f', - path: "pages/index/index?amount=${roseList[activePay.value].unitSellingPrice}&paymentOrderId=${data!.paymentOrderId}&url=match-fee", + path: "pages/index/index?amount=${roseList[activePay.value].unitSellingPrice}&paymentOrderId=${data.paymentOrderId}&url=match-fee", miniProgramType: WXMiniProgramType.preview )); countdownSeconds.value = 3; diff --git a/lib/network/api_urls.dart b/lib/network/api_urls.dart index 3da7c62..0c9dae7 100644 --- a/lib/network/api_urls.dart +++ b/lib/network/api_urls.dart @@ -102,4 +102,6 @@ class ApiUrls { static const String getChatVideoStatics = 'dating-agency-chat-audio/user/get/own-user-management'; + + static const String submitMatchmakerOrder = 'dating-agency-mall/user/submit/matchmaker-order'; } diff --git a/lib/network/user_api.dart b/lib/network/user_api.dart index e67598b..721a298 100644 --- a/lib/network/user_api.dart +++ b/lib/network/user_api.dart @@ -96,6 +96,11 @@ abstract class UserApi { @Body() Map data, ); + @POST(ApiUrls.submitMatchmakerOrder) + Future>> submitMatchmakerOrder( + @Body() Map data, + ); + @GET(ApiUrls.getEducationList) Future>>> getEducationList( @Body() Map data, diff --git a/lib/network/user_api.g.dart b/lib/network/user_api.g.dart index 27915b5..66fbf09 100644 --- a/lib/network/user_api.g.dart +++ b/lib/network/user_api.g.dart @@ -512,6 +512,43 @@ class _UserApi implements UserApi { return httpResponse; } + @override + Future>> submitMatchmakerOrder( + Map data, + ) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(data); + final _options = + _setStreamType>>( + Options(method: 'POST', headers: _headers, extra: _extra) + .compose( + _dio.options, + 'dating-agency-mall/user/submit/matchmaker-order', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl), + ), + ); + final _result = await _dio.fetch>(_options); + late BaseResponse _value; + try { + _value = BaseResponse.fromJson( + _result.data!, + (json) => SubmitOrderData.fromJson(json as Map), + ); + } on Object catch (e, s) { + errorLogger?.logError(e, s, _options); + rethrow; + } + final httpResponse = HttpResponse(_value, _result); + return httpResponse; + } + @override Future>>> getEducationList( Map data, diff --git a/lib/widget/live/live_room_notice_chat_panel.dart b/lib/widget/live/live_room_notice_chat_panel.dart index b1cb960..30aa6ef 100644 --- a/lib/widget/live/live_room_notice_chat_panel.dart +++ b/lib/widget/live/live_room_notice_chat_panel.dart @@ -103,7 +103,7 @@ class _LiveRoomNoticeChatPanelState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - controller.isLive.value ? '申请连麦中' : '免费连麦', + controller.isLive.value ? '下麦结束' : '免费连麦', style: TextStyle( fontSize: 13.w, color: Colors.white,