You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
925 B
40 lines
925 B
import 'package:dating_touchme_app/model/mine/matchmaker_requirement_data.dart';
|
|
import 'package:dating_touchme_app/network/user_api.dart';
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
class TaskController extends GetxController {
|
|
|
|
// UserApi实例
|
|
late UserApi _userApi;
|
|
final roseList = <MatchmakerRequirement>[].obs;
|
|
final loading = true.obs;
|
|
|
|
@override
|
|
void onInit() {
|
|
super.onInit();
|
|
_userApi = Get.find<UserApi>();
|
|
initDataList();
|
|
}
|
|
|
|
initDataList() async {
|
|
try{
|
|
loading.value = true;
|
|
final result = await _userApi.getMatchmakerRequirement();
|
|
if (result.data.isSuccess && result.data.data != null) {
|
|
roseList.value = result.data.data!;
|
|
}
|
|
} finally {
|
|
loading.value = false;
|
|
}
|
|
}
|
|
|
|
submitOrder() async {
|
|
try {
|
|
|
|
} catch (e) {
|
|
SmartDialog.showToast('申请失败');
|
|
}
|
|
}
|
|
|
|
}
|