Merge branch 'map_dev' into dev
# Conflicts: # ln_jq_app/android/app/src/main/AndroidManifest.xml # ln_jq_app/ios/Runner/Info.plist
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:get/get.dart';
|
||||
import 'package:get_storage/get_storage.dart';
|
||||
import 'package:getx_scaffold/common/utils/log_util.dart';
|
||||
import 'package:ln_jq_app/common/model/vehicle_info.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
/// 定义登录渠道的枚举类型
|
||||
enum LoginChannel {
|
||||
@@ -105,10 +106,16 @@ class StorageService extends GetxService {
|
||||
await _box.write(_nameKey, name);
|
||||
await _box.write(_phoneKey, phone);
|
||||
await _box.write(_idCardKey, idCard);
|
||||
|
||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
await prefs.setString('token', token);
|
||||
}
|
||||
|
||||
Future<void> saveVehicleInfo(VehicleInfo data) async {
|
||||
await _box.write(_vehicleInfoKey, vehicleInfoToJson(data));
|
||||
|
||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
await prefs.setString('plateNumber', data.plateNumber);
|
||||
}
|
||||
|
||||
Future<void> saveStationCredentials(String account, String password) async {
|
||||
@@ -128,6 +135,10 @@ class StorageService extends GetxService {
|
||||
|
||||
Future<void> clearVehicleInfo() async {
|
||||
await _box.remove(_vehicleInfoKey);
|
||||
|
||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
await prefs.remove('plateNumber');
|
||||
await prefs.remove('token');
|
||||
}
|
||||
|
||||
Future<void> clearStationCredentials() async {
|
||||
|
||||
Reference in New Issue
Block a user