diff --git a/.gitignore b/.gitignore
index 6d21af37..1146ffa9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@ doc/api/
.flutter-plugins
.flutter-plugins-dependencies
+.idea
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 26d33521..00000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 3ce5b9d9..00000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/starLock.iml b/.idea/starLock.iml
deleted file mode 100644
index 43102452..00000000
--- a/.idea/starLock.iml
+++ /dev/null
@@ -1,343 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 35eb1ddf..00000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/star_lock/.docker/.env.example b/star_lock/.docker/.env.example
index 46afd189..bc23dbeb 100644
--- a/star_lock/.docker/.env.example
+++ b/star_lock/.docker/.env.example
@@ -1,7 +1,7 @@
-FLUTTER_STORAGE_BASE_URL="https://mirrors.tuna.tsinghua.edu.cn/flutter"
-PUB_HOSTED_URL="https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
+FLUTTER_STORAGE_BASE_URL=https://mirrors.tuna.tsinghua.edu.cn/flutter
+PUB_HOSTED_URL=https://mirrors.tuna.tsinghua.edu.cn/dart-pub
-HTTP_PROXY=http://127.0.0.1:1080/```
+HTTP_PROXY=http://127.0.0.1:1080/
HTTPS_PROXY=http://127.0.0.1:1080/
# curl只支持小写
diff --git a/star_lock/.gitignore b/star_lock/.gitignore
index 24476c5d..d2b4a6eb 100644
--- a/star_lock/.gitignore
+++ b/star_lock/.gitignore
@@ -14,7 +14,7 @@ migrate_working_dir/
*.iml
*.ipr
*.iws
-.idea/
+.idea
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
diff --git a/star_lock/README.md b/star_lock/README.md
index 43035382..480f9ba1 100644
--- a/star_lock/README.md
+++ b/star_lock/README.md
@@ -30,7 +30,7 @@ flutter pub get
```bash
# 运行sky渠道
-flutter run --flavor sky -t lib/main_sky.dart
+flutter run --flavor sky -t lib/main_sky_full.dart
```
diff --git a/star_lock/flavorizr.yaml b/star_lock/flavorizr.yaml
index f45858db..e411ad41 100644
--- a/star_lock/flavorizr.yaml
+++ b/star_lock/flavorizr.yaml
@@ -38,12 +38,12 @@
# 下面是4个运行示例:
# flutter run --flavor dev -t lib/main_dev.dart
# flutter run --flavor pre -t lib/main_pre.dart
-# flutter run --flavor sky -t lib/main_sky.dart
+# flutter run --flavor sky -t lib/main_sky_full.dart
# flutter run --flavor xhj -t lib/main_xhj.dart
# 下面是安卓发布编译命令
-# flutter build apk --split-per-abi --release --flavor sky -t lib/main_sky.dart
-# flutter build apk --release --flavor sky -t lib/main_sky.dart
+# flutter build apk --split-per-abi --release --flavor sky -t lib/main_sky_full.dart
+# flutter build apk --release --flavor sky -t lib/main_sky_full.dart
# IOS编译发布
# TODO 待补充
diff --git a/star_lock/lib/flavors.dart b/star_lock/lib/flavors.dart
index cfb882c4..84e28c0b 100644
--- a/star_lock/lib/flavors.dart
+++ b/star_lock/lib/flavors.dart
@@ -80,7 +80,8 @@ class F {
static String get apiPrefix {
switch (appFlavor) {
case Flavor.local:
- return 'https://ge.lock.star-lock.cn';
+ // return 'https://ge.lock.star-lock.cn'; // 葛工
+ return 'http://192.168.1.15:8022'; // 谢工
case Flavor.dev:
return 'https://dev.lock.star-lock.cn';
case Flavor.pre:
@@ -90,8 +91,6 @@ class F {
case Flavor.xhj:
return 'https://lock.xhjcn.ltd';
default:
- // "http://192.168.1.15:8022"; //谢总本地
- // "https://ge.lock.star-lock.cn"; //葛工开发环境地址
throw Exception('flavor[$name] apiPrefix not found');
}
}
diff --git a/star_lock/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministrator_logic.dart b/star_lock/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministrator_logic.dart
index 1d81ccca..f7be6d8c 100644
--- a/star_lock/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministrator_logic.dart
+++ b/star_lock/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator/addAuthorizedAdministrator_logic.dart
@@ -1,6 +1,5 @@
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
-import 'package:star_lock/appRouters.dart';
import 'package:star_lock/network/api_repository.dart';
import 'package:star_lock/tools/baseGetXController.dart';
import 'package:star_lock/translations/trans_lib.dart';
@@ -12,6 +11,11 @@ import 'addAuthorizedAdministrator_state.dart';
class AddAuthorizedAdministratorLogic extends BaseGetXController {
AddAuthorizedAdministratorState state = AddAuthorizedAdministratorState();
+ bool isPhoneNumber(String input) {
+ // 手机号正则表达式,这里简化为11位数字
+ final RegExp phoneRegExp = RegExp(r'^\d{11}$');
+ return phoneRegExp.hasMatch(input);
+ }
//发送批量授权管理员
Future addAuthorizedAdminRequest() async {
if (state.emailOrPhoneController.text.isEmpty) {
@@ -59,7 +63,9 @@ class AddAuthorizedAdministratorLogic extends BaseGetXController {
startDate: startDate,
userid: state.emailOrPhoneController.text,
countryCode: state.countryCode.value,
- usernameType:'1',
+ usernameType: isPhoneNumber(state.emailOrPhoneController.text) == true
+ ? '1'
+ : '2',
);
if (entity.errorCode!.codeIsSuccessful) {
print('发送电子钥匙成功');