更新请求带版本号

This commit is contained in:
wyf
2026-01-09 09:56:58 +08:00
parent 2991deb8b3
commit 0ef8ddee8a
6 changed files with 17 additions and 4 deletions

View File

@@ -25,7 +25,6 @@ import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/JPushUtil.dart';
import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/common/util/requestWithLog.dart';
import 'package:vbvs_app/config/ConfigReader.dart';
import 'package:vbvs_app/controller/date/CalendarController.dart';
import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
import 'package:vbvs_app/controller/device/body_device_controller.dart';
@@ -747,6 +746,17 @@ Future<void> initLogin() async {
final box = GetStorage();
UserInfoController userInfoController = Get.find();
String? token = box.read('token');
if (AppConstants().ent_type == APPPackageType.MHT.code) {
EasyDartModule.dio.queryParameters = {
"ver": AppConstants.zhmht_app_version
};
} else if (AppConstants().ent_type == APPPackageType.TH.code) {
EasyDartModule.dio.queryParameters = {"ver": AppConstants.theh_app_version};
} else {
EasyDartModule.dio.queryParameters = {"ver": AppConstants.theh_app_version};
}
if (token != null) {
// 根据token去请求
// await userInfoController.autoLogin(token);