42 lines
1.2 KiB
Dart
42 lines
1.2 KiB
Dart
import 'dart:convert';
|
|
|
|
import 'package:get/get.dart';
|
|
import 'package:star_lock/main/lockDetail/lockDetail/ActivateInfoResponse.dart';
|
|
import 'package:star_lock/network/api_provider.dart';
|
|
import 'package:star_lock/network/api_provider_base.dart';
|
|
import 'package:star_lock/talk/starChart/entity/relay_info_entity.dart';
|
|
import 'package:star_lock/talk/starChart/entity/report_information_data.dart';
|
|
import 'package:star_lock/talk/starChart/entity/star_chart_register_node_entity.dart';
|
|
import 'package:star_lock/tools/storage.dart';
|
|
|
|
class StartCompanyApi extends BaseProvider {
|
|
// 星图url
|
|
String _startChartHost = 'https://company.skychip.top';
|
|
|
|
static StartCompanyApi get to => Get.put(StartCompanyApi());
|
|
|
|
// 设置星图host
|
|
set startChartHost(String value) {
|
|
_startChartHost = value;
|
|
}
|
|
|
|
// 获取星图host
|
|
String get startChartHost => _startChartHost;
|
|
|
|
// ttp查询
|
|
Future<ActivateInfoResponse> getActivateInfo({
|
|
required String model,
|
|
}) async {
|
|
final response = await post(
|
|
_startChartHost + getActivateInfoURL.toUrl,
|
|
jsonEncode(<String, dynamic>{
|
|
'model': model,
|
|
|
|
}),
|
|
isUnShowLoading: true,
|
|
isUserBaseUrl: false,
|
|
);
|
|
return ActivateInfoResponse.fromJson(response.body);
|
|
}
|
|
}
|