Merge branch 'master' of https://gitee.com/weishaoyang/star_lock
BIN
star_lock/images/icon_about.png
Normal file
|
After Width: | Height: | Size: 213 KiB |
BIN
star_lock/images/icon_email.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 64 KiB |
BIN
star_lock/images/icon_message.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
star_lock/images/icon_more.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
star_lock/images/icon_noData.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
star_lock/images/icon_wechat.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
@ -212,7 +212,7 @@
|
|||||||
"pushNotification":"消息推送",
|
"pushNotification":"消息推送",
|
||||||
"lockUserManagement":"锁用户管理",
|
"lockUserManagement":"锁用户管理",
|
||||||
"ownedKey":"拥有的钥匙",
|
"ownedKey":"拥有的钥匙",
|
||||||
"authorityManagement":"权限管理",
|
"authorityManagement":"批量授权",
|
||||||
"associatedDevice":"关联设备",
|
"associatedDevice":"关联设备",
|
||||||
"associatedName":"关联姓名",
|
"associatedName":"关联姓名",
|
||||||
"device":"设备",
|
"device":"设备",
|
||||||
|
|||||||
BIN
star_lock/images/lockType/addLock_entranceGuardBg.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
star_lock/images/lockType/addLock_parkingBg.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
star_lock/images/lockType/addLock_safeBg.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
@ -10,6 +10,7 @@
|
|||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||||
3EF1E85D6F1EE0C0DCF8449F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09D8B2FA2B26BA5BFF31AB2A /* Pods_Runner.framework */; };
|
3EF1E85D6F1EE0C0DCF8449F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09D8B2FA2B26BA5BFF31AB2A /* Pods_Runner.framework */; };
|
||||||
|
82BD91202ADA6FBB0018E523 /* XSFlutterManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 82BD911F2ADA6FBB0018E523 /* XSFlutterManager.m */; };
|
||||||
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
|
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
|
||||||
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
|
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||||
@ -39,6 +40,9 @@
|
|||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||||
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||||
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||||
|
82BD911E2ADA6FBB0018E523 /* XSFlutterManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XSFlutterManager.h; sourceTree = "<group>"; };
|
||||||
|
82BD911F2ADA6FBB0018E523 /* XSFlutterManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XSFlutterManager.m; sourceTree = "<group>"; };
|
||||||
|
82BD91212ADA72360018E523 /* CommonDefine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonDefine.h; sourceTree = "<group>"; };
|
||||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
@ -74,6 +78,15 @@
|
|||||||
path = Pods;
|
path = Pods;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
826570C02ADCDD0200A92776 /* XSController */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
82BD911E2ADA6FBB0018E523 /* XSFlutterManager.h */,
|
||||||
|
82BD911F2ADA6FBB0018E523 /* XSFlutterManager.m */,
|
||||||
|
);
|
||||||
|
name = XSController;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
9304F75C378DB3447BB2408C /* Frameworks */ = {
|
9304F75C378DB3447BB2408C /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@ -115,6 +128,7 @@
|
|||||||
97C146F01CF9000F007C117D /* Runner */ = {
|
97C146F01CF9000F007C117D /* Runner */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
826570C02ADCDD0200A92776 /* XSController */,
|
||||||
33BF41252A96174D009D92E2 /* Runner.entitlements */,
|
33BF41252A96174D009D92E2 /* Runner.entitlements */,
|
||||||
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
|
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
|
||||||
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
|
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
|
||||||
@ -125,6 +139,7 @@
|
|||||||
97C146F11CF9000F007C117D /* Supporting Files */,
|
97C146F11CF9000F007C117D /* Supporting Files */,
|
||||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||||
|
82BD91212ADA72360018E523 /* CommonDefine.h */,
|
||||||
);
|
);
|
||||||
path = Runner;
|
path = Runner;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -173,6 +188,7 @@
|
|||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
97C146ED1CF9000F007C117D = {
|
97C146ED1CF9000F007C117D = {
|
||||||
CreatedOnToolsVersion = 7.3.1;
|
CreatedOnToolsVersion = 7.3.1;
|
||||||
|
LastSwiftMigration = 1430;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -287,6 +303,7 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
|
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
|
||||||
|
82BD91202ADA6FBB0018E523 /* XSFlutterManager.m in Sources */,
|
||||||
97C146F31CF9000F007C117D /* main.m in Sources */,
|
97C146F31CF9000F007C117D /* main.m in Sources */,
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||||
);
|
);
|
||||||
@ -371,6 +388,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
@ -385,6 +403,8 @@
|
|||||||
PRODUCT_BUNDLE_IDENTIFIER = "cn.star-lock.lock";
|
PRODUCT_BUNDLE_IDENTIFIER = "cn.star-lock.lock";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Profile;
|
name = Profile;
|
||||||
@ -502,6 +522,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
@ -516,6 +537,9 @@
|
|||||||
PRODUCT_BUNDLE_IDENTIFIER = "cn.star-lock.lock";
|
PRODUCT_BUNDLE_IDENTIFIER = "cn.star-lock.lock";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
@ -526,6 +550,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
@ -540,6 +565,8 @@
|
|||||||
PRODUCT_BUNDLE_IDENTIFIER = "cn.star-lock.lock";
|
PRODUCT_BUNDLE_IDENTIFIER = "cn.star-lock.lock";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
|||||||
@ -1,13 +1,16 @@
|
|||||||
#import "AppDelegate.h"
|
#import "AppDelegate.h"
|
||||||
#import "GeneratedPluginRegistrant.h"
|
#import "GeneratedPluginRegistrant.h"
|
||||||
|
#import "XSFlutterManager.h"
|
||||||
|
#import "CommonDefine.h"
|
||||||
|
|
||||||
@implementation AppDelegate
|
@implementation AppDelegate
|
||||||
|
|
||||||
- (BOOL)application:(UIApplication *)application
|
- (BOOL)application:(UIApplication *)application
|
||||||
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||||
[GeneratedPluginRegistrant registerWithRegistry:self];
|
XSFlutterManager * VC = [[XSFlutterManager alloc]init];
|
||||||
// Override point for customization after application launch.
|
self.window.rootViewController = VC;
|
||||||
return [super application:application didFinishLaunchingWithOptions:launchOptions];
|
[self.window makeKeyAndVisible];
|
||||||
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -1,122 +1,121 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"filename" : "icon-20@2x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"filename" : "icon-20@3x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-20x20@3x.png",
|
"scale" : "3x",
|
||||||
"scale" : "3x"
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
"scale" : "1x",
|
||||||
"scale" : "1x"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"filename" : "icon-29@2x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"filename" : "icon-29@3x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-29x29@3x.png",
|
"scale" : "3x",
|
||||||
"scale" : "3x"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"filename" : "icon-40@2x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"filename" : "icon-40@3x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-40x40@3x.png",
|
"scale" : "3x",
|
||||||
"scale" : "3x"
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "60x60",
|
"filename" : "icon-60@2x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-60x60@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "60x60"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "60x60",
|
"filename" : "icon-60@3x.png",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "Icon-App-60x60@3x.png",
|
"scale" : "3x",
|
||||||
"scale" : "3x"
|
"size" : "60x60"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-20x20@1x.png",
|
"filename" : "Icon-App-20x20@1x.png",
|
||||||
"scale" : "1x"
|
"idiom" : "ipad",
|
||||||
|
"scale" : "1x",
|
||||||
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
"filename" : "Icon-App-20x20@2x.png",
|
||||||
"scale" : "2x"
|
"idiom" : "ipad",
|
||||||
|
"scale" : "2x",
|
||||||
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
"filename" : "Icon-App-29x29@1x.png",
|
||||||
"scale" : "1x"
|
"idiom" : "ipad",
|
||||||
|
"scale" : "1x",
|
||||||
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
"filename" : "Icon-App-29x29@2x.png",
|
||||||
"scale" : "2x"
|
"idiom" : "ipad",
|
||||||
|
"scale" : "2x",
|
||||||
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-40x40@1x.png",
|
"filename" : "Icon-App-40x40@1x.png",
|
||||||
"scale" : "1x"
|
"idiom" : "ipad",
|
||||||
|
"scale" : "1x",
|
||||||
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
"filename" : "Icon-App-40x40@2x.png",
|
||||||
"scale" : "2x"
|
"idiom" : "ipad",
|
||||||
|
"scale" : "2x",
|
||||||
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-76x76@1x.png",
|
"filename" : "Icon-App-76x76@1x.png",
|
||||||
"scale" : "1x"
|
"idiom" : "ipad",
|
||||||
|
"scale" : "1x",
|
||||||
|
"size" : "76x76"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-76x76@2x.png",
|
"filename" : "Icon-App-76x76@2x.png",
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "83.5x83.5",
|
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
"scale" : "2x",
|
||||||
"scale" : "2x"
|
"size" : "76x76"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"scale" : "2x",
|
||||||
|
"size" : "83.5x83.5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "1024x1024",
|
|
||||||
"idiom" : "ios-marketing",
|
|
||||||
"filename" : "Icon-App-1024x1024@1x.png",
|
"filename" : "Icon-App-1024x1024@1x.png",
|
||||||
"scale" : "1x"
|
"idiom" : "ios-marketing",
|
||||||
|
"scale" : "1x",
|
||||||
|
"size" : "1024x1024"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
"version" : 1,
|
"author" : "xcode",
|
||||||
"author" : "xcode"
|
"version" : 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
@ -1,8 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||||
|
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="iOS"/>
|
<deployment identifier="iOS"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<scenes>
|
<scenes>
|
||||||
<!--Flutter View Controller-->
|
<!--Flutter View Controller-->
|
||||||
@ -14,13 +16,14 @@
|
|||||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||||
</layoutGuides>
|
</layoutGuides>
|
||||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
</view>
|
</view>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||||
</objects>
|
</objects>
|
||||||
|
<point key="canvasLocation" x="-26" y="-77"/>
|
||||||
</scene>
|
</scene>
|
||||||
</scenes>
|
</scenes>
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
20
star_lock/ios/Runner/CommonDefine.h
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
//
|
||||||
|
// CommonDefine.h
|
||||||
|
// Runner
|
||||||
|
//
|
||||||
|
// Created by DaisyWu on 2023/10/14.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CommonDefine_h
|
||||||
|
#define CommonDefine_h
|
||||||
|
|
||||||
|
|
||||||
|
/** 信号通道,须与flutter里一致*/
|
||||||
|
#define flutterMethodChannel @"flutter_native_ios"
|
||||||
|
/** 交互方法字段名,须与flutter里一致*/
|
||||||
|
#define flutterMethodSharePassword @"flutter_sharePassword_to_ios"
|
||||||
|
#define flutterMethodPresent @"flutter_present_to_ios"
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* CommonDefine_h */
|
||||||
|
|
||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>Star Lock</string>
|
<string>星锁</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>star_lock</string>
|
<string>星锁</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
@ -57,6 +57,11 @@
|
|||||||
</array>
|
</array>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
<string>LaunchScreen</string>
|
<string>LaunchScreen</string>
|
||||||
|
<key>UIApplicationSceneManifest</key>
|
||||||
|
<dict>
|
||||||
|
<key>UISceneConfigurations</key>
|
||||||
|
<dict/>
|
||||||
|
</dict>
|
||||||
<key>UIMainStoryboardFile</key>
|
<key>UIMainStoryboardFile</key>
|
||||||
<string>Main</string>
|
<string>Main</string>
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
|
|||||||
16
star_lock/ios/Runner/XSFlutterManager.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// SharePasswordViewController.h
|
||||||
|
// Runner
|
||||||
|
//
|
||||||
|
// Created by DaisyWu on 2023/10/14.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Flutter/Flutter.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XSFlutterManager : FlutterViewController
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
104
star_lock/ios/Runner/XSFlutterManager.m
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
//
|
||||||
|
// XSFlutterManager.m
|
||||||
|
// Runner
|
||||||
|
//
|
||||||
|
// Created by DaisyWu on 2023/10/14.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XSFlutterManager.h"
|
||||||
|
#include "GeneratedPluginRegistrant.h"
|
||||||
|
#import "CommonDefine.h"
|
||||||
|
|
||||||
|
|
||||||
|
@interface XSFlutterManager ()
|
||||||
|
|
||||||
|
@property(nonatomic,strong) FlutterMethodChannel* methodChannel;
|
||||||
|
@property (nonatomic, copy) NSString *textToShare;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XSFlutterManager
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
self.textToShare = [[NSString alloc] init];
|
||||||
|
|
||||||
|
[self methodChannelFunction];
|
||||||
|
}
|
||||||
|
- (void)methodChannelFunction {
|
||||||
|
|
||||||
|
//创建 FlutterMethodChannel
|
||||||
|
self.methodChannel = [FlutterMethodChannel
|
||||||
|
methodChannelWithName:flutterMethodChannel binaryMessenger:self];
|
||||||
|
//设置监听
|
||||||
|
[self.methodChannel setMethodCallHandler:^(FlutterMethodCall* call, FlutterResult result) {
|
||||||
|
// TODO
|
||||||
|
NSString *method=call.method;
|
||||||
|
//调用系统分享
|
||||||
|
if ([method isEqualToString:flutterMethodSharePassword]) {
|
||||||
|
id params = call.arguments;
|
||||||
|
self.textToShare = @"您好,您的密码是:";
|
||||||
|
if ([params isKindOfClass:[NSDictionary class]]) {
|
||||||
|
NSDictionary *paramDic = (NSDictionary *)params;
|
||||||
|
//分享的标题
|
||||||
|
self.textToShare = paramDic[@"pwdShareStr"];
|
||||||
|
}
|
||||||
|
//分享的url
|
||||||
|
NSURL *urlToShare = [NSURL URLWithString:@"https://pre.lock.star-lock.cn:8093/login"];
|
||||||
|
|
||||||
|
//在这里呢 如果想分享图片 就把图片添加进去 文字什么的通上
|
||||||
|
NSArray *activityItems = @[self.textToShare,urlToShare];
|
||||||
|
|
||||||
|
UIActivityViewController *activityVC = [[UIActivityViewController alloc]initWithActivityItems:activityItems applicationActivities:nil];
|
||||||
|
|
||||||
|
//不出现在活动项目
|
||||||
|
activityVC.excludedActivityTypes = @[UIActivityTypePrint];
|
||||||
|
[self presentViewController:activityVC animated:YES completion:nil];
|
||||||
|
|
||||||
|
// 分享之后的回调
|
||||||
|
activityVC.completionWithItemsHandler = ^(UIActivityType _Nullable activityType, BOOL completed, NSArray * _Nullable returnedItems, NSError * _Nullable activityError) {
|
||||||
|
if (completed) {
|
||||||
|
|
||||||
|
NSLog(@"completed");
|
||||||
|
|
||||||
|
//分享 成功
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
NSLog(@"cancled");
|
||||||
|
|
||||||
|
//分享 取消
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
result(@"push返回到flutter");
|
||||||
|
}
|
||||||
|
|
||||||
|
}];
|
||||||
|
[GeneratedPluginRegistrant registerWithRegistry:self];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)viewWillAppear:(BOOL)animated{
|
||||||
|
[super viewWillAppear:animated];
|
||||||
|
[self.navigationController setNavigationBarHidden:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)viewWillDisappear:(BOOL)animated{
|
||||||
|
[super viewWillDisappear:animated];
|
||||||
|
[self.navigationController setNavigationBarHidden:NO];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
#pragma mark - Navigation
|
||||||
|
|
||||||
|
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||||
|
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||||
|
// Get the new view controller using [segue destinationViewController].
|
||||||
|
// Pass the selected object to the new view controller.
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
@end
|
||||||
@ -12,7 +12,7 @@ import 'package:star_lock/mine/about/webviewShow_page.dart';
|
|||||||
import 'package:star_lock/mine/mine/safeVerify/safeVerify_page.dart';
|
import 'package:star_lock/mine/mine/safeVerify/safeVerify_page.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_page.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_page.dart';
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoViewSafetyProblem/minePersonInfoViewSafetyProblem_page.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoViewSafetyProblem/minePersonInfoViewSafetyProblem_page.dart';
|
||||||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator_page.dart';
|
import 'package:star_lock/mine/mineSet/addAuthorizedAdministrator/addAuthorizedAdministrator_page.dart';
|
||||||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/administratorDetails/adminDetailChangeDate_page.dart';
|
import 'package:star_lock/mine/mineSet/authorizedAdministrator/administratorDetails/adminDetailChangeDate_page.dart';
|
||||||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_page.dart';
|
import 'package:star_lock/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_page.dart';
|
||||||
import 'package:star_lock/mine/mineSet/lockGroup/lockGroupList_page.dart';
|
import 'package:star_lock/mine/mineSet/lockGroup/lockGroupList_page.dart';
|
||||||
@ -320,7 +320,7 @@ abstract class Routers {
|
|||||||
|
|
||||||
static const getDeviceListPage = '/getDeviceListPage'; //设备列表
|
static const getDeviceListPage = '/getDeviceListPage'; //设备列表
|
||||||
static const getNameListPage = '/getNameListPage'; //姓名列表
|
static const getNameListPage = '/getNameListPage'; //姓名列表
|
||||||
static const authorityManagementPage = '/authorityManagementPage'; //权限管理
|
static const authorityManagementPage = '/authorityManagementPage'; //批量授权
|
||||||
static const massSendLockGroupPage = '/massSendLockGroupPage'; //群发锁分组列表
|
static const massSendLockGroupPage = '/massSendLockGroupPage'; //群发锁分组列表
|
||||||
static const massSendReceiverPage = '/massSendReceiverPage'; //群发接收人
|
static const massSendReceiverPage = '/massSendReceiverPage'; //群发接收人
|
||||||
static const lockUserListPage = '/lockUserListPage'; //锁用户列表
|
static const lockUserListPage = '/lockUserListPage'; //锁用户列表
|
||||||
|
|||||||
@ -27,7 +27,7 @@ class AuthorizedAdminSendEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Data {
|
class Data {
|
||||||
String? receiverUid;
|
int? receiverUid;
|
||||||
ReceiverUser? receiverUser;
|
ReceiverUser? receiverUser;
|
||||||
int? keyId;
|
int? keyId;
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ class Phone {
|
|||||||
int? userId;
|
int? userId;
|
||||||
String? phoneNumberHash;
|
String? phoneNumberHash;
|
||||||
String? phoneNumberEncrypt;
|
String? phoneNumberEncrypt;
|
||||||
String? countryCode;
|
int? countryCode;
|
||||||
String? phoneNumberVerifiedAt;
|
String? phoneNumberVerifiedAt;
|
||||||
String? updatedAt;
|
String? updatedAt;
|
||||||
String? createdAt;
|
String? createdAt;
|
||||||
@ -149,7 +149,7 @@ class Phone {
|
|||||||
class Cloud {
|
class Cloud {
|
||||||
String? username;
|
String? username;
|
||||||
String? password;
|
String? password;
|
||||||
String? cloudUid;
|
int? cloudUid;
|
||||||
int? userId;
|
int? userId;
|
||||||
String? updatedAt;
|
String? updatedAt;
|
||||||
String? createdAt;
|
String? createdAt;
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_reactive_ble/flutter_reactive_ble.dart';
|
import 'package:flutter_reactive_ble/flutter_reactive_ble.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/blue/io_type.dart';
|
import 'package:star_lock/blue/io_type.dart';
|
||||||
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
import '../../../../blue/blue_manage.dart';
|
import '../../../../blue/blue_manage.dart';
|
||||||
import '../../../../blue/io_protocol/io_addUser.dart';
|
import '../../../../blue/io_protocol/io_addUser.dart';
|
||||||
@ -23,7 +27,8 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
// 监听设备返回的数据
|
// 监听设备返回的数据
|
||||||
late StreamSubscription<Reply> _replySubscription;
|
late StreamSubscription<Reply> _replySubscription;
|
||||||
void _initReplySubscription() {
|
void _initReplySubscription() {
|
||||||
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((reply) async {
|
_replySubscription =
|
||||||
|
EventBusManager().eventBus!.on<Reply>().listen((reply) async {
|
||||||
// 转移权限
|
// 转移权限
|
||||||
if (reply is TransferPermissionsReply) {
|
if (reply is TransferPermissionsReply) {
|
||||||
var token = reply.data.sublist(2, 6);
|
var token = reply.data.sublist(2, 6);
|
||||||
@ -73,7 +78,7 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x14:
|
case 0x14:
|
||||||
// 权限校验错误
|
// 权限校验错误
|
||||||
print("${reply.commandType!.typeValue} 用户已存在");
|
print("${reply.commandType!.typeValue} 用户已存在");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -85,7 +90,7 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(reply is AddUserReply) {
|
if (reply is AddUserReply) {
|
||||||
_replyAddUserKey(reply);
|
_replyAddUserKey(reply);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -105,16 +110,16 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// userNo = reply.data[46];
|
// userNo = reply.data[46];
|
||||||
// print("status:$status");
|
// print("status:$status");
|
||||||
switch(status){
|
switch (status) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
print("添加用户数据解析成功");
|
print("添加用户数据解析成功");
|
||||||
state.isSendSuccess.value = true;
|
state.isSendSuccess.value = true;
|
||||||
Toast.show(msg: "添加成功");
|
Toast.show(msg: "添加成功");
|
||||||
// bindBlueAdmin();
|
// bindBlueAdmin();
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
//无权限
|
//无权限
|
||||||
print("需要鉴权");
|
print("需要鉴权");
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
@ -124,33 +129,32 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
|
|
||||||
IoSenderManage.senderAddUser(
|
IoSenderManage.senderAddUser(
|
||||||
lockID: BlueManage().connectDeviceName,
|
lockID: BlueManage().connectDeviceName,
|
||||||
authUserID:await Storage.getUid(),
|
authUserID: await Storage.getUid(),
|
||||||
keyID:"1",
|
keyID: "1",
|
||||||
userID:state.addUserId.value,
|
userID: state.addUserId.value,
|
||||||
openMode:1,
|
openMode: 1,
|
||||||
keyType:(state.type.value == "1") ? 0 : 1,
|
keyType: (state.type.value == "1") ? 0 : 1,
|
||||||
startDate:state.effectiveDateTime.value.millisecondsSinceEpoch,
|
startDate: state.effectiveDateTime.value.millisecondsSinceEpoch,
|
||||||
expireDate:state.failureDateTime.value.millisecondsSinceEpoch,
|
expireDate: state.failureDateTime.value.millisecondsSinceEpoch,
|
||||||
role:0,
|
role: 0,
|
||||||
password:"123456",
|
password: "123456",
|
||||||
needAuthor:1,
|
needAuthor: 1,
|
||||||
publicKey:publicKeyDataList,
|
publicKey: publicKeyDataList,
|
||||||
privateKey:getPrivateKeyList,
|
privateKey: getPrivateKeyList,
|
||||||
token: token
|
token: token);
|
||||||
);
|
|
||||||
break;
|
break;
|
||||||
case 0x07:
|
case 0x07:
|
||||||
//无权限
|
//无权限
|
||||||
print("用户无权限");
|
print("用户无权限");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x09:
|
case 0x09:
|
||||||
// 权限校验错误
|
// 权限校验错误
|
||||||
print("添加用户权限校验错误");
|
print("添加用户权限校验错误");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//失败
|
//失败
|
||||||
print("领锁失败");
|
print("领锁失败");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -190,8 +194,10 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
// 添加用户
|
// 添加用户
|
||||||
Future<void> addUserConnectBlue(String receiveId) async {
|
Future<void> addUserConnectBlue(String receiveId) async {
|
||||||
// 进来之后首先连接
|
// 进来之后首先连接
|
||||||
BlueManage().judgeReconnect(BlueManage().connectDeviceMacAddress, BlueManage().connectDeviceName, (DeviceConnectionState connecteState) async {
|
BlueManage().judgeReconnect(
|
||||||
if (connecteState == DeviceConnectionState.connected){
|
BlueManage().connectDeviceMacAddress, BlueManage().connectDeviceName,
|
||||||
|
(DeviceConnectionState connecteState) async {
|
||||||
|
if (connecteState == DeviceConnectionState.connected) {
|
||||||
// 私钥
|
// 私钥
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
@ -200,59 +206,60 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
var token = await Storage.getStringList(saveBlueToken);
|
var token = await Storage.getStringList(saveBlueToken);
|
||||||
List<int> getTokenList = [0,0,0,0];
|
List<int> getTokenList = [0, 0, 0, 0];
|
||||||
if(token != null){
|
if (token != null) {
|
||||||
getTokenList = changeStringListToIntList(token);
|
getTokenList = changeStringListToIntList(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
IoSenderManage.senderAddUser(
|
IoSenderManage.senderAddUser(
|
||||||
lockID: BlueManage().connectDeviceName,
|
lockID: BlueManage().connectDeviceName,
|
||||||
authUserID:await Storage.getUid(),
|
authUserID: await Storage.getUid(),
|
||||||
keyID:"1",
|
keyID: "1",
|
||||||
userID:receiveId,
|
userID: receiveId,
|
||||||
openMode:1,
|
openMode: 1,
|
||||||
keyType:(state.type.value == "1") ? 0 : 1,
|
keyType: (state.type.value == "1") ? 0 : 1,
|
||||||
startDate:state.effectiveDateTime.value.millisecondsSinceEpoch,
|
startDate: state.effectiveDateTime.value.millisecondsSinceEpoch,
|
||||||
expireDate:state.failureDateTime.value.millisecondsSinceEpoch,
|
expireDate: state.failureDateTime.value.millisecondsSinceEpoch,
|
||||||
role:0,
|
role: 0,
|
||||||
password:"123456",
|
password: "123456",
|
||||||
needAuthor:1,
|
needAuthor: 1,
|
||||||
publicKey:publicKeyDataList,
|
publicKey: publicKeyDataList,
|
||||||
privateKey:getPrivateKeyList,
|
privateKey: getPrivateKeyList,
|
||||||
token: getTokenList
|
token: getTokenList);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//发送授权管理员列表请求
|
//发送授权管理员列表请求
|
||||||
Future<void> sendElectronicKeyRequest() async {
|
Future<void> sendElectronicKeyRequest(BuildContext widgetContext) async {
|
||||||
String getFailureDateTime = '0';
|
String getFailureDateTime = '0';
|
||||||
String getEffectiveDateTime = '0';
|
String getEffectiveDateTime = '0';
|
||||||
String lockID = state.keyInfo.value.lockId.toString();
|
String lockID = state.keyInfo.value.lockId.toString();
|
||||||
String getKeyType = (int.parse(state.type.value) + 1).toString();
|
String getKeyType = (int.parse(state.type.value) + 1).toString();
|
||||||
if (state.type.value == '0') {
|
if (state.type.value == '0') {
|
||||||
getFailureDateTime = state.failureDateTime.value.millisecondsSinceEpoch.toString();
|
getFailureDateTime =
|
||||||
|
state.failureDateTime.value.millisecondsSinceEpoch.toString();
|
||||||
getEffectiveDateTime =
|
getEffectiveDateTime =
|
||||||
state.effectiveDateTime.value.millisecondsSinceEpoch.toString();
|
state.effectiveDateTime.value.millisecondsSinceEpoch.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
var entity = await ApiRepository.to.sendElectronicKey(
|
var entity = await ApiRepository.to.sendElectronicKey(
|
||||||
state.isCreateUser.value ? "1" : "0",
|
createUser: state.isCreateUser.value ? "1" : "0",
|
||||||
state.countryCode.value,
|
countryCode: state.countryCode.value,
|
||||||
'1',
|
usernameType: '1',
|
||||||
getFailureDateTime,
|
endDate: getFailureDateTime,
|
||||||
state.isAuthentication.value == true ? '1' : '2',
|
faceAuthentication: state.isAuthentication.value == true ? '1' : '2',
|
||||||
'2',
|
isCameraEnable: '2',
|
||||||
'2',
|
isRemoteUnlock: '2',
|
||||||
state.keyNameController.text,
|
keyNameForAdmin: state.keyNameController.text,
|
||||||
'1',
|
keyRight: '1',
|
||||||
getKeyType,
|
keyType: getKeyType,
|
||||||
lockID,
|
lockId: lockID,
|
||||||
'',
|
operatorUid: '',
|
||||||
state.emailOrPhoneController.text,
|
receiverUsername: state.emailOrPhoneController.text,
|
||||||
'',
|
remarks: '',
|
||||||
getEffectiveDateTime,
|
startDate: getEffectiveDateTime,
|
||||||
state.weekdaysList);
|
weekDays: state.weekdaysList);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
print('发送电子钥匙成功');
|
print('发送电子钥匙成功');
|
||||||
state.isSendSuccess.value = true;
|
state.isSendSuccess.value = true;
|
||||||
@ -260,15 +267,48 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
state.addUserId.value = entity.data!.receiverUser!.id.toString();
|
state.addUserId.value = entity.data!.receiverUser!.id.toString();
|
||||||
addUserConnectBlue(state.addUserId.value);
|
addUserConnectBlue(state.addUserId.value);
|
||||||
} else {
|
} else {
|
||||||
// Toast.show(msg: '${entity.errorMsg}');
|
|
||||||
if (entity.errorCode == 425) {
|
if (entity.errorCode == 425) {
|
||||||
//用户未注册
|
//用户未注册
|
||||||
state.isCreateUser.value = true;
|
_showDialog(widgetContext, '${entity.errorMsg}');
|
||||||
sendElectronicKeyRequest();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//用户未注册确认弹窗
|
||||||
|
void _showDialog(widgetContext, String errMsg) {
|
||||||
|
showCupertinoDialog(
|
||||||
|
context: widgetContext,
|
||||||
|
builder: (context) {
|
||||||
|
return CupertinoAlertDialog(
|
||||||
|
title: const Text('接收者号码未注册,请选择号码所在的国家并重新发送'),
|
||||||
|
actions: [
|
||||||
|
CupertinoDialogAction(
|
||||||
|
child: Text(TranslationLoader.lanKeys!.cancel!.tr),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
CupertinoDialogAction(
|
||||||
|
child: Text(TranslationLoader.lanKeys!.selet!.tr),
|
||||||
|
onPressed: () async {
|
||||||
|
//选择国家代码
|
||||||
|
state.isCreateUser.value = true;
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
|
||||||
|
var result = await Get.toNamed(Routers.seletCountryRegionPage);
|
||||||
|
if (result != null) {
|
||||||
|
result as Map<String, dynamic>;
|
||||||
|
state.countryCode.value = result['code'];
|
||||||
|
state.countryName.value = result['countryName'];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onReady() {
|
void onReady() {
|
||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
|
|||||||
@ -202,7 +202,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
|
|||||||
if (state.emailOrPhoneController.text.isNotEmpty &&
|
if (state.emailOrPhoneController.text.isNotEmpty &&
|
||||||
state.keyNameController.value.text.isNotEmpty) {
|
state.keyNameController.value.text.isNotEmpty) {
|
||||||
// logic.addUserConnectBlue();
|
// logic.addUserConnectBlue();
|
||||||
logic.sendElectronicKeyRequest();
|
logic.sendElectronicKeyRequest(context);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
Container(
|
Container(
|
||||||
@ -358,11 +358,15 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage> {
|
|||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
Contact? contact =
|
Contact? currentContact =
|
||||||
await state.contactPicker.selectContact();
|
await state.contactPicker.selectContact();
|
||||||
setState(() {
|
setState(() {
|
||||||
state.contact = contact!;
|
state.contact = currentContact!;
|
||||||
// print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
|
if (currentContact.phoneNumbers!.isNotEmpty) {
|
||||||
|
state.emailOrPhoneController.text = currentContact
|
||||||
|
.phoneNumbers![0]
|
||||||
|
.replaceAll(RegExp(r"\s+\b|\b\s"), "");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity
|
|||||||
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
|
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
import 'package:star_lock/tools/noData.dart';
|
||||||
|
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
@ -116,32 +117,34 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
|
|
||||||
Widget _buildMainUI(itemData) {
|
Widget _buildMainUI(itemData) {
|
||||||
List<ElectronicKeyListItem> getItemData = itemData;
|
List<ElectronicKeyListItem> getItemData = itemData;
|
||||||
return ListView.builder(
|
return getItemData.isEmpty
|
||||||
itemCount: getItemData.length,
|
? const NoData()
|
||||||
itemBuilder: (c, index) {
|
: ListView.builder(
|
||||||
ElectronicKeyListItem indexEntity = getItemData[index];
|
itemCount: getItemData.length,
|
||||||
String useDateStr = ''; //使用期限
|
itemBuilder: (c, index) {
|
||||||
String keyStatus = ''; //钥匙状态
|
ElectronicKeyListItem indexEntity = getItemData[index];
|
||||||
|
String useDateStr = ''; //使用期限
|
||||||
|
String keyStatus = ''; //钥匙状态
|
||||||
|
|
||||||
//使用期限
|
//使用期限
|
||||||
useDateStr = getUseDateStr(indexEntity);
|
useDateStr = getUseDateStr(indexEntity);
|
||||||
|
|
||||||
//钥匙状态
|
//钥匙状态
|
||||||
keyStatus = getKeyStatus(indexEntity.keyStatus);
|
keyStatus = getKeyStatus(indexEntity.keyStatus);
|
||||||
|
|
||||||
//是否为管理钥匙
|
//是否为管理钥匙
|
||||||
bool isAdminKey = false;
|
bool isAdminKey = false;
|
||||||
if (indexEntity.keyRight == 1) {
|
if (indexEntity.keyRight == 1) {
|
||||||
isAdminKey = true;
|
isAdminKey = true;
|
||||||
} else {
|
} else {
|
||||||
isAdminKey = false;
|
isAdminKey = false;
|
||||||
}
|
}
|
||||||
return _electronicKeyItem('images/controls_user.png',
|
return _electronicKeyItem('images/controls_user.png',
|
||||||
indexEntity.keyName!, useDateStr, keyStatus, isAdminKey, () {
|
indexEntity.keyName!, useDateStr, keyStatus, isAdminKey, () {
|
||||||
Navigator.pushNamed(context, Routers.electronicKeyDetailPage,
|
Navigator.pushNamed(context, Routers.electronicKeyDetailPage,
|
||||||
arguments: {'itemData': indexEntity});
|
arguments: {'itemData': indexEntity});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//使用期限
|
//使用期限
|
||||||
|
|||||||
@ -26,6 +26,7 @@ class VolumeAuthorizationLockPage extends StatefulWidget {
|
|||||||
_VolumeAuthorizationLockPageState();
|
_VolumeAuthorizationLockPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//批量授权锁页面
|
||||||
class _VolumeAuthorizationLockPageState
|
class _VolumeAuthorizationLockPageState
|
||||||
extends State<VolumeAuthorizationLockPage> {
|
extends State<VolumeAuthorizationLockPage> {
|
||||||
final FlutterContactPicker _contactPicker = FlutterContactPicker();
|
final FlutterContactPicker _contactPicker = FlutterContactPicker();
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import 'package:star_lock/app_settings/app_colors.dart';
|
|||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
import 'package:star_lock/tools/noData.dart';
|
||||||
import 'package:star_lock/tools/submitBtn.dart';
|
import 'package:star_lock/tools/submitBtn.dart';
|
||||||
import 'package:star_lock/translations/trans_lib.dart';
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
@ -56,16 +57,19 @@ class _LockUserListPageState extends State<LockUserListPage> {
|
|||||||
height: 20.h,
|
height: 20.h,
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView.separated(
|
child: dataList.isEmpty
|
||||||
itemBuilder: (context, index) {
|
? const NoData()
|
||||||
LockUserData indexEntity = dataList[index];
|
: ListView.separated(
|
||||||
return _electronicKeyItem(indexEntity);
|
itemBuilder: (context, index) {
|
||||||
},
|
LockUserData indexEntity = dataList[index];
|
||||||
itemCount: dataList.length,
|
return _electronicKeyItem(indexEntity);
|
||||||
separatorBuilder: (context, index) {
|
},
|
||||||
return const Divider(height: 1, color: AppColors.greyLineColor);
|
itemCount: dataList.length,
|
||||||
},
|
separatorBuilder: (context, index) {
|
||||||
)),
|
return const Divider(
|
||||||
|
height: 1, color: AppColors.greyLineColor);
|
||||||
|
},
|
||||||
|
)),
|
||||||
Container(
|
Container(
|
||||||
height: 120.h,
|
height: 120.h,
|
||||||
padding: EdgeInsets.only(left: 20.w, right: 20.w, top: 0.h),
|
padding: EdgeInsets.only(left: 20.w, right: 20.w, top: 0.h),
|
||||||
|
|||||||
@ -122,6 +122,11 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
selectGroupIdList.add(index);
|
selectGroupIdList.add(index);
|
||||||
clickIndex = index;
|
clickIndex = index;
|
||||||
|
//是否选中组
|
||||||
|
if (itemData.isChecked) {
|
||||||
|
// lockItemList[selectIndex] =
|
||||||
|
}
|
||||||
|
print('选中了么0');
|
||||||
},
|
},
|
||||||
typeImgList: const [],
|
typeImgList: const [],
|
||||||
groupItem: itemData,
|
groupItem: itemData,
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get_utils/get_utils.dart';
|
import 'package:get/get_utils/get_utils.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart';
|
||||||
@ -9,6 +10,8 @@ class MassSendReceiverCell extends StatelessWidget {
|
|||||||
final int currentIndex;
|
final int currentIndex;
|
||||||
LockUserData userData;
|
LockUserData userData;
|
||||||
final VoidCallback clickDeleteUser;
|
final VoidCallback clickDeleteUser;
|
||||||
|
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
||||||
|
late Contact contact;
|
||||||
|
|
||||||
MassSendReceiverCell(int index,
|
MassSendReceiverCell(int index,
|
||||||
{Key? key,
|
{Key? key,
|
||||||
@ -138,10 +141,14 @@ class MassSendReceiverCell extends StatelessWidget {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
// Contact? currentContact =
|
// Contact? currentContact =
|
||||||
// await _contactPicker.selectContact();
|
// await contactPicker.selectContact();
|
||||||
// setState(() {
|
// setState(() {
|
||||||
// _contact = currentContact!;
|
// state.contact = currentContact!;
|
||||||
// // print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
|
// if (currentContact.phoneNumbers!.isNotEmpty) {
|
||||||
|
// state.emailOrPhoneController.text = currentContact
|
||||||
|
// .phoneNumbers![0]
|
||||||
|
// .replaceAll(RegExp(r"\s+\b|\b\s"), "");
|
||||||
|
// }
|
||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,13 +1,18 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:get/get_utils/get_utils.dart';
|
||||||
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_state.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_state.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
import 'package:star_lock/tools/toast.dart';
|
import 'package:star_lock/tools/toast.dart';
|
||||||
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
class SendElectronicKeyLogic extends BaseGetXController {
|
class SendElectronicKeyLogic extends BaseGetXController {
|
||||||
final SendElectronicKeyState state = SendElectronicKeyState();
|
final SendElectronicKeyState state = SendElectronicKeyState();
|
||||||
|
|
||||||
//发送钥匙请求
|
//发送钥匙请求
|
||||||
Future<void> sendElectronicKeyRequest() async {
|
Future<void> sendElectronicKeyRequest(BuildContext widgetContext) async {
|
||||||
String getFailureDateTime = '0';
|
String getFailureDateTime = '0';
|
||||||
String getEffectiveDateTime = '0';
|
String getEffectiveDateTime = '0';
|
||||||
String lockID = state.keyInfo.value.lockId.toString();
|
String lockID = state.keyInfo.value.lockId.toString();
|
||||||
@ -18,33 +23,67 @@ class SendElectronicKeyLogic extends BaseGetXController {
|
|||||||
getEffectiveDateTime =
|
getEffectiveDateTime =
|
||||||
state.effectiveDateTime.value.millisecondsSinceEpoch.toString();
|
state.effectiveDateTime.value.millisecondsSinceEpoch.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
var entity = await ApiRepository.to.sendElectronicKey(
|
var entity = await ApiRepository.to.sendElectronicKey(
|
||||||
state.isCreateUser.value ? "1" : "0",
|
createUser: state.isCreateUser.value ? "1" : "0",
|
||||||
state.countryCode.value,
|
countryCode: state.countryCode.value,
|
||||||
'1',
|
usernameType: '1',
|
||||||
getFailureDateTime,
|
endDate: getFailureDateTime,
|
||||||
state.isAuthentication.value == true ? '1' : '2',
|
faceAuthentication: state.isAuthentication.value == true ? '1' : '2',
|
||||||
'2',
|
isCameraEnable: '2',
|
||||||
state.isRemoteUnlock.value == true ? '1' : '2',
|
isRemoteUnlock: state.isRemoteUnlock.value == true ? '1' : '2',
|
||||||
state.keyNameController.text,
|
keyNameForAdmin: state.keyNameController.text,
|
||||||
'0',
|
keyRight: '0',
|
||||||
getKeyType,
|
keyType: getKeyType,
|
||||||
lockID,
|
lockId: lockID,
|
||||||
'',
|
operatorUid: '',
|
||||||
state.emailOrPhoneController.text,
|
receiverUsername: state.emailOrPhoneController.text,
|
||||||
'',
|
remarks: '',
|
||||||
getEffectiveDateTime,
|
startDate: getEffectiveDateTime,
|
||||||
state.weekdaysList);
|
weekDays: state.weekdaysList);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
print('发送电子钥匙成功');
|
print('发送电子钥匙成功');
|
||||||
state.isSendSuccess.value = true;
|
state.isSendSuccess.value = true;
|
||||||
} else {
|
} else {
|
||||||
Toast.show(msg: '${entity.errorMsg}');
|
|
||||||
if (entity.errorCode == 425) {
|
if (entity.errorCode == 425) {
|
||||||
//用户未注册
|
//用户未注册
|
||||||
state.isCreateUser.value = true;
|
_showDialog(widgetContext, '${entity.errorMsg}');
|
||||||
sendElectronicKeyRequest();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//用户未注册确认弹窗
|
||||||
|
void _showDialog(widgetContext, String errMsg) {
|
||||||
|
showCupertinoDialog(
|
||||||
|
context: widgetContext,
|
||||||
|
builder: (context) {
|
||||||
|
return CupertinoAlertDialog(
|
||||||
|
title: const Text('接收者号码未注册,请选择号码所在的国家并重新发送'),
|
||||||
|
actions: [
|
||||||
|
CupertinoDialogAction(
|
||||||
|
child: Text(TranslationLoader.lanKeys!.cancel!.tr),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
CupertinoDialogAction(
|
||||||
|
child: Text(TranslationLoader.lanKeys!.selet!.tr),
|
||||||
|
onPressed: () async {
|
||||||
|
//选择国家代码
|
||||||
|
state.isCreateUser.value = true;
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
|
||||||
|
var result = await Get.toNamed(Routers.seletCountryRegionPage);
|
||||||
|
if (result != null) {
|
||||||
|
result as Map<String, dynamic>;
|
||||||
|
state.countryCode.value = result['code'];
|
||||||
|
state.countryName.value = result['countryName'];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -201,7 +201,9 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
|||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
width: 60.w, height: 50.h, child: _remoteSwitch(false)),
|
width: 60.w, height: 50.h, child: _remoteSwitch(false)),
|
||||||
action: () {}),
|
action: () {
|
||||||
|
// Toast.show(msg: '此功能暂未开放');
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -260,12 +262,12 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
|||||||
if (state.failureDateTime.value
|
if (state.failureDateTime.value
|
||||||
.compareTo(state.effectiveDateTime.value) ==
|
.compareTo(state.effectiveDateTime.value) ==
|
||||||
1) {
|
1) {
|
||||||
logic.sendElectronicKeyRequest();
|
logic.sendElectronicKeyRequest(context);
|
||||||
} else {
|
} else {
|
||||||
Toast.show(msg: '失效时间需大于生效时间');
|
Toast.show(msg: '失效时间需大于生效时间');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logic.sendElectronicKeyRequest();
|
logic.sendElectronicKeyRequest(context);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.show(msg: '请完善信息');
|
Toast.show(msg: '请完善信息');
|
||||||
@ -428,7 +430,11 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
|||||||
await state.contactPicker.selectContact();
|
await state.contactPicker.selectContact();
|
||||||
setState(() {
|
setState(() {
|
||||||
state.contact = currentContact!;
|
state.contact = currentContact!;
|
||||||
// print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
|
if (currentContact.phoneNumbers!.isNotEmpty) {
|
||||||
|
state.emailOrPhoneController.text = currentContact
|
||||||
|
.phoneNumbers![0]
|
||||||
|
.replaceAll(RegExp(r"\s+\b|\b\s"), "");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/tools/noData.dart';
|
||||||
|
|
||||||
import '../../../../../app_settings/app_colors.dart';
|
import '../../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../../tools/titleAppBar.dart';
|
import '../../../../../tools/titleAppBar.dart';
|
||||||
@ -14,6 +15,7 @@ class NearbyDoorMagneticPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _NearbyDoorMagneticPageState extends State<NearbyDoorMagneticPage> {
|
class _NearbyDoorMagneticPageState extends State<NearbyDoorMagneticPage> {
|
||||||
|
List dataList = [];
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@ -22,13 +24,16 @@ class _NearbyDoorMagneticPageState extends State<NearbyDoorMagneticPage> {
|
|||||||
barTitle: TranslationLoader.lanKeys!.nearbyEquipment!.tr,
|
barTitle: TranslationLoader.lanKeys!.nearbyEquipment!.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: ListView.builder(
|
body: dataList.isEmpty
|
||||||
itemCount: 20,
|
? const NoData()
|
||||||
itemBuilder: (c, index) {
|
: ListView.builder(
|
||||||
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", () {
|
itemCount: dataList.length,
|
||||||
// Navigator.pushNamed(context, Routers.saveLockPage);
|
itemBuilder: (c, index) {
|
||||||
});
|
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240",
|
||||||
}),
|
() {
|
||||||
|
// Navigator.pushNamed(context, Routers.saveLockPage);
|
||||||
|
});
|
||||||
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -66,42 +66,65 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
'keyInfo': state.getKeyInfosData.value
|
'keyInfo': state.getKeyInfosData.value
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
SizedBox(height: 10.h,),
|
SizedBox(
|
||||||
|
height: 10.h,
|
||||||
|
),
|
||||||
// 门磁
|
// 门磁
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child:CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.doorMagnetic!.tr,
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.doorMagnetic!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
// Get.toNamed(Routers.doorMagneticPage);
|
Get.toNamed(Routers.doorMagneticPage);
|
||||||
Toast.show(msg: "功能暂未开放");
|
// Toast.show(msg: "功能暂未开放");
|
||||||
})
|
})),
|
||||||
),
|
|
||||||
// 无线键盘
|
// 无线键盘
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.wirelessKeyboard!.tr,
|
TranslationLoader.lanKeys!.wirelessKeyboard!.tr,
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Get.toNamed(Routers.wirelessKeyboardPage);
|
||||||
|
// Toast.show(msg: "功能暂未开放");
|
||||||
|
})),
|
||||||
|
Visibility(
|
||||||
|
visible: true,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: '照明',
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Toast.show(msg: "功能暂未开放");
|
||||||
|
})),
|
||||||
|
Visibility(
|
||||||
|
visible: true,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: '开门器',
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
// Get.toNamed(Routers.wirelessKeyboardPage);
|
|
||||||
Toast.show(msg: "功能暂未开放");
|
Toast.show(msg: "功能暂未开放");
|
||||||
})
|
})),
|
||||||
),
|
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
// 自动闭锁
|
// 自动闭锁
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
||||||
rightTitle: state.getKeyInfosData.value.autoLockTime! > -1
|
rightTitle: state
|
||||||
|
.getKeyInfosData.value.autoLockTime! >
|
||||||
|
-1
|
||||||
? "${state.getKeyInfosData.value.autoLockTime!.toString()}s"
|
? "${state.getKeyInfosData.value.autoLockTime!.toString()}s"
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
@ -109,8 +132,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.automaticBlockingPage,
|
Get.toNamed(Routers.automaticBlockingPage,
|
||||||
arguments: state.getKeyInfosData.value);
|
arguments: state.getKeyInfosData.value);
|
||||||
}))
|
}))),
|
||||||
),
|
|
||||||
// 锁声音
|
// 锁声音
|
||||||
Obx(() {
|
Obx(() {
|
||||||
var titleStr = "";
|
var titleStr = "";
|
||||||
@ -145,144 +167,144 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.lockSoundSetPage,
|
Get.toNamed(Routers.lockSoundSetPage,
|
||||||
arguments: state.getKeyInfosData.value);
|
arguments: state.getKeyInfosData.value);
|
||||||
})
|
}));
|
||||||
);
|
|
||||||
}),
|
}),
|
||||||
// 防撬报警
|
// 防撬报警
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.burglarAlarm!.tr,
|
leftTitel:
|
||||||
rightTitle: state.getKeyInfosData.value.tamperAlert == 1
|
TranslationLoader.lanKeys!.burglarAlarm!.tr,
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
rightTitle:
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
state.getKeyInfosData.value.tamperAlert == 1
|
||||||
isHaveLine: true,
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
isHaveDirection: true,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
action: () {
|
isHaveLine: true,
|
||||||
Get.toNamed(Routers.burglarAlarmPage,
|
isHaveDirection: true,
|
||||||
arguments: state.getKeyInfosData.value);
|
action: () {
|
||||||
}))),
|
Get.toNamed(Routers.burglarAlarmPage,
|
||||||
|
arguments: state.getKeyInfosData.value);
|
||||||
|
}))),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
// 常开模式
|
// 常开模式
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
||||||
rightTitle: state.getKeyInfosData.value.passageMode == 1
|
rightTitle:
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
state.getKeyInfosData.value.passageMode == 1
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
isHaveLine: true,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
isHaveDirection: true,
|
isHaveLine: true,
|
||||||
action: () {
|
isHaveDirection: true,
|
||||||
Get.toNamed(Routers.normallyOpenModePage,
|
action: () {
|
||||||
arguments: state.getKeyInfosData.value);
|
Get.toNamed(Routers.normallyOpenModePage,
|
||||||
}))
|
arguments: state.getKeyInfosData.value);
|
||||||
),
|
}))),
|
||||||
// 远程开锁
|
// 远程开锁
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible:true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.remoteUnlocking!.tr,
|
leftTitel:
|
||||||
rightTitle: state.getKeyInfosData.value.remoteEnable == 1
|
TranslationLoader.lanKeys!.remoteUnlocking!.tr,
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
rightTitle:
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
state.getKeyInfosData.value.remoteEnable == 1
|
||||||
isHaveLine: true,
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
isHaveDirection: true,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
action: () {
|
isHaveLine: true,
|
||||||
Get.toNamed(Routers.remoteUnlockingPage,
|
isHaveDirection: true,
|
||||||
arguments: state.getKeyInfosData.value);
|
action: () {
|
||||||
}))
|
Get.toNamed(Routers.remoteUnlockingPage,
|
||||||
),
|
arguments: state.getKeyInfosData.value);
|
||||||
|
}))),
|
||||||
// 重置键
|
// 重置键
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.resetButton!.tr,
|
leftTitel: TranslationLoader.lanKeys!.resetButton!.tr,
|
||||||
rightTitle: state.getKeyInfosData.value.resetButton == 1
|
rightTitle:
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
state.getKeyInfosData.value.resetButton == 1
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
isHaveLine: true,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
isHaveDirection: true,
|
isHaveLine: true,
|
||||||
action: () {
|
isHaveDirection: true,
|
||||||
Get.toNamed(Routers.resetButtonPage,
|
action: () {
|
||||||
arguments: state.getKeyInfosData.value);
|
Get.toNamed(Routers.resetButtonPage,
|
||||||
}))
|
arguments: state.getKeyInfosData.value);
|
||||||
),
|
}))),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
//---田总新增展示
|
//---田总新增展示
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: '面容开锁',
|
leftTitel: '面容开锁',
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget:
|
rightWidget: SizedBox(
|
||||||
SizedBox(width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: '感应距离',
|
leftTitel: '感应距离',
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Toast.show(msg: "功能暂未开放");
|
||||||
}
|
})),
|
||||||
)),
|
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: '自动亮屏',
|
leftTitel: '自动亮屏',
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget:
|
rightWidget: SizedBox(
|
||||||
SizedBox(width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: '逗留警告',
|
leftTitel: '逗留警告',
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget:
|
rightWidget: SizedBox(
|
||||||
SizedBox(width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: '异常警告',
|
leftTitel: '异常警告',
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget:
|
rightWidget: SizedBox(
|
||||||
SizedBox(width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: '开门方向设置',
|
leftTitel: '开门方向设置',
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () {
|
action: () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Toast.show(msg: "功能暂未开放");
|
||||||
}
|
})),
|
||||||
)),
|
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: '电机功率设置',
|
leftTitel: '电机功率设置',
|
||||||
@ -291,8 +313,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Toast.show(msg: "功能暂未开放");
|
||||||
}
|
})),
|
||||||
)),
|
|
||||||
// ),
|
// ),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
//-----新增至此
|
//-----新增至此
|
||||||
@ -307,42 +328,41 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.markedHouseState!.tr,
|
TranslationLoader.lanKeys!.markedHouseState!.tr,
|
||||||
rightTitle: title,
|
rightTitle: title,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.markedHouseStatePage,
|
Get.toNamed(Routers.markedHouseStatePage,
|
||||||
arguments: state.getKeyInfosData.value);
|
arguments: state.getKeyInfosData.value);
|
||||||
})
|
}));
|
||||||
);
|
|
||||||
}),
|
}),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr,
|
leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget:
|
rightWidget: SizedBox(
|
||||||
SizedBox(width: 60.w, child: _openCheckInSwitch())
|
width: 60.w, child: _openCheckInSwitch()))),
|
||||||
)),
|
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.unlockReminder!.tr,
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.unlockReminder!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget:
|
rightWidget: SizedBox(
|
||||||
SizedBox(width: 60.w, child: _lockRemindSwitch()))),
|
width: 60.w, child: _lockRemindSwitch()))),
|
||||||
// ),
|
// ),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader
|
leftTitel: TranslationLoader
|
||||||
@ -355,20 +375,20 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.lockTime!.tr,
|
leftTitel: TranslationLoader.lanKeys!.lockTime!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.lockTimePage,
|
Get.toNamed(Routers.lockTimePage,
|
||||||
arguments: state.getKeyInfosData.value);
|
arguments: state.getKeyInfosData.value);
|
||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.diagnose!.tr,
|
leftTitel: TranslationLoader.lanKeys!.diagnose!.tr,
|
||||||
@ -381,7 +401,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.uploadData!.tr,
|
leftTitel: TranslationLoader.lanKeys!.uploadData!.tr,
|
||||||
@ -393,11 +413,11 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel:
|
leftTitel: TranslationLoader
|
||||||
TranslationLoader.lanKeys!.importOtherLockData!.tr,
|
.lanKeys!.importOtherLockData!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
@ -406,10 +426,11 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.lockEscalation!.tr,
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.lockEscalation!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
@ -419,7 +440,8 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
// ),
|
// ),
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 30.h),
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 30.h),
|
padding:
|
||||||
|
EdgeInsets.only(left: 20.w, right: 20.w, bottom: 30.h),
|
||||||
child: SubmitBtn(
|
child: SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||||
isDelete: true,
|
isDelete: true,
|
||||||
|
|||||||
@ -78,15 +78,15 @@ class _AddWirelessKeyboardPageState extends State<AddWirelessKeyboardPage> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 20.h,
|
height: 20.h,
|
||||||
),
|
),
|
||||||
Container(
|
// Container(
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
// margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||||
child: SubmitBtn(
|
// child: SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.theScreenNeverFlickered!.tr,
|
// btnName: TranslationLoader.lanKeys!.theScreenNeverFlickered!.tr,
|
||||||
onClick: () {
|
// onClick: () {
|
||||||
Navigator.pushNamed(
|
// Navigator.pushNamed(
|
||||||
context, Routers.addWirelessKeyboardScreenNotLightOnPage);
|
// context, Routers.addWirelessKeyboardScreenNotLightOnPage);
|
||||||
}),
|
// }),
|
||||||
),
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/tools/noData.dart';
|
||||||
|
|
||||||
import '../../../../../app_settings/app_colors.dart';
|
import '../../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../../tools/titleAppBar.dart';
|
import '../../../../../tools/titleAppBar.dart';
|
||||||
@ -15,6 +16,7 @@ class SeletWirelessKeyboardPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _SeletWirelessKeyboardPageState extends State<SeletWirelessKeyboardPage> {
|
class _SeletWirelessKeyboardPageState extends State<SeletWirelessKeyboardPage> {
|
||||||
|
List dataList = [];
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@ -24,13 +26,16 @@ class _SeletWirelessKeyboardPageState extends State<SeletWirelessKeyboardPage> {
|
|||||||
"${TranslationLoader.lanKeys!.selet!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}",
|
"${TranslationLoader.lanKeys!.selet!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}",
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: ListView.builder(
|
body: dataList.isEmpty
|
||||||
itemCount: 20,
|
? const NoData()
|
||||||
itemBuilder: (c, index) {
|
: ListView.builder(
|
||||||
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", () {
|
itemCount: 20,
|
||||||
// Navigator.pushNamed(context, Routers.saveLockPage);
|
itemBuilder: (c, index) {
|
||||||
});
|
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240",
|
||||||
}),
|
() {
|
||||||
|
// Navigator.pushNamed(context, Routers.saveLockPage);
|
||||||
|
});
|
||||||
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/tools/noData.dart';
|
||||||
|
|
||||||
import '../../../../../appRouters.dart';
|
import '../../../../../appRouters.dart';
|
||||||
import '../../../../../app_settings/app_colors.dart';
|
import '../../../../../app_settings/app_colors.dart';
|
||||||
@ -17,6 +18,7 @@ class WirelessKeyboardPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
|
class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
|
||||||
|
List dataList = [];
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@ -55,14 +57,16 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildMainUI() {
|
Widget _buildMainUI() {
|
||||||
return ListView.builder(
|
return dataList.isEmpty
|
||||||
itemCount: 10,
|
? const NoData()
|
||||||
itemBuilder: (c, index) {
|
: ListView.builder(
|
||||||
return _electronicKeyItem('images/icon_password.png', "张三",
|
itemCount: 10,
|
||||||
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
itemBuilder: (c, index) {
|
||||||
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
return _electronicKeyItem('images/icon_password.png', "张三",
|
||||||
});
|
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||||
});
|
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
|
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
|
||||||
|
|||||||
@ -86,7 +86,7 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
|
|||||||
// KeyInfos keyInfo = widget.lockMainEntity.data!.keyInfos![0];
|
// KeyInfos keyInfo = widget.lockMainEntity.data!.keyInfos![0];
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 50.h),
|
||||||
Stack(
|
Stack(
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
children: [
|
children: [
|
||||||
@ -120,7 +120,7 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
|
|||||||
Container(
|
Container(
|
||||||
// width: 1.sw,
|
// width: 1.sw,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
height: 280.w,
|
height: 330.w,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
@ -131,8 +131,11 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
|
|||||||
// logic.editLockUserAction();
|
// logic.editLockUserAction();
|
||||||
// logic.factoryDataResetAction();
|
// logic.factoryDataResetAction();
|
||||||
},
|
},
|
||||||
child: Image.asset('images/main/icon_main_openLockBtn.png',
|
child: Image.asset(
|
||||||
width: 268.w, height: 268.w),
|
'images/main/icon_main_openLockBtn.png',
|
||||||
|
width: 330.w,
|
||||||
|
height: 330.w,
|
||||||
|
),
|
||||||
)),
|
)),
|
||||||
// Visibility(
|
// Visibility(
|
||||||
// visible:
|
// visible:
|
||||||
@ -150,21 +153,21 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 30.h,
|
height: 30.h,
|
||||||
),
|
),
|
||||||
Row(
|
// Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
// children: [
|
||||||
Text(
|
// Text(
|
||||||
'门已上锁',
|
// '门已上锁',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
fontSize: 26.sp,
|
// fontSize: 26.sp,
|
||||||
color: Colors.black,
|
// color: Colors.black,
|
||||||
fontWeight: FontWeight.w500),
|
// fontWeight: FontWeight.w500),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
SizedBox(
|
// SizedBox(
|
||||||
height: 6.h,
|
// height: 6.h,
|
||||||
),
|
// ),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@ -187,14 +190,15 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
|
|||||||
'images/icon_electronicKey_admin.png',
|
'images/icon_electronicKey_admin.png',
|
||||||
width: 24.w,
|
width: 24.w,
|
||||||
height: 20.w,
|
height: 20.w,
|
||||||
|
color: AppColors.mainColor, //应根据状态显示(当前角色为超级管理员 应显示蓝色图标)
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 6.w,
|
width: 6.w,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'超级管理员',
|
'超级管理员',
|
||||||
style:
|
style: TextStyle(
|
||||||
TextStyle(fontSize: 20.sp, color: AppColors.btnDisableColor),
|
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 80.w,
|
width: 80.w,
|
||||||
@ -265,10 +269,10 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
|
|||||||
bottomItem('images/main/icon_main_electronicKey.png',
|
bottomItem('images/main/icon_main_electronicKey.png',
|
||||||
TranslationLoader.lanKeys!.electronicKey!.tr, () {
|
TranslationLoader.lanKeys!.electronicKey!.tr, () {
|
||||||
Get.toNamed(Routers.electronicKeyListPage, arguments: {
|
Get.toNamed(Routers.electronicKeyListPage, arguments: {
|
||||||
"lockMainEntity": widget.lockMainEntity,
|
"lockMainEntity": widget.lockMainEntity,
|
||||||
"keyInfo": widget.keyInfo
|
"keyInfo": widget.keyInfo
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// 密码
|
// 密码
|
||||||
bottomItem('images/main/icon_main_password.png',
|
bottomItem('images/main/icon_main_password.png',
|
||||||
@ -280,28 +284,24 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
// ic卡
|
// ic卡
|
||||||
bottomItem('images/main/icon_main_icCard.png', TranslationLoader.lanKeys!.card!.tr, () {
|
bottomItem('images/main/icon_main_icCard.png',
|
||||||
Get.toNamed(Routers.otherTypeKeyListPage, arguments: {
|
TranslationLoader.lanKeys!.card!.tr, () {
|
||||||
"lockId": widget.keyInfo.lockId,
|
Get.toNamed(Routers.otherTypeKeyListPage,
|
||||||
"fromType": 0
|
arguments: {"lockId": widget.keyInfo.lockId, "fromType": 0});
|
||||||
});
|
}),
|
||||||
}),
|
|
||||||
|
|
||||||
// 指纹
|
// 指纹
|
||||||
bottomItem('images/main/icon_main_fingerprint.png', TranslationLoader.lanKeys!.fingerprint!.tr, () {
|
bottomItem('images/main/icon_main_fingerprint.png',
|
||||||
Get.toNamed(Routers.otherTypeKeyListPage, arguments: {
|
TranslationLoader.lanKeys!.fingerprint!.tr, () {
|
||||||
"lockId": widget.keyInfo.lockId,
|
Get.toNamed(Routers.otherTypeKeyListPage,
|
||||||
"fromType": 1
|
arguments: {"lockId": widget.keyInfo.lockId, "fromType": 1});
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// 遥控
|
// 遥控
|
||||||
bottomItem('images/main/icon_main_remoteControl.png', TranslationLoader.lanKeys!.remoteControl!.tr, () {
|
bottomItem('images/main/icon_main_remoteControl.png',
|
||||||
// Get.toNamed(Routers.otherTypeKeyListPage, arguments: {
|
TranslationLoader.lanKeys!.remoteControl!.tr, () {
|
||||||
// "lockId": widget.keyInfo.lockId,
|
Get.toNamed(Routers.otherTypeKeyListPage,
|
||||||
// "fromType": 2
|
arguments: {"lockId": widget.keyInfo.lockId, "fromType": 2});
|
||||||
// });
|
|
||||||
Toast.show(msg: "功能暂未开放");
|
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
showWidgetArr.addAll(defaultWidgetArr);
|
showWidgetArr.addAll(defaultWidgetArr);
|
||||||
@ -345,7 +345,7 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
|
|||||||
bottomItem(
|
bottomItem(
|
||||||
'images/main/icon_main_set.png', TranslationLoader.lanKeys!.set!.tr,
|
'images/main/icon_main_set.png', TranslationLoader.lanKeys!.set!.tr,
|
||||||
() {
|
() {
|
||||||
BlueManage().stopScan();
|
BlueManage().stopScan();
|
||||||
Get.toNamed(Routers.lockSetPage, arguments: widget.keyInfo);
|
Get.toNamed(Routers.lockSetPage, arguments: widget.keyInfo);
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -13,19 +12,19 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
|
|||||||
OtherTypeAddKeyState state = OtherTypeAddKeyState();
|
OtherTypeAddKeyState state = OtherTypeAddKeyState();
|
||||||
|
|
||||||
// 添加指纹
|
// 添加指纹
|
||||||
void addFingerprintsData() async{
|
void addFingerprintsData() async {
|
||||||
var fingerprintType = 0;// 永久:1;限时2,单次3,循环:4
|
var fingerprintType = 0; // 永久:1;限时2,单次3,循环:4
|
||||||
var startDate = "";
|
var startDate = "";
|
||||||
var endDate = "";
|
var endDate = "";
|
||||||
if(state.seletType.value == "0"){
|
if (state.seletType.value == "0") {
|
||||||
fingerprintType = 1;
|
fingerprintType = 1;
|
||||||
}else if(state.seletType.value == "1"){
|
} else if (state.seletType.value == "1") {
|
||||||
fingerprintType = 2;
|
fingerprintType = 2;
|
||||||
if(state.beginTimeTimestamp.value.isEmpty){
|
if (state.beginTimeTimestamp.value.isEmpty) {
|
||||||
Toast.show(msg: "请选择开始时间");
|
Toast.show(msg: "请选择开始时间");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(state.endTimeTimestamp.value.isEmpty){
|
if (state.endTimeTimestamp.value.isEmpty) {
|
||||||
Toast.show(msg: "请选择开始时间");
|
Toast.show(msg: "请选择开始时间");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -35,25 +34,27 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
print("fasdfasdfasdf:${int.parse(state.beginTimeTimestamp.value)} == ${int.parse(state.endTimeTimestamp.value)}");
|
print(
|
||||||
if(int.parse(state.beginTimeTimestamp.value) >= int.parse(state.endTimeTimestamp.value)){
|
"fasdfasdfasdf:${int.parse(state.beginTimeTimestamp.value)} == ${int.parse(state.endTimeTimestamp.value)}");
|
||||||
|
if (int.parse(state.beginTimeTimestamp.value) >=
|
||||||
|
int.parse(state.endTimeTimestamp.value)) {
|
||||||
Toast.show(msg: "失效时间要大于生效时间");
|
Toast.show(msg: "失效时间要大于生效时间");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
startDate = state.beginTimeTimestamp.value;
|
startDate = state.beginTimeTimestamp.value;
|
||||||
endDate = state.endTimeTimestamp.value;
|
endDate = state.endTimeTimestamp.value;
|
||||||
}else if(state.seletType.value == "2"){
|
} else if (state.seletType.value == "2") {
|
||||||
if(state.effectiveDateTime.value <= 0){
|
if (state.effectiveDateTime.value <= 0) {
|
||||||
Toast.show(msg: "请选择生效时间");
|
Toast.show(msg: "请选择生效时间");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(state.failureDateTime.value <= 0){
|
if (state.failureDateTime.value <= 0) {
|
||||||
Toast.show(msg: "请选择失效时间");
|
Toast.show(msg: "请选择失效时间");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(state.weekdaysList.value.isEmpty){
|
if (state.weekdaysList.value.isEmpty) {
|
||||||
Toast.show(msg: "请选择有效日");
|
Toast.show(msg: "请选择有效日");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -63,7 +64,7 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if(state.effectiveDateTime.value >= state.failureDateTime.value){
|
if (state.effectiveDateTime.value >= state.failureDateTime.value) {
|
||||||
Toast.show(msg: "失效时间要大于生效时间");
|
Toast.show(msg: "失效时间要大于生效时间");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -81,7 +82,8 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
|
|||||||
"endDate": endDate,
|
"endDate": endDate,
|
||||||
"addType": "1",
|
"addType": "1",
|
||||||
"cardName": state.nameController.text,
|
"cardName": state.nameController.text,
|
||||||
"cardNumber": (Random().nextInt(100000000) + 10000000).floor().toString(),
|
"cardNumber":
|
||||||
|
(Random().nextInt(100000000) + 10000000).floor().toString(),
|
||||||
"cardType": fingerprintType.toString(),
|
"cardType": fingerprintType.toString(),
|
||||||
"isCoerced": state.isStressFingerprint.value ? "1" : "2",
|
"isCoerced": state.isStressFingerprint.value ? "1" : "2",
|
||||||
"startDate": startDate,
|
"startDate": startDate,
|
||||||
@ -108,6 +110,20 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
// 指纹
|
// 指纹
|
||||||
|
Get.toNamed(Routers.addFingerprintPage, arguments: {
|
||||||
|
"lockId": state.lockId.value,
|
||||||
|
"endDate": endDate,
|
||||||
|
"addType": "1",
|
||||||
|
"fingerprintName": state.nameController.text,
|
||||||
|
"fingerprintNumber": "123456",
|
||||||
|
"fingerprintType": fingerprintType.toString(),
|
||||||
|
"isCoerced": state.isStressFingerprint.value ? "1" : "2",
|
||||||
|
"startDate": startDate,
|
||||||
|
"weekDay": state.weekdaysList.value,
|
||||||
|
"fromType": state.fromType.value,
|
||||||
|
});
|
||||||
|
|
||||||
|
/* 根据田总需求 无需tips页面 直接跳转到添加页面
|
||||||
Get.toNamed(Routers.addFingerprintTipPage, arguments: {
|
Get.toNamed(Routers.addFingerprintTipPage, arguments: {
|
||||||
"lockId": state.lockId.value,
|
"lockId": state.lockId.value,
|
||||||
"endDate": endDate,
|
"endDate": endDate,
|
||||||
@ -120,6 +136,7 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
|
|||||||
"weekDay": state.weekdaysList.value,
|
"weekDay": state.weekdaysList.value,
|
||||||
"fromType": state.fromType.value,
|
"fromType": state.fromType.value,
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
// var entity = await ApiRepository.to.addFingerprintsData(
|
// var entity = await ApiRepository.to.addFingerprintsData(
|
||||||
// lockId: state.lockId.value.toString(),
|
// lockId: state.lockId.value.toString(),
|
||||||
@ -138,34 +155,28 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
|
|||||||
// }
|
// }
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// 遥控
|
// 遥控
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onReady() {
|
void onReady() {
|
||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
// TODO: implement onInit
|
// TODO: implement onInit
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onClose() {
|
void onClose() {
|
||||||
// TODO: implement onClose
|
// TODO: implement onClose
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
|
import 'package:date_format/date_format.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart';
|
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart';
|
||||||
@ -26,6 +28,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
|||||||
PasswordKeyListItem itemData = PasswordKeyListItem();
|
PasswordKeyListItem itemData = PasswordKeyListItem();
|
||||||
late TextEditingController _inputPwdController;
|
late TextEditingController _inputPwdController;
|
||||||
late TextEditingController _inputNameController;
|
late TextEditingController _inputNameController;
|
||||||
|
static const methodChannel = MethodChannel('flutter_native_ios');
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -33,42 +36,14 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
|||||||
|
|
||||||
_inputPwdController = TextEditingController();
|
_inputPwdController = TextEditingController();
|
||||||
_inputNameController = TextEditingController();
|
_inputNameController = TextEditingController();
|
||||||
|
|
||||||
// _initFluwx();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// _initFluwx() async {
|
|
||||||
// await registerWxApi(
|
|
||||||
// appId: "", doOnAndroid: true, doOnIOS: true, universalLink: "");
|
|
||||||
// }
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
dynamic obj = ModalRoute.of(context)?.settings.arguments;
|
dynamic obj = ModalRoute.of(context)?.settings.arguments;
|
||||||
if (obj != null && (obj["itemData"] != null)) {
|
if (obj != null && (obj["itemData"] != null)) {
|
||||||
itemData = obj["itemData"];
|
itemData = obj["itemData"];
|
||||||
}
|
}
|
||||||
List<String> nameItems = <String>[
|
|
||||||
'微信',
|
|
||||||
'朋友圈',
|
|
||||||
'QQ',
|
|
||||||
'QQ空间',
|
|
||||||
'微博',
|
|
||||||
'FaceBook',
|
|
||||||
'邮件',
|
|
||||||
'链接'
|
|
||||||
];
|
|
||||||
List<String> urlItems = <String>[
|
|
||||||
'icon_wechat.png',
|
|
||||||
'icon_wechat_moments.png',
|
|
||||||
'icon_qq.png',
|
|
||||||
'icon_qzone.png',
|
|
||||||
'icon_sina.png',
|
|
||||||
'icon_facebook.png',
|
|
||||||
'icon_email.png',
|
|
||||||
'icon_copylink.png'
|
|
||||||
];
|
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
@ -83,29 +58,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
|||||||
width: 30.w,
|
width: 30.w,
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
/*
|
_openModalBottomSheet();
|
||||||
showModalBottomSheet(
|
|
||||||
context: context,
|
|
||||||
isScrollControlled: true,
|
|
||||||
builder: (context) {
|
|
||||||
return Container(
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
constraints: const BoxConstraints(maxHeight: 700),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Image.asset(
|
|
||||||
'images/icon_wechat.png',
|
|
||||||
width: 50.0,
|
|
||||||
height: 50.0,
|
|
||||||
fit: BoxFit.fill,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
); //设置maxHeight为你想要的数字就行
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -371,91 +324,124 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _shareWidget(BuildContext context) {
|
Future _openModalBottomSheet() async {
|
||||||
List<String> nameItems = <String>[
|
showModalBottomSheet(
|
||||||
'微信',
|
context: context,
|
||||||
'朋友圈',
|
shape: RoundedRectangleBorder(
|
||||||
'QQ',
|
borderRadius: BorderRadiusDirectional.circular(10)),
|
||||||
'QQ空间',
|
constraints: BoxConstraints(maxHeight: 260.h),
|
||||||
'微博',
|
builder: (BuildContext context) {
|
||||||
'FaceBook',
|
return Column(
|
||||||
'邮件',
|
children: [
|
||||||
'链接'
|
SizedBox(
|
||||||
];
|
width: ScreenUtil().screenWidth,
|
||||||
List<String> urlItems = <String>[
|
height: 180.h,
|
||||||
'icon_wechat.png',
|
child: ListView(
|
||||||
'icon_wechat_moments.png',
|
scrollDirection: Axis.horizontal, //横向滚动
|
||||||
'icon_qq.png',
|
children: initBottomSheetList()),
|
||||||
'icon_qzone.png',
|
|
||||||
'icon_sina.png',
|
|
||||||
'icon_facebook.png',
|
|
||||||
'icon_email.png',
|
|
||||||
'icon_copylink.png'
|
|
||||||
];
|
|
||||||
|
|
||||||
return Container(
|
|
||||||
color: Colors.red,
|
|
||||||
height: 250.0,
|
|
||||||
child: GridView.builder(
|
|
||||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
|
||||||
crossAxisCount: 4, mainAxisSpacing: 5.0, childAspectRatio: 1.0),
|
|
||||||
itemBuilder: (BuildContext context, int index) {
|
|
||||||
return Image.asset(
|
|
||||||
'images/${urlItems[index]}',
|
|
||||||
width: 50.0,
|
|
||||||
height: 50.0,
|
|
||||||
fit: BoxFit.fill,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
itemCount: nameItems.length,
|
|
||||||
),
|
|
||||||
/*
|
|
||||||
child: Column(
|
|
||||||
children: <Widget>[
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 0.0),
|
|
||||||
child: SizedBox(
|
|
||||||
height: 190.0,
|
|
||||||
child: GridView.builder(
|
|
||||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
|
||||||
crossAxisCount: 4,
|
|
||||||
mainAxisSpacing: 5.0,
|
|
||||||
childAspectRatio: 1.0),
|
|
||||||
itemBuilder: (BuildContext context, int index) {
|
|
||||||
return Column(
|
|
||||||
children: <Widget>[
|
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsets.fromLTRB(0.0, 6.0, 0.0, 6.0),
|
|
||||||
child: Image.asset(
|
|
||||||
'images/${urlItems[index]}',
|
|
||||||
width: 50.0,
|
|
||||||
height: 50.0,
|
|
||||||
fit: BoxFit.fill,
|
|
||||||
)),
|
|
||||||
Text(nameItems[index])
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
itemCount: nameItems.length,
|
|
||||||
),
|
),
|
||||||
),
|
Container(
|
||||||
),
|
height: 8.h,
|
||||||
Container(
|
color: AppColors.greyBackgroundColor,
|
||||||
height: 0.5,
|
),
|
||||||
color: Colors.blueGrey,
|
TextButton(
|
||||||
),
|
style: ButtonStyle(
|
||||||
const Center(
|
overlayColor:
|
||||||
child: Padding(
|
MaterialStateProperty.all<Color>(Colors.white)),
|
||||||
padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'取 消',
|
'取消',
|
||||||
style: TextStyle(fontSize: 18.0, color: Colors.blueGrey),
|
style: TextStyle(
|
||||||
)),
|
color: Colors.black, fontSize: ScreenUtil().setSp(24)),
|
||||||
)
|
),
|
||||||
],
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Widget> initBottomSheetList() {
|
||||||
|
List<Widget> widgetList = [];
|
||||||
|
|
||||||
|
widgetList.add(buildCenter3('images/icon_wechat.png', '微信好友', 0));
|
||||||
|
widgetList.add(buildCenter3('images/icon_message.png', '短信', 1));
|
||||||
|
widgetList.add(buildCenter3('images/icon_email.png', '邮件', 2));
|
||||||
|
widgetList.add(buildCenter3('images/icon_more.png', '更多', 3));
|
||||||
|
|
||||||
|
return widgetList;
|
||||||
|
}
|
||||||
|
|
||||||
|
GestureDetector buildCenter3(
|
||||||
|
String imageName, String titleStr, int itemIndex) {
|
||||||
|
return GestureDetector(
|
||||||
|
child: Container(
|
||||||
|
width: 120.w,
|
||||||
|
// height: 64.h,
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(top: 20.w, bottom: 20.w, left: 10.w, right: 10.w),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
imageName,
|
||||||
|
width: 50.w,
|
||||||
|
height: 50.h,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16.w,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
titleStr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: ScreenUtil().setSp(20), color: Colors.black),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
*/
|
onTap: () => _jumpSmartDeviceRoute(itemIndex),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_jumpSmartDeviceRoute(int itemIndex) {
|
||||||
|
switch (itemIndex) {
|
||||||
|
case 0:
|
||||||
|
//微信好友
|
||||||
|
{
|
||||||
|
String pwdShareStr =
|
||||||
|
'您好,您的密码是:${itemData.keyboardPwd}\n生效时间:${itemData.startDate}\n类型:永久\n锁名:${itemData.keyboardPwdName}';
|
||||||
|
tokNative('flutter_sharePassword_to_ios',
|
||||||
|
arguments: {'pwdShareStr': pwdShareStr}).then((result) {
|
||||||
|
print('$result');
|
||||||
|
});
|
||||||
|
print('与原生交互');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
//短信
|
||||||
|
{}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
//邮件
|
||||||
|
{
|
||||||
|
Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
//更多
|
||||||
|
{}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<dynamic> tokNative(String method,
|
||||||
|
{required Map arguments}) async {
|
||||||
|
if (arguments == null) {
|
||||||
|
return await methodChannel.invokeMethod(method);
|
||||||
|
} else {
|
||||||
|
return await methodChannel.invokeMethod(method, arguments);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
import 'package:date_format/date_format.dart';
|
import 'package:date_format/date_format.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_pickers/pickers.dart';
|
import 'package:flutter_pickers/pickers.dart';
|
||||||
import 'package:flutter_pickers/style/default_style.dart';
|
import 'package:flutter_pickers/style/default_style.dart';
|
||||||
import 'package:flutter_pickers/time_picker/model/date_mode.dart';
|
import 'package:flutter_pickers/time_picker/model/date_mode.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_logic.dart';
|
import 'package:star_lock/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_logic.dart';
|
||||||
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
|
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
@ -37,6 +39,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
|||||||
final TextEditingController _nameController = TextEditingController();
|
final TextEditingController _nameController = TextEditingController();
|
||||||
final TextEditingController _pwdController = TextEditingController();
|
final TextEditingController _pwdController = TextEditingController();
|
||||||
final logic = Get.put(PasswordKeyPerpetualLogic());
|
final logic = Get.put(PasswordKeyPerpetualLogic());
|
||||||
|
static const methodChannel = MethodChannel('flutter_native_ios');
|
||||||
|
|
||||||
late bool _isSendSuccess; //是否发送成功
|
late bool _isSendSuccess; //是否发送成功
|
||||||
late bool _isPermanent; //是否永久
|
late bool _isPermanent; //是否永久
|
||||||
@ -581,7 +584,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
|||||||
OutLineBtn(
|
OutLineBtn(
|
||||||
btnName: '分享',
|
btnName: '分享',
|
||||||
onClick: () {
|
onClick: () {
|
||||||
Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
|
_openModalBottomSheet();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -644,4 +647,125 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
|||||||
String intToStr(int v) {
|
String intToStr(int v) {
|
||||||
return (v < 10) ? "0$v" : "$v";
|
return (v < 10) ? "0$v" : "$v";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future _openModalBottomSheet() async {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadiusDirectional.circular(10)),
|
||||||
|
constraints: BoxConstraints(maxHeight: 260.h),
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: ScreenUtil().screenWidth,
|
||||||
|
height: 180.h,
|
||||||
|
child: ListView(
|
||||||
|
scrollDirection: Axis.horizontal, //横向滚动
|
||||||
|
children: initBottomSheetList()),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 8.h,
|
||||||
|
color: AppColors.greyBackgroundColor,
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
style: ButtonStyle(
|
||||||
|
overlayColor:
|
||||||
|
MaterialStateProperty.all<Color>(Colors.white)),
|
||||||
|
child: Text(
|
||||||
|
'取消',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black, fontSize: ScreenUtil().setSp(24)),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Widget> initBottomSheetList() {
|
||||||
|
List<Widget> widgetList = [];
|
||||||
|
|
||||||
|
widgetList.add(buildCenter3('images/icon_wechat.png', '微信好友', 0));
|
||||||
|
widgetList.add(buildCenter3('images/icon_message.png', '短信', 1));
|
||||||
|
widgetList.add(buildCenter3('images/icon_email.png', '邮件', 2));
|
||||||
|
widgetList.add(buildCenter3('images/icon_more.png', '更多', 3));
|
||||||
|
|
||||||
|
return widgetList;
|
||||||
|
}
|
||||||
|
|
||||||
|
GestureDetector buildCenter3(
|
||||||
|
String imageName, String titleStr, int itemIndex) {
|
||||||
|
return GestureDetector(
|
||||||
|
child: Container(
|
||||||
|
width: 120.w,
|
||||||
|
// height: 64.h,
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(top: 20.w, bottom: 20.w, left: 10.w, right: 10.w),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
imageName,
|
||||||
|
width: 50.w,
|
||||||
|
height: 50.h,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16.w,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
titleStr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: ScreenUtil().setSp(20), color: Colors.black),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () => _jumpSmartDeviceRoute(itemIndex),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//\n生效时间:${itemData.startDate}\n类型:永久\n锁名:${itemData.keyboardPwdName}
|
||||||
|
_jumpSmartDeviceRoute(int itemIndex) {
|
||||||
|
switch (itemIndex) {
|
||||||
|
case 0:
|
||||||
|
//微信好友
|
||||||
|
{
|
||||||
|
String pwdShareStr = '您好,您的密码是:$_getPwdStr';
|
||||||
|
tokNative('flutter_sharePassword_to_ios',
|
||||||
|
arguments: {'pwdShareStr': pwdShareStr}).then((result) {
|
||||||
|
print('$result');
|
||||||
|
});
|
||||||
|
print('与原生交互');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
//短信
|
||||||
|
{}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
//邮件
|
||||||
|
{
|
||||||
|
Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
//更多
|
||||||
|
{}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<dynamic> tokNative(String method,
|
||||||
|
{required Map arguments}) async {
|
||||||
|
if (arguments == null) {
|
||||||
|
return await methodChannel.invokeMethod(method);
|
||||||
|
} else {
|
||||||
|
return await methodChannel.invokeMethod(method, arguments);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/app_settings/app_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
|
import 'package:star_lock/tools/submitBtn.dart';
|
||||||
|
|
||||||
import '../../../appRouters.dart';
|
import '../../../appRouters.dart';
|
||||||
import '../../../baseWidget.dart';
|
import '../../../baseWidget.dart';
|
||||||
@ -97,7 +98,7 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
|||||||
|
|
||||||
Widget unHaveData() {
|
Widget unHaveData() {
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -105,6 +106,7 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
|||||||
Container(
|
Container(
|
||||||
width: 330.w,
|
width: 330.w,
|
||||||
height: 330.w,
|
height: 330.w,
|
||||||
|
margin: EdgeInsets.only(top: 180.h),
|
||||||
// decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
// border: Border.all(width: 4.w, color: AppColors.mainColor),
|
// border: Border.all(width: 4.w, color: AppColors.mainColor),
|
||||||
// borderRadius: BorderRadius.circular(110.w),
|
// borderRadius: BorderRadius.circular(110.w),
|
||||||
@ -131,11 +133,8 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
|||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(
|
|
||||||
height: h(50.h),
|
|
||||||
),
|
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.all(30.w),
|
padding: EdgeInsets.only(top: 10.h),
|
||||||
child: Text(
|
child: Text(
|
||||||
TranslationLoader
|
TranslationLoader
|
||||||
.lanKeys!.whenAddingLockThePhoneMustBeNextToTheLock!.tr,
|
.lanKeys!.whenAddingLockThePhoneMustBeNextToTheLock!.tr,
|
||||||
@ -143,7 +142,11 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
|||||||
fontSize: 26.sp,
|
fontSize: 26.sp,
|
||||||
// fontWeight: FontWeight.w800,
|
// fontWeight: FontWeight.w800,
|
||||||
color: Colors.black),
|
color: Colors.black),
|
||||||
))
|
)),
|
||||||
|
SizedBox(
|
||||||
|
height: 200.h,
|
||||||
|
),
|
||||||
|
SubmitBtn(btnName: '演示模式')
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,10 +12,14 @@ import '../../translations/trans_lib.dart';
|
|||||||
// 网页的宏定义网址
|
// 网页的宏定义网址
|
||||||
class XSWebviewURLMacro {
|
class XSWebviewURLMacro {
|
||||||
static const baseWebURL = 'https://pre.lock.star-lock.cn:8093'; //baseURL
|
static const baseWebURL = 'https://pre.lock.star-lock.cn:8093'; //baseURL
|
||||||
static const userAgreementURL =
|
static const userAgreementURL = '$baseWebURL/app/userAgreement'; //用户协议
|
||||||
'$baseWebURL/page/detail?pageId=1&lang=cn'; //1用户协议
|
static const privacyPolicyURL = '$baseWebURL/app/privacy'; //隐私政策
|
||||||
static const privacyPolicyURL =
|
static const collectionListURL =
|
||||||
'$baseWebURL/page/detail?pageId=2&lang=cn'; //2隐私政策
|
'$baseWebURL/app/personalInformationCollectionList'; //个人信息收集清单
|
||||||
|
static const thirdPartyInfShareListURL =
|
||||||
|
'$baseWebURL/app/thirdPartyInformationSharingList'; //第三方信息共享清单
|
||||||
|
static const appPermissionDescURL =
|
||||||
|
'$baseWebURL/app/applicationPermissionDescription'; //应用权限说明
|
||||||
}
|
}
|
||||||
|
|
||||||
class AbountPage extends StatefulWidget {
|
class AbountPage extends StatefulWidget {
|
||||||
@ -66,7 +70,11 @@ class _AbountPageState extends State<AbountPage> {
|
|||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||||
|
arguments: {
|
||||||
|
"url": XSWebviewURLMacro.userAgreementURL,
|
||||||
|
"title": '介绍'
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
Divider(
|
Divider(
|
||||||
height: 1,
|
height: 1,
|
||||||
@ -117,7 +125,11 @@ class _AbountPageState extends State<AbountPage> {
|
|||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||||
|
arguments: {
|
||||||
|
"url": XSWebviewURLMacro.collectionListURL,
|
||||||
|
"title": '个人信息收集清单'
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
Divider(
|
Divider(
|
||||||
height: 1,
|
height: 1,
|
||||||
@ -132,7 +144,11 @@ class _AbountPageState extends State<AbountPage> {
|
|||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||||
|
arguments: {
|
||||||
|
"url": XSWebviewURLMacro.appPermissionDescURL,
|
||||||
|
"title": '应用权限说明'
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
Divider(
|
Divider(
|
||||||
height: 1,
|
height: 1,
|
||||||
@ -147,7 +163,11 @@ class _AbountPageState extends State<AbountPage> {
|
|||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(context, Routers.webviewShowPage,
|
||||||
|
arguments: {
|
||||||
|
"url": XSWebviewURLMacro.thirdPartyInfShareListURL,
|
||||||
|
"title": '第三方信息共享清单'
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
23
star_lock/lib/mine/addLock/addLock/addLock_logic.dart
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import 'package:star_lock/mine/addLock/addLock/addLock_state.dart';
|
||||||
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
|
||||||
|
class AddLockLogic extends BaseGetXController {
|
||||||
|
final AddLockState state = AddLockState();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onReady() {
|
||||||
|
// TODO: implement onReady
|
||||||
|
super.onReady();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
// TODO: implement onInit
|
||||||
|
super.onInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onClose() {
|
||||||
|
// TODO: implement onClose
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
|
import 'package:star_lock/mine/addLock/addLock/addLock_logic.dart';
|
||||||
|
|
||||||
import '../../../appRouters.dart';
|
import '../../../appRouters.dart';
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
@ -20,6 +21,9 @@ class AddLockPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _AddLockPageState extends State<AddLockPage> with BaseWidget {
|
class _AddLockPageState extends State<AddLockPage> with BaseWidget {
|
||||||
|
final logic = Get.put(AddLockLogic());
|
||||||
|
final state = Get.find<AddLockLogic>().state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@ -49,11 +53,11 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 120.h,
|
height: 120.h,
|
||||||
),
|
),
|
||||||
Image.asset(
|
Obx(() => Image.asset(
|
||||||
'images/lockType/addLock_touchScreen.png',
|
state.lockTypeImg.value,
|
||||||
width: 278.w,
|
width: 278.w,
|
||||||
height: 278.w,
|
height: 278.w,
|
||||||
),
|
)),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 120.h,
|
height: 120.h,
|
||||||
),
|
),
|
||||||
@ -73,17 +77,16 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget {
|
|||||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||||
borderRadius: 20.w,
|
borderRadius: 20.w,
|
||||||
onClick: () {
|
onClick: () {
|
||||||
if(Platform.isIOS){
|
if (Platform.isIOS) {
|
||||||
Navigator.pushNamed(context, Routers.nearbyLockPage);
|
Navigator.pushNamed(context, Routers.nearbyLockPage);
|
||||||
}else {
|
} else {
|
||||||
getMicrophonePermission()
|
getMicrophonePermission().then((value) {
|
||||||
.then((value) {
|
|
||||||
if (value) {
|
if (value) {
|
||||||
// 有权限
|
// 有权限
|
||||||
Navigator.pushNamed(context, Routers.nearbyLockPage);
|
Navigator.pushNamed(context, Routers.nearbyLockPage);
|
||||||
}else{
|
} else {
|
||||||
//没有权限
|
//没有权限
|
||||||
openAppSettings();//打开app系统设置
|
openAppSettings(); //打开app系统设置
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
29
star_lock/lib/mine/addLock/addLock/addLock_state.dart
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
class AddLockState {
|
||||||
|
var getLockType = 1.obs; //0-所有锁;1-门锁;2-NFC无源锁;3-挂锁;4-保险箱锁;5-车位锁;6-智能门禁;7-网关
|
||||||
|
var lockTypeImg = 'images/lockType/addLock_touchScreen.png'.obs; //不同类型锁图片更换
|
||||||
|
|
||||||
|
AddLockState() {
|
||||||
|
Map map = Get.arguments;
|
||||||
|
if (map.isNotEmpty) {
|
||||||
|
if (map["getLockType"] != null) {
|
||||||
|
getLockType.value = map["getLockType"];
|
||||||
|
//保险箱锁
|
||||||
|
if (getLockType.value == 4) {
|
||||||
|
lockTypeImg.value = "images/lockType/addLock_safeBg.png";
|
||||||
|
} else if (getLockType.value == 5) {
|
||||||
|
//车位锁
|
||||||
|
lockTypeImg.value = "images/lockType/addLock_parkingBg.png";
|
||||||
|
} else if (getLockType.value == 6) {
|
||||||
|
//智能门禁
|
||||||
|
lockTypeImg.value = "images/lockType/addLock_entranceGuardBg.png";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
lockTypeImg.value = 'images/lockType/addLock_touchScreen.png';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
lockTypeImg.value = 'images/lockType/addLock_touchScreen.png';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,6 +1,9 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
|
|
||||||
import '../../../appRouters.dart';
|
import '../../../appRouters.dart';
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
@ -40,33 +43,34 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
|||||||
children: [
|
children: [
|
||||||
lockTypeItem('images/lockType/lockType_doorLock.png',
|
lockTypeItem('images/lockType/lockType_doorLock.png',
|
||||||
TranslationLoader.lanKeys!.doorLock!.tr, () {
|
TranslationLoader.lanKeys!.doorLock!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage,
|
||||||
|
arguments: {'getLockType': 1});
|
||||||
}),
|
}),
|
||||||
lockTypeItem('images/lockType/lockType_NFCLock.png',
|
lockTypeItem('images/lockType/lockType_NFCLock.png',
|
||||||
TranslationLoader.lanKeys!.NFCPassiveLock!.tr, () {
|
TranslationLoader.lanKeys!.NFCPassiveLock!.tr, () {
|
||||||
// Navigator.pushNamed(context, Routers.addLockPage);
|
// Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
Toast.show(msg: "功能暂未开放");
|
getNearByLimits();
|
||||||
}),
|
}),
|
||||||
lockTypeItem('images/lockType/lockType_padlock.png',
|
lockTypeItem('images/lockType/lockType_padlock.png',
|
||||||
TranslationLoader.lanKeys!.padlock!.tr, () {
|
TranslationLoader.lanKeys!.padlock!.tr, () {
|
||||||
// Navigator.pushNamed(context, Routers.addLockPage);
|
// Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
Toast.show(msg: "功能暂未开放");
|
getNearByLimits();
|
||||||
}),
|
}),
|
||||||
lockTypeItem('images/lockType/lockType_safeLock.png',
|
lockTypeItem('images/lockType/lockType_safeLock.png',
|
||||||
TranslationLoader.lanKeys!.safeLock!.tr, () {
|
TranslationLoader.lanKeys!.safeLock!.tr, () {
|
||||||
// Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage,
|
||||||
Toast.show(msg: "功能暂未开放");
|
arguments: {'getLockType': 4});
|
||||||
}),
|
}),
|
||||||
lockTypeItem('images/lockType/lockType_parkingLock.png',
|
lockTypeItem('images/lockType/lockType_parkingLock.png',
|
||||||
TranslationLoader.lanKeys!.parkingLock!.tr, () {
|
TranslationLoader.lanKeys!.parkingLock!.tr, () {
|
||||||
// Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage,
|
||||||
Toast.show(msg: "功能暂未开放");
|
arguments: {'getLockType': 5});
|
||||||
}),
|
}),
|
||||||
lockTypeItem('images/lockType/lockType_entranceGuardLock.png',
|
lockTypeItem('images/lockType/lockType_entranceGuardLock.png',
|
||||||
TranslationLoader.lanKeys!.itelligentAccessControl!.tr,
|
TranslationLoader.lanKeys!.itelligentAccessControl!.tr,
|
||||||
() {
|
() {
|
||||||
// Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage,
|
||||||
Toast.show(msg: "功能暂未开放");
|
arguments: {'getLockType': 6});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// lockTypeItem('images/lockType/lockType_bicycleLock.png',
|
// lockTypeItem('images/lockType/lockType_bicycleLock.png',
|
||||||
@ -76,7 +80,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
|||||||
lockTypeItem('images/lockType/lockType_gatewayLock.png',
|
lockTypeItem('images/lockType/lockType_gatewayLock.png',
|
||||||
TranslationLoader.lanKeys!.gateway!.tr, () {
|
TranslationLoader.lanKeys!.gateway!.tr, () {
|
||||||
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
||||||
Toast.show(msg: "功能暂未开放");
|
getNearByLimits();
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -90,7 +94,8 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
|||||||
Widget allLock() {
|
Widget allLock() {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage,
|
||||||
|
arguments: {'getLockType': 0});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 150.h,
|
height: 150.h,
|
||||||
@ -174,6 +179,41 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//跳转到附近的锁页面先判断权限
|
||||||
|
void getNearByLimits() {
|
||||||
|
if (Platform.isIOS) {
|
||||||
|
Navigator.pushNamed(context, Routers.nearbyLockPage);
|
||||||
|
} else {
|
||||||
|
getMicrophonePermission().then((value) {
|
||||||
|
if (value) {
|
||||||
|
// 有权限
|
||||||
|
Navigator.pushNamed(context, Routers.nearbyLockPage);
|
||||||
|
} else {
|
||||||
|
//没有权限
|
||||||
|
openAppSettings(); //打开app系统设置
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///请求权限
|
||||||
|
Future<bool> getMicrophonePermission() async {
|
||||||
|
// You can request multiple permissions at once.
|
||||||
|
Map<Permission, PermissionStatus> statuses = await [
|
||||||
|
Permission.bluetoothScan,
|
||||||
|
Permission.bluetoothConnect,
|
||||||
|
Permission.location,
|
||||||
|
].request();
|
||||||
|
|
||||||
|
//granted 通过,denied 被拒绝,permanentlyDenied 拒绝且不在提示
|
||||||
|
if (statuses[Permission.bluetoothScan]!.isGranted &&
|
||||||
|
statuses[Permission.bluetoothConnect]!.isGranted &&
|
||||||
|
statuses[Permission.location]!.isGranted) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void onShow() {}
|
void onShow() {}
|
||||||
|
|
||||||
void onHide() {}
|
void onHide() {}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/tools/noData.dart';
|
||||||
|
|
||||||
import '../../appRouters.dart';
|
import '../../appRouters.dart';
|
||||||
import '../../app_settings/app_colors.dart';
|
import '../../app_settings/app_colors.dart';
|
||||||
@ -15,6 +16,7 @@ class MessageListPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MessageListPageState extends State<MessageListPage> {
|
class _MessageListPageState extends State<MessageListPage> {
|
||||||
|
List dataList = [];
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@ -23,14 +25,17 @@ class _MessageListPageState extends State<MessageListPage> {
|
|||||||
barTitle: TranslationLoader.lanKeys!.message!.tr,
|
barTitle: TranslationLoader.lanKeys!.message!.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: ListView.builder(
|
body: dataList.isEmpty
|
||||||
itemCount: 10,
|
? const NoData()
|
||||||
itemBuilder: (c, index) {
|
: ListView.builder(
|
||||||
return _seletGatewayListListItem(
|
itemCount: 10,
|
||||||
'images/controls_user.png', "您的钥匙已发送成功", "2023.6.21 11.15", () {
|
itemBuilder: (c, index) {
|
||||||
// Navigator.pushNamed(context, Routers.gatewayConfigurationWifiPage);
|
return _seletGatewayListListItem(
|
||||||
});
|
'images/controls_user.png', "您的钥匙已发送成功", "2023.6.21 11.15",
|
||||||
}),
|
() {
|
||||||
|
// Navigator.pushNamed(context, Routers.gatewayConfigurationWifiPage);
|
||||||
|
});
|
||||||
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -136,8 +136,8 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
|||||||
// }),
|
// }),
|
||||||
mineItem('images/mine/icon_mine_main_message.png',
|
mineItem('images/mine/icon_mine_main_message.png',
|
||||||
TranslationLoader.lanKeys!.message!.tr, () {
|
TranslationLoader.lanKeys!.message!.tr, () {
|
||||||
// Navigator.pushNamed(context, Routers.messageListPage);
|
Navigator.pushNamed(context, Routers.messageListPage);
|
||||||
Toast.show(msg: "功能暂未开放");
|
// Toast.show(msg: "功能暂未开放");
|
||||||
}),
|
}),
|
||||||
//删除“客服”行
|
//删除“客服”行
|
||||||
// mineItem('images/mine/icon_mine_main_supportStaff.png',
|
// mineItem('images/mine/icon_mine_main_supportStaff.png',
|
||||||
|
|||||||
@ -0,0 +1,124 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/appRouters.dart';
|
||||||
|
import 'package:star_lock/mine/mineSet/addAuthorizedAdministrator/AddAuthorizedAdministrator_state.dart';
|
||||||
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
import 'package:star_lock/tools/toast.dart';
|
||||||
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
|
class AddAuthorizedAdministratorLogic extends BaseGetXController {
|
||||||
|
final AddAuthorizedAdministratorState state =
|
||||||
|
AddAuthorizedAdministratorState();
|
||||||
|
|
||||||
|
//发送批量授权管理员
|
||||||
|
Future<void> addAuthorizedAdminRequest() async {
|
||||||
|
String getFailureDateTime = '0';
|
||||||
|
String getEffectiveDateTime = '0';
|
||||||
|
if (state.tabController!.index == 1) {
|
||||||
|
getFailureDateTime =
|
||||||
|
state.failureDateTime.value.millisecondsSinceEpoch.toString();
|
||||||
|
getEffectiveDateTime =
|
||||||
|
state.effectiveDateTime.value.millisecondsSinceEpoch.toString();
|
||||||
|
}
|
||||||
|
var entity = await ApiRepository.to.addAuthorizedAdmin(
|
||||||
|
state.isCreateUser.value ? "1" : "0",
|
||||||
|
getFailureDateTime,
|
||||||
|
state.isRemoteUnlock.value == true ? '1' : '2',
|
||||||
|
[],
|
||||||
|
state.lockIdList,
|
||||||
|
state.keyNameController.text,
|
||||||
|
getEffectiveDateTime,
|
||||||
|
state.emailOrPhoneController.text,
|
||||||
|
state.countryCode.value,
|
||||||
|
'1',
|
||||||
|
);
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
print('发送电子钥匙成功');
|
||||||
|
state.isSendSuccess.value = true;
|
||||||
|
} else {
|
||||||
|
Toast.show(msg: '${entity.errorMsg}');
|
||||||
|
if (entity.errorCode == 425) {
|
||||||
|
//用户未注册
|
||||||
|
state.isCreateUser.value = true;
|
||||||
|
addAuthorizedAdminRequest();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//发送钥匙请求
|
||||||
|
Future<void> sendElectronicKeyRequest(BuildContext widgetContext) async {
|
||||||
|
String getFailureDateTime = '0';
|
||||||
|
String getEffectiveDateTime = '0';
|
||||||
|
String lockID = state.keyInfo.value.lockId.toString();
|
||||||
|
String getKeyType = (int.parse(state.type.value) + 1).toString();
|
||||||
|
if (state.type.value == '0') {
|
||||||
|
getFailureDateTime =
|
||||||
|
state.failureDateTime.value.millisecondsSinceEpoch.toString();
|
||||||
|
getEffectiveDateTime =
|
||||||
|
state.effectiveDateTime.value.millisecondsSinceEpoch.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
var entity = await ApiRepository.to.sendElectronicKey(
|
||||||
|
createUser: state.isCreateUser.value ? "1" : "0",
|
||||||
|
countryCode: state.countryCode.value,
|
||||||
|
usernameType: '1',
|
||||||
|
endDate: getFailureDateTime,
|
||||||
|
faceAuthentication: state.isAuthentication.value == true ? '1' : '2',
|
||||||
|
isCameraEnable: '2',
|
||||||
|
isRemoteUnlock: state.isRemoteUnlock.value == true ? '1' : '2',
|
||||||
|
keyNameForAdmin: state.keyNameController.text,
|
||||||
|
keyRight: '0',
|
||||||
|
keyType: getKeyType,
|
||||||
|
lockId: lockID,
|
||||||
|
operatorUid: '',
|
||||||
|
receiverUsername: state.emailOrPhoneController.text,
|
||||||
|
remarks: '',
|
||||||
|
startDate: getEffectiveDateTime,
|
||||||
|
weekDays: state.weekdaysList);
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
print('发送电子钥匙成功');
|
||||||
|
state.isSendSuccess.value = true;
|
||||||
|
} else {
|
||||||
|
if (entity.errorCode == 425) {
|
||||||
|
//用户未注册
|
||||||
|
_showDialog(widgetContext, '${entity.errorMsg}');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//用户未注册确认弹窗
|
||||||
|
void _showDialog(widgetContext, String errMsg) {
|
||||||
|
showCupertinoDialog(
|
||||||
|
context: widgetContext,
|
||||||
|
builder: (context) {
|
||||||
|
return CupertinoAlertDialog(
|
||||||
|
title: const Text('接收者号码未注册,请选择号码所在的国家并重新发送'),
|
||||||
|
actions: [
|
||||||
|
CupertinoDialogAction(
|
||||||
|
child: Text(TranslationLoader.lanKeys!.cancel!.tr),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
CupertinoDialogAction(
|
||||||
|
child: Text(TranslationLoader.lanKeys!.selet!.tr),
|
||||||
|
onPressed: () async {
|
||||||
|
//选择国家代码
|
||||||
|
state.isCreateUser.value = true;
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
|
||||||
|
var result = await Get.toNamed(Routers.seletCountryRegionPage);
|
||||||
|
if (result != null) {
|
||||||
|
result as Map<String, dynamic>;
|
||||||
|
state.countryCode.value = result['code'];
|
||||||
|
state.countryName.value = result['countryName'];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
|
||||||
|
|
||||||
|
class AddAuthorizedAdministratorState {
|
||||||
|
late TabController? tabController;
|
||||||
|
TextEditingController emailOrPhoneController =
|
||||||
|
TextEditingController(); //邮箱/手机号输入框
|
||||||
|
TextEditingController keyNameController = TextEditingController(); //钥匙名输入框
|
||||||
|
|
||||||
|
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
||||||
|
late Contact contact;
|
||||||
|
var type = ''.obs;
|
||||||
|
var lockIdList = [].obs;
|
||||||
|
var weekdaysList = [].obs;
|
||||||
|
var isCreateUser = false.obs; //用户未注册时传1 已注册传0
|
||||||
|
var selectEffectiveDate =
|
||||||
|
'${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} ${DateTime.now().hour}:${DateTime.now().minute}'
|
||||||
|
.obs; //默认为当前时间
|
||||||
|
var selectFailureDate =
|
||||||
|
'${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} ${DateTime.now().hour}:${DateTime.now().minute}'
|
||||||
|
.obs; //默认为当前时间
|
||||||
|
final effectiveDateTime = DateTime.now().obs;
|
||||||
|
final failureDateTime = DateTime.now().obs;
|
||||||
|
var countryName = '中国'.obs;
|
||||||
|
var countryCode = '86'.obs;
|
||||||
|
var isSendSuccess = false.obs;
|
||||||
|
final isRemoteUnlock = false.obs; //是否允许远程开锁
|
||||||
|
final isAuthentication = false.obs; //是否允许实名认证
|
||||||
|
final keyInfo = KeyInfos().obs;
|
||||||
|
final lockMainEntity = LockMainEntity().obs;
|
||||||
|
|
||||||
|
AddAuthorizedAdministratorState() {
|
||||||
|
Map map = Get.arguments;
|
||||||
|
lockMainEntity.value = map["lockMainEntity"];
|
||||||
|
keyInfo.value = map["keyInfo"];
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -6,6 +6,7 @@ import 'package:star_lock/appRouters.dart';
|
|||||||
import 'package:star_lock/app_settings/app_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
||||||
import 'package:star_lock/tools/ExpandedListView.dart';
|
import 'package:star_lock/tools/ExpandedListView.dart';
|
||||||
|
import 'package:star_lock/tools/noData.dart';
|
||||||
import 'package:star_lock/tools/submitBtn.dart';
|
import 'package:star_lock/tools/submitBtn.dart';
|
||||||
import 'package:star_lock/translations/trans_lib.dart';
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
@ -28,6 +29,7 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
|
|||||||
bool isDeviceSelect = false;
|
bool isDeviceSelect = false;
|
||||||
int selectDeviceIndex = 0;
|
int selectDeviceIndex = 0;
|
||||||
int selectNameIndex = 0;
|
int selectNameIndex = 0;
|
||||||
|
List dataList = [];
|
||||||
|
|
||||||
List tabs = [
|
List tabs = [
|
||||||
TranslationLoader.lanKeys!.name!.tr,
|
TranslationLoader.lanKeys!.name!.tr,
|
||||||
@ -83,9 +85,10 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
|
|||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: TabBarView(
|
body: TabBarView(controller: _tabController, children: [
|
||||||
controller: _tabController,
|
dataList.isEmpty ? const NoData() : _permissionNameList(),
|
||||||
children: [_permissionNameList(), _permissionDeviceList()])));
|
dataList.isEmpty ? const NoData() : _permissionDeviceList()
|
||||||
|
])));
|
||||||
}
|
}
|
||||||
|
|
||||||
//姓名列表
|
//姓名列表
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/authorizedAdminListEntity.dart';
|
import 'package:star_lock/mine/mineSet/authorizedAdministrator/authorizedAdminListEntity.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
import 'package:star_lock/tools/noData.dart';
|
||||||
|
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
@ -131,12 +132,14 @@ class _AuthorizedAdministratorListPageState
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildMainUI(List itemList) {
|
Widget _buildMainUI(List itemList) {
|
||||||
return ListView.builder(
|
return itemList.isEmpty
|
||||||
itemCount: itemList.length,
|
? const NoData()
|
||||||
itemBuilder: (c, index) {
|
: ListView.builder(
|
||||||
AuthorizedAdminListItem itemData = itemList[index];
|
itemCount: itemList.length,
|
||||||
return _electronicKeyItem(itemData);
|
itemBuilder: (c, index) {
|
||||||
});
|
AuthorizedAdminListItem itemData = itemList[index];
|
||||||
|
return _electronicKeyItem(itemData);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _electronicKeyItem(AuthorizedAdminListItem itemData) {
|
Widget _electronicKeyItem(AuthorizedAdminListItem itemData) {
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
||||||
|
import 'package:star_lock/tools/noData.dart';
|
||||||
|
|
||||||
import '../../../../../app_settings/app_colors.dart';
|
import '../../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../../tools/titleAppBar.dart';
|
import '../../../../../tools/titleAppBar.dart';
|
||||||
@ -55,7 +56,7 @@ class _LockItemListPageState extends State<LockItemListPage> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: Container(),
|
: const NoData(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
import 'package:star_lock/tools/noData.dart';
|
||||||
|
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
@ -119,19 +120,21 @@ class _LockUserManageListPageState extends State<LockUserManageListPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildMainUI() {
|
Widget _buildMainUI() {
|
||||||
return ListView.separated(
|
return dataList.isEmpty
|
||||||
itemCount: dataList.length,
|
? const NoData()
|
||||||
itemBuilder: (c, index) {
|
: ListView.separated(
|
||||||
LockUserData indexEntity = dataList[index];
|
itemCount: dataList.length,
|
||||||
return _electronicKeyItem(indexEntity);
|
itemBuilder: (c, index) {
|
||||||
},
|
LockUserData indexEntity = dataList[index];
|
||||||
separatorBuilder: (BuildContext context, int index) {
|
return _electronicKeyItem(indexEntity);
|
||||||
return const Divider(
|
},
|
||||||
height: 1,
|
separatorBuilder: (BuildContext context, int index) {
|
||||||
color: AppColors.greyLineColor,
|
return const Divider(
|
||||||
);
|
height: 1,
|
||||||
},
|
color: AppColors.greyLineColor,
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//请求锁用户列表
|
//请求锁用户列表
|
||||||
|
|||||||
@ -93,15 +93,15 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
Navigator.pushNamed(
|
Navigator.pushNamed(
|
||||||
context, Routers.authorizedAdministratorListPage);
|
context, Routers.authorizedAdministratorListPage);
|
||||||
}),
|
}),
|
||||||
//by DaisyWu 新增--权限管理
|
//by DaisyWu 新增--批量授权
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.authorityManagement!.tr,
|
leftTitel: TranslationLoader.lanKeys!.authorityManagement!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
// Navigator.pushNamed(context, Routers.authorityManagementPage);
|
Navigator.pushNamed(context, Routers.authorityManagementPage);
|
||||||
Toast.show(msg: "功能暂未开放");
|
// Toast.show(msg: "功能暂未开放");
|
||||||
}),
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.lockGroup!.tr,
|
leftTitel: TranslationLoader.lanKeys!.lockGroup!.tr,
|
||||||
|
|||||||
@ -31,59 +31,51 @@ class _ValueAddedServicesPageListState
|
|||||||
_valueAddedServicesItem(
|
_valueAddedServicesItem(
|
||||||
Image.asset('images/mine/icon_mine_valueAddedServices_note.png'),
|
Image.asset('images/mine/icon_mine_valueAddedServices_note.png'),
|
||||||
TranslationLoader.lanKeys!.note!.tr, () {
|
TranslationLoader.lanKeys!.note!.tr, () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(
|
||||||
// Navigator.pushNamed(
|
context, Routers.valueAddedServicesNoteAndEmailDetailPage,
|
||||||
// context, Routers.valueAddedServicesNoteAndEmailDetailPage,
|
arguments: 1);
|
||||||
// arguments: 1);
|
|
||||||
}),
|
}),
|
||||||
_valueAddedServicesItem(
|
_valueAddedServicesItem(
|
||||||
Image.asset('images/mine/icon_mine_valueAddedServices_email.png'),
|
Image.asset('images/mine/icon_mine_valueAddedServices_email.png'),
|
||||||
TranslationLoader.lanKeys!.mail!.tr, () {
|
TranslationLoader.lanKeys!.mail!.tr, () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(
|
||||||
// Navigator.pushNamed(
|
context, Routers.valueAddedServicesNoteAndEmailDetailPage,
|
||||||
// context, Routers.valueAddedServicesNoteAndEmailDetailPage,
|
arguments: 2);
|
||||||
// arguments: 2);
|
|
||||||
}),
|
}),
|
||||||
_valueAddedServicesItem(
|
_valueAddedServicesItem(
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'images/mine/icon_mine_valueAddedServices_realName.png'),
|
'images/mine/icon_mine_valueAddedServices_realName.png'),
|
||||||
TranslationLoader.lanKeys!.realNameAuthentication!.tr, () {
|
TranslationLoader.lanKeys!.realNameAuthentication!.tr, () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(
|
||||||
// Navigator.pushNamed(
|
context, Routers.valueAddedServicesRealNamePage);
|
||||||
// context, Routers.valueAddedServicesRealNamePage);
|
|
||||||
}),
|
}),
|
||||||
_valueAddedServicesItem(
|
_valueAddedServicesItem(
|
||||||
Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'),
|
Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'),
|
||||||
TranslationLoader.lanKeys!.advancedFunction!.tr, () {
|
TranslationLoader.lanKeys!.advancedFunction!.tr, () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(
|
||||||
// Navigator.pushNamed(
|
context, Routers.valueAddedServicesHighFunctionPage);
|
||||||
// context, Routers.valueAddedServicesHighFunctionPage);
|
|
||||||
}),
|
}),
|
||||||
_valueAddedServicesItem(
|
_valueAddedServicesItem(
|
||||||
Image.asset('images/mine/icon_mine_valueAddedServices_push.png'),
|
Image.asset('images/mine/icon_mine_valueAddedServices_push.png'),
|
||||||
TranslationLoader.lanKeys!.pushMessage!.tr, () {
|
TranslationLoader.lanKeys!.pushMessage!.tr, () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
||||||
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
|
||||||
}),
|
}),
|
||||||
_valueAddedServicesItem(
|
_valueAddedServicesItem(
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'images/mine/icon_mine_valueAddedServices_checkIn.png'),
|
'images/mine/icon_mine_valueAddedServices_checkIn.png'),
|
||||||
TranslationLoader.lanKeys!.checkingIn!.tr, () {
|
TranslationLoader.lanKeys!.checkingIn!.tr, () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
||||||
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
|
||||||
}),
|
}),
|
||||||
_valueAddedServicesItem(
|
_valueAddedServicesItem(
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'images/mine/icon_mine_valueAddedServices_storage.png'),
|
'images/mine/icon_mine_valueAddedServices_storage.png'),
|
||||||
TranslationLoader.lanKeys!.recordsRetention!.tr, () {
|
TranslationLoader.lanKeys!.recordsRetention!.tr, () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
||||||
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
|
||||||
}),
|
}),
|
||||||
_valueAddedServicesItem(
|
_valueAddedServicesItem(
|
||||||
Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'),
|
Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'),
|
||||||
'可视对讲', () {
|
'可视对讲', () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
||||||
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
|
||||||
}),
|
}),
|
||||||
_valueAddedServicesItem(
|
_valueAddedServicesItem(
|
||||||
Text(
|
Text(
|
||||||
@ -94,8 +86,7 @@ class _ValueAddedServicesPageListState
|
|||||||
fontWeight: FontWeight.w600),
|
fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
"Amazon Alexa", () {
|
"Amazon Alexa", () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
||||||
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
|
||||||
}),
|
}),
|
||||||
_valueAddedServicesItem(
|
_valueAddedServicesItem(
|
||||||
Text(
|
Text(
|
||||||
@ -106,8 +97,7 @@ class _ValueAddedServicesPageListState
|
|||||||
fontWeight: FontWeight.w600),
|
fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
"Google Home", () {
|
"Google Home", () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
||||||
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -74,9 +74,10 @@ class BaseProvider extends GetConnect with Api {
|
|||||||
case 430: //与葛工约定弹出ErrorMsg
|
case 430: //与葛工约定弹出ErrorMsg
|
||||||
Toast.show(msg: T["errorMsg"]);
|
Toast.show(msg: T["errorMsg"]);
|
||||||
break;
|
break;
|
||||||
case 425:
|
//已单独处理,暂不做全局弹窗
|
||||||
Toast.show(msg: "用户不存在");
|
// case 425:
|
||||||
break;
|
// Toast.show(msg: "用户不存在");
|
||||||
|
// break;
|
||||||
case 10001:
|
case 10001:
|
||||||
Toast.show(msg: "数据不存在");
|
Toast.show(msg: "数据不存在");
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -136,22 +136,22 @@ class ApiRepository {
|
|||||||
|
|
||||||
//发送电子钥匙
|
//发送电子钥匙
|
||||||
Future<AuthorizedAdminSendEntity> sendElectronicKey(
|
Future<AuthorizedAdminSendEntity> sendElectronicKey(
|
||||||
String createUser,
|
{required String createUser,
|
||||||
String countryCode,
|
required String countryCode,
|
||||||
String usernameType,
|
required String usernameType,
|
||||||
String endDate,
|
required String endDate,
|
||||||
String faceAuthentication,
|
required String faceAuthentication,
|
||||||
String isCameraEnable,
|
required String isCameraEnable,
|
||||||
String isRemoteUnlock,
|
required String isRemoteUnlock,
|
||||||
String keyNameForAdmin,
|
required String keyNameForAdmin,
|
||||||
String keyRight,
|
required String keyRight,
|
||||||
String keyType,
|
required String keyType,
|
||||||
String lockId,
|
required String lockId,
|
||||||
String operatorUid,
|
required String operatorUid,
|
||||||
String receiverUsername,
|
required String receiverUsername,
|
||||||
String remarks,
|
required String remarks,
|
||||||
String startDate,
|
required String startDate,
|
||||||
List weekDays) async {
|
required List weekDays}) async {
|
||||||
final res = await apiProvider.sendElectronicKey(
|
final res = await apiProvider.sendElectronicKey(
|
||||||
createUser,
|
createUser,
|
||||||
countryCode,
|
countryCode,
|
||||||
|
|||||||
@ -107,7 +107,7 @@ class _ExpandedListTileState extends State<ExpandedListTile> {
|
|||||||
width: 10.w,
|
width: 10.w,
|
||||||
)),
|
)),
|
||||||
AnimatedRotation(
|
AnimatedRotation(
|
||||||
turns: _isExpanded ? 0 : -0.5,
|
turns: _isExpanded ? -0.5 : 0,
|
||||||
duration: _animationDuration,
|
duration: _animationDuration,
|
||||||
child: const Icon(Icons.keyboard_arrow_down),
|
child: const Icon(Icons.keyboard_arrow_down),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
|
|
||||||
class NoData extends StatelessWidget {
|
class NoData extends StatelessWidget {
|
||||||
const NoData({Key? key}) : super(key: key);
|
const NoData({Key? key}) : super(key: key);
|
||||||
@ -10,8 +11,22 @@ class NoData extends StatelessWidget {
|
|||||||
width: 1.sw,
|
width: 1.sw,
|
||||||
height: 1.sh - ScreenUtil().statusBarHeight,
|
height: 1.sh - ScreenUtil().statusBarHeight,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Image.asset('images/icon_unHaveData.png',width: 300.w,height: 240.w),
|
child: Column(
|
||||||
),
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
'images/icon_noData.png',
|
||||||
|
width: 160.w,
|
||||||
|
height: 180.h,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'暂无数据',
|
||||||
|
style:
|
||||||
|
TextStyle(color: AppColors.darkGrayTextColor, fontSize: 22.sp),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||