Commit 4779ef0c8e5b7a84a71ffc3ce8a411f16d1c2588

Authored by wdn127929
1 parent 2bf7baa6

主题选择部分

... ... @@ -111,8 +111,8 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> {
bottom: BorderSide(
color: MyColours.color_E7E7E7, width: w(0.5)))),
margin: EdgeInsets.only(
right: w(20), left: w(36), bottom: w(12), top: w(12)),
padding: EdgeInsets.only(top: w(12), bottom: w(12), right: w(12)),
right: w(24), left: w(36), bottom: w(12), top: w(12)),
padding: EdgeInsets.only(top: w(12), bottom: w(12)),
child: Row(
children: [
Text(
... ... @@ -200,33 +200,37 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> {
color: MyColours.color_E7E7E7)),
InkWell(
onTap: () {
setState(() {
select = !select;
});
NavigatorUtil.goInvitationThemeHomePage(context);
},
child: Padding(
padding: EdgeInsets.only(
left: w(16),
top: w(12),
bottom: w(12),
right: w(12)),
right: w(24)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'启用预订安排通知图文模式',
'客户通知主题选择',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
),
Spacer(),
Text(
'经典图片',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
),
Container(
padding: EdgeInsets.symmetric(
horizontal: w(7), vertical: w(4)),
horizontal: w(11), vertical: w(4)),
child: Image.asset(
Utils.getImgPath(
select ? 'swich_on' : 'swich_off'),
width: w(44),
"assets/arrow_right_new.png",
width: w(9),
height: w(16),
),
)
// RoundButton(
... ... @@ -249,22 +253,22 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> {
padding: EdgeInsets.only(left: w(16)),
child: MyDivider(double.infinity, w(0.5),
color: MyColours.color_E7E7E7)),
_item('首图形象展示', onTap: () {
NavigatorUtil.goFirstImagePage(context);
}),
_item('预订信息模块', onTap: () {
// _item('首图形象展示', onTap: () {
// NavigatorUtil.goFirstImagePage(context);
// }),
_item('预订信息模块设置', onTap: () {
NavigatorUtil.goBookInfoPage(context);
}),
_item('店铺介绍展示', onTap: () {
_item('店铺介绍模块设置', onTap: () {
NavigatorUtil.goStoreIntroducePage(context);
}),
_item('主厨介绍展示', onTap: () {
_item('主厨介绍设置', onTap: () {
NavigatorUtil.goChefIntroducePage(context);
}),
_item('招牌菜展示', onTap: () {
_item('招牌菜展示设置', onTap: () {
NavigatorUtil.goDishShowPage(context);
}),
_item('客户互动', onTap: () {
_item('客户互动设置', onTap: () {
NavigatorUtil.goMarkingInteractionPage(context);
}),
],
... ...
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/widgets/system_app_bar.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import '../../../res/colors.dart';
import '../../../utils/screen_util.dart';
import '../../../utils/utils.dart';
import '../../../widgets/MyDivider.dart';
import '../../online_check/photo_view_wiget.dart';
/**
*
* 邀请函主题选择页面
*/
class InvitationThemeHomePage extends StatefulWidget {
InvitationThemeHomePage({Key key}) : super(key: key);
@override
_InvitationThemeHomePageState createState() =>
_InvitationThemeHomePageState();
}
class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
ScrollController controller = ScrollController();
_showPhotoView(BuildContext context, int index, List<String> imgs,
{isShow = false, List dashName}) async {
// if (imgs.length == 1 &&
// imgs[0] ==
// 'http://nosqn.colorcun.com/custom/lite-online/image/def-banner.png') {
// imgs[0] = 'http://nosqn.colorcun.com/app/seller-hj-empty.png';
// }
Utils.setBarStatus(false, color: Colors.black);
dynamic result = await showGeneralDialog(
context: context,
barrierDismissible: false,
// barrierColor: Colors.red,
barrierLabel:
MaterialLocalizations.of(context).modalBarrierDismissLabel,
transitionDuration: const Duration(milliseconds: 150),
pageBuilder: (BuildContext context, Animation animation,
Animation secondaryAnimation) {
Widget child = Stack(
alignment: Alignment.bottomCenter,
children: <Widget>[
PhotoPreview(
initialIndex: index,
photoList: imgs,
isShow: isShow,
dashName: dashName),
Positioned(
bottom: w(20),
child: Container(
padding: EdgeInsets.symmetric(
horizontal: w(30), vertical: w(10)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(r(30)),
),
child: Text(
'应用主题',
style: TextStyle(
decoration: TextDecoration.none,
color: MyColours.color_515151,
fontSize: font(16)),
),
))
],
);
return child;
});
Utils.setBarStatus(true, color: Colors.white);
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: MyColours.color_ffffff,
appBar: SystemAppBar('客户通知设置'),
body: Column(
children: [
Expanded(
child: Column(
children: [
InkWell(
onTap: () {},
child: Padding(
padding: EdgeInsets.only(
left: w(16), top: w(12), bottom: w(12), right: w(24)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'主题颜色选择',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
),
Spacer(),
Text(
'群青绿',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
),
Container(
padding: EdgeInsets.symmetric(
horizontal: w(11), vertical: w(4)),
child: Image.asset(
"assets/arrow_right_new.png",
width: w(9),
height: w(16),
),
)
// RoundButton(
// text: '预览',
// gradientStart: MyColours.color_ffffff,
// gradientEnd: MyColours.color_ffffff,
// borderColor: MyColours.color_438E93,
// textColor: MyColours.color_438E93,
// radius: ScreenUtil().setWidth(22),
// fontSize: 24,
// width: w(72),
// height: ScreenUtil().setWidth(44),
// isBold: true,
// onPressed: () {
// NavigatorUtil.goMarkingPreviewPage(context);
// },
// ),
]))),
Padding(
padding: EdgeInsets.only(left: w(16)),
child: MyDivider(double.infinity, w(0.5),
color: MyColours.color_E7E7E7)),
VEmptyView(24),
Expanded(
child: GridView.builder(
padding: EdgeInsets.symmetric(horizontal: w(16)),
controller: controller,
// padding: EdgeInsets.only(top: ScreenUtil().getAdapterSize(10)),
shrinkWrap: true,
itemCount: 7,
//SliverGridDelegateWithFixedCrossAxisCount 构建一个横轴固定数量Widget
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
//横轴元素个数
crossAxisCount: 2,
//纵轴间距
mainAxisSpacing: w(15),
//横轴间距
crossAxisSpacing: w(15),
//子组件宽高长度比例
childAspectRatio:
(ScreenUtil().screenWidth - w(62)) / 2 / 350),
itemBuilder: (BuildContext context, int index) {
return InkWell(
onTap: () {
_showPhotoView(context, 0, [
'https://qn.colorcun.com/i_theme_1.png',
'https://qn.colorcun.com/i_theme_1.png',
'https://qn.colorcun.com/i_theme_1.png'
]);
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(10)),
border: Border.all(
color: true
? MyColours.color_005AA7
: MyColours.color_DBDBDB,
width: true ? w(2) : w(1))),
child: Column(
children: [
CachedNetworkImage(
imageUrl:
'https://qn.colorcun.com/i_theme_1.png',
width:
(ScreenUtil().screenWidth - w(62)) / 2,
// height: w(388),
),
VEmptyView(10),
Padding(
padding:
EdgeInsets.symmetric(vertical: w(6)),
child: Text(
'1 经典图片式',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_000000,
fontSize: font(14)),
),
)
],
),
));
}))
],
))
],
),
);
}
}
... ...
... ... @@ -1827,4 +1827,13 @@ class NavigatorUtil {
return _navigateTo(context, "${Routes.collect_store_info_page}",
replace: replace);
}
/// 邀请函主题选择
static Future<dynamic> goInvitationThemeHomePage(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.invitation_theme_home_page}",
replace: replace);
}
}
... ...
... ... @@ -210,6 +210,7 @@ import '../pages/my/marketing_center/book_notification/marking_recharge_select_p
import '../pages/my/marketing_center/book_notification/store_introduce_page.dart';
import '../pages/my/marketing_center/comments_setting_page.dart';
import '../pages/my/marketing_center/customer_notice_setting_page.dart';
import '../pages/my/marketing_center/invitation_theme_home_page.dart';
import '../pages/my/marketing_center/marketing_center_home_page.dart';
import '../pages/my/marketing_center/order_setting_manager_page.dart';
import '../pages/my/marketing_center/order_setting_page.dart';
... ... @@ -623,9 +624,9 @@ var handleCouponEditPageHandler = new Handler(
bool isMine = FluroConvertUtils.string2bool(params["isMine"].first);
return ChangeNotifierProvider<UploadImageProvider>(
create: (_) => UploadImageProvider(),
child:CouponEidtPage(
isMine: isMine,
));
child: CouponEidtPage(
isMine: isMine,
));
});
///选择优惠券
... ... @@ -3095,3 +3096,19 @@ var collectStoreInfoPageHandle = new Handler(
return ChangeNotifierProvider<CollectStoreProvider>(
create: (_) => CollectStoreProvider(), child: CollectStoreInfoPage());
});
//邀请函主题选择
var invitationThemeHomePageHandle = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
// String year = params["year"].first;
// String month = params["month"].first;
// String day = params["day"].first;
// String uid = params["uid"].first;
// DayList daylist = DayList.fromJson(json
// .decode(FluroConvertUtils.fluroCnParamsDecode(params["daylist"].first)));
return ChangeNotifierProvider<MarketingCenterProvider>(
create: (_) => MarketingCenterProvider(),
child: InvitationThemeHomePage());
});
... ...
... ... @@ -293,6 +293,9 @@ class Routes {
static String collect_store_info_page = "/collect_store_info_page"; // 店铺信息收集
static String invitation_theme_home_page = "/invitation_theme_home_page"; //邀请函主题选择
static void configureRoutes(FluroRouter router) {
router.notFoundHandler = new Handler(
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
... ... @@ -546,5 +549,14 @@ class Routes {
router.define(comments_setting_page, handler: commentsSettingPageHandle);
router.define(collect_store_info_page, handler: collectStoreInfoPageHandle);
router.define(invitation_theme_home_page, handler:invitationThemeHomePageHandle);
}
}
... ...