Browse Source

红娘升级

ios
ZHR007 3 months ago
parent
commit
a2bf9c7c5d
4 changed files with 9 additions and 4 deletions
  1. 2
      lib/controller/discover/room_controller.dart
  2. 7
      lib/controller/setting/spread_controller.dart
  3. 2
      lib/network/user_api.dart
  4. 2
      lib/network/user_api.g.dart

2
lib/controller/discover/room_controller.dart

@ -183,6 +183,8 @@ class RoomController extends GetxController with WidgetsBindingObserver {
}
Future<void> joinChat(CurrentRole role) async {
final granted = await _ensureRtcPermissions();
if (!granted) return;
final data = {
'channelId': RTCManager.instance.currentChannelId,
'seatNumber': role == CurrentRole.maleAudience ? 1 : 2,

7
lib/controller/setting/spread_controller.dart

@ -139,8 +139,11 @@ class SpreadController extends GetxController with WidgetsBindingObserver {
final response = await _userApi.getChatStaticsInfo();
if (response.data.isSuccess && response.data.data != null) {
final data = response.data.data!;
if(data.liveDurationMins >= 600 && !matchmakerFlag.value){
canApply = true;
if(roseList[activePay.value].liveDurationHours != null){
int hours = int.parse(roseList[activePay.value].liveDurationHours!);
if(hours > 0 && data.liveDurationMins >= 60 * hours && !matchmakerFlag.value){
canApply = true;
}
}
}
} catch (e) {

2
lib/network/user_api.dart

@ -201,7 +201,7 @@ abstract class UserApi {
}
);
@GET(ApiUrls.getHxUserToken)
@GET(ApiUrls.getChatVideoStatics)
Future<HttpResponse<BaseResponse<ChatStaticData>>> getChatStaticsInfo();
}

2
lib/network/user_api.g.dart

@ -1245,7 +1245,7 @@ class _UserApi implements UserApi {
Options(method: 'GET', headers: _headers, extra: _extra)
.compose(
_dio.options,
'dating-agency-chat-audio/user/get/hx/user/token',
'dating-agency-chat-audio/user/get/own-user-management',
queryParameters: queryParameters,
data: _data,
)

Loading…
Cancel
Save