Commit 4779ef0c8e5b7a84a71ffc3ce8a411f16d1c2588

Authored by wdn127929
1 parent 2bf7baa6

主题选择部分

@@ -111,8 +111,8 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { @@ -111,8 +111,8 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> {
111 bottom: BorderSide( 111 bottom: BorderSide(
112 color: MyColours.color_E7E7E7, width: w(0.5)))), 112 color: MyColours.color_E7E7E7, width: w(0.5)))),
113 margin: EdgeInsets.only( 113 margin: EdgeInsets.only(
114 - right: w(20), left: w(36), bottom: w(12), top: w(12)),  
115 - padding: EdgeInsets.only(top: w(12), bottom: w(12), right: w(12)), 114 + right: w(24), left: w(36), bottom: w(12), top: w(12)),
  115 + padding: EdgeInsets.only(top: w(12), bottom: w(12)),
116 child: Row( 116 child: Row(
117 children: [ 117 children: [
118 Text( 118 Text(
@@ -200,33 +200,37 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { @@ -200,33 +200,37 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> {
200 color: MyColours.color_E7E7E7)), 200 color: MyColours.color_E7E7E7)),
201 InkWell( 201 InkWell(
202 onTap: () { 202 onTap: () {
203 - setState(() {  
204 - select = !select;  
205 - }); 203 + NavigatorUtil.goInvitationThemeHomePage(context);
206 }, 204 },
207 child: Padding( 205 child: Padding(
208 padding: EdgeInsets.only( 206 padding: EdgeInsets.only(
209 left: w(16), 207 left: w(16),
210 top: w(12), 208 top: w(12),
211 bottom: w(12), 209 bottom: w(12),
212 - right: w(12)), 210 + right: w(24)),
213 child: Row( 211 child: Row(
214 mainAxisAlignment: MainAxisAlignment.spaceBetween, 212 mainAxisAlignment: MainAxisAlignment.spaceBetween,
215 children: [ 213 children: [
216 Text( 214 Text(
217 - '启用预订安排通知图文模式', 215 + '客户通知主题选择',
218 style: TextStyle( 216 style: TextStyle(
219 color: MyColours.color_515151, 217 color: MyColours.color_515151,
220 fontSize: font(16)), 218 fontSize: font(16)),
221 ), 219 ),
222 Spacer(), 220 Spacer(),
  221 + Text(
  222 + '经典图片',
  223 + style: TextStyle(
  224 + color: MyColours.color_515151,
  225 + fontSize: font(16)),
  226 + ),
223 Container( 227 Container(
224 padding: EdgeInsets.symmetric( 228 padding: EdgeInsets.symmetric(
225 - horizontal: w(7), vertical: w(4)), 229 + horizontal: w(11), vertical: w(4)),
226 child: Image.asset( 230 child: Image.asset(
227 - Utils.getImgPath(  
228 - select ? 'swich_on' : 'swich_off'),  
229 - width: w(44), 231 + "assets/arrow_right_new.png",
  232 + width: w(9),
  233 + height: w(16),
230 ), 234 ),
231 ) 235 )
232 // RoundButton( 236 // RoundButton(
@@ -249,22 +253,22 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { @@ -249,22 +253,22 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> {
249 padding: EdgeInsets.only(left: w(16)), 253 padding: EdgeInsets.only(left: w(16)),
250 child: MyDivider(double.infinity, w(0.5), 254 child: MyDivider(double.infinity, w(0.5),
251 color: MyColours.color_E7E7E7)), 255 color: MyColours.color_E7E7E7)),
252 - _item('首图形象展示', onTap: () {  
253 - NavigatorUtil.goFirstImagePage(context);  
254 - }),  
255 - _item('预订信息模块', onTap: () { 256 + // _item('首图形象展示', onTap: () {
  257 + // NavigatorUtil.goFirstImagePage(context);
  258 + // }),
  259 + _item('预订信息模块设置', onTap: () {
256 NavigatorUtil.goBookInfoPage(context); 260 NavigatorUtil.goBookInfoPage(context);
257 }), 261 }),
258 - _item('店铺介绍展示', onTap: () { 262 + _item('店铺介绍模块设置', onTap: () {
259 NavigatorUtil.goStoreIntroducePage(context); 263 NavigatorUtil.goStoreIntroducePage(context);
260 }), 264 }),
261 - _item('主厨介绍展示', onTap: () { 265 + _item('主厨介绍设置', onTap: () {
262 NavigatorUtil.goChefIntroducePage(context); 266 NavigatorUtil.goChefIntroducePage(context);
263 }), 267 }),
264 - _item('招牌菜展示', onTap: () { 268 + _item('招牌菜展示设置', onTap: () {
265 NavigatorUtil.goDishShowPage(context); 269 NavigatorUtil.goDishShowPage(context);
266 }), 270 }),
267 - _item('客户互动', onTap: () { 271 + _item('客户互动设置', onTap: () {
268 NavigatorUtil.goMarkingInteractionPage(context); 272 NavigatorUtil.goMarkingInteractionPage(context);
269 }), 273 }),
270 ], 274 ],
  1 +import 'package:cached_network_image/cached_network_image.dart';
  2 +import 'package:flutter/material.dart';
  3 +import 'package:flutter_screenutil/flutter_screenutil.dart';
  4 +import 'package:one_key/widgets/system_app_bar.dart';
  5 +import 'package:one_key/widgets/v_empty_view.dart';
  6 +
  7 +import '../../../res/colors.dart';
  8 +import '../../../utils/screen_util.dart';
  9 +import '../../../utils/utils.dart';
  10 +import '../../../widgets/MyDivider.dart';
  11 +import '../../online_check/photo_view_wiget.dart';
  12 +
  13 +/**
  14 + *
  15 + * 邀请函主题选择页面
  16 + */
  17 +
  18 +class InvitationThemeHomePage extends StatefulWidget {
  19 + InvitationThemeHomePage({Key key}) : super(key: key);
  20 +
  21 + @override
  22 + _InvitationThemeHomePageState createState() =>
  23 + _InvitationThemeHomePageState();
  24 +}
  25 +
  26 +class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
  27 + ScrollController controller = ScrollController();
  28 +
  29 + _showPhotoView(BuildContext context, int index, List<String> imgs,
  30 + {isShow = false, List dashName}) async {
  31 + // if (imgs.length == 1 &&
  32 + // imgs[0] ==
  33 + // 'http://nosqn.colorcun.com/custom/lite-online/image/def-banner.png') {
  34 + // imgs[0] = 'http://nosqn.colorcun.com/app/seller-hj-empty.png';
  35 + // }
  36 + Utils.setBarStatus(false, color: Colors.black);
  37 + dynamic result = await showGeneralDialog(
  38 + context: context,
  39 + barrierDismissible: false,
  40 + // barrierColor: Colors.red,
  41 + barrierLabel:
  42 + MaterialLocalizations.of(context).modalBarrierDismissLabel,
  43 + transitionDuration: const Duration(milliseconds: 150),
  44 + pageBuilder: (BuildContext context, Animation animation,
  45 + Animation secondaryAnimation) {
  46 + Widget child = Stack(
  47 + alignment: Alignment.bottomCenter,
  48 + children: <Widget>[
  49 + PhotoPreview(
  50 + initialIndex: index,
  51 + photoList: imgs,
  52 + isShow: isShow,
  53 + dashName: dashName),
  54 + Positioned(
  55 + bottom: w(20),
  56 + child: Container(
  57 + padding: EdgeInsets.symmetric(
  58 + horizontal: w(30), vertical: w(10)),
  59 + decoration: BoxDecoration(
  60 + color: MyColours.color_ffffff,
  61 + borderRadius: BorderRadius.circular(r(30)),
  62 + ),
  63 + child: Text(
  64 + '应用主题',
  65 + style: TextStyle(
  66 + decoration: TextDecoration.none,
  67 + color: MyColours.color_515151,
  68 + fontSize: font(16)),
  69 + ),
  70 + ))
  71 + ],
  72 + );
  73 + return child;
  74 + });
  75 + Utils.setBarStatus(true, color: Colors.white);
  76 + }
  77 +
  78 + @override
  79 + Widget build(BuildContext context) {
  80 + return Scaffold(
  81 + backgroundColor: MyColours.color_ffffff,
  82 + appBar: SystemAppBar('客户通知设置'),
  83 + body: Column(
  84 + children: [
  85 + Expanded(
  86 + child: Column(
  87 + children: [
  88 + InkWell(
  89 + onTap: () {},
  90 + child: Padding(
  91 + padding: EdgeInsets.only(
  92 + left: w(16), top: w(12), bottom: w(12), right: w(24)),
  93 + child: Row(
  94 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  95 + children: [
  96 + Text(
  97 + '主题颜色选择',
  98 + style: TextStyle(
  99 + color: MyColours.color_515151,
  100 + fontSize: font(16)),
  101 + ),
  102 + Spacer(),
  103 + Text(
  104 + '群青绿',
  105 + style: TextStyle(
  106 + color: MyColours.color_515151,
  107 + fontSize: font(16)),
  108 + ),
  109 + Container(
  110 + padding: EdgeInsets.symmetric(
  111 + horizontal: w(11), vertical: w(4)),
  112 + child: Image.asset(
  113 + "assets/arrow_right_new.png",
  114 + width: w(9),
  115 + height: w(16),
  116 + ),
  117 + )
  118 + // RoundButton(
  119 + // text: '预览',
  120 + // gradientStart: MyColours.color_ffffff,
  121 + // gradientEnd: MyColours.color_ffffff,
  122 + // borderColor: MyColours.color_438E93,
  123 + // textColor: MyColours.color_438E93,
  124 + // radius: ScreenUtil().setWidth(22),
  125 + // fontSize: 24,
  126 + // width: w(72),
  127 + // height: ScreenUtil().setWidth(44),
  128 + // isBold: true,
  129 + // onPressed: () {
  130 + // NavigatorUtil.goMarkingPreviewPage(context);
  131 + // },
  132 + // ),
  133 + ]))),
  134 + Padding(
  135 + padding: EdgeInsets.only(left: w(16)),
  136 + child: MyDivider(double.infinity, w(0.5),
  137 + color: MyColours.color_E7E7E7)),
  138 + VEmptyView(24),
  139 + Expanded(
  140 + child: GridView.builder(
  141 + padding: EdgeInsets.symmetric(horizontal: w(16)),
  142 + controller: controller,
  143 + // padding: EdgeInsets.only(top: ScreenUtil().getAdapterSize(10)),
  144 + shrinkWrap: true,
  145 + itemCount: 7,
  146 + //SliverGridDelegateWithFixedCrossAxisCount 构建一个横轴固定数量Widget
  147 + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
  148 + //横轴元素个数
  149 + crossAxisCount: 2,
  150 + //纵轴间距
  151 + mainAxisSpacing: w(15),
  152 + //横轴间距
  153 + crossAxisSpacing: w(15),
  154 + //子组件宽高长度比例
  155 + childAspectRatio:
  156 + (ScreenUtil().screenWidth - w(62)) / 2 / 350),
  157 + itemBuilder: (BuildContext context, int index) {
  158 + return InkWell(
  159 + onTap: () {
  160 + _showPhotoView(context, 0, [
  161 + 'https://qn.colorcun.com/i_theme_1.png',
  162 + 'https://qn.colorcun.com/i_theme_1.png',
  163 + 'https://qn.colorcun.com/i_theme_1.png'
  164 + ]);
  165 + },
  166 + child: Container(
  167 + decoration: BoxDecoration(
  168 + borderRadius: BorderRadius.circular(r(10)),
  169 + border: Border.all(
  170 + color: true
  171 + ? MyColours.color_005AA7
  172 + : MyColours.color_DBDBDB,
  173 + width: true ? w(2) : w(1))),
  174 + child: Column(
  175 + children: [
  176 + CachedNetworkImage(
  177 + imageUrl:
  178 + 'https://qn.colorcun.com/i_theme_1.png',
  179 + width:
  180 + (ScreenUtil().screenWidth - w(62)) / 2,
  181 + // height: w(388),
  182 + ),
  183 + VEmptyView(10),
  184 + Padding(
  185 + padding:
  186 + EdgeInsets.symmetric(vertical: w(6)),
  187 + child: Text(
  188 + '1 经典图片式',
  189 + maxLines: 1,
  190 + overflow: TextOverflow.ellipsis,
  191 + style: TextStyle(
  192 + color: MyColours.color_000000,
  193 + fontSize: font(14)),
  194 + ),
  195 + )
  196 + ],
  197 + ),
  198 + ));
  199 + }))
  200 + ],
  201 + ))
  202 + ],
  203 + ),
  204 + );
  205 + }
  206 +}
@@ -1827,4 +1827,13 @@ class NavigatorUtil { @@ -1827,4 +1827,13 @@ class NavigatorUtil {
1827 return _navigateTo(context, "${Routes.collect_store_info_page}", 1827 return _navigateTo(context, "${Routes.collect_store_info_page}",
1828 replace: replace); 1828 replace: replace);
1829 } 1829 }
  1830 +
  1831 + /// 邀请函主题选择
  1832 + static Future<dynamic> goInvitationThemeHomePage(
  1833 + BuildContext context, {
  1834 + replace = false,
  1835 + }) {
  1836 + return _navigateTo(context, "${Routes.invitation_theme_home_page}",
  1837 + replace: replace);
  1838 + }
1830 } 1839 }
@@ -210,6 +210,7 @@ import '../pages/my/marketing_center/book_notification/marking_recharge_select_p @@ -210,6 +210,7 @@ import '../pages/my/marketing_center/book_notification/marking_recharge_select_p
210 import '../pages/my/marketing_center/book_notification/store_introduce_page.dart'; 210 import '../pages/my/marketing_center/book_notification/store_introduce_page.dart';
211 import '../pages/my/marketing_center/comments_setting_page.dart'; 211 import '../pages/my/marketing_center/comments_setting_page.dart';
212 import '../pages/my/marketing_center/customer_notice_setting_page.dart'; 212 import '../pages/my/marketing_center/customer_notice_setting_page.dart';
  213 +import '../pages/my/marketing_center/invitation_theme_home_page.dart';
213 import '../pages/my/marketing_center/marketing_center_home_page.dart'; 214 import '../pages/my/marketing_center/marketing_center_home_page.dart';
214 import '../pages/my/marketing_center/order_setting_manager_page.dart'; 215 import '../pages/my/marketing_center/order_setting_manager_page.dart';
215 import '../pages/my/marketing_center/order_setting_page.dart'; 216 import '../pages/my/marketing_center/order_setting_page.dart';
@@ -623,9 +624,9 @@ var handleCouponEditPageHandler = new Handler( @@ -623,9 +624,9 @@ var handleCouponEditPageHandler = new Handler(
623 bool isMine = FluroConvertUtils.string2bool(params["isMine"].first); 624 bool isMine = FluroConvertUtils.string2bool(params["isMine"].first);
624 return ChangeNotifierProvider<UploadImageProvider>( 625 return ChangeNotifierProvider<UploadImageProvider>(
625 create: (_) => UploadImageProvider(), 626 create: (_) => UploadImageProvider(),
626 - child:CouponEidtPage(  
627 - isMine: isMine,  
628 - )); 627 + child: CouponEidtPage(
  628 + isMine: isMine,
  629 + ));
629 }); 630 });
630 631
631 ///选择优惠券 632 ///选择优惠券
@@ -3095,3 +3096,19 @@ var collectStoreInfoPageHandle = new Handler( @@ -3095,3 +3096,19 @@ var collectStoreInfoPageHandle = new Handler(
3095 return ChangeNotifierProvider<CollectStoreProvider>( 3096 return ChangeNotifierProvider<CollectStoreProvider>(
3096 create: (_) => CollectStoreProvider(), child: CollectStoreInfoPage()); 3097 create: (_) => CollectStoreProvider(), child: CollectStoreInfoPage());
3097 }); 3098 });
  3099 +
  3100 +//邀请函主题选择
  3101 +var invitationThemeHomePageHandle = new Handler(
  3102 + handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
  3103 + // String year = params["year"].first;
  3104 + // String month = params["month"].first;
  3105 + // String day = params["day"].first;
  3106 + // String uid = params["uid"].first;
  3107 +
  3108 + // DayList daylist = DayList.fromJson(json
  3109 + // .decode(FluroConvertUtils.fluroCnParamsDecode(params["daylist"].first)));
  3110 +
  3111 + return ChangeNotifierProvider<MarketingCenterProvider>(
  3112 + create: (_) => MarketingCenterProvider(),
  3113 + child: InvitationThemeHomePage());
  3114 +});
@@ -293,6 +293,9 @@ class Routes { @@ -293,6 +293,9 @@ class Routes {
293 293
294 static String collect_store_info_page = "/collect_store_info_page"; // 店铺信息收集 294 static String collect_store_info_page = "/collect_store_info_page"; // 店铺信息收集
295 295
  296 + static String invitation_theme_home_page = "/invitation_theme_home_page"; //邀请函主题选择
  297 +
  298 +
296 static void configureRoutes(FluroRouter router) { 299 static void configureRoutes(FluroRouter router) {
297 router.notFoundHandler = new Handler( 300 router.notFoundHandler = new Handler(
298 handlerFunc: (BuildContext context, Map<String, List<String>> params) { 301 handlerFunc: (BuildContext context, Map<String, List<String>> params) {
@@ -546,5 +549,14 @@ class Routes { @@ -546,5 +549,14 @@ class Routes {
546 router.define(comments_setting_page, handler: commentsSettingPageHandle); 549 router.define(comments_setting_page, handler: commentsSettingPageHandle);
547 550
548 router.define(collect_store_info_page, handler: collectStoreInfoPageHandle); 551 router.define(collect_store_info_page, handler: collectStoreInfoPageHandle);
  552 +
  553 +
  554 +router.define(invitation_theme_home_page, handler:invitationThemeHomePageHandle);
  555 +
  556 +
  557 +
  558 +
  559 +
  560 +
549 } 561 }
550 } 562 }