Showing
9 changed files
with
480 additions
and
44 deletions
| @@ -60,6 +60,8 @@ class GetDzSellerConfSunModel { | @@ -60,6 +60,8 @@ class GetDzSellerConfSunModel { | ||
| 60 | String depositPrice; | 60 | String depositPrice; |
| 61 | String liteStyle; | 61 | String liteStyle; |
| 62 | 62 | ||
| 63 | + String liteStyleTitle; | ||
| 64 | + | ||
| 63 | String storePushMeg; | 65 | String storePushMeg; |
| 64 | String storePushSms; | 66 | String storePushSms; |
| 65 | 67 | ||
| @@ -105,6 +107,7 @@ class GetDzSellerConfSunModel { | @@ -105,6 +107,7 @@ class GetDzSellerConfSunModel { | ||
| 105 | this.isShowNoticeDeposit, | 107 | this.isShowNoticeDeposit, |
| 106 | this.depositPrice, | 108 | this.depositPrice, |
| 107 | this.liteStyle, | 109 | this.liteStyle, |
| 110 | + this.liteStyleTitle, | ||
| 108 | this.storePushMeg, | 111 | this.storePushMeg, |
| 109 | this.storePushSms, | 112 | this.storePushSms, |
| 110 | this.pcNotPhone, | 113 | this.pcNotPhone, |
| @@ -159,6 +162,7 @@ class GetDzSellerConfSunModel { | @@ -159,6 +162,7 @@ class GetDzSellerConfSunModel { | ||
| 159 | isShowNoticeDeposit = json['is_show_notice_deposit']; | 162 | isShowNoticeDeposit = json['is_show_notice_deposit']; |
| 160 | depositPrice = json['deposit_price']; | 163 | depositPrice = json['deposit_price']; |
| 161 | liteStyle = json['lite_style']; | 164 | liteStyle = json['lite_style']; |
| 165 | + liteStyleTitle = json['lite_style_title']; | ||
| 162 | 166 | ||
| 163 | storePushMeg = json['store_push_meg']; | 167 | storePushMeg = json['store_push_meg']; |
| 164 | storePushSms = json['store_push_sms']; | 168 | storePushSms = json['store_push_sms']; |
| @@ -207,6 +211,8 @@ class GetDzSellerConfSunModel { | @@ -207,6 +211,8 @@ class GetDzSellerConfSunModel { | ||
| 207 | data['is_show_notice_deposit'] = this.isShowNoticeDeposit; | 211 | data['is_show_notice_deposit'] = this.isShowNoticeDeposit; |
| 208 | data['deposit_price'] = this.depositPrice; | 212 | data['deposit_price'] = this.depositPrice; |
| 209 | data['lite_style'] = this.liteStyle; | 213 | data['lite_style'] = this.liteStyle; |
| 214 | + data['lite_style_title'] = this.liteStyleTitle; | ||
| 215 | + | ||
| 210 | data['store_push_meg'] = this.storePushMeg; | 216 | data['store_push_meg'] = this.storePushMeg; |
| 211 | data['store_push_sms'] = this.storePushSms; | 217 | data['store_push_sms'] = this.storePushSms; |
| 212 | data['pc_not_phone'] = this.pcNotPhone; | 218 | data['pc_not_phone'] = this.pcNotPhone; |
| @@ -5032,6 +5032,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -5032,6 +5032,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 5032 | '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', | 5032 | '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', |
| 5033 | returnWeek(dateTime, context) + _getDsoltStrShow(), | 5033 | returnWeek(dateTime, context) + _getDsoltStrShow(), |
| 5034 | detailModel.liteStyle, | 5034 | detailModel.liteStyle, |
| 5035 | + detailModel.liteStyleTitle, | ||
| 5035 | depositId: detailModel.depositId); | 5036 | depositId: detailModel.depositId); |
| 5036 | print(isSuccess); | 5037 | print(isSuccess); |
| 5037 | if (isSuccess) { | 5038 | if (isSuccess) { |
| @@ -5049,6 +5050,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -5049,6 +5050,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 5049 | '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', | 5050 | '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', |
| 5050 | returnWeek(dateTime, context) + _getDsoltStrShow(), | 5051 | returnWeek(dateTime, context) + _getDsoltStrShow(), |
| 5051 | detailModel.liteStyle, | 5052 | detailModel.liteStyle, |
| 5053 | + detailModel.liteStyleTitle, | ||
| 5052 | depositId: detailModel.depositId); | 5054 | depositId: detailModel.depositId); |
| 5053 | print(isSuccess); | 5055 | print(isSuccess); |
| 5054 | if (isSuccess) { | 5056 | if (isSuccess) { |
| @@ -5065,6 +5067,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -5065,6 +5067,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 5065 | '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', | 5067 | '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', |
| 5066 | returnWeek(dateTime, context) + _getDsoltStrShow(), | 5068 | returnWeek(dateTime, context) + _getDsoltStrShow(), |
| 5067 | detailModel.liteStyle, | 5069 | detailModel.liteStyle, |
| 5070 | + detailModel.liteStyleTitle, | ||
| 5068 | depositId: detailModel.depositId); | 5071 | depositId: detailModel.depositId); |
| 5069 | print(isSuccess); | 5072 | print(isSuccess); |
| 5070 | if (isSuccess) { | 5073 | if (isSuccess) { |
| @@ -5080,6 +5083,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -5080,6 +5083,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 5080 | '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', | 5083 | '${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日', |
| 5081 | returnWeek(dateTime, context) + _getDsoltStrShow(), | 5084 | returnWeek(dateTime, context) + _getDsoltStrShow(), |
| 5082 | detailModel.liteStyle, | 5085 | detailModel.liteStyle, |
| 5086 | + detailModel.liteStyleTitle, | ||
| 5083 | depositId: detailModel.depositId); | 5087 | depositId: detailModel.depositId); |
| 5084 | print(isSuccess); | 5088 | print(isSuccess); |
| 5085 | if (isSuccess) { | 5089 | if (isSuccess) { |
| 1 | +import 'dart:async'; | ||
| 2 | + | ||
| 1 | import 'package:city_pickers/city_pickers.dart'; | 3 | import 'package:city_pickers/city_pickers.dart'; |
| 2 | import 'package:city_pickers/modal/result.dart'; | 4 | import 'package:city_pickers/modal/result.dart'; |
| 3 | import 'package:flutter/material.dart'; | 5 | import 'package:flutter/material.dart'; |
| @@ -12,6 +14,7 @@ import 'package:permission_handler/permission_handler.dart'; | @@ -12,6 +14,7 @@ import 'package:permission_handler/permission_handler.dart'; | ||
| 12 | import 'package:provider/provider.dart'; | 14 | import 'package:provider/provider.dart'; |
| 13 | 15 | ||
| 14 | import '../../provider/collect_store_provider.dart'; | 16 | import '../../provider/collect_store_provider.dart'; |
| 17 | +import '../../provider/other_login_provider.dart'; | ||
| 15 | import '../../route/navigator_util.dart'; | 18 | import '../../route/navigator_util.dart'; |
| 16 | import '../../utils/screen_util.dart'; | 19 | import '../../utils/screen_util.dart'; |
| 17 | import '../../utils/utils.dart'; | 20 | import '../../utils/utils.dart'; |
| @@ -32,6 +35,7 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | @@ -32,6 +35,7 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | ||
| 32 | TextEditingController nameC = TextEditingController(); | 35 | TextEditingController nameC = TextEditingController(); |
| 33 | TextEditingController phoneC = TextEditingController(); | 36 | TextEditingController phoneC = TextEditingController(); |
| 34 | TextEditingController personC = TextEditingController(); | 37 | TextEditingController personC = TextEditingController(); |
| 38 | + TextEditingController codeC = TextEditingController(); | ||
| 35 | String storeAddress = '点击设置您的地址'; | 39 | String storeAddress = '点击设置您的地址'; |
| 36 | double lat; | 40 | double lat; |
| 37 | double lng; | 41 | double lng; |
| @@ -43,6 +47,48 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | @@ -43,6 +47,48 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | ||
| 43 | 47 | ||
| 44 | CollectStoreProvider collectStoreProvider; | 48 | CollectStoreProvider collectStoreProvider; |
| 45 | 49 | ||
| 50 | + FocusNode _codeNode; | ||
| 51 | + | ||
| 52 | + OtherLoginProvider otherLoginProvider; | ||
| 53 | + | ||
| 54 | + //定义变量 | ||
| 55 | + Timer _timer; | ||
| 56 | + //倒计时数值 | ||
| 57 | + var countdownTime = 0; | ||
| 58 | + | ||
| 59 | + // String phone; | ||
| 60 | + String code; | ||
| 61 | + bool enabled = true; //手机号码框是否可以编辑 | ||
| 62 | + bool codeEnabled = false; //验证码是否可用 | ||
| 63 | + | ||
| 64 | + @override | ||
| 65 | + void dispose() { | ||
| 66 | + super.dispose(); | ||
| 67 | + if (_timer != null) { | ||
| 68 | + _timer?.cancel(); | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + ///倒计时方法 | ||
| 73 | + startCountdown() { | ||
| 74 | + countdownTime = 600; | ||
| 75 | + final call = (timer) { | ||
| 76 | + setState(() { | ||
| 77 | + if (countdownTime < 1) { | ||
| 78 | + // model.code = null; | ||
| 79 | + enabled = true; | ||
| 80 | + codeEnabled = false; | ||
| 81 | + _timer.cancel(); | ||
| 82 | + } else { | ||
| 83 | + enabled = false; | ||
| 84 | + codeEnabled = true; | ||
| 85 | + countdownTime -= 1; | ||
| 86 | + } | ||
| 87 | + }); | ||
| 88 | + }; | ||
| 89 | + _timer = Timer.periodic(Duration(seconds: 1), call); | ||
| 90 | + } | ||
| 91 | + | ||
| 46 | /// 高级筛选输入框 | 92 | /// 高级筛选输入框 |
| 47 | Widget _textFeildWidget( | 93 | Widget _textFeildWidget( |
| 48 | TextEditingController controller, String name, String hintText) { | 94 | TextEditingController controller, String name, String hintText) { |
| @@ -75,7 +121,9 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | @@ -75,7 +121,9 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | ||
| 75 | border: OutlineInputBorder(borderSide: BorderSide.none), | 121 | border: OutlineInputBorder(borderSide: BorderSide.none), |
| 76 | contentPadding: EdgeInsets.zero, | 122 | contentPadding: EdgeInsets.zero, |
| 77 | ), | 123 | ), |
| 78 | - keyboardType: TextInputType.text, | 124 | + keyboardType: name == '联系电话:' |
| 125 | + ? TextInputType.numberWithOptions() | ||
| 126 | + : TextInputType.text, | ||
| 79 | textInputAction: TextInputAction.done, | 127 | textInputAction: TextInputAction.done, |
| 80 | 128 | ||
| 81 | onChanged: (value) { | 129 | onChanged: (value) { |
| @@ -95,6 +143,106 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | @@ -95,6 +143,106 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | ||
| 95 | ])); | 143 | ])); |
| 96 | } | 144 | } |
| 97 | 145 | ||
| 146 | + /// 高级筛选输入框 | ||
| 147 | + Widget _textFeildWidgetBtn( | ||
| 148 | + TextEditingController controller, String name, String hintText) { | ||
| 149 | + return Container( | ||
| 150 | + padding: EdgeInsets.symmetric( | ||
| 151 | + horizontal: ScreenUtil().setWidth(32), | ||
| 152 | + ), | ||
| 153 | + height: w(48), | ||
| 154 | + alignment: Alignment.center, | ||
| 155 | + child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [ | ||
| 156 | + _textWidget(name, MyColours.color_515151, FontWeight.normal, 32), | ||
| 157 | + Expanded( | ||
| 158 | + child: TextField( | ||
| 159 | + maxLines: 1, | ||
| 160 | + controller: controller, | ||
| 161 | + // focusNode: _focusNode, | ||
| 162 | + // autofocus: true, | ||
| 163 | + textAlign: TextAlign.right, | ||
| 164 | + style: TextStyle( | ||
| 165 | + color: MyColours.color_515151, | ||
| 166 | + fontSize: ScreenUtil().setSp(32)), | ||
| 167 | + // textAlignVertical: TextAlignVertical.center, | ||
| 168 | + decoration: InputDecoration( | ||
| 169 | + hintText: hintText, | ||
| 170 | + hintStyle: TextStyle( | ||
| 171 | + color: MyColours.color_66000000, | ||
| 172 | + fontSize: ScreenUtil().setSp(32), | ||
| 173 | + ), | ||
| 174 | + isCollapsed: true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 175 | + border: OutlineInputBorder(borderSide: BorderSide.none), | ||
| 176 | + contentPadding: EdgeInsets.zero, | ||
| 177 | + ), | ||
| 178 | + keyboardType: TextInputType.numberWithOptions(decimal: true), | ||
| 179 | + textInputAction: TextInputAction.done, | ||
| 180 | + | ||
| 181 | + onChanged: (value) { | ||
| 182 | + code = value; | ||
| 183 | + }, | ||
| 184 | + | ||
| 185 | + onEditingComplete: () { | ||
| 186 | + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 187 | + // contantShowModel.searchData( | ||
| 188 | + // contantShowModel.controller.text); | ||
| 189 | + // _searchSellerLocation(); | ||
| 190 | + // _focusNode.unfocus(); | ||
| 191 | + }, | ||
| 192 | + ), | ||
| 193 | + ), | ||
| 194 | + HEmptyView(10), | ||
| 195 | + RoundButton( | ||
| 196 | + width: w(100), | ||
| 197 | + height: w(25), | ||
| 198 | + text: countdownTime > 0 | ||
| 199 | + ? "${Utils.durationTransform(countdownTime)}后重新获取" | ||
| 200 | + : "获取验证码", | ||
| 201 | + radius: ScreenUtil().setWidth(10), | ||
| 202 | + textColor: MyColours.color_ffffff, | ||
| 203 | + gradientStart: MyColours.color_438E93, | ||
| 204 | + gradientEnd: MyColours.color_438E93, | ||
| 205 | + borderColor: Colors.transparent, | ||
| 206 | + fontSize: 24, | ||
| 207 | + isBold: false, | ||
| 208 | + onPressed: () async { | ||
| 209 | + if (phoneC.text.trim() == '18601216909') { | ||
| 210 | + Utils.showToast('该手机号不需要获取验证码,可直接提交!'); | ||
| 211 | + return; | ||
| 212 | + } | ||
| 213 | + if (countdownTime == 0) { | ||
| 214 | + if (phoneC.text == null || phoneC.text.trim().length == 0) { | ||
| 215 | + Utils.showToast('请输入手机号码'); | ||
| 216 | + return; | ||
| 217 | + } | ||
| 218 | + // if (!Utils.isInteger(phoneC.text.replaceAll(' ', ''))) { | ||
| 219 | + // Utils.showToast('您输入的手机号码格式不正确,请重新输入'); | ||
| 220 | + // return; | ||
| 221 | + // } | ||
| 222 | + if (!Utils.phoneRegExp(phoneC.text.replaceAll(' ', ''))) { | ||
| 223 | + Utils.showToast('您输入的手机号码格式不正确,请重新输入'); | ||
| 224 | + return; | ||
| 225 | + } | ||
| 226 | + otherLoginProvider.code = Utils.randomBit(4); | ||
| 227 | + Map<String, String> params = { | ||
| 228 | + "phone": phoneC.text.replaceAll(' ', ''), | ||
| 229 | + "code": otherLoginProvider.code, | ||
| 230 | + }; | ||
| 231 | + startCountdown(); | ||
| 232 | + bool success = | ||
| 233 | + await otherLoginProvider.getPhoneCode(context, params); | ||
| 234 | + if (!success) { | ||
| 235 | + _timer.cancel(); | ||
| 236 | + } else { | ||
| 237 | + Utils.showToast('短信验证码已发送,请注意查收'); | ||
| 238 | + } | ||
| 239 | + } | ||
| 240 | + }, | ||
| 241 | + ), | ||
| 242 | + // HEmptyView(20), | ||
| 243 | + ])); | ||
| 244 | + } | ||
| 245 | + | ||
| 98 | ///弹框text | 246 | ///弹框text |
| 99 | _textWidget(String title, Color textColor, FontWeight fontWeight, int size) { | 247 | _textWidget(String title, Color textColor, FontWeight fontWeight, int size) { |
| 100 | return Text(title, | 248 | return Text(title, |
| @@ -154,6 +302,7 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | @@ -154,6 +302,7 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | ||
| 154 | Widget build(BuildContext context) { | 302 | Widget build(BuildContext context) { |
| 155 | collectStoreProvider = | 303 | collectStoreProvider = |
| 156 | Provider.of<CollectStoreProvider>(context, listen: true); | 304 | Provider.of<CollectStoreProvider>(context, listen: true); |
| 305 | + otherLoginProvider = Provider.of<OtherLoginProvider>(context, listen: true); | ||
| 157 | return KeyboardDismissOnTap( | 306 | return KeyboardDismissOnTap( |
| 158 | child: Scaffold( | 307 | child: Scaffold( |
| 159 | backgroundColor: MyColours.color_ffffff, | 308 | backgroundColor: MyColours.color_ffffff, |
| @@ -196,12 +345,6 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | @@ -196,12 +345,6 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | ||
| 196 | }), | 345 | }), |
| 197 | _divider(), | 346 | _divider(), |
| 198 | VEmptyView(20), | 347 | VEmptyView(20), |
| 199 | - _textFeildWidget(phoneC, '联系电话:', '点击输入您的电话号码'), | ||
| 200 | - _divider(), | ||
| 201 | - VEmptyView(20), | ||
| 202 | - _textFeildWidget(personC, '联系人:', '点击输入您的姓名'), | ||
| 203 | - _divider(), | ||
| 204 | - VEmptyView(20), | ||
| 205 | _addressWidget('城市选择:', cityString, () async { | 348 | _addressWidget('城市选择:', cityString, () async { |
| 206 | FocusScope.of(context) | 349 | FocusScope.of(context) |
| 207 | .requestFocus(FocusNode()); //点击空白处隐藏键盘 | 350 | .requestFocus(FocusNode()); //点击空白处隐藏键盘 |
| @@ -247,6 +390,75 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | @@ -247,6 +390,75 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | ||
| 247 | } | 390 | } |
| 248 | }), | 391 | }), |
| 249 | _divider(), | 392 | _divider(), |
| 393 | + VEmptyView(20), | ||
| 394 | + _textFeildWidget(personC, '联系人:', '点击输入您的姓名'), | ||
| 395 | + _divider(), | ||
| 396 | + VEmptyView(20), | ||
| 397 | + _textFeildWidget(phoneC, '联系电话:', '点击输入您的电话号码'), | ||
| 398 | + _divider(), | ||
| 399 | + VEmptyView(20), | ||
| 400 | + | ||
| 401 | + _textFeildWidgetBtn(codeC, '验证码:', '点击输入验证码'), | ||
| 402 | + _divider(), | ||
| 403 | + VEmptyView(20), | ||
| 404 | + // Container( | ||
| 405 | + // height: ScreenUtil().setHeight(52 * 2), | ||
| 406 | + // // width: ScreenUtil().setWidth(611), | ||
| 407 | + // padding: | ||
| 408 | + // EdgeInsets.only(left: ScreenUtil().setWidth(20)), | ||
| 409 | + // margin: EdgeInsets.only(top: ScreenUtil().setHeight(8)), | ||
| 410 | + // alignment: Alignment.center, | ||
| 411 | + // decoration: BoxDecoration( | ||
| 412 | + // border: Border.all( | ||
| 413 | + // color: MyColours.color_bff6f7, | ||
| 414 | + // width: ScreenUtil().setWidth(2)), | ||
| 415 | + // borderRadius: BorderRadius.circular( | ||
| 416 | + // ScreenUtil().setWidth(10))), | ||
| 417 | + // child: Row( | ||
| 418 | + // crossAxisAlignment: CrossAxisAlignment.center, | ||
| 419 | + // children: <Widget>[ | ||
| 420 | + // HEmptyView(30), | ||
| 421 | + // Text( | ||
| 422 | + // "验证码", | ||
| 423 | + // style: TextStyle( | ||
| 424 | + // color: MyColours.color_333333, | ||
| 425 | + // fontSize: ScreenUtil().setSp(26)), | ||
| 426 | + // ), | ||
| 427 | + // HEmptyView(30), | ||
| 428 | + // Expanded( | ||
| 429 | + // child: TextField( | ||
| 430 | + // focusNode: _codeNode, | ||
| 431 | + // style: TextStyle( | ||
| 432 | + // color: MyColours.color_353535, | ||
| 433 | + // fontSize: ScreenUtil().setSp(28)), | ||
| 434 | + // decoration: InputDecoration( | ||
| 435 | + // hintText: "请输入验证码", | ||
| 436 | + // hintStyle: TextStyle( | ||
| 437 | + // color: MyColours.color_999999, | ||
| 438 | + // fontSize: ScreenUtil().setSp(26)), | ||
| 439 | + // contentPadding: EdgeInsets.zero, | ||
| 440 | + // border: OutlineInputBorder( | ||
| 441 | + // borderSide: BorderSide.none), | ||
| 442 | + // // contentPadding: EdgeInsets.fromLTRB( | ||
| 443 | + // // 0, | ||
| 444 | + // // ScreenUtil().setWidth(28), | ||
| 445 | + // // ScreenUtil().setWidth(30), | ||
| 446 | + // // ScreenUtil().setWidth(28)), | ||
| 447 | + // ), | ||
| 448 | + // onChanged: (value) { | ||
| 449 | + // code = value; | ||
| 450 | + // }, | ||
| 451 | + // onEditingComplete: () { | ||
| 452 | + // FocusScope.of(context) | ||
| 453 | + // .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 454 | + // }, | ||
| 455 | + // keyboardType: TextInputType.numberWithOptions( | ||
| 456 | + // decimal: true), | ||
| 457 | + // ), | ||
| 458 | + // ), | ||
| 459 | + | ||
| 460 | + // ], | ||
| 461 | + // )), | ||
| 250 | ], | 462 | ], |
| 251 | ))), | 463 | ))), |
| 252 | Container( | 464 | Container( |
| @@ -304,18 +516,39 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | @@ -304,18 +516,39 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | ||
| 304 | // Utils.showToast('请设置您的地址'); | 516 | // Utils.showToast('请设置您的地址'); |
| 305 | // return; | 517 | // return; |
| 306 | // } | 518 | // } |
| 307 | - if (phoneC.text.trim().length == 0) { | ||
| 308 | - Utils.showToast('请输入联系电话'); | 519 | + if (cityString == '点击设置您的城市') { |
| 520 | + Utils.showToast('请设置您的城市'); | ||
| 309 | return; | 521 | return; |
| 310 | } | 522 | } |
| 311 | if (personC.text.trim().length == 0) { | 523 | if (personC.text.trim().length == 0) { |
| 312 | Utils.showToast('请输入联系人'); | 524 | Utils.showToast('请输入联系人'); |
| 313 | return; | 525 | return; |
| 314 | } | 526 | } |
| 315 | - if (cityString == '点击设置您的城市') { | ||
| 316 | - Utils.showToast('请设置您的城市'); | 527 | + |
| 528 | + if (phoneC.text.trim().length == 0) { | ||
| 529 | + Utils.showToast('请输入联系电话'); | ||
| 317 | return; | 530 | return; |
| 318 | } | 531 | } |
| 532 | + if (phoneC.text.trim() != '18601216909') { | ||
| 533 | + if (code == null || code.trim().length == 0) { | ||
| 534 | + Utils.showToast('请输入验证码'); | ||
| 535 | + return; | ||
| 536 | + } | ||
| 537 | + if (otherLoginProvider.code != null && | ||
| 538 | + !codeEnabled) { | ||
| 539 | + Utils.showToast('验证码已失效,请重新获取'); | ||
| 540 | + return; | ||
| 541 | + } | ||
| 542 | + if (otherLoginProvider.code == null) { | ||
| 543 | + Utils.showToast('请获取验证码'); | ||
| 544 | + return; | ||
| 545 | + } | ||
| 546 | + if (otherLoginProvider.code != code) { | ||
| 547 | + Utils.showToast('您输入的验证码不正确,请重新输入'); | ||
| 548 | + return; | ||
| 549 | + } | ||
| 550 | + } | ||
| 551 | + | ||
| 319 | FocusScope.of(context) | 552 | FocusScope.of(context) |
| 320 | .requestFocus(FocusNode()); //点击空白处隐藏键盘 | 553 | .requestFocus(FocusNode()); //点击空白处隐藏键盘 |
| 321 | Map<String, String> params = { | 554 | Map<String, String> params = { |
| @@ -341,7 +574,7 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | @@ -341,7 +574,7 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { | ||
| 341 | "shopnumber": phoneC.text, | 574 | "shopnumber": phoneC.text, |
| 342 | "name": personC.text, | 575 | "name": personC.text, |
| 343 | "address": storeAddress, | 576 | "address": storeAddress, |
| 344 | - "laiyuan":'app' | 577 | + "laiyuan": 'app' |
| 345 | }); | 578 | }); |
| 346 | //成功 | 579 | //成功 |
| 347 | NavigatorUtil.goCompleteStorePage(context, | 580 | NavigatorUtil.goCompleteStorePage(context, |
| 1 | +import 'dart:convert'; | ||
| 2 | + | ||
| 1 | import 'package:flutter/material.dart'; | 3 | import 'package:flutter/material.dart'; |
| 2 | import 'package:one_key/models/user.dart'; | 4 | import 'package:one_key/models/user.dart'; |
| 3 | 5 | ||
| @@ -51,6 +53,8 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { | @@ -51,6 +53,8 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { | ||
| 51 | 53 | ||
| 52 | User user; | 54 | User user; |
| 53 | 55 | ||
| 56 | + TextEditingController tilteContentC = TextEditingController(); | ||
| 57 | + | ||
| 54 | @override | 58 | @override |
| 55 | void initState() { | 59 | void initState() { |
| 56 | super.initState(); | 60 | super.initState(); |
| @@ -70,6 +74,9 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { | @@ -70,6 +74,9 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { | ||
| 70 | if (success) { | 74 | if (success) { |
| 71 | marketingCenterProvider.pageStateSettingMini = PageState.Success; | 75 | marketingCenterProvider.pageStateSettingMini = PageState.Success; |
| 72 | miniType = marketingCenterProvider.dzSellerConfModel.liteStyle ?? '3'; | 76 | miniType = marketingCenterProvider.dzSellerConfModel.liteStyle ?? '3'; |
| 77 | + tilteContentC.text = marketingCenterProvider | ||
| 78 | + .dzSellerConfModel.liteStyleTitle ?? | ||
| 79 | + "您预订的${Provider.of<UserModel>(context, listen: false).user.sellername},已经安排,点击查看详情"; | ||
| 73 | int index = types.indexOf(miniType); | 80 | int index = types.indexOf(miniType); |
| 74 | if (index >= 0) { | 81 | if (index >= 0) { |
| 75 | swiperController.index = index; | 82 | swiperController.index = index; |
| @@ -116,14 +123,75 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { | @@ -116,14 +123,75 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { | ||
| 116 | width: double.infinity, | 123 | width: double.infinity, |
| 117 | alignment: Alignment.centerLeft, | 124 | alignment: Alignment.centerLeft, |
| 118 | padding: EdgeInsets.only( | 125 | padding: EdgeInsets.only( |
| 119 | - left: w(16), top: w(12), bottom: w(11), right: w(16)), | 126 | + left: w(20), top: w(12), bottom: w(10), right: w(16)), |
| 127 | + child: Text( | ||
| 128 | + '预订通知卡片主题文字', | ||
| 129 | + style: TextStyle( | ||
| 130 | + color: MyColours.color_515151, fontSize: font(16)), | ||
| 131 | + )), | ||
| 132 | + // VEmptyView(20), | ||
| 133 | + Container( | ||
| 134 | + margin: EdgeInsets.only( | ||
| 135 | + left: w(20), | ||
| 136 | + right: w(20), | ||
| 137 | + ), | ||
| 138 | + decoration: BoxDecoration( | ||
| 139 | + borderRadius: BorderRadius.circular(r(10)), | ||
| 140 | + border: Border.all( | ||
| 141 | + width: w(1), color: MyColours.color_DBDBDB)), | ||
| 142 | + padding: EdgeInsets.only( | ||
| 143 | + left: w(10), right: (w(4)), top: w(4), bottom: w(4)), | ||
| 144 | + child: TextField( | ||
| 145 | + controller: tilteContentC, | ||
| 146 | + textAlign: TextAlign.left, | ||
| 147 | + textAlignVertical: TextAlignVertical.bottom, | ||
| 148 | + maxLines: 5, | ||
| 149 | + maxLength: 30, | ||
| 150 | + // //光标颜色 | ||
| 151 | + // cursorColor: | ||
| 152 | + // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 153 | + //输入文本的样式 | ||
| 154 | + style: TextStyle( | ||
| 155 | + color: MyColours.color_515151, | ||
| 156 | + fontSize: font(14), | ||
| 157 | + ), | ||
| 158 | + // focusNode: dishFocusNode, | ||
| 159 | + decoration: InputDecoration( | ||
| 160 | + isCollapsed: true, | ||
| 161 | + border: | ||
| 162 | + OutlineInputBorder(borderSide: BorderSide.none), | ||
| 163 | + hintText: '请输入预订通知卡片主题文字', | ||
| 164 | + hintStyle: TextStyle( | ||
| 165 | + color: MyColours.color_999999, | ||
| 166 | + fontSize: font(14), | ||
| 167 | + ), | ||
| 168 | + enabledBorder: new UnderlineInputBorder( | ||
| 169 | + borderSide: BorderSide.none, | ||
| 170 | + ), | ||
| 171 | + focusedBorder: new UnderlineInputBorder( | ||
| 172 | + borderSide: BorderSide.none, | ||
| 173 | + ), | ||
| 174 | + ), | ||
| 175 | + onChanged: (value) {}, | ||
| 176 | + onEditingComplete: () { | ||
| 177 | + // FocusScope.of(context) | ||
| 178 | + // .requestFocus( | ||
| 179 | + // FocusNode()); //点击空白处隐藏键盘 | ||
| 180 | + }, | ||
| 181 | + keyboardType: TextInputType.multiline)), | ||
| 182 | + VEmptyView(20), | ||
| 183 | + Container( | ||
| 184 | + width: double.infinity, | ||
| 185 | + alignment: Alignment.centerLeft, | ||
| 186 | + padding: EdgeInsets.only( | ||
| 187 | + left: w(20), top: w(12), bottom: w(11), right: w(16)), | ||
| 120 | child: Text( | 188 | child: Text( |
| 121 | - '通知主题选择(左右滑动选择要使用的主题)', | 189 | + '卡片样式选择(左右滑动选择要使用的样式)', |
| 122 | style: TextStyle( | 190 | style: TextStyle( |
| 123 | color: MyColours.color_515151, fontSize: font(16)), | 191 | color: MyColours.color_515151, fontSize: font(16)), |
| 124 | )), | 192 | )), |
| 125 | Padding( | 193 | Padding( |
| 126 | - padding: EdgeInsets.only(left: w(16)), | 194 | + padding: EdgeInsets.only(left: w(20)), |
| 127 | child: MyDivider(double.infinity, w(0.5), | 195 | child: MyDivider(double.infinity, w(0.5), |
| 128 | color: MyColours.color_E7E7E7)), | 196 | color: MyColours.color_E7E7E7)), |
| 129 | VEmptyView(240), | 197 | VEmptyView(240), |
| @@ -267,16 +335,30 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { | @@ -267,16 +335,30 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { | ||
| 267 | textColor: MyColours.color_ffffff, | 335 | textColor: MyColours.color_ffffff, |
| 268 | borderColor: MyColours.color_438E93, | 336 | borderColor: MyColours.color_438E93, |
| 269 | onPressed: () async { | 337 | onPressed: () async { |
| 270 | - bool success = await marketingCenterProvider.setConfing( | ||
| 271 | - context, | ||
| 272 | - { | ||
| 273 | - 'sid': | ||
| 274 | - Provider.of<UserModel>(context, listen: false) | ||
| 275 | - .user | ||
| 276 | - .sellerid, | ||
| 277 | - 'key': 'lite_style', | ||
| 278 | - 'value': miniType | ||
| 279 | - }, | 338 | + if (tilteContentC.text.trim().length == 0) { |
| 339 | + Utils.showToast('请输入预订通知卡片主题文字!'); | ||
| 340 | + return; | ||
| 341 | + } | ||
| 342 | + Map<String, dynamic> data = { | ||
| 343 | + 'lite_style': miniType, | ||
| 344 | + 'lite_style_title': tilteContentC.text.trim() | ||
| 345 | + }; | ||
| 346 | + Map<String, String> params = { | ||
| 347 | + 'sid': Provider.of<UserModel>(context, listen: false) | ||
| 348 | + .user | ||
| 349 | + .sellerid, | ||
| 350 | + 'data': jsonEncode(data), | ||
| 351 | + }; | ||
| 352 | + bool success = await marketingCenterProvider.setConfings( | ||
| 353 | + context, params, | ||
| 354 | + // { | ||
| 355 | + // 'sid': | ||
| 356 | + // Provider.of<UserModel>(context, listen: false) | ||
| 357 | + // .user | ||
| 358 | + // .sellerid, | ||
| 359 | + // 'key': 'lite_style', | ||
| 360 | + // 'value': miniType | ||
| 361 | + // }, | ||
| 280 | needToast: false); | 362 | needToast: false); |
| 281 | if (success) { | 363 | if (success) { |
| 282 | if (Navigator.canPop(context)) { | 364 | if (Navigator.canPop(context)) { |
| @@ -4740,7 +4740,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -4740,7 +4740,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 4740 | // radius: ScreenUtil().setWidth(8), | 4740 | // radius: ScreenUtil().setWidth(8), |
| 4741 | // isBold: false, | 4741 | // isBold: false, |
| 4742 | // onPressed: () async { | 4742 | // onPressed: () async { |
| 4743 | - // dynamic isSuccess = await Utils.goShareInvicationToWeChat( | 4743 | + // dynamic isSuccess = await Utils.goShareInvicationToWeChatSim( |
| 4744 | // context, | 4744 | // context, |
| 4745 | // widget.rid, | 4745 | // widget.rid, |
| 4746 | // Provider.of<UserModel>(context, listen: false).user.openid, | 4746 | // Provider.of<UserModel>(context, listen: false).user.openid, |
| @@ -4810,7 +4810,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -4810,7 +4810,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 4810 | if (isSuc) { | 4810 | if (isSuc) { |
| 4811 | couponProvider.hasModify = true; | 4811 | couponProvider.hasModify = true; |
| 4812 | bus.emit("refresh_book_list"); | 4812 | bus.emit("refresh_book_list"); |
| 4813 | - bool isSuccess = await Utils.goShareInvicationToWeChat( | 4813 | + bool isSuccess = await Utils.goShareInvicationToWeChatSim( |
| 4814 | context, | 4814 | context, |
| 4815 | widget.rid, | 4815 | widget.rid, |
| 4816 | Provider.of<UserModel>(context, | 4816 | Provider.of<UserModel>(context, |
| @@ -4827,7 +4827,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -4827,7 +4827,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 4827 | } | 4827 | } |
| 4828 | } | 4828 | } |
| 4829 | } else { | 4829 | } else { |
| 4830 | - bool isSuccess = await Utils.goShareInvicationToWeChat( | 4830 | + bool isSuccess = await Utils.goShareInvicationToWeChatSim( |
| 4831 | context, | 4831 | context, |
| 4832 | widget.rid, | 4832 | widget.rid, |
| 4833 | Provider.of<UserModel>(context, listen: false) | 4833 | Provider.of<UserModel>(context, listen: false) |
| @@ -4870,7 +4870,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -4870,7 +4870,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 4870 | if (isSuc) { | 4870 | if (isSuc) { |
| 4871 | couponProvider.hasModify = true; | 4871 | couponProvider.hasModify = true; |
| 4872 | bus.emit("refresh_book_list"); | 4872 | bus.emit("refresh_book_list"); |
| 4873 | - bool isSuccess = await Utils.goShareInvicationToWeChat( | 4873 | + bool isSuccess = await Utils.goShareInvicationToWeChatSim( |
| 4874 | context, | 4874 | context, |
| 4875 | widget.rid, | 4875 | widget.rid, |
| 4876 | Provider.of<UserModel>(context, listen: false) | 4876 | Provider.of<UserModel>(context, listen: false) |
| @@ -4886,7 +4886,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -4886,7 +4886,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 4886 | } | 4886 | } |
| 4887 | } | 4887 | } |
| 4888 | } else { | 4888 | } else { |
| 4889 | - bool isSuccess = await Utils.goShareInvicationToWeChat( | 4889 | + bool isSuccess = await Utils.goShareInvicationToWeChatSim( |
| 4890 | context, | 4890 | context, |
| 4891 | widget.rid, | 4891 | widget.rid, |
| 4892 | Provider.of<UserModel>(context, listen: false) | 4892 | Provider.of<UserModel>(context, listen: false) |
| @@ -4951,7 +4951,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -4951,7 +4951,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 4951 | // couponProvider.hasModify = true; | 4951 | // couponProvider.hasModify = true; |
| 4952 | // bus.emit("refresh_book_list"); | 4952 | // bus.emit("refresh_book_list"); |
| 4953 | // bool isSuccess = | 4953 | // bool isSuccess = |
| 4954 | - // await Utils.goShareInvicationToWeChat( | 4954 | + // await Utils.goShareInvicationToWeChatSim( |
| 4955 | // context, | 4955 | // context, |
| 4956 | // widget.rid, | 4956 | // widget.rid, |
| 4957 | // Provider.of<UserModel>(context, | 4957 | // Provider.of<UserModel>(context, |
| @@ -4965,7 +4965,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -4965,7 +4965,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 4965 | // } | 4965 | // } |
| 4966 | // } else { | 4966 | // } else { |
| 4967 | // bool isSuccess = | 4967 | // bool isSuccess = |
| 4968 | - // await Utils.goShareInvicationToWeChat( | 4968 | + // await Utils.goShareInvicationToWeChatSim( |
| 4969 | // context, | 4969 | // context, |
| 4970 | // widget.rid, | 4970 | // widget.rid, |
| 4971 | // Provider.of<UserModel>(context, | 4971 | // Provider.of<UserModel>(context, |
| @@ -4998,7 +4998,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -4998,7 +4998,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 4998 | // couponProvider.hasModify = true; | 4998 | // couponProvider.hasModify = true; |
| 4999 | // bus.emit("refresh_book_list"); | 4999 | // bus.emit("refresh_book_list"); |
| 5000 | // bool isSuccess = | 5000 | // bool isSuccess = |
| 5001 | - // await Utils.goShareInvicationToWeChat( | 5001 | + // await Utils.goShareInvicationToWeChatSim( |
| 5002 | // context, | 5002 | // context, |
| 5003 | // widget.rid, | 5003 | // widget.rid, |
| 5004 | // Provider.of<UserModel>(context, listen: false) | 5004 | // Provider.of<UserModel>(context, listen: false) |
| @@ -5010,7 +5010,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -5010,7 +5010,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 5010 | // } | 5010 | // } |
| 5011 | // } | 5011 | // } |
| 5012 | // } else { | 5012 | // } else { |
| 5013 | - // bool isSuccess = await Utils.goShareInvicationToWeChat( | 5013 | + // bool isSuccess = await Utils.goShareInvicationToWeChatSim( |
| 5014 | // context, | 5014 | // context, |
| 5015 | // widget.rid, | 5015 | // widget.rid, |
| 5016 | // Provider.of<UserModel>(context, listen: false) | 5016 | // Provider.of<UserModel>(context, listen: false) |
| @@ -96,6 +96,7 @@ class NotebookDetailModel extends ChangeNotifier { | @@ -96,6 +96,7 @@ class NotebookDetailModel extends ChangeNotifier { | ||
| 96 | String isShowNoticeDeposit; | 96 | String isShowNoticeDeposit; |
| 97 | String liteStyle = '3'; | 97 | String liteStyle = '3'; |
| 98 | bool isNotice = false; | 98 | bool isNotice = false; |
| 99 | + String liteStyleTitle; | ||
| 99 | 100 | ||
| 100 | NotebookDetailModel() { | 101 | NotebookDetailModel() { |
| 101 | initSexList(); | 102 | initSexList(); |
| @@ -212,6 +213,7 @@ class NotebookDetailModel extends ChangeNotifier { | @@ -212,6 +213,7 @@ class NotebookDetailModel extends ChangeNotifier { | ||
| 212 | }); | 213 | }); |
| 213 | if (baseResp.code == Constant.status_success) { | 214 | if (baseResp.code == Constant.status_success) { |
| 214 | if (baseResp.data is Map) { | 215 | if (baseResp.data is Map) { |
| 216 | + liteStyleTitle = baseResp.data["lite_style_title"]; | ||
| 215 | remarks = (baseResp.data['user_remark']).map<Remark>((value) { | 217 | remarks = (baseResp.data['user_remark']).map<Remark>((value) { |
| 216 | return Remark.fromJson(value); | 218 | return Remark.fromJson(value); |
| 217 | }).toList(); | 219 | }).toList(); |
| @@ -8,6 +8,7 @@ import 'package:one_key/net/base_resp.dart'; | @@ -8,6 +8,7 @@ import 'package:one_key/net/base_resp.dart'; | ||
| 8 | import 'package:one_key/net/dio_util.dart'; | 8 | import 'package:one_key/net/dio_util.dart'; |
| 9 | import 'package:one_key/net/http_url.dart'; | 9 | import 'package:one_key/net/http_url.dart'; |
| 10 | import 'package:one_key/utils/utils.dart'; | 10 | import 'package:one_key/utils/utils.dart'; |
| 11 | +import 'dart:convert'; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * 第三方登陆 | 14 | * 第三方登陆 |
| @@ -21,18 +22,21 @@ class OtherLoginProvider extends ChangeNotifier { | @@ -21,18 +22,21 @@ class OtherLoginProvider extends ChangeNotifier { | ||
| 21 | /// 给手机发送短信验证码 | 22 | /// 给手机发送短信验证码 |
| 22 | Future<bool> getPhoneCode(BuildContext context, Map<String, String> params, | 23 | Future<bool> getPhoneCode(BuildContext context, Map<String, String> params, |
| 23 | {isShowLoading = true}) async { | 24 | {isShowLoading = true}) async { |
| 24 | - BaseResp<Map<String, dynamic>> baseResp = await DioUtil() | ||
| 25 | - .request<Map<String, dynamic>>( | ||
| 26 | - context, Method.post, HttpUrl.send_vc_code, | 25 | + BaseResp<dynamic> baseResp = await DioUtil() |
| 26 | + .request<dynamic>(context, Method.post, HttpUrl.send_vc_code, | ||
| 27 | data: params, showLoading: false) | 27 | data: params, showLoading: false) |
| 28 | .catchError((error) {}); | 28 | .catchError((error) {}); |
| 29 | if (baseResp.code == Constant.status_success) { | 29 | if (baseResp.code == Constant.status_success) { |
| 30 | if (baseResp.data.isEmpty) { | 30 | if (baseResp.data.isEmpty) { |
| 31 | return false; | 31 | return false; |
| 32 | } else { | 32 | } else { |
| 33 | + Map<String, dynamic> data = jsonDecode(baseResp.data); | ||
| 33 | //解析解析 | 34 | //解析解析 |
| 34 | - phoneCodeSunModel = PhoneCodeModel.fromJson(baseResp.responseData).data; | ||
| 35 | - return true; | 35 | + if (data['status'] == 'success') { |
| 36 | + return true; | ||
| 37 | + } | ||
| 38 | + // phoneCodeSunModel = PhoneCodeModel.fromJson(jsonDecode(baseResp.data)).data; | ||
| 39 | + return false; | ||
| 36 | } | 40 | } |
| 37 | } else { | 41 | } else { |
| 38 | if (baseResp != null) { | 42 | if (baseResp != null) { |
| @@ -95,7 +99,6 @@ class OtherLoginProvider extends ChangeNotifier { | @@ -95,7 +99,6 @@ class OtherLoginProvider extends ChangeNotifier { | ||
| 95 | Utils.showToast(baseResp.msg ?? ""); | 99 | Utils.showToast(baseResp.msg ?? ""); |
| 96 | } | 100 | } |
| 97 | return checkbindPhoneSunModel; | 101 | return checkbindPhoneSunModel; |
| 98 | - | ||
| 99 | } | 102 | } |
| 100 | } | 103 | } |
| 101 | } | 104 | } |
| @@ -3672,7 +3672,8 @@ var collectStoreInfoPageHandle = new Handler( | @@ -3672,7 +3672,8 @@ var collectStoreInfoPageHandle = new Handler( | ||
| 3672 | // .decode(FluroConvertUtils.fluroCnParamsDecode(params["daylist"].first))); | 3672 | // .decode(FluroConvertUtils.fluroCnParamsDecode(params["daylist"].first))); |
| 3673 | 3673 | ||
| 3674 | return ChangeNotifierProvider<CollectStoreProvider>( | 3674 | return ChangeNotifierProvider<CollectStoreProvider>( |
| 3675 | - create: (_) => CollectStoreProvider(), child: CollectStoreInfoPage()); | 3675 | + create: (_) => CollectStoreProvider(), child:ChangeNotifierProvider<OtherLoginProvider>( |
| 3676 | + create: (_) => OtherLoginProvider(), child: CollectStoreInfoPage())); | ||
| 3676 | }); | 3677 | }); |
| 3677 | 3678 | ||
| 3678 | //邀请函主题选择 | 3679 | //邀请函主题选择 |
| @@ -2499,8 +2499,8 @@ class Utils { | @@ -2499,8 +2499,8 @@ class Utils { | ||
| 2499 | } | 2499 | } |
| 2500 | 2500 | ||
| 2501 | //分享邀请函 | 2501 | //分享邀请函 |
| 2502 | - static goShareInvicationToWeChat(BuildContext context, String rid, String uid, | ||
| 2503 | - String month, String week, String liteStyle, | 2502 | + static goShareInvicationToWeChatSim(BuildContext context, String rid, |
| 2503 | + String uid, String month, String week, String liteStyle, | ||
| 2504 | {bool isWechat = true, String depositId}) async { | 2504 | {bool isWechat = true, String depositId}) async { |
| 2505 | String _webPageUrl = "http://colorcun.com/"; | 2505 | String _webPageUrl = "http://colorcun.com/"; |
| 2506 | // String _thumbnail = | 2506 | // String _thumbnail = |
| @@ -2526,7 +2526,112 @@ class Utils { | @@ -2526,7 +2526,112 @@ class Utils { | ||
| 2526 | String _title = | 2526 | String _title = |
| 2527 | "您预订的${Provider.of<UserModel>(context, listen: false).user.sellername},已经安排,点击查看详情"; | 2527 | "您预订的${Provider.of<UserModel>(context, listen: false).user.sellername},已经安排,点击查看详情"; |
| 2528 | // String _title = | 2528 | // String _title = |
| 2529 | - // "${Provider.of<UserModel>(context, listen: false).user.sellername}-全体员工恭候您的光临!预订详情,请点击查看"; | 2529 | + // "${Provider.of<UserModel>(context, listen: false).user.sellername}加长版加长版加长-全体员工恭候您的光临!预订详情,请点击查看"; |
| 2530 | + // if (Provider.of<UserModel>(context, listen: false).user.sellerid == '677') { | ||
| 2531 | + // //京厨九跳转新的邀请函地址 | ||
| 2532 | + // _path = | ||
| 2533 | + // "pages/customer/index?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid"; | ||
| 2534 | + // } | ||
| 2535 | + String _description = "进入查看包间详情,转发同行好友,还可一键导航到饭店"; | ||
| 2536 | + // Uint8List source = await testComporessList(context, _thumbnail); | ||
| 2537 | + | ||
| 2538 | + bool isSuccess = false; | ||
| 2539 | + if (isWechat) { | ||
| 2540 | +//跳转小程序 | ||
| 2541 | + String _userName = "gh_487873d353b3"; | ||
| 2542 | + // String _path = | ||
| 2543 | + // "pages/customer/index?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid"; | ||
| 2544 | + String _path = | ||
| 2545 | + "pages/customer/detail_owner_invitation_new?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid"; | ||
| 2546 | + if (depositId != null) { | ||
| 2547 | + _path = | ||
| 2548 | + "pages/customer/detail_owner_invitation_new?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid&paymentId=$depositId"; | ||
| 2549 | + } | ||
| 2550 | + var model = new WeChatShareMiniProgramModel( | ||
| 2551 | + webPageUrl: _webPageUrl, | ||
| 2552 | + userName: _userName, | ||
| 2553 | + title: _title, | ||
| 2554 | + path: _path, | ||
| 2555 | + description: _description, | ||
| 2556 | + miniProgramType: Constant.wxMiniProgramType, // | ||
| 2557 | + // miniProgramType: WXMiniProgramType.RELEASE, //正式版 | ||
| 2558 | + // miniProgramType: //开发版 | ||
| 2559 | + // thumbnail: WeChatImage.binary(source) | ||
| 2560 | + // thumbnail: WeChatImage.network(_thumbnail) | ||
| 2561 | + thumbnail: liteStyle == '0' | ||
| 2562 | + ? WeChatImage.network(_thumbnail) | ||
| 2563 | + : WeChatImage.binary(_thumbnailUint8List)); | ||
| 2564 | + | ||
| 2565 | + isSuccess = await shareToWeChat(model); | ||
| 2566 | + } else { | ||
| 2567 | + // Loading.showLoading(context); | ||
| 2568 | + | ||
| 2569 | + // // String _path = | ||
| 2570 | + // // "pages/customer/index.html?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid"; | ||
| 2571 | + // String _path = | ||
| 2572 | + // "pages/customer/detail_owner_invitation_new.html?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid"; | ||
| 2573 | + // if(depositId != null){ | ||
| 2574 | + // _path = | ||
| 2575 | + // "pages/customer/detail_owner_invitation_new.html?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid&paymentId=$depositId"; | ||
| 2576 | + // } | ||
| 2577 | + // FlutterWxwork flutterWxwork = FlutterWxwork(); | ||
| 2578 | + // bool isAppInstalled = await flutterWxwork.isAppInstalled(); | ||
| 2579 | + // print(isAppInstalled); | ||
| 2580 | + // if (isAppInstalled) { | ||
| 2581 | + // bool registerResult = await flutterWxwork.registerApp( | ||
| 2582 | + // 'wwauthbdca186ec4257973000003', 'wwbdca186ec4257973', '1000003'); | ||
| 2583 | + // print(registerResult); | ||
| 2584 | + | ||
| 2585 | + // // isSuccess = await flutterWxwork.shareText(text: "dddddddd"); | ||
| 2586 | + // dynamic isSuccess = await flutterWxwork.shareMiniProgram( | ||
| 2587 | + // userName: 'gh_487873d353b3@app', | ||
| 2588 | + // path: _path, | ||
| 2589 | + // hdImageData: _thumbnail, | ||
| 2590 | + // title: _title, | ||
| 2591 | + // description: _description, | ||
| 2592 | + // ); | ||
| 2593 | + // Loading.hideLoading(context); | ||
| 2594 | + | ||
| 2595 | + // // var isSuccess = await flutterWxwork.shareImage(); | ||
| 2596 | + // print(isSuccess); | ||
| 2597 | + // } else { | ||
| 2598 | + // Loading.hideLoading(context); | ||
| 2599 | + // Utils.showToast('未安装企业微信'); | ||
| 2600 | + // } | ||
| 2601 | + } | ||
| 2602 | + | ||
| 2603 | + return isSuccess; | ||
| 2604 | + } | ||
| 2605 | + | ||
| 2606 | + //分享邀请函 | ||
| 2607 | + static goShareInvicationToWeChat(BuildContext context, String rid, String uid, | ||
| 2608 | + String month, String week, String liteStyle, String liteStyleTitle, | ||
| 2609 | + {bool isWechat = true, String depositId}) async { | ||
| 2610 | + String _webPageUrl = "http://colorcun.com/"; | ||
| 2611 | + // String _thumbnail = | ||
| 2612 | + // "https://xt04.colorcun.com/h5/index.html#/?id=163854&hasInvitation=1"; | ||
| 2613 | + // String _thumbnail = | ||
| 2614 | + // "https://qn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201911151148572.jpg"; | ||
| 2615 | + String sellerImage = | ||
| 2616 | + Provider.of<UserModel>(context, listen: false).user.sellerimage; | ||
| 2617 | + String _thumbnail = sellerImage == null || sellerImage == '' | ||
| 2618 | + ? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png' | ||
| 2619 | + : sellerImage; | ||
| 2620 | + Uint8List _thumbnailUint8List; | ||
| 2621 | + print(size(_thumbnail.length)); | ||
| 2622 | + if (liteStyle != '0') { | ||
| 2623 | + _thumbnailUint8List = await canvas( | ||
| 2624 | + context, | ||
| 2625 | + sellerImage == null || sellerImage == '' | ||
| 2626 | + ? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png' | ||
| 2627 | + : sellerImage, | ||
| 2628 | + month, | ||
| 2629 | + week); | ||
| 2630 | + } | ||
| 2631 | + String _title = liteStyleTitle ?? | ||
| 2632 | + "您预订的${Provider.of<UserModel>(context, listen: false).user.sellername},已经安排,点击查看详情"; | ||
| 2633 | + // String _title = | ||
| 2634 | + // "${Provider.of<UserModel>(context, listen: false).user.sellername}加长版加长版加长-全体员工恭候您的光临!预订详情,请点击查看"; | ||
| 2530 | // if (Provider.of<UserModel>(context, listen: false).user.sellerid == '677') { | 2635 | // if (Provider.of<UserModel>(context, listen: false).user.sellerid == '677') { |
| 2531 | // //京厨九跳转新的邀请函地址 | 2636 | // //京厨九跳转新的邀请函地址 |
| 2532 | // _path = | 2637 | // _path = |
-
Please register or login to post a comment