Browse Source

no message

ios
ZHR007 4 months ago
parent
commit
408d4a3ce1
5 changed files with 58 additions and 4 deletions
  1. 16
      lib/controller/setting/spread_controller.dart
  2. 2
      lib/network/api_urls.dart
  3. 5
      lib/network/user_api.dart
  4. 37
      lib/network/user_api.g.dart
  5. 2
      lib/widget/live/live_room_notice_chat_panel.dart

16
lib/controller/setting/spread_controller.dart

@ -174,8 +174,18 @@ class SpreadController extends GetxController with WidgetsBindingObserver {
return; return;
} }
try { 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) { if (response.data.isSuccess && response.data.data != null) {
final data = response.data.data; final data = response.data.data;
@ -188,7 +198,7 @@ class SpreadController extends GetxController with WidgetsBindingObserver {
} else { } else {
fluwx.open(target: MiniProgram( fluwx.open(target: MiniProgram(
username: 'gh_9ea8d46add6f', 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 miniProgramType: WXMiniProgramType.preview
)); ));
countdownSeconds.value = 3; countdownSeconds.value = 3;

2
lib/network/api_urls.dart

@ -102,4 +102,6 @@ class ApiUrls {
static const String getChatVideoStatics = static const String getChatVideoStatics =
'dating-agency-chat-audio/user/get/own-user-management'; 'dating-agency-chat-audio/user/get/own-user-management';
static const String submitMatchmakerOrder = 'dating-agency-mall/user/submit/matchmaker-order';
} }

5
lib/network/user_api.dart

@ -96,6 +96,11 @@ abstract class UserApi {
@Body() Map<String, dynamic> data, @Body() Map<String, dynamic> data,
); );
@POST(ApiUrls.submitMatchmakerOrder)
Future<HttpResponse<BaseResponse<SubmitOrderData>>> submitMatchmakerOrder(
@Body() Map<String, dynamic> data,
);
@GET(ApiUrls.getEducationList) @GET(ApiUrls.getEducationList)
Future<HttpResponse<BaseResponse<List<EducationData>>>> getEducationList( Future<HttpResponse<BaseResponse<List<EducationData>>>> getEducationList(
@Body() Map<String, dynamic> data, @Body() Map<String, dynamic> data,

37
lib/network/user_api.g.dart

@ -512,6 +512,43 @@ class _UserApi implements UserApi {
return httpResponse; return httpResponse;
} }
@override
Future<HttpResponse<BaseResponse<SubmitOrderData>>> submitMatchmakerOrder(
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<SubmitOrderData>>>(
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<Map<String, dynamic>>(_options);
late BaseResponse<SubmitOrderData> _value;
try {
_value = BaseResponse<SubmitOrderData>.fromJson(
_result.data!,
(json) => SubmitOrderData.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 @override
Future<HttpResponse<BaseResponse<List<EducationData>>>> getEducationList( Future<HttpResponse<BaseResponse<List<EducationData>>>> getEducationList(
Map<String, dynamic> data, Map<String, dynamic> data,

2
lib/widget/live/live_room_notice_chat_panel.dart

@ -103,7 +103,7 @@ class _LiveRoomNoticeChatPanelState extends State<LiveRoomNoticeChatPanel> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Text(
controller.isLive.value ? '申请连麦中' : '免费连麦',
controller.isLive.value ? '下麦结束' : '免费连麦',
style: TextStyle( style: TextStyle(
fontSize: 13.w, fontSize: 13.w,
color: Colors.white, color: Colors.white,

Loading…
Cancel
Save