|
|
|
@ -24,7 +24,7 @@ class SpreadController extends GetxController with WidgetsBindingObserver { |
|
|
|
final Fluwx fluwx = Fluwx(); |
|
|
|
final matchmakerFlag = false.obs; |
|
|
|
final button = '去相亲'.obs; |
|
|
|
|
|
|
|
bool canApply = false; |
|
|
|
final revenue = [ |
|
|
|
{'icon': '1', 'desc': '礼物收益范围15%-30%,嘉宾消费的分成3%;'}, |
|
|
|
{'icon': '2', 'desc': '每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;'}, |
|
|
|
@ -44,7 +44,7 @@ class SpreadController extends GetxController with WidgetsBindingObserver { |
|
|
|
button.value = '立即续费'; |
|
|
|
} |
|
|
|
} else if(activePay.value == 0){ |
|
|
|
button.value = '去相亲'; |
|
|
|
button.value = canApply ? '立即加入' : '去相亲'; |
|
|
|
} else { |
|
|
|
button.value = '立即加入'; |
|
|
|
} |
|
|
|
@ -91,6 +91,7 @@ class SpreadController extends GetxController with WidgetsBindingObserver { |
|
|
|
matchmakerFlag.value = true; |
|
|
|
} |
|
|
|
getRoseList(); |
|
|
|
getChatInfo(); |
|
|
|
} |
|
|
|
|
|
|
|
@override |
|
|
|
@ -133,6 +134,20 @@ class SpreadController extends GetxController with WidgetsBindingObserver { |
|
|
|
super.onClose(); |
|
|
|
} |
|
|
|
|
|
|
|
getChatInfo() async { |
|
|
|
try{ |
|
|
|
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; |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|
print('spread: $e'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
getRoseList() async { |
|
|
|
try{ |
|
|
|
final response = await _userApi.getMatchmakerFee(); |
|
|
|
@ -145,15 +160,13 @@ class SpreadController extends GetxController with WidgetsBindingObserver { |
|
|
|
changePayActive(enableIndex.value); |
|
|
|
} |
|
|
|
} |
|
|
|
print('rose>>>${roseList.length}'); |
|
|
|
} catch (e) { |
|
|
|
print('玫瑰列表获取失败: $e'); |
|
|
|
rethrow; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
submitOrder() async { |
|
|
|
if(activePay.value == 0){ |
|
|
|
if(activePay.value == 0 && !canApply){ |
|
|
|
Get.back(); |
|
|
|
return; |
|
|
|
} |
|
|
|
|