更新首页数据滚动效果

This commit is contained in:
wyf
2026-01-12 15:16:36 +08:00
parent 0ef8ddee8a
commit e841ee887a
19 changed files with 1160 additions and 400 deletions

View File

@@ -13,6 +13,7 @@ import 'package:vbvs_app/common/color/app_uri_status.dart';
import 'package:vbvs_app/common/util/DailyLogUtils.dart';
import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/common/util/requestWithLog.dart';
import 'package:vbvs_app/component/tool/NewTopSlideNotification.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/device/body_device_controller.dart';
import 'package:vbvs_app/controller/home/home_controller.dart';
@@ -47,6 +48,7 @@ class UserInfoModel {
String? img_bucket = 'user';
int? login = 0; //0未登录 1 登录
int? deviceBindNum = 0; //绑定设备数量
int? loginPhone = 0; //0 本机号码 1其他手机号
@@ -73,6 +75,7 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
int initLocationpermission = 0; //未初始化
FluwxCancelable? fluwxCancelable;
final Fluwx fluwx = Fluwx();
// RxInt login = 0.obs; //0未登录 1 登录
List<Map<String, String>> country_code = [
{
@@ -86,7 +89,7 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
];
RxString select_country_code = "+86".obs;
RxInt select_login_method = 1.obs;//1手机 2邮箱
RxInt select_login_method = 1.obs; //1手机 2邮箱
Future<ApiResponse> uploadImg() async {
EasyDartModule.logger.info("请求上传图片");
@@ -386,4 +389,42 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
ef.log("微信解绑失败-》$e");
}
}
// 查询是否需要更新APP
checkAPPUpdate(String currentVersion) async {
String serviceAddress = ServiceConstant.service_address;
String serviceName = ServiceConstant.server_service;
String serviceApi = ServiceConstant.checkAPPVersion;
// 拼接 query 参数 ver
String queryUrl =
"${serviceAddress}${serviceName}${serviceApi}?ver=${AppConstants.theh_app_version}";
var data = null;
try {
final res = await requestWithLog(
logTitle: "检测APP更新",
method: MyHttpMethod.get,
queryUrl: queryUrl,
onSuccess: (res) {
data = res.data;
},
onFailure: (res) {
NewTopSlideNotification.show(
text: res.msg!,
textColor: themeController.currentColor.sc9,
);
},
);
} catch (e) {
ef.log("检测APP更新-》$e");
NewTopSlideNotification.show(
text: "检测异常".tr,
textColor: themeController.currentColor.sc9,
);
}
return data;
}
}