Commit 1ca9de2a486c2054592ddc8ec6d7108e8d397b24

Authored by wdn127929
1 parent 0ba32b50

封面样式设置&短信手机卡发送

@@ -18,19 +18,19 @@ if (flutterRoot == null) { @@ -18,19 +18,19 @@ if (flutterRoot == null) {
18 18
19 19
20 20
21 -def flutterVersionCode = "520" 21 +def flutterVersionCode = "529"
22 if (flutterVersionCode == null) { 22 if (flutterVersionCode == null) {
23 - flutterVersionCode = '520' 23 + flutterVersionCode = '529'
24 24
25 25
26 26
27 } 27 }
28 28
29 29
30 -def flutterVersionName = "5.2.0" 30 +def flutterVersionName = "5.2.9"
31 31
32 if (flutterVersionName == null) { 32 if (flutterVersionName == null) {
33 - flutterVersionName = '5.2.0' 33 + flutterVersionName = '5.2.9'
34 34
35 35
36 } 36 }
@@ -58,6 +58,7 @@ class GetDzSellerConfSunModel { @@ -58,6 +58,7 @@ class GetDzSellerConfSunModel {
58 58
59 String isShowNoticeDeposit; 59 String isShowNoticeDeposit;
60 String depositPrice; 60 String depositPrice;
  61 + String liteStyle;
61 62
62 GetDzSellerConfSunModel( 63 GetDzSellerConfSunModel(
63 {this.id, 64 {this.id,
@@ -86,7 +87,8 @@ class GetDzSellerConfSunModel { @@ -86,7 +87,8 @@ class GetDzSellerConfSunModel {
86 this.isAllowUpdate, 87 this.isAllowUpdate,
87 this.isShowRnamePhone, 88 this.isShowRnamePhone,
88 this.isShowNoticeDeposit, 89 this.isShowNoticeDeposit,
89 - this.depositPrice}); 90 + this.depositPrice,
  91 + this.liteStyle});
90 92
91 GetDzSellerConfSunModel.fromJson(Map<String, dynamic> json) { 93 GetDzSellerConfSunModel.fromJson(Map<String, dynamic> json) {
92 id = json['id']; 94 id = json['id'];
@@ -113,7 +115,7 @@ class GetDzSellerConfSunModel { @@ -113,7 +115,7 @@ class GetDzSellerConfSunModel {
113 isNotice = json['is_seller_notice']; 115 isNotice = json['is_seller_notice'];
114 isMarketing = json['is_seller_marketing']; 116 isMarketing = json['is_seller_marketing'];
115 saiyouyun = json['saiyouyun']; 117 saiyouyun = json['saiyouyun'];
116 - bookinginfo = json['bookinginfo'] != null&& json['bookinginfo'] != false 118 + bookinginfo = json['bookinginfo'] != null && json['bookinginfo'] != false
117 ? new Bookinginfo.fromJson(json['bookinginfo']) 119 ? new Bookinginfo.fromJson(json['bookinginfo'])
118 : null; 120 : null;
119 isAllowUpdate = json['is_allow_update'] ?? '1'; 121 isAllowUpdate = json['is_allow_update'] ?? '1';
@@ -128,6 +130,7 @@ class GetDzSellerConfSunModel { @@ -128,6 +130,7 @@ class GetDzSellerConfSunModel {
128 } 130 }
129 isShowNoticeDeposit = json['is_show_notice_deposit']; 131 isShowNoticeDeposit = json['is_show_notice_deposit'];
130 depositPrice = json['deposit_price']; 132 depositPrice = json['deposit_price'];
  133 + liteStyle = json['lite_style'];
131 } 134 }
132 135
133 Map<String, dynamic> toJson() { 136 Map<String, dynamic> toJson() {
@@ -161,6 +164,8 @@ class GetDzSellerConfSunModel { @@ -161,6 +164,8 @@ class GetDzSellerConfSunModel {
161 data['is_show_ranme_phone'] = this.isShowRnamePhone; 164 data['is_show_ranme_phone'] = this.isShowRnamePhone;
162 data['is_show_notice_deposit'] = this.isShowNoticeDeposit; 165 data['is_show_notice_deposit'] = this.isShowNoticeDeposit;
163 data['deposit_price'] = this.depositPrice; 166 data['deposit_price'] = this.depositPrice;
  167 + data['lite_style'] = this.liteStyle;
  168 +
164 return data; 169 return data;
165 } 170 }
166 } 171 }
@@ -446,6 +446,7 @@ class InvicationPageState extends State<InvicationPage> @@ -446,6 +446,7 @@ class InvicationPageState extends State<InvicationPage>
446 }, 446 },
447 showCircle: showCicle); 447 showCircle: showCicle);
448 448
  449 + noticeSms = detailModel.isNotice;
449 if (detailModel.baseInfoSunModel != null) { 450 if (detailModel.baseInfoSunModel != null) {
450 _baseIndoProvider.baseInfoSunModel = detailModel.baseInfoSunModel; 451 _baseIndoProvider.baseInfoSunModel = detailModel.baseInfoSunModel;
451 name = _baseIndoProvider.baseInfoSunModel.name; 452 name = _baseIndoProvider.baseInfoSunModel.name;
@@ -4855,6 +4856,24 @@ class InvicationPageState extends State<InvicationPage> @@ -4855,6 +4856,24 @@ class InvicationPageState extends State<InvicationPage>
4855 return date; 4856 return date;
4856 } 4857 }
4857 4858
  4859 + _getDsoltStrShow() {
  4860 + String dsoltStr = '${ddateHm == null || ddateHm == '' ? '' : ddateHm}';
  4861 + if (detailModel.liteStyle == '1') {
  4862 + dsoltStr = detailModel.detailModelAllSunModel.ddateSolt == '1'
  4863 + ? '早上'
  4864 + : detailModel.detailModelAllSunModel.ddateSolt == '2'
  4865 + ? '中午'
  4866 + : '晚上';
  4867 + } else if (detailModel.liteStyle == '3') {
  4868 + dsoltStr = detailModel.detailModelAllSunModel.ddateSolt == '1'
  4869 + ? '早餐'
  4870 + : detailModel.detailModelAllSunModel.ddateSolt == '2'
  4871 + ? '午餐'
  4872 + : '晚餐';
  4873 + }
  4874 + return dsoltStr;
  4875 + }
  4876 +
4858 _createReserveDeposit() async { 4877 _createReserveDeposit() async {
4859 if (detailModel.isShowNoticeDeposit == '1') { 4878 if (detailModel.isShowNoticeDeposit == '1') {
4860 //页面有预订订金选项 4879 //页面有预订订金选项
@@ -4885,13 +4904,14 @@ class InvicationPageState extends State<InvicationPage> @@ -4885,13 +4904,14 @@ class InvicationPageState extends State<InvicationPage>
4885 await detailModel.createReserveDeposit(context, pramas); 4904 await detailModel.createReserveDeposit(context, pramas);
4886 if (success) { 4905 if (success) {
4887 bus.emit('refresh_detail_deposit'); 4906 bus.emit('refresh_detail_deposit');
  4907 +
4888 bool isSuccess = await Utils.goShareInvicationToWeChat( 4908 bool isSuccess = await Utils.goShareInvicationToWeChat(
4889 context, 4909 context,
4890 widget.rid, 4910 widget.rid,
4891 Provider.of<UserModel>(context, listen: false).user.openid, 4911 Provider.of<UserModel>(context, listen: false).user.openid,
4892 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', 4912 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日',
4893 - returnWeek(dateTime, context) +  
4894 - '${ddateHm == null || ddateHm == '' ? '' : ddateHm}', 4913 + returnWeek(dateTime, context) + _getDsoltStrShow(),
  4914 + detailModel.liteStyle,
4895 depositId: detailModel.depositId); 4915 depositId: detailModel.depositId);
4896 print(isSuccess); 4916 print(isSuccess);
4897 if (isSuccess) { 4917 if (isSuccess) {
@@ -4907,8 +4927,8 @@ class InvicationPageState extends State<InvicationPage> @@ -4907,8 +4927,8 @@ class InvicationPageState extends State<InvicationPage>
4907 widget.rid, 4927 widget.rid,
4908 Provider.of<UserModel>(context, listen: false).user.openid, 4928 Provider.of<UserModel>(context, listen: false).user.openid,
4909 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', 4929 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日',
4910 - returnWeek(dateTime, context) +  
4911 - '${ddateHm == null || ddateHm == '' ? '' : ddateHm}', 4930 + returnWeek(dateTime, context) + _getDsoltStrShow(),
  4931 + detailModel.liteStyle,
4912 depositId: detailModel.depositId); 4932 depositId: detailModel.depositId);
4913 print(isSuccess); 4933 print(isSuccess);
4914 if (isSuccess) { 4934 if (isSuccess) {
@@ -4923,8 +4943,8 @@ class InvicationPageState extends State<InvicationPage> @@ -4923,8 +4943,8 @@ class InvicationPageState extends State<InvicationPage>
4923 widget.rid, 4943 widget.rid,
4924 Provider.of<UserModel>(context, listen: false).user.openid, 4944 Provider.of<UserModel>(context, listen: false).user.openid,
4925 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', 4945 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日',
4926 - returnWeek(dateTime, context) +  
4927 - '${ddateHm == null || ddateHm == '' ? '' : ddateHm}', 4946 + returnWeek(dateTime, context) + _getDsoltStrShow(),
  4947 + detailModel.liteStyle,
4928 depositId: detailModel.depositId); 4948 depositId: detailModel.depositId);
4929 print(isSuccess); 4949 print(isSuccess);
4930 if (isSuccess) { 4950 if (isSuccess) {
@@ -4938,8 +4958,8 @@ class InvicationPageState extends State<InvicationPage> @@ -4938,8 +4958,8 @@ class InvicationPageState extends State<InvicationPage>
4938 widget.rid, 4958 widget.rid,
4939 Provider.of<UserModel>(context, listen: false).user.openid, 4959 Provider.of<UserModel>(context, listen: false).user.openid,
4940 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', 4960 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日',
4941 - returnWeek(dateTime, context) +  
4942 - '${ddateHm == null || ddateHm == '' ? '' : ddateHm}', 4961 + returnWeek(dateTime, context) + _getDsoltStrShow(),
  4962 + detailModel.liteStyle,
4943 depositId: detailModel.depositId); 4963 depositId: detailModel.depositId);
4944 print(isSuccess); 4964 print(isSuccess);
4945 if (isSuccess) { 4965 if (isSuccess) {
@@ -598,6 +598,9 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { @@ -598,6 +598,9 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> {
598 _item('客户互动设置', onTap: () { 598 _item('客户互动设置', onTap: () {
599 NavigatorUtil.goMarkingInteractionPage(context); 599 NavigatorUtil.goMarkingInteractionPage(context);
600 }), 600 }),
  601 + _item('小程序通知卡片样式选择', onTap: () {
  602 + NavigatorUtil.goMiniprogramSettingPage(context);
  603 + }),
601 ], 604 ],
602 )), 605 )),
603 )), 606 )),
  1 +import 'package:flutter/material.dart';
  2 +import 'package:one_key/models/user.dart';
  3 +
  4 +import 'package:one_key/widgets/system_app_bar.dart';
  5 +import 'package:one_key/widgets/v_empty_view.dart';
  6 +
  7 +import 'package:provider/provider.dart';
  8 +
  9 +import '../../../constant/state.dart';
  10 +import '../../../provider/marketing_center_provider.dart';
  11 +import '../../../provider/user_model.dart';
  12 +import '../../../res/colors.dart';
  13 +
  14 +import '../../../utils/screen_util.dart';
  15 +import '../../../utils/utils.dart';
  16 +import '../../../widgets/MyDivider.dart';
  17 +import '../../../widgets/h_empty_view.dart';
  18 +import '../../../widgets/page_exception.dart';
  19 +import '../../../widgets/round_button.dart';
  20 +import '../../online_check/photo_view_wiget.dart';
  21 +
  22 +import 'dart:convert' as convert;
  23 +
  24 +import 'dart:math' as math;
  25 +
  26 +import 'package:flutter_swiper/flutter_swiper.dart';
  27 +
  28 +/**
  29 + *
  30 + * 小程序通知卡片样式
  31 + */
  32 +
  33 +class MiniprogramSettingPage extends StatefulWidget {
  34 + MiniprogramSettingPage({Key key}) : super(key: key);
  35 +
  36 + @override
  37 + _MiniprogramSettingPageState createState() => _MiniprogramSettingPageState();
  38 +}
  39 +
  40 +class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
  41 + MarketingCenterProvider marketingCenterProvider;
  42 + ScrollController controller = ScrollController();
  43 +
  44 + String miniType;
  45 + PageController pageController;
  46 + double pageOffset = 0;
  47 +
  48 + SwiperController swiperController = SwiperController();
  49 +
  50 + List<String> types = ['0', '1', '2', '3'];
  51 +
  52 + User user;
  53 +
  54 + @override
  55 + void initState() {
  56 + super.initState();
  57 + pageController = PageController(viewportFraction: 1);
  58 + pageController.addListener(() {
  59 + setState(() => pageOffset = pageController.page);
  60 + });
  61 +
  62 + WidgetsBinding.instance.addPostFrameCallback((_) async {
  63 + getDzSellerConf();
  64 + });
  65 + }
  66 +
  67 + getDzSellerConf() async {
  68 + bool success = await marketingCenterProvider.getDzSellerConf(context,
  69 + showLoading: false, selfDismiss: true);
  70 + if (success) {
  71 + marketingCenterProvider.pageStateSettingMini = PageState.Success;
  72 + miniType = marketingCenterProvider.dzSellerConfModel.liteStyle ?? '2';
  73 + int index = types.indexOf(miniType);
  74 + if (index >= 0) {
  75 + swiperController.index = index;
  76 + }
  77 + } else {
  78 + marketingCenterProvider.pageStateSettingMini =
  79 + PageState.ConnectivityError;
  80 + }
  81 + setState(() {});
  82 + }
  83 +
  84 + String returnWeek(DateTime day, BuildContext context) {
  85 + String date = "周${Utils.formatWeekDayNum(day.weekday)} ";
  86 +
  87 + return date;
  88 + }
  89 +
  90 + @override
  91 + Widget build(BuildContext context) {
  92 + marketingCenterProvider =
  93 + Provider.of<MarketingCenterProvider>(context, listen: true);
  94 +
  95 + user = Provider.of<UserModel>(context, listen: false).user;
  96 + return Scaffold(
  97 + backgroundColor: MyColours.color_ffffff,
  98 + appBar: SystemAppBar('小程序通知卡片样式'),
  99 + body: Consumer<MarketingCenterProvider>(builder: (context1, model, _) {
  100 + if (model.pageStateSettingMini != PageState.Success) {
  101 + return ExceptionPage(
  102 + pageState: model.pageStateSettingMini,
  103 + callback: () async {},
  104 + emptyMsg: "暂时没有信息展示哦",
  105 + emptyImg: "empty_search",
  106 + showMsg: "加载中,请稍后...",
  107 + );
  108 + } else {
  109 + return Column(
  110 + children: [
  111 + Expanded(
  112 + child: SingleChildScrollView(
  113 + child: Column(
  114 + children: [
  115 + Container(
  116 + width: double.infinity,
  117 + alignment: Alignment.centerLeft,
  118 + padding: EdgeInsets.only(
  119 + left: w(16), top: w(12), bottom: w(11), right: w(16)),
  120 + child: Text(
  121 + '通知主题选择(左右滑动选择要使用的主题)',
  122 + style: TextStyle(
  123 + color: MyColours.color_515151, fontSize: font(16)),
  124 + )),
  125 + Padding(
  126 + padding: EdgeInsets.only(left: w(16)),
  127 + child: MyDivider(double.infinity, w(0.5),
  128 + color: MyColours.color_E7E7E7)),
  129 + VEmptyView(240),
  130 + Container(
  131 + height: w(145),
  132 + child: Swiper(
  133 + controller: swiperController,
  134 + itemBuilder: (BuildContext context, int index) {
  135 + if (types[index] == '0') {
  136 + return Container(
  137 + color: Color.fromRGBO(81, 81, 81, 0.4),
  138 + padding: EdgeInsets.symmetric(horizontal: w(10)),
  139 + width: w(180),
  140 + height: h(145),
  141 + alignment: Alignment.center,
  142 + child: Text(
  143 + '无样式',
  144 + textAlign: TextAlign.center,
  145 + maxLines: 2,
  146 + overflow: TextOverflow.ellipsis,
  147 + style: TextStyle(
  148 + color: MyColours.color_FFEFC5,
  149 + fontSize: font(20)),
  150 + ),
  151 + );
  152 + }
  153 + return Container(
  154 + color: Color.fromRGBO(81, 81, 81, 0.4),
  155 + padding: EdgeInsets.symmetric(horizontal: w(10)),
  156 + width: w(180),
  157 + height: h(145),
  158 + child: Column(
  159 + children: [
  160 + VEmptyView(20),
  161 + Text(
  162 + '${Provider.of<UserModel>(context, listen: false).user.sellername}',
  163 + textAlign: TextAlign.center,
  164 + maxLines: 2,
  165 + overflow: TextOverflow.ellipsis,
  166 + style: TextStyle(
  167 + color: MyColours.color_FFEFC5,
  168 + fontSize: font(12)),
  169 + ),
  170 + VEmptyView(50),
  171 + Text(
  172 + '${Utils.addZeroNumber(DateTime.now().month)}月${Utils.addZeroNumber(DateTime.now().day)}日',
  173 + textAlign: TextAlign.center,
  174 + maxLines: 2,
  175 + overflow: TextOverflow.ellipsis,
  176 + style: TextStyle(
  177 + color: MyColours.color_FFEFC5,
  178 + fontWeight: FontWeight.bold,
  179 + fontSize: font(20)),
  180 + ),
  181 + VEmptyView(10),
  182 + Text(
  183 + returnWeek(DateTime.now(), context) +
  184 + (types[index] == '1'
  185 + ? '中午'
  186 + : types[index] == '2'
  187 + ? (user.noon != '00:00'
  188 + ? user.noon.split('-')[0]
  189 + : '14:30')
  190 + : '午餐'),
  191 + textAlign: TextAlign.center,
  192 + maxLines: 2,
  193 + overflow: TextOverflow.ellipsis,
  194 + style: TextStyle(
  195 + color: MyColours.color_FFEFC5,
  196 + fontWeight: FontWeight.bold,
  197 + fontSize: font(18)),
  198 + )
  199 + ],
  200 + ),
  201 + );
  202 + },
  203 + onTap: (v) {
  204 + print(v);
  205 + },
  206 + onIndexChanged: (index) {
  207 + print(index);
  208 + miniType = types[index];
  209 + // marketingCenterProvider.isThemeTitle =
  210 + // marketingCenterProvider
  211 + // .templeteDatas[index].isSetTitle ==
  212 + // '1'
  213 + // ? true
  214 + // : false;
  215 + // marketingCenterProvider.isThemeColor =
  216 + // marketingCenterProvider
  217 + // .templeteDatas[index].isSetColor ==
  218 + // '1'
  219 + // ? true
  220 + // : false;
  221 +
  222 + // setState(() {
  223 + // swiperController.index = index;
  224 + // });
  225 +
  226 + // 当前选中的主题
  227 + },
  228 + index: swiperController.index,
  229 + itemCount: types.length,
  230 + viewportFraction: 0.5,
  231 + scale: 0.4,
  232 + ))
  233 + ],
  234 + ))),
  235 + Container(
  236 + padding:
  237 + EdgeInsets.symmetric(horizontal: w(24), vertical: w(35)),
  238 + child: Row(
  239 + children: [
  240 + RoundButton(
  241 + text: '返回',
  242 + width: w(100),
  243 + height: w(43),
  244 + radius: r(5),
  245 + fontSize: 32,
  246 + isBold: true,
  247 + gradientStart: MyColours.color_ffffff,
  248 + gradientEnd: MyColours.color_ffffff,
  249 + textColor: MyColours.color_438E93,
  250 + borderColor: MyColours.color_438E93,
  251 + onPressed: () {
  252 + Navigator.pop(context);
  253 + },
  254 + ),
  255 + HEmptyView(24),
  256 + Expanded(
  257 + child: RoundButton(
  258 + text: '保存并返回',
  259 + height: w(43),
  260 + radius: r(5),
  261 + isBold: true,
  262 + fontSize: 32,
  263 + gradientStart: MyColours.color_438E93,
  264 + gradientEnd: MyColours.color_438E93,
  265 + textColor: MyColours.color_ffffff,
  266 + borderColor: MyColours.color_438E93,
  267 + onPressed: () async {
  268 + bool success = await marketingCenterProvider.setConfing(
  269 + context,
  270 + {
  271 + 'sid':
  272 + Provider.of<UserModel>(context, listen: false)
  273 + .user
  274 + .sellerid,
  275 + 'key': 'lite_style',
  276 + 'value': miniType
  277 + },
  278 + needToast: false);
  279 + if (success) {
  280 + Navigator.pop(context);
  281 + }
  282 + },
  283 + )),
  284 + ],
  285 + ),
  286 + )
  287 + ],
  288 + );
  289 + }
  290 + }),
  291 + );
  292 + }
  293 +}
  294 +
  295 +class SlidingCard extends StatelessWidget {
  296 + final double offset;
  297 + final String movie;
  298 + final int index;
  299 + const SlidingCard({this.offset, this.movie, this.index});
  300 +
  301 + @override
  302 + Widget build(BuildContext context) {
  303 + int select = 0;
  304 + double gauss = math.exp(-(math.pow((offset.abs() - 0.5), 2) / 0.08));
  305 + if (Offset(-32 * gauss * offset.sign, 0).dx == -0.0) {
  306 + //最中间的图
  307 + select = index;
  308 + }
  309 + return Transform.translate(
  310 + offset: Offset(-32 * gauss * offset.sign, 0),
  311 + child: InkWell(
  312 + onTap: () {
  313 + print(gauss);
  314 + print(Offset(-32 * gauss * offset.sign, 0));
  315 + print(index);
  316 + },
  317 + child: Card(
  318 + margin: EdgeInsets.only(left: 8, right: 8, bottom: 8),
  319 + elevation: 8,
  320 + shape: RoundedRectangleBorder(
  321 + borderRadius: BorderRadius.circular(32),
  322 + ),
  323 + child: ClipRRect(
  324 + borderRadius: BorderRadius.circular(
  325 + r(10),
  326 + ),
  327 + child: Image.network(
  328 + '${movie}',
  329 + width: select == index ? w(375) : w(179),
  330 + height: select == index ? w(359) : w(90),
  331 + // height: MediaQuery.of(context).size.height * 0.3,
  332 + alignment: Alignment(-offset.abs(), 0),
  333 + fit: BoxFit.cover,
  334 + ),
  335 + ),
  336 + // SizedBox(
  337 + // height: 8,
  338 + // ),
  339 + // Expanded(
  340 + // child: Padding(
  341 + // padding: const EdgeInsets.all(8.0),
  342 + // child: Column(
  343 + // crossAxisAlignment: CrossAxisAlignment.start,
  344 + // children: <Widget>[
  345 + // Text(
  346 + // '${movie.name}',
  347 + // style:
  348 + // TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
  349 + // ),
  350 + // SizedBox(
  351 + // height: 10,
  352 + // ),
  353 + // Text(
  354 + // '上架时间: ${movie.date}',
  355 + // style: TextStyle(
  356 + // fontSize: 14, fontWeight: FontWeight.normal),
  357 + // ),
  358 + // Text(
  359 + // '${movie.intor}',
  360 + // style: TextStyle(
  361 + // fontSize: 14,
  362 + // fontWeight: FontWeight.normal,
  363 + // ),
  364 + // ),
  365 + // Spacer(),
  366 + // Row(
  367 + // children: <Widget>[
  368 + // SizedBox(width: 16,),
  369 + // Text(
  370 + // '${movie.price}',
  371 + // style: TextStyle(
  372 + // fontSize: 18, fontWeight: FontWeight.bold),
  373 + // ),
  374 + // Spacer(),
  375 + // MaterialButton(
  376 + // onPressed: () {},
  377 + // color: Colors.black,
  378 + // child: Text('购买'),
  379 + // textColor: Colors.white,
  380 + // shape: RoundedRectangleBorder(
  381 + // borderRadius: BorderRadius.circular(32),
  382 + // ),
  383 + // ),
  384 + // SizedBox(width: 16,),
  385 + // ],
  386 + // ),
  387 + // ],
  388 + // ),
  389 + // ),
  390 + // ),
  391 + )),
  392 + );
  393 + }
  394 +}
@@ -4808,6 +4808,7 @@ class InvicationPageSimState extends State<InvicationPageSim> @@ -4808,6 +4808,7 @@ class InvicationPageSimState extends State<InvicationPageSim>
4808 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', 4808 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日',
4809 returnWeek(dateTime, context) + 4809 returnWeek(dateTime, context) +
4810 '${ddateHm == null || ddateHm == '' ? '' : ddateHm}', 4810 '${ddateHm == null || ddateHm == '' ? '' : ddateHm}',
  4811 + '0'
4811 ); 4812 );
4812 print(isSuccess); 4813 print(isSuccess);
4813 if (isSuccess) { 4814 if (isSuccess) {
@@ -4825,6 +4826,7 @@ class InvicationPageSimState extends State<InvicationPageSim> @@ -4825,6 +4826,7 @@ class InvicationPageSimState extends State<InvicationPageSim>
4825 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', 4826 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日',
4826 returnWeek(dateTime, context) + 4827 returnWeek(dateTime, context) +
4827 '${ddateHm == null || ddateHm == '' ? '' : ddateHm}', 4828 '${ddateHm == null || ddateHm == '' ? '' : ddateHm}',
  4829 + '0'
4828 ); 4830 );
4829 if (isSuccess) { 4831 if (isSuccess) {
4830 _addForward(); 4832 _addForward();
@@ -4869,6 +4871,7 @@ class InvicationPageSimState extends State<InvicationPageSim> @@ -4869,6 +4871,7 @@ class InvicationPageSimState extends State<InvicationPageSim>
4869 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', 4871 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日',
4870 returnWeek(dateTime, context) + 4872 returnWeek(dateTime, context) +
4871 '${ddateHm == null || ddateHm == '' ? '' : ddateHm}', 4873 '${ddateHm == null || ddateHm == '' ? '' : ddateHm}',
  4874 + '0'
4872 ); 4875 );
4873 print(isSuccess); 4876 print(isSuccess);
4874 if (isSuccess) { 4877 if (isSuccess) {
@@ -4885,6 +4888,7 @@ class InvicationPageSimState extends State<InvicationPageSim> @@ -4885,6 +4888,7 @@ class InvicationPageSimState extends State<InvicationPageSim>
4885 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', 4888 '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日',
4886 returnWeek(dateTime, context) + 4889 returnWeek(dateTime, context) +
4887 '${ddateHm == null || ddateHm == '' ? '' : ddateHm}', 4890 '${ddateHm == null || ddateHm == '' ? '' : ddateHm}',
  4891 + '0'
4888 ); 4892 );
4889 if (isSuccess) { 4893 if (isSuccess) {
4890 _addForward(); 4894 _addForward();
@@ -33,7 +33,7 @@ class MarketingCenterProvider extends ChangeNotifier { @@ -33,7 +33,7 @@ class MarketingCenterProvider extends ChangeNotifier {
33 PageState pageStateBookInfo = PageState.Loading; 33 PageState pageStateBookInfo = PageState.Loading;
34 PageState pageStateThemeHome = PageState.Loading; 34 PageState pageStateThemeHome = PageState.Loading;
35 PageState pageStateSetting = PageState.Loading; 35 PageState pageStateSetting = PageState.Loading;
36 - 36 + PageState pageStateSettingMini = PageState.Loading;
37 List<RechargeListSunModel> rechargeList = []; 37 List<RechargeListSunModel> rechargeList = [];
38 38
39 List<RechargeListSunModel> rechargeListHistory = []; 39 List<RechargeListSunModel> rechargeListHistory = [];
@@ -94,6 +94,8 @@ class NotebookDetailModel extends ChangeNotifier { @@ -94,6 +94,8 @@ class NotebookDetailModel extends ChangeNotifier {
94 String reserveImgText; 94 String reserveImgText;
95 String smsContent = ''; 95 String smsContent = '';
96 String isShowNoticeDeposit; 96 String isShowNoticeDeposit;
  97 + String liteStyle = '2';
  98 + bool isNotice = false;
97 99
98 NotebookDetailModel() { 100 NotebookDetailModel() {
99 initSexList(); 101 initSexList();
@@ -221,6 +223,11 @@ class NotebookDetailModel extends ChangeNotifier { @@ -221,6 +223,11 @@ class NotebookDetailModel extends ChangeNotifier {
221 if (baseResp.data['template_param'] != null) { 223 if (baseResp.data['template_param'] != null) {
222 smsContent = baseResp.data["template_param"]; 224 smsContent = baseResp.data["template_param"];
223 } 225 }
  226 + if (baseResp.data['is_seller_notice'] != null) {
  227 + isNotice = baseResp.data["is_seller_notice"] == '1'?true:false;
  228 + }
  229 +
  230 +
224 231
225 if (baseResp.data['is_show_ranme_phone'] != null && 232 if (baseResp.data['is_show_ranme_phone'] != null &&
226 baseResp.data['is_show_ranme_phone'] != '') { 233 baseResp.data['is_show_ranme_phone'] != '') {
@@ -247,6 +254,9 @@ class NotebookDetailModel extends ChangeNotifier { @@ -247,6 +254,9 @@ class NotebookDetailModel extends ChangeNotifier {
247 if (baseResp.data['is_show_notice_deposit'] != null) { 254 if (baseResp.data['is_show_notice_deposit'] != null) {
248 isShowNoticeDeposit = baseResp.data['is_show_notice_deposit']; 255 isShowNoticeDeposit = baseResp.data['is_show_notice_deposit'];
249 } 256 }
  257 + if (baseResp.data['lite_style'] != null) {
  258 + liteStyle = baseResp.data['lite_style'];
  259 + }
250 if (baseResp.data['deposit_price'] != null) { 260 if (baseResp.data['deposit_price'] != null) {
251 depositPrice = baseResp.data['deposit_price']; 261 depositPrice = baseResp.data['deposit_price'];
252 } 262 }
@@ -2243,4 +2243,16 @@ class NavigatorUtil { @@ -2243,4 +2243,16 @@ class NavigatorUtil {
2243 return _navigateTo(context, "${Routes.payment_setting_page}", 2243 return _navigateTo(context, "${Routes.payment_setting_page}",
2244 replace: replace); 2244 replace: replace);
2245 } 2245 }
  2246 +
  2247 +
  2248 +
  2249 + //小程序通知卡片样式
  2250 + static Future<dynamic> goMiniprogramSettingPage(
  2251 + BuildContext context, {
  2252 +
  2253 + replace = false,
  2254 + }) {
  2255 + return _navigateTo(context, "${Routes.mini_program_setting_page}",
  2256 + replace: replace);
  2257 + }
2246 } 2258 }
@@ -232,6 +232,7 @@ import '../pages/my/marketing_center/invitation_theme_home_page.dart'; @@ -232,6 +232,7 @@ import '../pages/my/marketing_center/invitation_theme_home_page.dart';
232 232
233 import '../pages/my/marketing_center/invitation_theme_home_preview_page.dart'; 233 import '../pages/my/marketing_center/invitation_theme_home_preview_page.dart';
234 import '../pages/my/marketing_center/marketing_center_home_page.dart'; 234 import '../pages/my/marketing_center/marketing_center_home_page.dart';
  235 +import '../pages/my/marketing_center/mini_program_setting_page.dart';
235 import '../pages/my/marketing_center/order_setting_manager_page.dart'; 236 import '../pages/my/marketing_center/order_setting_manager_page.dart';
236 import '../pages/my/marketing_center/order_setting_page.dart'; 237 import '../pages/my/marketing_center/order_setting_page.dart';
237 import '../pages/my/marketing_center/payment_setting_page.dart'; 238 import '../pages/my/marketing_center/payment_setting_page.dart';
@@ -3853,3 +3854,20 @@ var paymentSettingPageHandle = new Handler( @@ -3853,3 +3854,20 @@ var paymentSettingPageHandle = new Handler(
3853 child: ChangeNotifierProvider<StoreBaseIndoProvider>( 3854 child: ChangeNotifierProvider<StoreBaseIndoProvider>(
3854 create: (_) => StoreBaseIndoProvider(), child: PaymentSettingPage())); 3855 create: (_) => StoreBaseIndoProvider(), child: PaymentSettingPage()));
3855 }); 3856 });
  3857 +
  3858 +
  3859 +
  3860 +///小程序通知卡片样式
  3861 +var miniprogramSettingPageHandle = new Handler(
  3862 + handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
  3863 + // String rid = params["rid"].first;
  3864 + // // String smsTemplate = params["smsTemplate"].first;
  3865 + // CouponUse use = CouponUse.fromJson(
  3866 + // json.decode(FluroConvertUtils.fluroCnParamsDecode(params["use"].first)));
  3867 + // CouponSunModel couponSunModel = CouponSunModel.fromJson(json.decode(
  3868 + // FluroConvertUtils.fluroCnParamsDecode(params["couponSunModel"].first)));
  3869 + return ChangeNotifierProvider<MarketingCenterProvider>(
  3870 + create: (_) => MarketingCenterProvider(),
  3871 + child: MiniprogramSettingPage());
  3872 +});
  3873 +
@@ -385,6 +385,11 @@ class Routes { @@ -385,6 +385,11 @@ class Routes {
385 static String select_table_f_or_reserve = 385 static String select_table_f_or_reserve =
386 "/select_table_f_or_reserve"; //在客户预订通知中,增加支付订金功能 386 "/select_table_f_or_reserve"; //在客户预订通知中,增加支付订金功能
387 387
  388 + static String mini_program_setting_page =
  389 + "/mini_program_setting_page"; //小程序封面样式设置
  390 +
  391 +
  392 +
388 static void configureRoutes(FluroRouter router) { 393 static void configureRoutes(FluroRouter router) {
389 router.notFoundHandler = new Handler( 394 router.notFoundHandler = new Handler(
390 handlerFunc: (BuildContext context, Map<String, List<String>> params) { 395 handlerFunc: (BuildContext context, Map<String, List<String>> params) {
@@ -721,5 +726,9 @@ router.define(select_table_f_or_reserve, handler: handleSelectTableFOrReserveHan @@ -721,5 +726,9 @@ router.define(select_table_f_or_reserve, handler: handleSelectTableFOrReserveHan
721 router.define(invication_addition_page, 726 router.define(invication_addition_page,
722 handler: invicationAdditionPageHandle); 727 handler: invicationAdditionPageHandle);
723 router.define(payment_setting_page, handler: paymentSettingPageHandle); 728 router.define(payment_setting_page, handler: paymentSettingPageHandle);
  729 +
  730 + router.define(mini_program_setting_page, handler: miniprogramSettingPageHandle);
  731 +
  732 +
724 } 733 }
725 } 734 }
@@ -2349,8 +2349,8 @@ class Utils { @@ -2349,8 +2349,8 @@ class Utils {
2349 } 2349 }
2350 2350
2351 //分享邀请函 2351 //分享邀请函
2352 - static goShareInvicationToWeChat(  
2353 - BuildContext context, String rid, String uid, String month, String week, 2352 + static goShareInvicationToWeChat(BuildContext context, String rid, String uid,
  2353 + String month, String week, String liteStyle,
2354 {bool isWechat = true, String depositId}) async { 2354 {bool isWechat = true, String depositId}) async {
2355 String _webPageUrl = "http://colorcun.com/"; 2355 String _webPageUrl = "http://colorcun.com/";
2356 // String _thumbnail = 2356 // String _thumbnail =
@@ -2359,16 +2359,19 @@ class Utils { @@ -2359,16 +2359,19 @@ class Utils {
2359 // "https://qn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201911151148572.jpg"; 2359 // "https://qn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201911151148572.jpg";
2360 String sellerImage = 2360 String sellerImage =
2361 Provider.of<UserModel>(context, listen: false).user.sellerimage; 2361 Provider.of<UserModel>(context, listen: false).user.sellerimage;
2362 - // String _thumbnail = sellerImage == null || sellerImage == ''  
2363 - // ? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'  
2364 - // : sellerImage;  
2365 - Uint8List _thumbnail = await canvas(  
2366 - context,  
2367 - sellerImage == null || sellerImage == ''  
2368 - ? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'  
2369 - : sellerImage,  
2370 - month,  
2371 - week); 2362 + String _thumbnail = sellerImage == null || sellerImage == ''
  2363 + ? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'
  2364 + : sellerImage;
  2365 + Uint8List _thumbnailUint8List;
  2366 + if (liteStyle != '0') {
  2367 + _thumbnailUint8List = await canvas(
  2368 + context,
  2369 + sellerImage == null || sellerImage == ''
  2370 + ? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'
  2371 + : sellerImage,
  2372 + month,
  2373 + week);
  2374 + }
2372 String _title = 2375 String _title =
2373 "您预订的${Provider.of<UserModel>(context, listen: false).user.sellername},已经安排,点击查看详情"; 2376 "您预订的${Provider.of<UserModel>(context, listen: false).user.sellername},已经安排,点击查看详情";
2374 2377
@@ -2403,7 +2406,9 @@ class Utils { @@ -2403,7 +2406,9 @@ class Utils {
2403 // miniProgramType: //开发版 2406 // miniProgramType: //开发版
2404 // thumbnail: WeChatImage.binary(source) 2407 // thumbnail: WeChatImage.binary(source)
2405 // thumbnail: WeChatImage.network(_thumbnail) 2408 // thumbnail: WeChatImage.network(_thumbnail)
2406 - thumbnail: WeChatImage.binary(_thumbnail)); 2409 + thumbnail: liteStyle == '0'
  2410 + ? WeChatImage.network(_thumbnail)
  2411 + : WeChatImage.binary(_thumbnailUint8List));
2407 2412
2408 isSuccess = await shareToWeChat(model); 2413 isSuccess = await shareToWeChat(model);
2409 } else { 2414 } else {