更新分享设备权限

This commit is contained in:
wyf
2025-12-08 11:06:54 +08:00
parent db51c42664
commit 8285599aa9
14 changed files with 935 additions and 108 deletions

View File

@@ -46,6 +46,7 @@ class DeviceShareController extends GetControllerEx<DeviceShareModel> {
RxString account = "".obs;
RxString msg = "".obs;
RxInt code = 0.obs;
RxInt type = 1.obs;//分享权限类型 1 wifi开 2 wifi关
Future<ApiResponse> getDeviceType() async {
ApiResponse apiResponse = ApiResponse(code: -1, msg: "请求失败".tr);
@@ -102,7 +103,7 @@ class DeviceShareController extends GetControllerEx<DeviceShareModel> {
String serviceApi = ServiceConstant.device_share;
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
String? language = "";
if (AppConstants().ent_type == APPPackageType.MHT.code) {
if (AppConstants().ent_type == APPPackageType.MHT.code) {
if (mhLanguageController.selectLanguage != null) {
language = mhLanguageController.selectLanguage.value!.language_code;
}
@@ -118,7 +119,12 @@ class DeviceShareController extends GetControllerEx<DeviceShareModel> {
queryUrl += "?lang=$language";
}
}
var data = {"type": 1, "userName": account.value, "mac": mac};
var data = {
"type": 1,
"userName": account.value,
"mac": mac,
"opType": type.value,
};
var response =
await EasyDartModule.dio.post(queryUrl, data: jsonEncode(data));
if (response != null) {