更新在线客服
This commit is contained in:
@@ -3,7 +3,9 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:fluwx/fluwx.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/util/CommonVariables.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
@@ -13,6 +15,8 @@ import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:vbvs_app/pages/mh_page/user/controller/mht_login_controller.dart';
|
||||
|
||||
class NewMinePage extends StatefulWidget {
|
||||
const NewMinePage({super.key});
|
||||
|
||||
@@ -299,10 +303,17 @@ class _MinePageState extends State<NewMinePage> {
|
||||
'问题与帮助', '常见的问题汇总,如:智能床连接流程、如何查看睡眠报告',
|
||||
path: "/issueListpage"),
|
||||
_buildListTile(
|
||||
'assets/img/icon/customer_service.svg',
|
||||
'在线客服',
|
||||
'购买和使用智能床过程中,如果遇到疑问可与客服进行联系',
|
||||
path: ""),
|
||||
'assets/img/icon/customer_service.svg',
|
||||
'在线客服',
|
||||
'购买和使用智能床过程中,如果遇到疑问可与客服进行联系',
|
||||
path: "",
|
||||
onTap: () async {
|
||||
MHTLoginController mhtLoginController =
|
||||
Get.find<MHTLoginController>();
|
||||
await mhtLoginController
|
||||
.openWeChatCustomerService(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -334,85 +345,89 @@ class _MinePageState extends State<NewMinePage> {
|
||||
String svgPath,
|
||||
String title,
|
||||
String subtitle, {
|
||||
// VoidCallback? onTap,
|
||||
String? path,
|
||||
bool showTopLine = false,
|
||||
VoidCallback? onTap, // ✅ 新增可选 onTap 参数
|
||||
}) {
|
||||
return ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white,
|
||||
padding: EdgeInsets.all(0.rpx),
|
||||
onTap: () {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white,
|
||||
padding: EdgeInsets.all(0.rpx),
|
||||
onTap: () {
|
||||
if (onTap != null) {
|
||||
onTap(); // ✅ 使用外部传入的 onTap
|
||||
} else {
|
||||
if (path == null || path.isEmpty) {
|
||||
TopSlideNotification.show(context, text: "待开发功能".tr);
|
||||
} else {
|
||||
Get.toNamed(path);
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: showTopLine
|
||||
? BorderSide(color: Color(0xFF929699), width: 0.5.rpx)
|
||||
: BorderSide.none,
|
||||
bottom: BorderSide(color: Color(0xFF929699), width: 0.5.rpx),
|
||||
),
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: showTopLine
|
||||
? BorderSide(color: Color(0xFF929699), width: 0.5.rpx)
|
||||
: BorderSide.none,
|
||||
bottom: BorderSide(color: Color(0xFF929699), width: 0.5.rpx),
|
||||
),
|
||||
height: 116.rpx,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
),
|
||||
height: 116.rpx,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
svgPath,
|
||||
width: 42.rpx,
|
||||
height: 42.rpx,
|
||||
),
|
||||
SizedBox(width: 30.rpx),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
subtitle,
|
||||
style: TextStyle(
|
||||
color: Color(0xFF929699),
|
||||
fontSize: 20.rpx,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
softWrap: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
padding: EdgeInsets.only(right: 0),
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
height: 30.rpx,
|
||||
width: 30.rpx,
|
||||
child: SvgPicture.asset(
|
||||
svgPath,
|
||||
width: 42.rpx,
|
||||
height: 42.rpx,
|
||||
'assets/img/icon/expand.svg',
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 30.rpx),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center, // 垂直方向居中对齐
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// SizedBox(height: 6.rpx), // 加点间距
|
||||
Text(
|
||||
subtitle,
|
||||
style: TextStyle(
|
||||
color: Color(0xFF929699),
|
||||
fontSize: 20.rpx,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
softWrap: true, // 允许换行
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
padding: EdgeInsets.only(right: 0),
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
height: 30.rpx,
|
||||
width: 30.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/expand.svg',
|
||||
color: Colors.white,
|
||||
))),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSettingButton() {
|
||||
|
||||
Reference in New Issue
Block a user