更新
This commit is contained in:
@@ -20,8 +20,8 @@ class ServiceConstant {
|
||||
static String device_show = "/api/device/bind";//更新设备绑定
|
||||
static String disease_list = "/api/personnel/disease/list";//获取疾病类型
|
||||
static String share_deleted = "";//删除分享
|
||||
static String start_calibration = "";//开始校准
|
||||
static String calibration_process = "";//校准进度
|
||||
static String start_calibration = "/api/caibration";//开始校准
|
||||
static String calibration_process = "/api/caibration";//校准进度
|
||||
static String submit_repair = "";//提交报修
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ class AppConstants {
|
||||
double title_text_fontSize = 30.rpx; //标题文字字号
|
||||
|
||||
double dropdown_height = 90.rpx; //标题文字字号
|
||||
double border_width = 1.rpx; //标题文字字号//border宽度
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -162,6 +162,17 @@ class MyUtils {
|
||||
String twoDigits(int n) => n.toString().padLeft(2, '0');
|
||||
return '${twoDigits(date.month)}/${twoDigits(date.day)}';
|
||||
}
|
||||
|
||||
static String getFormatChineseTime(date) {
|
||||
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(date);
|
||||
// 格式化年月日
|
||||
String dateStr = DateFormat('yyyy年MM月dd日').format(dateTime);
|
||||
// 获取星期
|
||||
const weekDays = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'];
|
||||
String weekStr = weekDays[dateTime.weekday - 1];
|
||||
|
||||
return '$dateStr $weekStr';
|
||||
}
|
||||
}
|
||||
|
||||
Color stringToColor(String hexColor) {
|
||||
@@ -323,7 +334,6 @@ String time_08_Formatter_pattern(String time, String pattern) {
|
||||
return DateFormat(pattern).format(DateTime.parse(time).toLocal());
|
||||
}
|
||||
|
||||
|
||||
enum LoadingDialogIcon { ble, wifi, none }
|
||||
|
||||
class LoadingDialog {
|
||||
|
||||
@@ -63,7 +63,8 @@ Future<ApiResponse> requestWithLog({
|
||||
final responseData =
|
||||
response.data is String ? jsonDecode(response.data) : response.data;
|
||||
|
||||
apiResponse = ApiResponse.fromJson(responseData, (object) => object);
|
||||
apiResponse = ApiResponse.fromJson(responseData, (object) => object,
|
||||
rawResponse: response);
|
||||
|
||||
if (apiResponse.code == HttpStatusCodes.ok) {
|
||||
MyUtils.formatResponse(apiResponse, successMsg, errorMsg);
|
||||
|
||||
Reference in New Issue
Block a user