我的设置样式 以及我的智能设备样式修改
This commit is contained in:
@@ -214,5 +214,7 @@
|
||||
"每日得分介绍": "每日得分介绍",
|
||||
"与上月对比": "与上月对比",
|
||||
"设备状态":"设备状态",
|
||||
"校准未完成提示":"校准还未完成,是否确认退出校准流程?"
|
||||
"校准未完成提示":"校准还未完成,是否确认退出校准流程?",
|
||||
"选择体重":"选择体重"
|
||||
|
||||
}
|
||||
@@ -47,5 +47,10 @@
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>openapp.jdmobile</string>
|
||||
</array>
|
||||
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
class DeliveryStatus {
|
||||
// 私有构造函数,防止实例化
|
||||
const DeliveryStatus._();
|
||||
|
||||
// 物流状态常量
|
||||
static const String no_de = '待发货';//下单之后待发货
|
||||
static const String has_de = '已发货';//确认发货
|
||||
static const String completed = '已签收';//签收
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
class PayStatus {
|
||||
// 私有构造函数,防止实例化
|
||||
const PayStatus._();
|
||||
|
||||
// 支付状态常量
|
||||
static const String no_pay = '待支付';
|
||||
static const String have_pay = '已支付';
|
||||
static const String close = '已关闭';
|
||||
|
||||
}
|
||||
@@ -236,9 +236,16 @@ class MhMessageController extends GetControllerEx<MhMessageModel> {
|
||||
if (res.code == HttpStatusCodes.ok) {
|
||||
getMessageList(messageType);
|
||||
getMessageStatus();
|
||||
|
||||
// ✅ 只有在 all 为 true 时才提示
|
||||
if (all) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: res.msg!,
|
||||
textColor: Color(0XFF00C1AA),
|
||||
);
|
||||
}
|
||||
}
|
||||
TopSlideNotification.show(context,
|
||||
text: res.msg!, textColor: Color(0XFF00C1AA));
|
||||
},
|
||||
onFailure: (res) {
|
||||
TopSlideNotification.show(context,
|
||||
|
||||
@@ -663,7 +663,7 @@ Future<void> showWeightPickerDialog(
|
||||
),
|
||||
),
|
||||
)),
|
||||
Text(title,
|
||||
Text(title.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: themeController.currentColor.sc3,
|
||||
|
||||
52
lib/pages/mh_page/component/jd.dart
Normal file
52
lib/pages/mh_page/component/jd.dart
Normal file
@@ -0,0 +1,52 @@
|
||||
import 'dart:convert';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class JDLauncher {
|
||||
/// 跳转京东店铺(App 优先)
|
||||
static Future<void> openShop(String shopUrlOrShortLink) async {
|
||||
final isShortLink = shopUrlOrShortLink.contains("3.cn");
|
||||
|
||||
if (isShortLink) {
|
||||
// 如果是短链接,比如 https://3.cn/xxxxx,直接尝试打开即可
|
||||
await _launchJD(shopUrlOrShortLink);
|
||||
} else {
|
||||
// 如果是普通店铺链接,比如 https://mall.jd.com/index-xxxxxxx.html
|
||||
final jdAppUrl = _buildJDAppUrl("m", {"url": shopUrlOrShortLink});
|
||||
await _launchJD(jdAppUrl, fallbackUrl: shopUrlOrShortLink);
|
||||
}
|
||||
}
|
||||
|
||||
/// 跳转京东商品详情页(传入 SKU)
|
||||
static Future<void> openProduct(String skuId) async {
|
||||
final webUrl = "https://item.jd.com/$skuId.html";
|
||||
final jdAppUrl = _buildJDAppUrl("productDetail", {"skuId": skuId});
|
||||
await _launchJD(jdAppUrl, fallbackUrl: webUrl);
|
||||
}
|
||||
|
||||
/// 构建京东 App 的 scheme 跳转 URL
|
||||
static String _buildJDAppUrl(String des, Map<String, dynamic> extraParams) {
|
||||
final params = {
|
||||
"category": "jump",
|
||||
"des": des,
|
||||
...extraParams,
|
||||
};
|
||||
final encoded = Uri.encodeComponent(jsonEncode(params));
|
||||
return "openapp.jdmobile://virtual?params=$encoded";
|
||||
}
|
||||
|
||||
/// 通用跳转逻辑(优先跳 App,失败跳网页)
|
||||
static Future<void> _launchJD(String url, {String? fallbackUrl}) async {
|
||||
try {
|
||||
final uri = Uri.parse(url);
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
} else if (fallbackUrl != null) {
|
||||
await launchUrl(Uri.parse(fallbackUrl), mode: LaunchMode.externalApplication);
|
||||
}
|
||||
} catch (_) {
|
||||
if (fallbackUrl != null) {
|
||||
await launchUrl(Uri.parse(fallbackUrl), mode: LaunchMode.externalApplication);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -247,7 +247,7 @@ class _EditBedPageState extends State<EditBedPage> {
|
||||
fontFamily: 'Readex Pro',
|
||||
letterSpacing: 0,
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
fontSize: 36.rpx,
|
||||
),
|
||||
),
|
||||
))
|
||||
|
||||
@@ -14,6 +14,7 @@ import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/message_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/component/jd.dart';
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:vbvs_app/pages/mh_page/user/controller/mht_login_controller.dart';
|
||||
@@ -143,7 +144,7 @@ class _MinePageState extends State<NewMinePage> {
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 30.rpx, left: 60.rpx, bottom: 70.rpx),
|
||||
top: 30.rpx, left: 60.rpx, bottom: 190.rpx),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
@@ -305,7 +306,10 @@ class _MinePageState extends State<NewMinePage> {
|
||||
),
|
||||
_buildListTile('assets/img/icon/mall.svg', '网上商城',
|
||||
'最新的智能产品线上购买服务',
|
||||
path: ""),
|
||||
path: "", onTap: () {
|
||||
JDLauncher.openShop(
|
||||
"https://mall.jd.com/index-14587480.html");
|
||||
}),
|
||||
_buildListTile('assets/img/icon/address.svg',
|
||||
'地址管理', '用于收货和报修时联系您',
|
||||
path: "/addressListPage"),
|
||||
|
||||
@@ -114,7 +114,6 @@ class _LanguageSettingState extends State<LanguageSetting> {
|
||||
horizontal: 16.rpx),
|
||||
onTap: () async {
|
||||
// 点击事件逻辑
|
||||
print('点击了语言项');
|
||||
for (var lang
|
||||
in languageController
|
||||
.languageList) {
|
||||
|
||||
Reference in New Issue
Block a user