Commit 3d7a531d7384a70adb39bc5eba4928196dc604e8

Authored by weixin_45529955
1 parent 688b07fd

语音控制设置

@@ -20,19 +20,19 @@ if (flutterRoot == null) { @@ -20,19 +20,19 @@ if (flutterRoot == null) {
20 20
21 21
22 22
23 -def flutterVersionCode = "707" 23 +def flutterVersionCode = "710"
24 if (flutterVersionCode == null) { 24 if (flutterVersionCode == null) {
25 - flutterVersionCode = '707' 25 + flutterVersionCode = '710'
26 26
27 27
28 28
29 } 29 }
30 30
31 31
32 -def flutterVersionName = "7.0.7" 32 +def flutterVersionName = "7.1.0"
33 33
34 if (flutterVersionName == null) { 34 if (flutterVersionName == null) {
35 - flutterVersionName = '7.0.7' 35 + flutterVersionName = '7.1.0'
36 36
37 } 37 }
38 38
  1 +/**
  2 + * 商家语音欢迎致辞配置
  3 + * 对应接口:App.Seller.GetVoiceWelcomeConfig / App.Seller.SaveVoiceWelcomeConfig
  4 + */
  5 +class VoiceWelcomeConfigModel {
  6 + String? isVoiceWelcome; //是否开启语音欢迎致辞 0/1
  7 + String? welcomeContent; //预订人语音欢迎致辞模板
  8 + String? inviteeSameAsReserver; //被请人播报是否与预订人一致 0/1
  9 + String? inviteeDefaultContent; //被请人默认语音欢迎致辞模板
  10 + String? inviteeSpecialContent; //被请人特殊用餐类型语音欢迎致辞模板
  11 + String? isInviteeSpecialEnabled; //是否启用特殊用餐类型语音播报 0/1
  12 + List<String>? specialReserveTypes; //已选特殊用餐类型
  13 + List<String>? reserveTypeOptions; //全部用餐类型选项
  14 + List<VoiceWelcomePlaceholderModel>? placeholderButtons; //可变字段按钮
  15 +
  16 + VoiceWelcomeConfigModel(
  17 + {this.isVoiceWelcome,
  18 + this.welcomeContent,
  19 + this.inviteeSameAsReserver,
  20 + this.inviteeDefaultContent,
  21 + this.inviteeSpecialContent,
  22 + this.isInviteeSpecialEnabled,
  23 + this.specialReserveTypes,
  24 + this.reserveTypeOptions,
  25 + this.placeholderButtons});
  26 +
  27 + VoiceWelcomeConfigModel.fromJson(Map<String, dynamic> json) {
  28 + isVoiceWelcome = json['is_voice_welcome']?.toString();
  29 + welcomeContent = json['welcome_content']?.toString();
  30 + inviteeSameAsReserver = json['invitee_same_as_reserver']?.toString();
  31 + inviteeDefaultContent = json['invitee_default_content']?.toString();
  32 + inviteeSpecialContent = json['invitee_special_content']?.toString();
  33 + isInviteeSpecialEnabled =
  34 + json['is_invitee_special_enabled']?.toString();
  35 + if (json['special_reserve_types'] is List) {
  36 + specialReserveTypes = (json['special_reserve_types'] as List)
  37 + .map((e) => e.toString())
  38 + .toList();
  39 + }
  40 + if (json['reserve_type_options'] is List) {
  41 + reserveTypeOptions =
  42 + (json['reserve_type_options'] as List).map((e) => e.toString()).toList();
  43 + }
  44 + if (json['placeholder_buttons'] is List) {
  45 + placeholderButtons = [];
  46 + (json['placeholder_buttons'] as List).forEach((v) {
  47 + placeholderButtons!.add(
  48 + VoiceWelcomePlaceholderModel.fromJson(v as Map<String, dynamic>));
  49 + });
  50 + }
  51 + }
  52 +}
  53 +
  54 +///可变字段按钮(如 年月日 -> {预订日期})
  55 +class VoiceWelcomePlaceholderModel {
  56 + String? name;
  57 + String? placeholder;
  58 +
  59 + VoiceWelcomePlaceholderModel({this.name, this.placeholder});
  60 +
  61 + VoiceWelcomePlaceholderModel.fromJson(Map<String, dynamic> json) {
  62 + name = json['name']?.toString();
  63 + placeholder = json['placeholder']?.toString();
  64 + }
  65 +}
@@ -507,6 +507,11 @@ class HttpUrl { @@ -507,6 +507,11 @@ class HttpUrl {
507 static const String get_reserve_type_field = 507 static const String get_reserve_type_field =
508 "?service=App.Seller.GetReserveTypeField"; // 获取用餐类型 508 "?service=App.Seller.GetReserveTypeField"; // 获取用餐类型
509 509
  510 + static const String get_voice_welcome_config =
  511 + "?service=App.Seller.GetVoiceWelcomeConfig"; //获取商家语音欢迎致辞配置
  512 + static const String save_voice_welcome_config =
  513 + "?service=App.Seller.SaveVoiceWelcomeConfig"; //保存商家语音欢迎致辞配置
  514 +
510 static const String set_reserve_deposit = 515 static const String set_reserve_deposit =
511 "?service=App.Reserve.SetReserveDeposit"; // 取消订单设置订金走向 516 "?service=App.Reserve.SetReserveDeposit"; // 取消订单设置订金走向
512 517
  1 +import 'dart:convert';
  2 +
  3 +import 'package:flutter/material.dart';
  4 +import 'package:one_key/constant/constant.dart';
  5 +import 'package:one_key/models/get_reserve_type_field_model.dart';
  6 +import 'package:one_key/models/voice_welcome_config_model.dart';
  7 +import 'package:one_key/net/base_resp.dart';
  8 +import 'package:one_key/net/dio_util.dart';
  9 +import 'package:one_key/net/http_url.dart';
  10 +import 'package:one_key/provider/user_model.dart';
  11 +import 'package:one_key/res/colors.dart';
  12 +import 'package:one_key/utils/screen_util.dart';
  13 +import 'package:one_key/utils/utils.dart';
  14 +import 'package:one_key/widgets/MyDivider.dart';
  15 +import 'package:one_key/widgets/round_button.dart';
  16 +import 'package:one_key/widgets/system_app_bar.dart';
  17 +import 'package:one_key/widgets/v_empty_view.dart';
  18 +import 'package:provider/provider.dart';
  19 +
  20 +/***
  21 + * 语音欢迎致辞设置
  22 + */
  23 +class VoiceWelcomeSettingPage extends StatefulWidget {
  24 + VoiceWelcomeSettingPage({Key? key}) : super(key: key);
  25 +
  26 + @override
  27 + _VoiceWelcomeSettingPageState createState() =>
  28 + _VoiceWelcomeSettingPageState();
  29 +}
  30 +
  31 +class _VoiceWelcomeSettingPageState extends State<VoiceWelcomeSettingPage> {
  32 + bool addVoiceInfo = false; //预订安排中附加语音欢迎致辞
  33 + bool guestVoiceSame = true; //被请人语音播报与预订人一致
  34 + bool specialVoiceEnabled = false; //是否启用特殊用餐类型语音播报
  35 +
  36 + TextEditingController voiceIncoC = TextEditingController(); //预订人语音播报
  37 + TextEditingController guestDefaultC = TextEditingController(); //被请人默认
  38 + TextEditingController guestSpecialC = TextEditingController(); //被请人特殊
  39 +
  40 + FocusNode voiceIncoNode = FocusNode();
  41 + FocusNode guestDefaultNode = FocusNode();
  42 + FocusNode guestSpecialNode = FocusNode();
  43 +
  44 + List<VoiceWelcomePlaceholderModel> changeFieldData = []; //可变字段标签
  45 + List<GetReserveTypeFieldsSunModel>? mealTypes = []; //用餐类型
  46 + bool mealTypesError = false; //用餐类型接口加载失败
  47 +
  48 + static const String defaultVoiceText =
  49 + '尊敬的贵宾,您好!\n欢迎您选择本店。\n您的就餐安排在{预订日期},{餐段},坐席位于{桌位}。\n预祝您用餐愉快,期待您的光临!';
  50 +
  51 + @override
  52 + void initState() {
  53 + super.initState();
  54 + voiceIncoC.text = defaultVoiceText;
  55 + guestDefaultC.text = defaultVoiceText;
  56 + guestSpecialC.text = defaultVoiceText;
  57 +
  58 + WidgetsBinding.instance.addPostFrameCallback((_) {
  59 + _getData();
  60 + });
  61 + }
  62 +
  63 + @override
  64 + void dispose() {
  65 + voiceIncoC.dispose();
  66 + guestDefaultC.dispose();
  67 + guestSpecialC.dispose();
  68 + voiceIncoNode.dispose();
  69 + guestDefaultNode.dispose();
  70 + guestSpecialNode.dispose();
  71 + super.dispose();
  72 + }
  73 +
  74 + _getData() async {
  75 + try {
  76 + String? sid =
  77 + Provider.of<UserModel>(context, listen: false).user?.sellerid;
  78 + BaseResp<dynamic> baseResp = await DioUtil().request<dynamic>(
  79 + context, Method.post, HttpUrl.get_voice_welcome_config,
  80 + data: {'sid': sid}, showLoading: false);
  81 + if (baseResp.code == Constant.status_success &&
  82 + baseResp.data != null &&
  83 + baseResp.data is Map) {
  84 + VoiceWelcomeConfigModel model = VoiceWelcomeConfigModel.fromJson(
  85 + baseResp.data as Map<String, dynamic>);
  86 + addVoiceInfo = model.isVoiceWelcome == '1' ? true : false;
  87 + guestVoiceSame =
  88 + model.inviteeSameAsReserver == '1' ? true : false;
  89 + voiceIncoC.text = (model.welcomeContent != null &&
  90 + model.welcomeContent!.isNotEmpty)
  91 + ? model.welcomeContent!
  92 + : defaultVoiceText;
  93 + guestDefaultC.text = (model.inviteeDefaultContent != null &&
  94 + model.inviteeDefaultContent!.isNotEmpty)
  95 + ? model.inviteeDefaultContent!
  96 + : defaultVoiceText;
  97 + guestSpecialC.text = (model.inviteeSpecialContent != null &&
  98 + model.inviteeSpecialContent!.isNotEmpty)
  99 + ? model.inviteeSpecialContent!
  100 + : defaultVoiceText;
  101 + specialVoiceEnabled =
  102 + model.isInviteeSpecialEnabled == '1' ? true : false;
  103 + //可变字段按钮
  104 + changeFieldData = model.placeholderButtons ?? [];
  105 + //用餐类型及已选状态
  106 + mealTypes = [];
  107 + model.reserveTypeOptions?.forEach((v) {
  108 + GetReserveTypeFieldsSunModel temp =
  109 + GetReserveTypeFieldsSunModel(name: v, select: false);
  110 + if (model.specialReserveTypes != null &&
  111 + model.specialReserveTypes!.contains(v)) {
  112 + temp.select = true;
  113 + }
  114 + mealTypes!.add(temp);
  115 + });
  116 + mealTypesError = false;
  117 + } else {
  118 + mealTypesError = true;
  119 + if (baseResp.msg != null && baseResp.msg!.isNotEmpty) {
  120 + Utils.showToast(baseResp.msg!);
  121 + }
  122 + }
  123 + } catch (error) {
  124 + print(error.toString());
  125 + mealTypesError = true;
  126 + }
  127 + if (mounted) {
  128 + setState(() {});
  129 + }
  130 + }
  131 +
  132 + ///在光标处插入可变字段
  133 + _insertField(
  134 + TextEditingController controller, VoiceWelcomePlaceholderModel field) {
  135 + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
  136 + int cursorPosition = controller.selection.baseOffset;
  137 + if (cursorPosition != -1) {
  138 + controller.text = controller.text.substring(0, cursorPosition) +
  139 + (field.placeholder ?? '') +
  140 + controller.text.substring(cursorPosition);
  141 + controller.selection = TextSelection.fromPosition(
  142 + TextPosition(
  143 + offset: cursorPosition + field.placeholder!.length,
  144 + affinity: TextAffinity.downstream));
  145 + } else {
  146 + controller.text += field.placeholder ?? '';
  147 + }
  148 + setState(() {});
  149 + }
  150 +
  151 + ///可变字段标签(全部青绿实底白字)
  152 + Widget _fieldChip(
  153 + TextEditingController controller, VoiceWelcomePlaceholderModel field) {
  154 + return InkWell(
  155 + onTap: () {
  156 + _insertField(controller, field);
  157 + },
  158 + child: Container(
  159 + padding: EdgeInsets.symmetric(horizontal: w(8), vertical: w(5)),
  160 + decoration: BoxDecoration(
  161 + color: MyColours.color_529EA4,
  162 + borderRadius: BorderRadius.circular(r(5)),
  163 + ),
  164 + child: Text(
  165 + field.name!,
  166 + style: TextStyle(
  167 + color: MyColours.color_ffffff,
  168 + fontSize: font(12),
  169 + fontWeight: FontWeight.bold),
  170 + ),
  171 + ),
  172 + );
  173 + }
  174 +
  175 + Widget _chipsWrap(
  176 + TextEditingController controller, List<VoiceWelcomePlaceholderModel> data) {
  177 + return Padding(
  178 + padding: EdgeInsets.only(left: w(30)),
  179 + child: Wrap(
  180 + spacing: w(10),
  181 + runSpacing: w(10),
  182 + children:
  183 + data.map((e) => _fieldChip(controller, e)).toList(),
  184 + ),
  185 + );
  186 + }
  187 +
  188 + Widget _sectionHeader(String title, {double? left}) {
  189 + return Padding(
  190 + padding: EdgeInsets.only(left: left ?? w(16)),
  191 + child: Align(
  192 + alignment: Alignment.centerLeft,
  193 + child: Text(
  194 + title,
  195 + style: TextStyle(
  196 + color: MyColours.color_666666,
  197 + fontSize: font(12)),
  198 + ),
  199 + ),
  200 + );
  201 + }
  202 +
  203 + ///特殊用餐类型标题行(右侧带启用复选框)
  204 + Widget _specialHeader() {
  205 + return InkWell(
  206 + onTap: () {
  207 + setState(() {
  208 + specialVoiceEnabled = !specialVoiceEnabled;
  209 + });
  210 + },
  211 + child: Padding(
  212 + padding: EdgeInsets.only(left: w(30), right: w(16)),
  213 + child: Row(
  214 + children: [
  215 + Expanded(
  216 + child: Text(
  217 + '被请人语音播报设置(特殊用餐类型)',
  218 + style: TextStyle(
  219 + color: MyColours.color_666666, fontSize: font(12)),
  220 + ),
  221 + ),
  222 + Image.asset(
  223 + Utils.getImgPath(
  224 + specialVoiceEnabled ? 'f_select' : 'f_select_not'),
  225 + width: w(22),
  226 + ),
  227 + ],
  228 + ),
  229 + ),
  230 + );
  231 + }
  232 +
  233 + Widget _divider() {
  234 + return Padding(
  235 + padding: EdgeInsets.only(left: w(16), right: w(12)),
  236 + child: MyDivider(double.infinity, w(0.5),
  237 + color: MyColours.color_E7E7E7),
  238 + );
  239 + }
  240 +
  241 + Widget _textArea(TextEditingController controller, String hint) {
  242 + return Container(
  243 + width: double.infinity,
  244 + margin: EdgeInsets.symmetric(horizontal: w(30)),
  245 + padding: EdgeInsets.symmetric(horizontal: w(10), vertical: w(10)),
  246 + alignment: Alignment.topLeft,
  247 + decoration: BoxDecoration(
  248 + color: MyColours.color_ffffff,
  249 + border: Border.all(color: MyColours.color_DBDBDB, width: w(1)),
  250 + borderRadius: BorderRadius.circular(r(10)),
  251 + ),
  252 + child: TextField(
  253 + controller: controller,
  254 + style: TextStyle(
  255 + color: MyColours.color_777777,
  256 + fontSize: font(14),
  257 + textBaseline: TextBaseline.alphabetic),
  258 + textAlignVertical: TextAlignVertical.center,
  259 + maxLines: 7,
  260 + decoration: InputDecoration(
  261 + hintText: hint,
  262 + hintStyle: TextStyle(
  263 + color: MyColours.color_999999,
  264 + fontSize: font(14),
  265 + ),
  266 + contentPadding: EdgeInsets.zero,
  267 + border: OutlineInputBorder(borderSide: BorderSide.none),
  268 + ),
  269 + keyboardType: TextInputType.multiline,
  270 + ),
  271 + );
  272 + }
  273 +
  274 + Widget _hintText() {
  275 + return Padding(
  276 + padding: EdgeInsets.only(left: w(30)),
  277 + child: Align(
  278 + alignment: Alignment.centerLeft,
  279 + child: Text(
  280 + '*{预订日期}、{餐段}、{桌位}不能修改,可以删除。',
  281 + style: TextStyle(color: MyColours.color_B0B0B0, fontSize: font(12)),
  282 + ),
  283 + ),
  284 + );
  285 + }
  286 +
  287 + Widget _radioRow(String title, bool selected, VoidCallback onTap) {
  288 + return InkWell(
  289 + onTap: onTap,
  290 + child: Container(
  291 + width: double.infinity,
  292 + padding: EdgeInsets.only(
  293 + left: w(16), right: w(16), top: w(20), bottom: w(20)),
  294 + child: Row(
  295 + children: [
  296 + Expanded(
  297 + child: Text(
  298 + title,
  299 + style: TextStyle(
  300 + color: MyColours.color_666666, fontSize: font(14)),
  301 + ),
  302 + ),
  303 + Image.asset(
  304 + Utils.getImgPath(selected ? 'f_radio_sel' : 'f_radio_un'),
  305 + width: w(20),
  306 + ),
  307 + ],
  308 + ),
  309 + ),
  310 + );
  311 + }
  312 +
  313 + Widget _mealChipsWrap() {
  314 + if (mealTypes == null || mealTypes!.isEmpty) {
  315 + return InkWell(
  316 + onTap: () {
  317 + _getData();
  318 + },
  319 + child: Padding(
  320 + padding: EdgeInsets.only(left: w(30)),
  321 + child: Row(
  322 + children: [
  323 + Text(
  324 + '暂无用餐类型数据,点击重试',
  325 + style: TextStyle(
  326 + color: MyColours.color_666666, fontSize: font(12)),
  327 + ),
  328 + ],
  329 + ),
  330 + ),
  331 + );
  332 + }
  333 + return Padding(
  334 + padding: EdgeInsets.only(left: w(30)),
  335 + child: Wrap(
  336 + spacing: w(10),
  337 + runSpacing: w(10),
  338 + children: mealTypes!.map((item) {
  339 + bool selected = item.select ?? false;
  340 + return InkWell(
  341 + onTap: () {
  342 + setState(() {
  343 + item.select = !selected;
  344 + });
  345 + },
  346 + child: Container(
  347 + padding: EdgeInsets.symmetric(horizontal: w(10), vertical: w(5)),
  348 + decoration: BoxDecoration(
  349 + color: selected
  350 + ? MyColours.color_529EA4
  351 + : MyColours.color_ffffff,
  352 + borderRadius: BorderRadius.circular(r(5)),
  353 + border: Border.all(
  354 + width: w(1),
  355 + color: selected
  356 + ? MyColours.color_529EA4
  357 + : MyColours.color_B7B7B7),
  358 + ),
  359 + child: Text(
  360 + item.name ?? '',
  361 + style: TextStyle(
  362 + color: selected
  363 + ? MyColours.color_ffffff
  364 + : MyColours.color_B0B0B0,
  365 + fontSize: font(12),
  366 + ),
  367 + ),
  368 + ),
  369 + );
  370 + }).toList(),
  371 + ),
  372 + );
  373 + }
  374 +
  375 + _save() async {
  376 + if (addVoiceInfo && voiceIncoC.text.trim().isEmpty) {
  377 + Utils.showToast('请输入语音欢迎致辞!');
  378 + return;
  379 + }
  380 + List<String> selectedMealTypes = [];
  381 + mealTypes?.forEach((item) {
  382 + if (item.select ?? false) {
  383 + selectedMealTypes.add(item.name ?? '');
  384 + }
  385 + });
  386 +
  387 + Map<String, String?> params = {
  388 + 'sid': Provider.of<UserModel>(context, listen: false).user?.sellerid,
  389 + 'is_voice_welcome': addVoiceInfo ? '1' : '0',
  390 + 'welcome_content': voiceIncoC.text,
  391 + 'invitee_same_as_reserver': guestVoiceSame ? '1' : '0',
  392 + 'invitee_default_content': guestDefaultC.text,
  393 + 'invitee_special_content': guestSpecialC.text,
  394 + 'special_reserve_types': json.encode(selectedMealTypes),
  395 + 'is_invitee_special_enabled': specialVoiceEnabled ? '1' : '0',
  396 + };
  397 +
  398 + try {
  399 + BaseResp<dynamic> baseResp = await DioUtil().request<dynamic>(
  400 + context, Method.post, HttpUrl.save_voice_welcome_config,
  401 + data: params, showLoading: true);
  402 + if (baseResp.code == Constant.status_success) {
  403 + Utils.showToast('保存成功');
  404 + if (Navigator.canPop(context)) {
  405 + Navigator.pop(context);
  406 + }
  407 + } else {
  408 + if (baseResp.msg != null && baseResp.msg!.isNotEmpty) {
  409 + Utils.showToast(baseResp.msg!);
  410 + }
  411 + }
  412 + } catch (error) {
  413 + print(error.toString());
  414 + }
  415 + }
  416 +
  417 + @override
  418 + Widget build(BuildContext context) {
  419 + return Scaffold(
  420 + backgroundColor: MyColours.color_ffffff,
  421 + appBar: SystemAppBar('语音欢迎致辞设置'),
  422 + body: Column(
  423 + children: [
  424 + Expanded(
  425 + child: SingleChildScrollView(
  426 + child: Column(
  427 + crossAxisAlignment: CrossAxisAlignment.start,
  428 + children: [
  429 + //预订安排中附加语音欢迎致辞
  430 + InkWell(
  431 + onTap: () {
  432 + setState(() {
  433 + addVoiceInfo = !addVoiceInfo;
  434 + });
  435 + },
  436 + child: Container(
  437 + width: double.infinity,
  438 + margin: EdgeInsets.only(left: w(16), right: w(16)),
  439 + padding:
  440 + EdgeInsets.symmetric(vertical: w(24)),
  441 + child: Row(
  442 + children: [
  443 + Text(
  444 + '预订安排中附加语音欢迎致辞',
  445 + style: TextStyle(
  446 + color: MyColours.color_666666,
  447 + fontSize: font(16)),
  448 + ),
  449 + Spacer(),
  450 + Image.asset(
  451 + Utils.getImgPath(
  452 + addVoiceInfo ? 'swich_on' : 'swich_off'),
  453 + width: w(44),
  454 + ),
  455 + ],
  456 + ),
  457 + ),
  458 + ),
  459 + _divider(),
  460 + if (addVoiceInfo) ...[
  461 + VEmptyView(8),
  462 + _sectionHeader('预订人语音播报设置'),
  463 + VEmptyView(16),
  464 + _textArea(voiceIncoC, '点击录入语音欢迎致辞'),
  465 + VEmptyView(16),
  466 + _hintText(),
  467 + VEmptyView(16),
  468 + _chipsWrap(voiceIncoC, changeFieldData),
  469 + VEmptyView(24),
  470 + _divider(),
  471 + VEmptyView(24),
  472 + _sectionHeader('被请人语音播报设置'),
  473 + VEmptyView(24),
  474 + _radioRow('被请人语音播报与预订人一致', guestVoiceSame, () {
  475 + setState(() {
  476 + guestVoiceSame = true;
  477 + });
  478 + }),
  479 + _divider(),
  480 + _radioRow('被请人语音播报与预订人不一致', !guestVoiceSame, () {
  481 + setState(() {
  482 + guestVoiceSame = false;
  483 + });
  484 + }),
  485 + if (!guestVoiceSame) ...[
  486 + _divider(),
  487 + VEmptyView(16),
  488 + _sectionHeader('被请人语音播报设置(默认)', left: w(30)),
  489 + VEmptyView(16),
  490 + _textArea(guestDefaultC, '点击录入被请人语音播报'),
  491 + VEmptyView(16),
  492 + _hintText(),
  493 + VEmptyView(16),
  494 + _chipsWrap(guestDefaultC, changeFieldData),
  495 + VEmptyView(24),
  496 + _specialHeader(),
  497 + if (specialVoiceEnabled) ...[
  498 + VEmptyView(16),
  499 + _textArea(guestSpecialC, '点击录入特殊用餐类型语音播报'),
  500 + VEmptyView(16),
  501 + _hintText(),
  502 + VEmptyView(16),
  503 + _chipsWrap(guestSpecialC, changeFieldData),
  504 + VEmptyView(24),
  505 + Padding(
  506 + padding: EdgeInsets.only(left: w(30)),
  507 + child: Text(
  508 + '请选择该语音播报适用的用餐类型',
  509 + style: TextStyle(
  510 + color: MyColours.color_666666,
  511 + fontSize: font(12)),
  512 + ),
  513 + ),
  514 + VEmptyView(16),
  515 + _mealChipsWrap(),
  516 + ],
  517 + ],
  518 + VEmptyView(32),
  519 + ],
  520 + ],
  521 + ),
  522 + ),
  523 + ),
  524 + Container(
  525 + color: MyColours.color_ffffff,
  526 + padding: EdgeInsets.only(
  527 + left: w(24), right: w(24), top: w(12), bottom: w(25)),
  528 + child: RoundButton(
  529 + text: '保存',
  530 + gradientStart: MyColours.color_529EA4,
  531 + gradientEnd: MyColours.color_529EA4,
  532 + radius: r(5),
  533 + fontSize: 34,
  534 + height: w(40),
  535 + isBold: true,
  536 + onPressed: () {
  537 + _save();
  538 + },
  539 + ),
  540 + ),
  541 + ],
  542 + ),
  543 + );
  544 + }
  545 +}
@@ -600,6 +600,9 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { @@ -600,6 +600,9 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> {
600 _item('预订信息模块设置', onTap: () { 600 _item('预订信息模块设置', onTap: () {
601 NavigatorUtil.goBookInfoPage(context); 601 NavigatorUtil.goBookInfoPage(context);
602 }), 602 }),
  603 + _item('语音欢迎致辞设置', onTap: () {
  604 + NavigatorUtil.goVoiceWelcomeSettingPage(context);
  605 + }),
603 _item('店铺介绍模块设置', onTap: () { 606 _item('店铺介绍模块设置', onTap: () {
604 NavigatorUtil.goStoreIntroducePage(context); 607 NavigatorUtil.goStoreIntroducePage(context);
605 }), 608 }),
@@ -168,4 +168,5 @@ class MyColours { @@ -168,4 +168,5 @@ class MyColours {
168 static const Color color_BA9953 = Color(0xffBA9953); 168 static const Color color_BA9953 = Color(0xffBA9953);
169 static const Color color_D7F7F7 = Color(0xffD7F7F7); 169 static const Color color_D7F7F7 = Color(0xffD7F7F7);
170 static const Color color_2AB5B7 = Color(0xff2AB5B7); 170 static const Color color_2AB5B7 = Color(0xff2AB5B7);
  171 + static const Color color_529EA4 = Color(0xff529EA4);
171 } 172 }
@@ -1702,6 +1702,15 @@ class NavigatorUtil { @@ -1702,6 +1702,15 @@ class NavigatorUtil {
1702 return _navigateTo(context, "${Routes.book_info_page}", replace: replace); 1702 return _navigateTo(context, "${Routes.book_info_page}", replace: replace);
1703 } 1703 }
1704 1704
  1705 + ///预订安排通知定制------语音欢迎致辞设置
  1706 + static Future<dynamic> goVoiceWelcomeSettingPage(
  1707 + BuildContext context, {
  1708 + replace = false,
  1709 + }) {
  1710 + return _navigateTo(context, "${Routes.voice_welcome_setting_page}",
  1711 + replace: replace);
  1712 + }
  1713 +
1705 ///预订安排通知定制------预订信息展示 1714 ///预订安排通知定制------预订信息展示
1706 static Future<dynamic> goBookInfoPageSim( 1715 static Future<dynamic> goBookInfoPageSim(
1707 BuildContext context, { 1716 BuildContext context, {
@@ -265,6 +265,7 @@ import '../pages/my/marketing_center/book_notification/first_image_page.dart'; @@ -265,6 +265,7 @@ import '../pages/my/marketing_center/book_notification/first_image_page.dart';
265 import '../pages/my/marketing_center/book_notification/marking_coupon_select_page.dart'; 265 import '../pages/my/marketing_center/book_notification/marking_coupon_select_page.dart';
266 import '../pages/my/marketing_center/book_notification/marking_preview_page.dart'; 266 import '../pages/my/marketing_center/book_notification/marking_preview_page.dart';
267 import '../pages/my/marketing_center/book_notification/marking_recharge_select_page.dart'; 267 import '../pages/my/marketing_center/book_notification/marking_recharge_select_page.dart';
  268 +import '../pages/my/marketing_center/book_notification/voice_welcome_setting_page.dart';
268 import '../pages/my/marketing_center/book_notification/park_info_page.dart'; 269 import '../pages/my/marketing_center/book_notification/park_info_page.dart';
269 import '../pages/my/marketing_center/book_notification/store_introduce_page.dart'; 270 import '../pages/my/marketing_center/book_notification/store_introduce_page.dart';
270 import '../pages/my/marketing_center/comments_setting_page.dart'; 271 import '../pages/my/marketing_center/comments_setting_page.dart';
@@ -3195,8 +3196,14 @@ var storeIntroducePageHandle = new Handler( @@ -3195,8 +3196,14 @@ var storeIntroducePageHandle = new Handler(
3195 // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first))); 3196 // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first)));
3196 return ChangeNotifierProvider<MarketingCenterProvider>( 3197 return ChangeNotifierProvider<MarketingCenterProvider>(
3197 create: (_) => MarketingCenterProvider(), 3198 create: (_) => MarketingCenterProvider(),
3198 - child: ChangeNotifierProvider<StoreBaseIndoProvider>(  
3199 - create: (_) => StoreBaseIndoProvider(), child: StoreIntroducePage())); 3199 + child: ChangeNotifierProvider<StoreBaseIndoProvider>(
  3200 + create: (_) => StoreBaseIndoProvider(), child: StoreIntroducePage()));
  3201 +});
  3202 +
  3203 +//我的----营销中心-语音欢迎致辞设置
  3204 +var voiceWelcomeSettingPageHandle = new Handler(
  3205 + handlerFunc: (BuildContext? context, Map<dynamic, List<Object>> params) {
  3206 + return VoiceWelcomeSettingPage();
3200 }); 3207 });
3201 3208
3202 //我的----营销中心-主厨介绍 3209 //我的----营销中心-主厨介绍
@@ -240,6 +240,8 @@ class Routes { @@ -240,6 +240,8 @@ class Routes {
240 static String book_info_page = "/book_info_page"; //预订安排通知定制------预订信息展示 240 static String book_info_page = "/book_info_page"; //预订安排通知定制------预订信息展示
241 static String book_info_page_sim = 241 static String book_info_page_sim =
242 "/book_info_page_sim"; //预订安排通知定制------预订信息展示 242 "/book_info_page_sim"; //预订安排通知定制------预订信息展示
  243 + static String voice_welcome_setting_page =
  244 + "/voice_welcome_setting_page"; //预订安排通知定制------语音欢迎致辞设置
243 245
244 static String store_introduce_page = 246 static String store_introduce_page =
245 "/store_introduce_page"; //预订安排通知定制------店铺介绍 247 "/store_introduce_page"; //预订安排通知定制------店铺介绍
@@ -707,6 +709,8 @@ class Routes { @@ -707,6 +709,8 @@ class Routes {
707 router.define(book_info_page, handler: bookInfoPageHandle); 709 router.define(book_info_page, handler: bookInfoPageHandle);
708 710
709 router.define(book_info_page_sim, handler: bookInfoPageSimHandle); 711 router.define(book_info_page_sim, handler: bookInfoPageSimHandle);
  712 + router.define(voice_welcome_setting_page,
  713 + handler: voiceWelcomeSettingPageHandle);
710 router.define(store_introduce_page, handler: storeIntroducePageHandle); 714 router.define(store_introduce_page, handler: storeIntroducePageHandle);
711 router.define(chef_introduce_page, handler: chefIntroducePageHandle); 715 router.define(chef_introduce_page, handler: chefIntroducePageHandle);
712 716