Showing
8 changed files
with
351 additions
and
3 deletions
| @@ -67,6 +67,8 @@ class Meals extends Object { | @@ -67,6 +67,8 @@ class Meals extends Object { | ||
| 67 | @JsonKey(name: 'discount') | 67 | @JsonKey(name: 'discount') |
| 68 | String discount; | 68 | String discount; |
| 69 | 69 | ||
| 70 | + bool selected = false; | ||
| 71 | + | ||
| 70 | Meals( | 72 | Meals( |
| 71 | this.id, | 73 | this.id, |
| 72 | this.packageName, | 74 | this.packageName, |
| @@ -3,6 +3,7 @@ import 'package:flutter_screenutil/screenutil.dart'; | @@ -3,6 +3,7 @@ import 'package:flutter_screenutil/screenutil.dart'; | ||
| 3 | import 'package:one_key/models/sms_info.dart'; | 3 | import 'package:one_key/models/sms_info.dart'; |
| 4 | import 'package:one_key/provider/my_model.dart'; | 4 | import 'package:one_key/provider/my_model.dart'; |
| 5 | import 'package:one_key/res/colors.dart'; | 5 | import 'package:one_key/res/colors.dart'; |
| 6 | +import 'package:one_key/route/navigator_util.dart'; | ||
| 6 | import 'package:one_key/utils/event_bus.dart'; | 7 | import 'package:one_key/utils/event_bus.dart'; |
| 7 | import 'package:one_key/utils/utils.dart'; | 8 | import 'package:one_key/utils/utils.dart'; |
| 8 | import 'package:one_key/widgets/MyDivider.dart'; | 9 | import 'package:one_key/widgets/MyDivider.dart'; |
| @@ -113,7 +114,8 @@ class _SmsManagerPageState extends State<SmsManagerPage> { | @@ -113,7 +114,8 @@ class _SmsManagerPageState extends State<SmsManagerPage> { | ||
| 113 | isBold: true, | 114 | isBold: true, |
| 114 | imgWidth: 26, | 115 | imgWidth: 26, |
| 115 | onPressed: () { | 116 | onPressed: () { |
| 116 | - // NavigatorUtil.goBaseInfoPage(context); | 117 | + NavigatorUtil.goSmsRechargePage(context, |
| 118 | + smsInfoData: widget.infoData); | ||
| 117 | }, | 119 | }, |
| 118 | ), | 120 | ), |
| 119 | Positioned( | 121 | Positioned( |
lib/pages/my/sms_recharge_item_page.dart
0 → 100644
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/models/sms_info.dart'; | ||
| 4 | +import 'package:one_key/res/colors.dart'; | ||
| 5 | +import 'package:one_key/utils/utils.dart'; | ||
| 6 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 7 | + | ||
| 8 | +class SmsRechargeItemPage extends StatefulWidget { | ||
| 9 | + Meals meals; | ||
| 10 | + GestureTapCallback callback; | ||
| 11 | + SmsRechargeItemPage({Key key, this.meals, this.callback}) : super(key: key); | ||
| 12 | + | ||
| 13 | + @override | ||
| 14 | + _SmsRechargeItemPageState createState() => _SmsRechargeItemPageState(); | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +class _SmsRechargeItemPageState extends State<SmsRechargeItemPage> { | ||
| 18 | + @override | ||
| 19 | + Widget build(BuildContext context) { | ||
| 20 | + return InkWell( | ||
| 21 | + onTap: widget.callback, | ||
| 22 | + child: Stack( | ||
| 23 | + clipBehavior: Clip.none, | ||
| 24 | + children: [ | ||
| 25 | + Container( | ||
| 26 | + decoration: BoxDecoration( | ||
| 27 | + color: widget.meals.selected | ||
| 28 | + ? MyColours.color_199095 | ||
| 29 | + : MyColours.color_ffffff, | ||
| 30 | + borderRadius: | ||
| 31 | + BorderRadius.circular(ScreenUtil().setWidth(10)), | ||
| 32 | + border: Border.all( | ||
| 33 | + width: ScreenUtil().setWidth(2), | ||
| 34 | + color: MyColours.color_E0E0E0, | ||
| 35 | + )), | ||
| 36 | + padding: EdgeInsets.symmetric( | ||
| 37 | + horizontal: ScreenUtil().setWidth(30), | ||
| 38 | + vertical: ScreenUtil().setWidth(20)), | ||
| 39 | + margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(30)), | ||
| 40 | + child: Row( | ||
| 41 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 42 | + children: [ | ||
| 43 | + Column( | ||
| 44 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 45 | + mainAxisAlignment: MainAxisAlignment.start, | ||
| 46 | + children: [ | ||
| 47 | + Text( | ||
| 48 | + '${widget.meals.total}条', | ||
| 49 | + style: TextStyle( | ||
| 50 | + fontWeight: FontWeight.bold, | ||
| 51 | + fontSize: ScreenUtil().setSp(34), | ||
| 52 | + color: widget.meals.selected | ||
| 53 | + ? MyColours.color_F0F0F0 | ||
| 54 | + : MyColours.color_333333), | ||
| 55 | + ), | ||
| 56 | + VEmptyView(20), | ||
| 57 | + Text('约${widget.meals.priceAve}元/条', | ||
| 58 | + style: TextStyle( | ||
| 59 | + fontSize: ScreenUtil().setSp(30), | ||
| 60 | + color: widget.meals.selected | ||
| 61 | + ? MyColours.color_F0F0F0 | ||
| 62 | + : MyColours.color_333333)), | ||
| 63 | + ], | ||
| 64 | + ), | ||
| 65 | + Container( | ||
| 66 | + width: ScreenUtil().setWidth(150), | ||
| 67 | + margin: EdgeInsets.only(top: ScreenUtil().setWidth(30)), | ||
| 68 | + child: Column( | ||
| 69 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 70 | + mainAxisAlignment: MainAxisAlignment.start, | ||
| 71 | + children: [ | ||
| 72 | + Text( | ||
| 73 | + '¥${widget.meals.price}', | ||
| 74 | + style: TextStyle( | ||
| 75 | + fontWeight: FontWeight.bold, | ||
| 76 | + fontSize: ScreenUtil().setSp(34), | ||
| 77 | + color: widget.meals.selected | ||
| 78 | + ? MyColours.color_F0F0F0 | ||
| 79 | + : MyColours.color_333333), | ||
| 80 | + ), | ||
| 81 | + widget.meals.price == widget.meals.priceOld | ||
| 82 | + ? SizedBox() | ||
| 83 | + : Text('¥${widget.meals.priceOld}', | ||
| 84 | + style: TextStyle( | ||
| 85 | + decoration: TextDecoration.lineThrough, | ||
| 86 | + fontSize: ScreenUtil().setSp(30), | ||
| 87 | + color: widget.meals.selected | ||
| 88 | + ? MyColours.color_F0F0F0 | ||
| 89 | + : MyColours.color_999999)), | ||
| 90 | + ], | ||
| 91 | + ), | ||
| 92 | + ), | ||
| 93 | + ], | ||
| 94 | + )), | ||
| 95 | + widget.meals.discount == '0' | ||
| 96 | + ? SizedBox() | ||
| 97 | + : Positioned( | ||
| 98 | + top: -5, | ||
| 99 | + right: -2, | ||
| 100 | + child: Container( | ||
| 101 | + // padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(16),vertical: ScreenUtil().setWidth(4)), | ||
| 102 | + padding: EdgeInsets.only( | ||
| 103 | + left: ScreenUtil().setWidth(6), | ||
| 104 | + bottom: ScreenUtil().setWidth(10)), | ||
| 105 | + alignment: Alignment.center, | ||
| 106 | + width: ScreenUtil().setWidth(44 * 2), | ||
| 107 | + height: ScreenUtil().setWidth(61), | ||
| 108 | + decoration: BoxDecoration( | ||
| 109 | + // color: Colors.red, | ||
| 110 | + image: DecorationImage( | ||
| 111 | + image: ExactAssetImage( | ||
| 112 | + Utils.getImgPath('sms_manager'), | ||
| 113 | + ), | ||
| 114 | + fit: BoxFit.cover, | ||
| 115 | + ), | ||
| 116 | + ), | ||
| 117 | + child: Text( | ||
| 118 | + '${widget.meals.discount}折', | ||
| 119 | + style: TextStyle( | ||
| 120 | + color: MyColours.color_fefefe, | ||
| 121 | + fontSize: ScreenUtil().setSp(24)), | ||
| 122 | + ))) | ||
| 123 | + ], | ||
| 124 | + ), | ||
| 125 | + ); | ||
| 126 | + } | ||
| 127 | +} |
lib/pages/my/sms_recharge_page.dart
0 → 100644
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/models/sms_info.dart'; | ||
| 4 | +import 'package:one_key/pages/my/sms_recharge_item_page.dart'; | ||
| 5 | +import 'package:one_key/provider/sms_recharge_provider.dart'; | ||
| 6 | +import 'package:one_key/res/colors.dart'; | ||
| 7 | +import 'package:one_key/utils/event_bus.dart'; | ||
| 8 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 9 | +import 'package:one_key/widgets/round_button.dart'; | ||
| 10 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 11 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 12 | +import 'package:provider/provider.dart'; | ||
| 13 | +import 'package:fluwx/fluwx.dart' as fluwx; | ||
| 14 | + | ||
| 15 | +class SmsRechargePage extends StatefulWidget { | ||
| 16 | + final SmsInfoData infoData; | ||
| 17 | + SmsRechargePage({Key key, this.infoData}) : super(key: key); | ||
| 18 | + | ||
| 19 | + @override | ||
| 20 | + _SmsRechargePageState createState() => _SmsRechargePageState(); | ||
| 21 | +} | ||
| 22 | + | ||
| 23 | +class _SmsRechargePageState extends State<SmsRechargePage> { | ||
| 24 | + ScrollController controller = ScrollController(); | ||
| 25 | + Meals mealsSelected; | ||
| 26 | + SmsRechargeModel rechargeModel; | ||
| 27 | + | ||
| 28 | + @override | ||
| 29 | + Widget build(BuildContext context) { | ||
| 30 | + rechargeModel = Provider.of<SmsRechargeModel>(context, listen: true); | ||
| 31 | + return Scaffold( | ||
| 32 | + backgroundColor: MyColours.color_ffffff, | ||
| 33 | + appBar: SystemAppBar( | ||
| 34 | + '短信充值', | ||
| 35 | + onTap: () { | ||
| 36 | + EventBus().emit('changeStatusColor'); | ||
| 37 | + Navigator.pop(context); | ||
| 38 | + }, | ||
| 39 | + ), | ||
| 40 | + body: WillPopScope( | ||
| 41 | + onWillPop: () async { | ||
| 42 | + EventBus().emit('changeStatusColor'); | ||
| 43 | + return true; | ||
| 44 | + }, | ||
| 45 | + child: Column( | ||
| 46 | + children: [ | ||
| 47 | + Expanded( | ||
| 48 | + child: SingleChildScrollView( | ||
| 49 | + controller: controller, | ||
| 50 | + child: Padding( | ||
| 51 | + padding: EdgeInsets.symmetric( | ||
| 52 | + horizontal: ScreenUtil().setWidth(40)), | ||
| 53 | + child: Column( | ||
| 54 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 55 | + children: [ | ||
| 56 | + VEmptyView(40), | ||
| 57 | + Text( | ||
| 58 | + '短信套餐', | ||
| 59 | + style: TextStyle( | ||
| 60 | + fontSize: ScreenUtil().setSp(38), | ||
| 61 | + fontWeight: FontWeight.bold), | ||
| 62 | + ), | ||
| 63 | + VEmptyView(30), | ||
| 64 | + Text('购买套餐,使用更划算', | ||
| 65 | + style: TextStyle( | ||
| 66 | + fontSize: ScreenUtil().setSp(28), | ||
| 67 | + color: MyColours.color_333333)), | ||
| 68 | + ListView.builder( | ||
| 69 | + shrinkWrap: true, | ||
| 70 | + controller: controller, | ||
| 71 | + physics: NeverScrollableScrollPhysics(), | ||
| 72 | + padding: EdgeInsets.symmetric( | ||
| 73 | + vertical: ScreenUtil().setWidth(40)), | ||
| 74 | + itemBuilder: (BuildContext contxt, int index) { | ||
| 75 | + return SmsRechargeItemPage( | ||
| 76 | + meals: widget.infoData.meals[index], | ||
| 77 | + callback: () { | ||
| 78 | + for (Meals item | ||
| 79 | + in widget.infoData.meals) { | ||
| 80 | + item.selected = false; | ||
| 81 | + } | ||
| 82 | + setState(() { | ||
| 83 | + widget.infoData.meals[index].selected = | ||
| 84 | + true; | ||
| 85 | + mealsSelected = | ||
| 86 | + widget.infoData.meals[index]; | ||
| 87 | + }); | ||
| 88 | + }); | ||
| 89 | + }, | ||
| 90 | + itemCount: widget.infoData.meals.length, | ||
| 91 | + scrollDirection: Axis.vertical, | ||
| 92 | + ) | ||
| 93 | + ], | ||
| 94 | + ), | ||
| 95 | + ))), | ||
| 96 | + Container( | ||
| 97 | + height: ScreenUtil().setWidth(160), | ||
| 98 | + width: double.infinity, | ||
| 99 | + padding: | ||
| 100 | + EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)), | ||
| 101 | + decoration: BoxDecoration( | ||
| 102 | + border: Border( | ||
| 103 | + top: BorderSide( | ||
| 104 | + width: ScreenUtil().setWidth(2), | ||
| 105 | + color: MyColours.color_E0E0E0, | ||
| 106 | + ))), | ||
| 107 | + child: Row( | ||
| 108 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 109 | + children: [ | ||
| 110 | + Expanded( | ||
| 111 | + child: Text( | ||
| 112 | + mealsSelected == null | ||
| 113 | + ? '剩余${widget.infoData.lastNum}条短信,请及时充值以保证正常使用' | ||
| 114 | + : '${mealsSelected.price}元', | ||
| 115 | + // maxLines: 2, | ||
| 116 | + style: mealsSelected == null | ||
| 117 | + ? TextStyle( | ||
| 118 | + fontSize: ScreenUtil().setSp(28), | ||
| 119 | + color: MyColours.color_333333) | ||
| 120 | + : TextStyle( | ||
| 121 | + fontSize: ScreenUtil().setSp(36), | ||
| 122 | + fontWeight: FontWeight.bold))), | ||
| 123 | + HEmptyView(80), | ||
| 124 | + RoundButton( | ||
| 125 | + radius: ScreenUtil().setWidth(10), | ||
| 126 | + text: '购买', | ||
| 127 | + fontSize: 34, | ||
| 128 | + width: ScreenUtil().setWidth(160), | ||
| 129 | + height: ScreenUtil().setWidth(70), | ||
| 130 | + textColor: MyColours.color_F0F0F0, | ||
| 131 | + onPressed: () async { | ||
| 132 | + //1.接口请求微信支付所需参数 | ||
| 133 | + //2.成功后掉起微信支付 | ||
| 134 | + Map<String, String> params; | ||
| 135 | + bool success = await rechargeModel.getWechatPayInfo( | ||
| 136 | + context, params); | ||
| 137 | + if (success) { | ||
| 138 | + //掉起微信支付 | ||
| 139 | + // fluwx | ||
| 140 | + // .payWithWeChat( | ||
| 141 | + // appId: result['appid'].toString(), | ||
| 142 | + // partnerId: result['partnerid'].toString(), | ||
| 143 | + // prepayId: result['prepayid'].toString(), | ||
| 144 | + // packageValue: result['package'].toString(), | ||
| 145 | + // nonceStr: result['noncestr'].toString(), | ||
| 146 | + // timeStamp: result['timestamp'], | ||
| 147 | + // sign: result['sign'].toString(), | ||
| 148 | + // ) | ||
| 149 | + // .then((data) { | ||
| 150 | + // print("---》$data"); | ||
| 151 | + // }); | ||
| 152 | + } else { | ||
| 153 | + //给用户提示错误 | ||
| 154 | + } | ||
| 155 | + }, | ||
| 156 | + isBold: true, | ||
| 157 | + ), | ||
| 158 | + ], | ||
| 159 | + ), | ||
| 160 | + ) | ||
| 161 | + ], | ||
| 162 | + ), | ||
| 163 | + )); | ||
| 164 | + } | ||
| 165 | +} |
lib/provider/sms_recharge_provider.dart
0 → 100644
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:one_key/constant/constant.dart'; | ||
| 3 | +import 'package:one_key/constant/error.dart'; | ||
| 4 | +import 'package:one_key/net/base_resp.dart'; | ||
| 5 | +import 'package:one_key/net/dio_util.dart'; | ||
| 6 | +import 'package:one_key/net/http_url.dart'; | ||
| 7 | +import 'package:one_key/utils/utils.dart'; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * 短信充值 | ||
| 11 | + */ | ||
| 12 | +class SmsRechargeModel extends ChangeNotifier { | ||
| 13 | + //获取微信支付所需参数 | ||
| 14 | + getWechatPayInfo(BuildContext context, Map<String, String> params, | ||
| 15 | + {bool showPageLoading = false}) async { | ||
| 16 | + BaseResp<List> baseResp = await DioUtil() | ||
| 17 | + .request<List>(context, Method.get, HttpUrl.get_custom_remark, | ||
| 18 | + data: params, showLoading: showPageLoading ? false : true) | ||
| 19 | + .catchError((error) { | ||
| 20 | + print(error.toString()); | ||
| 21 | + if (error is MyError) {} | ||
| 22 | + }); | ||
| 23 | + if (baseResp != null && baseResp.code == Constant.status_success) { | ||
| 24 | + } else { | ||
| 25 | + Utils.showToast(baseResp.msg ?? ""); | ||
| 26 | + } | ||
| 27 | + notifyListeners(); | ||
| 28 | + } | ||
| 29 | +} |
| @@ -343,11 +343,19 @@ class NavigatorUtil { | @@ -343,11 +343,19 @@ class NavigatorUtil { | ||
| 343 | replace: replace); | 343 | replace: replace); |
| 344 | } | 344 | } |
| 345 | 345 | ||
| 346 | - /// 短信充值 | 346 | + /// 短信余额显示 |
| 347 | static Future<dynamic> goSmsManagePage(BuildContext context, | 347 | static Future<dynamic> goSmsManagePage(BuildContext context, |
| 348 | {replace = false, SmsInfoData smsInfoData}) { | 348 | {replace = false, SmsInfoData smsInfoData}) { |
| 349 | return _navigateTo(context, | 349 | return _navigateTo(context, |
| 350 | "${Routes.sms_manager_page}?smsInfoData=${FluroConvertUtils.object2string(smsInfoData)}", | 350 | "${Routes.sms_manager_page}?smsInfoData=${FluroConvertUtils.object2string(smsInfoData)}", |
| 351 | replace: replace); | 351 | replace: replace); |
| 352 | } | 352 | } |
| 353 | + | ||
| 354 | + /// 短信充值 | ||
| 355 | + static Future<dynamic> goSmsRechargePage(BuildContext context, | ||
| 356 | + {replace = false, SmsInfoData smsInfoData}) { | ||
| 357 | + return _navigateTo(context, | ||
| 358 | + "${Routes.sms_recharge_page}?smsInfoData=${FluroConvertUtils.object2string(smsInfoData)}", | ||
| 359 | + replace: replace); | ||
| 360 | + } | ||
| 353 | } | 361 | } |
| @@ -41,6 +41,7 @@ import 'package:one_key/pages/my/my_integral_page.dart'; | @@ -41,6 +41,7 @@ import 'package:one_key/pages/my/my_integral_page.dart'; | ||
| 41 | import 'package:one_key/pages/my/receive_orders_time_set.dart'; | 41 | import 'package:one_key/pages/my/receive_orders_time_set.dart'; |
| 42 | import 'package:one_key/pages/my/remark_manager_page.dart'; | 42 | import 'package:one_key/pages/my/remark_manager_page.dart'; |
| 43 | import 'package:one_key/pages/my/sms_manager.dart'; | 43 | import 'package:one_key/pages/my/sms_manager.dart'; |
| 44 | +import 'package:one_key/pages/my/sms_recharge_page.dart'; | ||
| 44 | import 'package:one_key/pages/my/store_type_fill_manage_page.dart'; | 45 | import 'package:one_key/pages/my/store_type_fill_manage_page.dart'; |
| 45 | import 'package:one_key/pages/notebook/statistics_page.dart'; | 46 | import 'package:one_key/pages/notebook/statistics_page.dart'; |
| 46 | import 'package:one_key/pages/notebook/statistics_sms_page.dart'; | 47 | import 'package:one_key/pages/notebook/statistics_sms_page.dart'; |
| @@ -62,6 +63,7 @@ import 'package:one_key/provider/notebook_detail_model.dart'; | @@ -62,6 +63,7 @@ import 'package:one_key/provider/notebook_detail_model.dart'; | ||
| 62 | import 'package:one_key/provider/order_food_provider.dart'; | 63 | import 'package:one_key/provider/order_food_provider.dart'; |
| 63 | import 'package:one_key/provider/other_login_provider.dart'; | 64 | import 'package:one_key/provider/other_login_provider.dart'; |
| 64 | import 'package:one_key/provider/remark_manager_model.dart'; | 65 | import 'package:one_key/provider/remark_manager_model.dart'; |
| 66 | +import 'package:one_key/provider/sms_recharge_provider.dart'; | ||
| 65 | import 'package:one_key/provider/statistics_provider.dart'; | 67 | import 'package:one_key/provider/statistics_provider.dart'; |
| 66 | import 'package:one_key/provider/store_detail_model.dart'; | 68 | import 'package:one_key/provider/store_detail_model.dart'; |
| 67 | import 'package:one_key/provider/table_photo_manager_provider.dart'; | 69 | import 'package:one_key/provider/table_photo_manager_provider.dart'; |
| @@ -526,7 +528,7 @@ var storeTypeFillManagePageHandler = new Handler( | @@ -526,7 +528,7 @@ var storeTypeFillManagePageHandler = new Handler( | ||
| 526 | // create: (_) => UploadImageProvider(), child: EnterStoreFrontPhotoPage()); | 528 | // create: (_) => UploadImageProvider(), child: EnterStoreFrontPhotoPage()); |
| 527 | }); | 529 | }); |
| 528 | 530 | ||
| 529 | -///短信充值 | 531 | +///短信余额显示 |
| 530 | var smsManagerPageHandler = new Handler( | 532 | var smsManagerPageHandler = new Handler( |
| 531 | handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | 533 | handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { |
| 532 | SmsInfoData data = SmsInfoData.fromJson(json.decode( | 534 | SmsInfoData data = SmsInfoData.fromJson(json.decode( |
| @@ -536,3 +538,14 @@ var smsManagerPageHandler = new Handler( | @@ -536,3 +538,14 @@ var smsManagerPageHandler = new Handler( | ||
| 536 | // return ChangeNotifierProvider<UploadImageProvider>( | 538 | // return ChangeNotifierProvider<UploadImageProvider>( |
| 537 | // create: (_) => UploadImageProvider(), child: EnterStoreFrontPhotoPage()); | 539 | // create: (_) => UploadImageProvider(), child: EnterStoreFrontPhotoPage()); |
| 538 | }); | 540 | }); |
| 541 | + | ||
| 542 | +///短信充值 | ||
| 543 | +var smsRechargePageHandler = new Handler( | ||
| 544 | + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | ||
| 545 | + SmsInfoData data = SmsInfoData.fromJson(json.decode( | ||
| 546 | + FluroConvertUtils.fluroCnParamsDecode(params["smsInfoData"].first))); | ||
| 547 | + return ChangeNotifierProvider<SmsRechargeModel>( | ||
| 548 | + create: (_) => SmsRechargeModel(), child: SmsRechargePage(infoData: data)); | ||
| 549 | + // return ChangeNotifierProvider<UploadImageProvider>( | ||
| 550 | + // create: (_) => UploadImageProvider(), child: EnterStoreFrontPhotoPage()); | ||
| 551 | +}); |
| @@ -49,6 +49,7 @@ class Routes { | @@ -49,6 +49,7 @@ class Routes { | ||
| 49 | static String store_type_fill_manage_page = | 49 | static String store_type_fill_manage_page = |
| 50 | "/store_type_fill_manage_page"; //包间置满管理 | 50 | "/store_type_fill_manage_page"; //包间置满管理 |
| 51 | static String sms_manager_page = "/sms_manager_page"; //短信充值 | 51 | static String sms_manager_page = "/sms_manager_page"; //短信充值 |
| 52 | + static String sms_recharge_page = "/sms_recharge_page"; //短信充值 | ||
| 52 | 53 | ||
| 53 | static void configureRoutes(FluroRouter router) { | 54 | static void configureRoutes(FluroRouter router) { |
| 54 | router.notFoundHandler = new Handler( | 55 | router.notFoundHandler = new Handler( |
| @@ -105,5 +106,6 @@ class Routes { | @@ -105,5 +106,6 @@ class Routes { | ||
| 105 | router.define(store_type_fill_manage_page, | 106 | router.define(store_type_fill_manage_page, |
| 106 | handler: storeTypeFillManagePageHandler); | 107 | handler: storeTypeFillManagePageHandler); |
| 107 | router.define(sms_manager_page, handler: smsManagerPageHandler); | 108 | router.define(sms_manager_page, handler: smsManagerPageHandler); |
| 109 | + router.define(sms_recharge_page, handler: smsRechargePageHandler); | ||
| 108 | } | 110 | } |
| 109 | } | 111 | } |
-
Please register or login to post a comment