更新分享设备权限
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user