修复编译;修复发送授权管理员的用户类型字段
This commit is contained in:
parent
b51a53a9bd
commit
dd0706c863
@ -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只支持小写
|
||||
|
||||
2
star_lock/.gitignore
vendored
2
star_lock/.gitignore
vendored
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
```
|
||||
|
||||
|
||||
@ -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 待补充
|
||||
|
||||
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<void> 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('发送电子钥匙成功');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user