x_pan_assemble_control.dart 752 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import 'package:get/get.dart';
  2. import '../models/index.dart';
  3. import '../utils/index.dart';
  4. ///
  5. /// v3版本网盘服务
  6. ///
  7. class PanAssembleControlService extends GetxService {
  8. static PanAssembleControlService get to => Get.find();
  9. String baseUrl() {
  10. return O2ApiManager.instance
  11. .getModuleBaseUrl(O2DistributeModuleEnum.x_pan_assemble_control) ??
  12. '';
  13. }
  14. ///
  15. /// 服务器应答
  16. ///
  17. Future<EchoData?> echo() async {
  18. try {
  19. ApiResponse response =
  20. await O2HttpClient.instance.get('${baseUrl()}jaxrs/echo');
  21. return EchoData.fromJson(response.data);
  22. } catch (err, stackTrace) {
  23. OLogger.e('v3版本网盘服务器应答', err, stackTrace);
  24. }
  25. return null;
  26. }
  27. }