初始化项目
This commit is contained in:
27
lib/common/color/appColors.dart
Normal file
27
lib/common/color/appColors.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
|
||||
class AppColors {
|
||||
// 定义颜色常量
|
||||
static const Color text_selected_color = Color(0xFFD3B684); //选中文本
|
||||
static const Color text_default_color = Color(0xFFFFFFFF); //默认文本
|
||||
|
||||
static const Color button_active_color = Color(0xFFD3B684); //可点击按钮
|
||||
static const Color button_inactive_color = Color(0xFFD3D3D3); //不可点击按钮
|
||||
static const Color bg_color = Color(0xFF000750); //背景色
|
||||
static const Color input_bg_color = Color(0xFFF3F5F6); //输入框背景色
|
||||
static const Color input_hint_text_color = Color(0xFFF3F5F6); //hinttext
|
||||
static const Color input_split_color = Color(0xFFF3F5F6); //分隔符
|
||||
static const Color textColor = Color(0xFF333333); //普通文本
|
||||
|
||||
static const Color buttonColor = Color(0xFF03A9F4);
|
||||
static const Color borderColor = Color(0xFFE0E0E0);
|
||||
static const Color errorColor = Color(0xFFB00020);
|
||||
|
||||
Color check_Color = stringToColor('#409EFF');
|
||||
Color repair_Color = stringToColor('#409EFF');
|
||||
Color finish_Color = stringToColor('#71E2A3');
|
||||
Color unOp_Color = stringToColor('#FF4949');
|
||||
|
||||
Color press_color = stringToColor("#eaeaea");
|
||||
}
|
||||
24
lib/common/color/appConstants.dart
Normal file
24
lib/common/color/appConstants.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
|
||||
class AppConstants {
|
||||
// App-related constants
|
||||
static const int code_time = 60; //验证码倒计时
|
||||
static const int limit = 10; //分页数量
|
||||
|
||||
static const double list_end_height = 26; //列表结尾空白高度
|
||||
static const double list_ano_end_height = 100; //列表结尾空白高度
|
||||
static const double list_start_height = 13; //列表开头空白高度
|
||||
|
||||
static const double page_button_bottom_padding = 45; //页面底部按钮距离底部距离
|
||||
|
||||
double main_left_right_padding = 30.rpx; //页面左右布局间距
|
||||
double content_left_right_padding = 15.rpx; //页面左右内容间距
|
||||
|
||||
double normal_container_radius = 24.rpx; //普通容器圆角
|
||||
double button_container_radius = 100.rpx; //按钮容器圆角
|
||||
|
||||
double text_padding_up_dowm_p = 5.rpx; //段落文字上下间距
|
||||
|
||||
double normal_text_fontSize = 26.rpx; //普通文字字号
|
||||
double title_text_fontSize = 30.rpx; //标题文字字号
|
||||
}
|
||||
10
lib/common/color/appFontsize.dart
Normal file
10
lib/common/color/appFontsize.dart
Normal file
@@ -0,0 +1,10 @@
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
|
||||
class AppFontsize {
|
||||
// 定义文字常量
|
||||
static double title_size = 15.px; //标题
|
||||
static double normal_text_size = 13.px; //普通文本
|
||||
static double small_text_size = 11.px; //小号文本
|
||||
static double smaller_text_size = 9.px; //小号文本
|
||||
static double explain_size = 8.px; //说明文本
|
||||
}
|
||||
32
lib/common/color/app_uri.dart
Normal file
32
lib/common/color/app_uri.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
// lib/api_endpoints.dart
|
||||
|
||||
import 'package:vbvs_app/common/util/CommonVariables.dart';
|
||||
|
||||
class ApiEndpoints {
|
||||
// Base URL of the API
|
||||
static String baseUrl = '${CommonVariables.apiUrl}/api';
|
||||
|
||||
// Endpoints
|
||||
static String signIn = '$baseUrl/auth/account/info/signIn'; //登录
|
||||
static String getUserInfo = '$baseUrl/user/info'; //获取用户信息
|
||||
static String updateProfile = '$baseUrl/user/updateProfile'; //更新用户信息
|
||||
static String login_code = '$baseUrl/auth/msg/signIn'; //登录验证码
|
||||
static String wx_auth_code = '$baseUrl/auth/msg/wxAuth'; //微信授权验证码
|
||||
static String register = '$baseUrl/auth/account/info/signUp'; //注册
|
||||
static String reset_code = '$baseUrl/auth/msg/restore'; //重置验证码
|
||||
static String reset_pd = '$baseUrl/auth/account/info/restore/pw'; //重置密码
|
||||
static String updateUserInfo =
|
||||
'$baseUrl/auth/account/info/nameAndHead'; //更新用户资料
|
||||
static String autoLogin = '$baseUrl/auth/account/info/autoLogin'; //自动登录
|
||||
|
||||
//订单管理
|
||||
static String orderList = "/api/order/info/list"; //订单列表
|
||||
static String orderQianshou = "/api/order/info/get"; //签收
|
||||
|
||||
//分享设备
|
||||
static String deviceInvite = '$baseUrl/api/device/info/share'; //分享设备
|
||||
|
||||
// Add more endpoints as needed
|
||||
//添加/床垫控制日志
|
||||
static String addLog = '$baseUrl/oplog/add';
|
||||
}
|
||||
19
lib/common/color/app_uri_status.dart
Normal file
19
lib/common/color/app_uri_status.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
// lib/http_status_codes.dart
|
||||
|
||||
class HttpStatusCodes {
|
||||
// Success codes
|
||||
static const int ok = 1;
|
||||
static const int created = 201;
|
||||
static const int accepted = 202;
|
||||
|
||||
// Client error codes
|
||||
static const int badRequest = 400;
|
||||
static const int unauthorized = 401;
|
||||
static const int forbidden = 403;
|
||||
static const int notFound = 404;
|
||||
|
||||
// Server error codes
|
||||
static const int internalServerError = 500;
|
||||
static const int notImplemented = 501;
|
||||
static const int serviceUnavailable = 503;
|
||||
}
|
||||
9
lib/common/color/delivery_status.dart
Normal file
9
lib/common/color/delivery_status.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class DeliveryStatus {
|
||||
// 私有构造函数,防止实例化
|
||||
const DeliveryStatus._();
|
||||
|
||||
// 物流状态常量
|
||||
static const String no_de = '待发货';//下单之后待发货
|
||||
static const String has_de = '已发货';//确认发货
|
||||
static const String completed = '已签收';//签收
|
||||
}
|
||||
37
lib/common/color/order_status.dart
Normal file
37
lib/common/color/order_status.dart
Normal file
@@ -0,0 +1,37 @@
|
||||
class OrderStatus {
|
||||
// 私有构造函数,防止实例化
|
||||
const OrderStatus._();
|
||||
|
||||
// 订单状态常量值
|
||||
static const int noPay = 1; // 已下单,待支付(both)
|
||||
static const int paid = 2; // 已支付(app),待确认(web)
|
||||
static const int toBeShipped = 3; // 已确认(web),待发货(app)
|
||||
static const int toBeReceived = 4; // 已发货(web),待签收(app)
|
||||
static const int received = 5; // 已签收(app),待完成(web)
|
||||
static const int closed = 6; // 已关闭(both)
|
||||
static const int completed = 7; // 已完成(web),已签收(app)
|
||||
|
||||
// 订单状态编号与描述的映射
|
||||
static const Map<int, String> statuses = {
|
||||
1: '待支付', // 已下单,待支付(both)
|
||||
2: '已支付', // 已支付(app),待确认(web)
|
||||
3: '待发货', // 已确认(web),待发货(app)
|
||||
4: '待签收', // 已发货(web),待签收(app)
|
||||
5: '已签收', // 已签收(app),待完成(web)
|
||||
6: '已关闭', // 已关闭(both)
|
||||
7: '已签收', // 已完成(web),已签收(app)
|
||||
};
|
||||
|
||||
// 根据编号获取状态名称的描述
|
||||
static String getDescriptionByCode(int code) {
|
||||
return statuses[code] ?? '未知状态';
|
||||
}
|
||||
|
||||
// 根据状态名称获取编号
|
||||
static int getCodeByDescription(String description) {
|
||||
return statuses.entries
|
||||
.firstWhere((element) => element.value == description,
|
||||
orElse: () => MapEntry(0, '未知状态'))
|
||||
.key;
|
||||
}
|
||||
}
|
||||
10
lib/common/color/pay_status.dart
Normal file
10
lib/common/color/pay_status.dart
Normal file
@@ -0,0 +1,10 @@
|
||||
class PayStatus {
|
||||
// 私有构造函数,防止实例化
|
||||
const PayStatus._();
|
||||
|
||||
// 支付状态常量
|
||||
static const String no_pay = '待支付';
|
||||
static const String have_pay = '已支付';
|
||||
static const String close = '已关闭';
|
||||
|
||||
}
|
||||
9
lib/common/color/repair_status.dart
Normal file
9
lib/common/color/repair_status.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class RepairStatus {
|
||||
// 私有构造函数,防止实例化
|
||||
const RepairStatus._();
|
||||
|
||||
// 维修状态常量
|
||||
static const String pending = '审核中';
|
||||
static const String approved = '审核通过';
|
||||
static const String completed = '已完成';
|
||||
}
|
||||
Reference in New Issue
Block a user