设备分享
This commit is contained in:
@@ -49,11 +49,11 @@ class MHDeviceShareController extends GetControllerEx<MHDeviceShareModel> {
|
||||
// RxString account = "".obs;
|
||||
// RxString msg = "".obs;
|
||||
// RxInt code = 0.obs;
|
||||
@override
|
||||
Future<void> onInit() async {
|
||||
super.onInit();
|
||||
await shareDeviceList(Get.arguments["mac"]);
|
||||
}
|
||||
// @override
|
||||
// Future<void> onInit() async {
|
||||
// super.onInit();
|
||||
// await shareDeviceList(Get.arguments["mac"]);
|
||||
// }
|
||||
|
||||
Future<ApiResponse> shareDevice(String mac) async {
|
||||
ApiResponse apiResponse = ApiResponse(code: -1, msg: "请求失败".tr);
|
||||
@@ -85,7 +85,12 @@ class MHDeviceShareController extends GetControllerEx<MHDeviceShareModel> {
|
||||
queryUrl += "?lang=$language";
|
||||
}
|
||||
}
|
||||
var data = {"type": model.type, "userName": model.account, "mac": mac};
|
||||
var data = {
|
||||
"type": 1,
|
||||
"userName": model.account,
|
||||
"mac": mac,
|
||||
"opType": model.type
|
||||
};
|
||||
var response =
|
||||
await EasyDartModule.dio.post(queryUrl, data: jsonEncode(data));
|
||||
if (response != null) {
|
||||
|
||||
Reference in New Issue
Block a user