Browse Source

添加送礼接口

ios
Jolie 4 months ago
parent
commit
de6c564311
4 changed files with 12 additions and 6 deletions
  1. 1
      ios/.gitignore
  2. 9
      lib/controller/message/chat_controller.dart
  3. 2
      lib/network/api_urls.dart
  4. 6
      lib/network/rtc_api.dart

1
ios/.gitignore

@ -14,7 +14,6 @@ Icon?
**/.symlinks/ **/.symlinks/
profile profile
xcuserdata xcuserdata
**/.generated/
Flutter/App.framework Flutter/App.framework
Flutter/Flutter.framework Flutter/Flutter.framework
Flutter/Flutter.podspec Flutter/Flutter.podspec

9
lib/controller/message/chat_controller.dart

@ -1509,16 +1509,15 @@ class ChatController extends GetxController {
int quantity = 1, int quantity = 1,
}) async { }) async {
try { try {
// channelIdtype为2表示添加好友/
// IM
final requestData = { final requestData = {
'type': 2, // 1. 2./
'toUId': int.tryParse(userId) ?? 0,
'toUserId': int.tryParse(userId) ?? 0,
'productSpecId': int.tryParse(gift.productSpecId) ?? 0, 'productSpecId': int.tryParse(gift.productSpecId) ?? 0,
'quantity': quantity, 'quantity': quantity,
}; };
//
final response = await _networkService.rtcApi.costChannelGift(
// IM
final response = await _networkService.rtcApi.costImGift(
requestData, requestData,
); );

2
lib/network/api_urls.dart

@ -64,6 +64,8 @@ class ApiUrls {
'dating-agency-mall/user/list/gift-product'; 'dating-agency-mall/user/list/gift-product';
static const String costChannelGift = static const String costChannelGift =
'dating-agency-chat-audio/user/cost/channel-gift'; 'dating-agency-chat-audio/user/cost/channel-gift';
static const String costImGift =
'dating-agency-chat-audio/user/cost/im-gift';
static const String listBankCardByIndividual = static const String listBankCardByIndividual =
'dating-agency-mall/user/list/bank-card/by-individual'; 'dating-agency-mall/user/list/bank-card/by-individual';
static const String createBankCardByIndividual = static const String createBankCardByIndividual =

6
lib/network/rtc_api.dart

@ -76,4 +76,10 @@ abstract class RtcApi {
Future<HttpResponse<BaseResponse<dynamic>>> costChannelGift( Future<HttpResponse<BaseResponse<dynamic>>> costChannelGift(
@Body() Map<String, dynamic> data, @Body() Map<String, dynamic> data,
); );
/// IM
@POST(ApiUrls.costImGift)
Future<HttpResponse<BaseResponse<dynamic>>> costImGift(
@Body() Map<String, dynamic> data,
);
} }
Loading…
Cancel
Save