|
|
@ -5,9 +5,6 @@ import 'package:flutter/material.dart'; |
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
|
|
import 'package:fluwx/fluwx.dart'; |
|
|
import 'package:fluwx/fluwx.dart'; |
|
|
import 'package:get/get.dart'; |
|
|
import 'package:get/get.dart'; |
|
|
import 'package:get_storage/get_storage.dart'; |
|
|
|
|
|
|
|
|
|
|
|
import '../../generated/assets.dart'; |
|
|
|
|
|
|
|
|
|
|
|
class SpreadController extends GetxController with WidgetsBindingObserver { |
|
|
class SpreadController extends GetxController with WidgetsBindingObserver { |
|
|
|
|
|
|
|
|
@ -44,7 +41,7 @@ class SpreadController extends GetxController with WidgetsBindingObserver { |
|
|
button.value = '立即续费'; |
|
|
button.value = '立即续费'; |
|
|
} |
|
|
} |
|
|
} else if(activePay.value == 0){ |
|
|
} else if(activePay.value == 0){ |
|
|
button.value = canApply ? '立即加入' : '去相亲'; |
|
|
|
|
|
|
|
|
button.value = canApply ? '免费加入' : '去相亲'; |
|
|
} else { |
|
|
} else { |
|
|
button.value = '立即加入'; |
|
|
button.value = '立即加入'; |
|
|
} |
|
|
} |
|
|
@ -182,6 +179,11 @@ class SpreadController extends GetxController with WidgetsBindingObserver { |
|
|
} else { |
|
|
} else { |
|
|
matchmakerOrderType = 3; |
|
|
matchmakerOrderType = 3; |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
await _userApi.applyMatchmaker({ |
|
|
|
|
|
"phone": GlobalData().userData!.phone, |
|
|
|
|
|
"name": GlobalData().userData!.name |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
final response = await _userApi.submitMatchmakerOrder({ |
|
|
final response = await _userApi.submitMatchmakerOrder({ |
|
|
"productSpecId": roseList[activePay.value].productSpecId, |
|
|
"productSpecId": roseList[activePay.value].productSpecId, |
|
|
@ -209,7 +211,6 @@ class SpreadController extends GetxController with WidgetsBindingObserver { |
|
|
SmartDialog.showToast(response.data.message ?? '网络异常'); |
|
|
SmartDialog.showToast(response.data.message ?? '网络异常'); |
|
|
} |
|
|
} |
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
print('玫瑰列表获取失败: $e'); |
|
|
|
|
|
SmartDialog.showToast('下单失败'); |
|
|
SmartDialog.showToast('下单失败'); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|