更新安卓通知栏提示
This commit is contained in:
@@ -18,8 +18,10 @@ import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/color/app_uri_status.dart';
|
||||
import 'package:vbvs_app/common/util/CheckNetwork.dart';
|
||||
import 'package:vbvs_app/common/util/CommonVariables.dart';
|
||||
import 'package:vbvs_app/common/util/DailyLogUtils.dart';
|
||||
import 'package:vbvs_app/common/util/Dio.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/JPushUtil.dart';
|
||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||
import 'package:vbvs_app/controller/date/CalendarController.dart';
|
||||
import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
|
||||
@@ -187,8 +189,8 @@ Future<void> initWX() async {
|
||||
Fluwx fluwx = Fluwx();
|
||||
fluwx.registerApi(
|
||||
//请填写自己的微信appid
|
||||
appId: "wxeb2688220799e2c5", //太和
|
||||
// appId: "wx929c548fea6af9c7", //眠花糖
|
||||
// appId: "wxeb2688220799e2c5", //太和
|
||||
appId: "wx929c548fea6af9c7", //眠花糖
|
||||
doOnAndroid: true,
|
||||
doOnIOS: true,
|
||||
// universalLink: "https://app.he-info.com/theh/",
|
||||
@@ -627,17 +629,21 @@ void initEasyDartModule() {
|
||||
try {
|
||||
EasyDartModule.init(
|
||||
loggerConfig:
|
||||
LoggerConfig(host: ServiceConstant.logService, serviceName: "web"),
|
||||
LoggerConfig(host: ServiceConstant.logService, serviceName: "智慧眠花糖在线"),
|
||||
webSocketConfig:
|
||||
WebSocketConfig(ServiceConstant.webSocketService, (data) {
|
||||
// 接收到服务消息
|
||||
var json = jsonDecode(data);
|
||||
ef.log("[websokcet]:${json}");
|
||||
EasyDartModule.logger.info("[websokcet数据]:${json}");
|
||||
DailyLogUtils.writeLog("[websokcet数据]:${json}");
|
||||
if (json['wsId'] != null) {
|
||||
ef.kvRoot.websocketId = json['wsId'];
|
||||
}
|
||||
if (json['code'] != null && json['code'] != 200) {
|
||||
EasyDartModule.logger.error("websocket连接失败--》" + json);
|
||||
EasyDartModule.logger
|
||||
.error("[websokcet数据]:websocket连接失败--》" + json);
|
||||
DailyLogUtils.writeLog("[websokcet数据]:websocket连接失败--》" + json);
|
||||
}
|
||||
if (json["path"] != null) {
|
||||
var call = CommonVariables.callMap[json["path"]];
|
||||
@@ -653,6 +659,8 @@ void initEasyDartModule() {
|
||||
}
|
||||
} else {
|
||||
print("未找到当前路径: ${json["path"]} 回调函数");
|
||||
EasyDartModule.logger.error("未找到当前路径: ${json["path"]} 回调函数");
|
||||
DailyLogUtils.writeLog("未找到当前路径: ${json["path"]} 回调函数");
|
||||
}
|
||||
}
|
||||
// print(data);
|
||||
@@ -664,8 +672,9 @@ void initEasyDartModule() {
|
||||
}));
|
||||
} catch (e) {
|
||||
print(e);
|
||||
EasyDartModule.logger.error("websocket连接失败--》:$e");
|
||||
DailyLogUtils.writeLog("websocket连接失败--》:$e");
|
||||
}
|
||||
//初始化
|
||||
}
|
||||
|
||||
Future<void> initLogin() async {
|
||||
@@ -692,6 +701,8 @@ Future<void> initLogin() async {
|
||||
EasyDartModule.dio.token = null;
|
||||
} else {
|
||||
userInfoController.model.login = 1;
|
||||
await JPushUtil.initJPush();
|
||||
updateAppSystemNotify(true);
|
||||
}
|
||||
} else {
|
||||
// 如果没有 token,则将用户标记为未登录
|
||||
@@ -836,6 +847,7 @@ class MyApp extends StatelessWidget {
|
||||
Get.lazyPut(() => UserPdfController()),
|
||||
Get.lazyPut(() => PrivacyPdfController()),
|
||||
Get.lazyPut(() => AuthBindTelController()),
|
||||
Get.lazyPut(() => CommonMessageSettingController()),
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user