Commit c58516d13fe4bdefe51aee35f5e4a85624e931d8

Authored by wdn127929
1 parent 0c7f3609

我的ui

1002 Bytes

727 Bytes

915 Bytes

925 Bytes

  1 +import 'dart:convert';
  2 +
1 import 'package:flutter/material.dart'; 3 import 'package:flutter/material.dart';
2 import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 import 'package:flutter_screenutil/flutter_screenutil.dart';
3 import 'package:fluwx/fluwx.dart'; 5 import 'package:fluwx/fluwx.dart';
4 import 'package:one_key/constant/state.dart'; 6 import 'package:one_key/constant/state.dart';
5 import 'package:one_key/models/sms_info.dart'; 7 import 'package:one_key/models/sms_info.dart';
6 import 'package:one_key/models/store_info.dart'; 8 import 'package:one_key/models/store_info.dart';
  9 +import 'package:one_key/models/user.dart';
7 import 'package:one_key/models/version.dart'; 10 import 'package:one_key/models/version.dart';
8 import 'package:one_key/provider/create_store_model.dart'; 11 import 'package:one_key/provider/create_store_model.dart';
9 import 'package:one_key/provider/my_model.dart'; 12 import 'package:one_key/provider/my_model.dart';
@@ -47,7 +50,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -47,7 +50,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
47 50
48 controller = ScrollController(initialScrollOffset: 0.0); 51 controller = ScrollController(initialScrollOffset: 0.0);
49 WidgetsBinding.instance.addObserver(this); 52 WidgetsBinding.instance.addObserver(this);
50 - Utils.changeStatusColor(color: MyColours.color_199095); 53 + Utils.changeStatusColor(color: MyColours.color_438E93);
51 Utils.getCurrVersion().then((version) { 54 Utils.getCurrVersion().then((version) {
52 setState(() { 55 setState(() {
53 cur_version = "v" + version; 56 cur_version = "v" + version;
@@ -64,7 +67,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -64,7 +67,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
64 checkUpdate(); 67 checkUpdate();
65 }); 68 });
66 EventBus().on('changeStatusColor', (arg) { 69 EventBus().on('changeStatusColor', (arg) {
67 - Utils.changeStatusColor(color: MyColours.color_199095); 70 + Utils.changeStatusColor(color: MyColours.color_438E93);
68 }); 71 });
69 EventBus().on('refreshMySms', (arg) { 72 EventBus().on('refreshMySms', (arg) {
70 _getSmsInfo(context); 73 _getSmsInfo(context);
@@ -136,18 +139,19 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -136,18 +139,19 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
136 myModel = Provider.of<MyModel>(context, listen: true); 139 myModel = Provider.of<MyModel>(context, listen: true);
137 createStoreModel = Provider.of<CreateStoreModel>(context, listen: false); 140 createStoreModel = Provider.of<CreateStoreModel>(context, listen: false);
138 return Scaffold( 141 return Scaffold(
139 - appBar: AppBar(  
140 - backgroundColor: MyColours.color_199095, //把appbar的背景色改成透明  
141 - elevation: 0, //appbar的阴影  
142 - centerTitle: true, // 标题居中  
143 - title: Text(  
144 - '一键订',  
145 - style: TextStyle(  
146 - color: MyColours.color_fefefe,  
147 - fontSize: ScreenUtil().setSp(34),  
148 - fontWeight: FontWeight.normal,  
149 - decoration: TextDecoration.none),  
150 - )), 142 + backgroundColor: MyColours.color_F8F9FD,
  143 + // appBar: AppBar(
  144 + // backgroundColor: MyColours.color_438E93, //把appbar的背景色改成透明
  145 + // elevation: 0, //appbar的阴影
  146 + // centerTitle: true, // 标题居中
  147 + // title: Text(
  148 + // '一键订',
  149 + // style: TextStyle(
  150 + // color: MyColours.color_fefefe,
  151 + // fontSize: ScreenUtil().setSp(34),
  152 + // fontWeight: FontWeight.normal,
  153 + // decoration: TextDecoration.none),
  154 + // )),
151 body: NestedScrollView( 155 body: NestedScrollView(
152 // controller: _scrollViewController, 156 // controller: _scrollViewController,
153 headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { 157 headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
@@ -155,105 +159,316 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -155,105 +159,316 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
155 SliverAppBar( 159 SliverAppBar(
156 pinned: false, 160 pinned: false,
157 floating: false, 161 floating: false,
158 - expandedHeight: ScreenUtil().setWidth(260 + 40), 162 + backgroundColor: MyColours.color_F8F9FD,
  163 + expandedHeight: ScreenUtil().setWidth(154 * 2 + 33 * 2 + 72 + 50),
159 flexibleSpace: FlexibleSpaceBar( 164 flexibleSpace: FlexibleSpaceBar(
160 collapseMode: CollapseMode.pin, 165 collapseMode: CollapseMode.pin,
161 background: Consumer<UserModel>(builder: 166 background: Consumer<UserModel>(builder:
162 (BuildContext context, UserModel model, Widget child) { 167 (BuildContext context, UserModel model, Widget child) {
163 return Stack( 168 return Stack(
  169 + clipBehavior: Clip.none,
164 children: [ 170 children: [
165 Container( 171 Container(
166 width: double.infinity, 172 width: double.infinity,
167 - height: ScreenUtil().setHeight(260 + 30), 173 + height: ScreenUtil().setHeight(154 * 2 + 33 * 2 + 50),
168 alignment: Alignment.centerLeft, 174 alignment: Alignment.centerLeft,
169 - color: MyColours.color_199095, 175 + color: MyColours.color_438E93,
  176 + child: Padding(
  177 + padding: EdgeInsets.only(
  178 + left: ScreenUtil().setWidth(24 * 2),
  179 + right: ScreenUtil().setWidth(24 * 2),
  180 + top: ScreenUtil().setWidth(60 * 2 + 50),
  181 + ),
  182 + child: Row(
  183 + crossAxisAlignment: CrossAxisAlignment.start,
  184 + children: [
  185 + Stack(clipBehavior: Clip.none, children: [
  186 + Container(
  187 + width: ScreenUtil().setWidth(48 * 2),
  188 + height: ScreenUtil().setWidth(48 * 2),
  189 + child: ClipRRect(
  190 + borderRadius: BorderRadius.circular(
  191 + ScreenUtil().setWidth(48)),
  192 + child: Image.asset(
  193 + Utils.getImgPath('base_tx_bg'),
  194 + fit: BoxFit.cover,
  195 + width:
  196 + ScreenUtil().setWidth(48 * 2),
  197 + height:
  198 + ScreenUtil().setWidth(48 * 2),
  199 + ))),
  200 + Positioned(
  201 + top: ScreenUtil().setWidth(2 * 2),
  202 + left: ScreenUtil().setWidth(4 * 2),
  203 + child: Container(
  204 + width: ScreenUtil().setWidth(40 * 2),
  205 + height: ScreenUtil().setWidth(40 * 2),
  206 + // margin: EdgeInsets.only(
  207 + // right: ScreenUtil().setWidth(24),
  208 + // ),
  209 + child: ClipRRect(
  210 + borderRadius: BorderRadius.circular(
  211 + ScreenUtil().setWidth(40)),
  212 + child: model.user.sellerimage ==
  213 + null ||
  214 + model.user.sellerimage == ''
  215 + ? Image.asset(
  216 + Utils.getImgPath(
  217 + 'base_tx_mr'),
  218 + fit: BoxFit.cover,
  219 + width: ScreenUtil()
  220 + .setWidth(40 * 2),
  221 + height: ScreenUtil()
  222 + .setWidth(40 * 2),
  223 + )
  224 + : Image.network(
  225 + model.user.sellerimage,
  226 + fit: BoxFit.cover,
  227 + width: ScreenUtil()
  228 + .setWidth(40 * 2),
  229 + height: ScreenUtil()
  230 + .setWidth(40 * 2),
  231 + ),
  232 + )))
  233 + ]),
  234 + HEmptyView(22),
  235 + Column(
  236 + crossAxisAlignment: CrossAxisAlignment.start,
  237 + mainAxisAlignment: MainAxisAlignment.start,
  238 + children: [
  239 + Container(
  240 + child: Text(
  241 + model.user.sellername,
  242 + maxLines: 1,
  243 + overflow: TextOverflow.ellipsis,
  244 + style: TextStyle(
  245 + color: MyColours.color_ffffff,
  246 + fontSize: ScreenUtil().setSp(28)),
  247 + ),
  248 + ),
  249 + VEmptyView(14),
  250 + Container(
  251 + padding: EdgeInsets.symmetric(
  252 + horizontal:
  253 + ScreenUtil().setWidth(8),
  254 + vertical: ScreenUtil().setWidth(4)),
  255 + decoration: BoxDecoration(
  256 + color: MyColours.color_ffffff,
  257 + borderRadius: BorderRadius.circular(
  258 + ScreenUtil().setWidth(6))),
  259 + child: Text(
  260 + model.user.account +
  261 + " " +
  262 + model.user.role_name,
  263 + style: TextStyle(
  264 + color: MyColours.color_515151,
  265 + fontSize: ScreenUtil().setSp(16)),
  266 + )),
  267 + // VEmptyView(20),
  268 + // InkWell(
  269 + // onTap: () {
  270 + // // print(myModel.integralSunModel);
  271 + // NavigatorUtil.goMyIntegralPage(context,
  272 + // sunModel: myModel.integralSunModel);
  273 + // },
  274 + // child: Container(
  275 + // height: ScreenUtil().setWidth(48),
  276 + // padding: EdgeInsets.symmetric(
  277 + // horizontal:
  278 + // ScreenUtil().setWidth(20),
  279 + // vertical: ScreenUtil().setWidth(8)),
  280 + // decoration: BoxDecoration(
  281 + // borderRadius: BorderRadius.circular(
  282 + // ScreenUtil().setWidth(24)),
  283 + // border: Border.all(
  284 + // width: ScreenUtil().setWidth(2),
  285 + // color: Color.fromRGBO(
  286 + // 255, 255, 255, 0.2)),
  287 + // color: Color.fromRGBO(
  288 + // 255, 255, 255, 0.1)),
  289 + // child: Text(
  290 + // '积分${myModel.integralSunModel != null && myModel.integralSunModel.myIntegral != null ? myModel.integralSunModel?.myIntegral : '0'}',
  291 + // style: TextStyle(
  292 + // color: MyColours.color_ffffff,
  293 + // fontSize: ScreenUtil().setSp(22)),
  294 + // ),
  295 + // ),
  296 + // )
  297 + ],
  298 + ),
  299 + Spacer(),
  300 + RoundButton(
  301 + text: '切换店铺',
  302 + gradientStart: MyColours.color_ffffff,
  303 + gradientEnd: MyColours.color_ffffff,
  304 + borderColor: MyColours.color_ffffff,
  305 + width: ScreenUtil().setWidth(68 * 2),
  306 + height: ScreenUtil().setWidth(25 * 2),
  307 + fontSize: 24,
  308 + isBold: false,
  309 + textColor:
  310 + App.sp.getBool("accountLogin") ?? false
  311 + ? MyColours.color_999999
  312 + : MyColours.color_438E93,
  313 + radius: ScreenUtil().setWidth(34),
  314 + onPressed: () {
  315 + if (App.sp.getBool("accountLogin") ??
  316 + false) {
  317 + return;
  318 + }
  319 +
  320 + print(createStoreModel.storeInfo);
  321 + createStoreModel.storeInfo = StoreInfo();
  322 + NavigatorUtil.goIfNeedCreateStorePage(
  323 + context,
  324 + changeStatus: true);
  325 + },
  326 + ),
  327 + ])),
170 ), 328 ),
171 - Padding(  
172 - padding:  
173 - EdgeInsets.only(left: ScreenUtil().setWidth(30)),  
174 - child: Column(  
175 - crossAxisAlignment: CrossAxisAlignment.start,  
176 - children: [  
177 - VEmptyView(58),  
178 - Container(  
179 - height: ScreenUtil().setWidth(50),  
180 - child: Text(  
181 - model.user.sellername,  
182 - maxLines: 1,  
183 - overflow: TextOverflow.ellipsis,  
184 - style: TextStyle(  
185 - color: MyColours.color_ffffff,  
186 - fontSize: ScreenUtil().setSp(36)), 329 + Positioned(
  330 + left: ScreenUtil().setWidth(24 * 2),
  331 + bottom: ScreenUtil().setWidth(72),
  332 + child: Container(
  333 + width: ScreenUtil.screenWidthDp -
  334 + ScreenUtil().setWidth(24 * 2) * 2,
  335 + height: ScreenUtil().setWidth(72 * 2),
  336 + decoration: BoxDecoration(
  337 + color: MyColours.color_ffffff,
  338 + boxShadow: [
  339 + BoxShadow(
  340 + color: Color.fromRGBO(0, 0, 0, 0.4),
  341 + offset: Offset(0, ScreenUtil().setWidth(8)),
  342 + spreadRadius: ScreenUtil().setWidth(2),
  343 + blurRadius: ScreenUtil().setWidth(34))
  344 + ],
  345 + borderRadius: BorderRadius.circular(
  346 + ScreenUtil().setWidth(14))),
  347 + child: Row(
  348 + crossAxisAlignment: CrossAxisAlignment.center,
  349 + mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  350 + children: [
  351 + Column(
  352 + mainAxisAlignment: MainAxisAlignment.center,
  353 + children: [
  354 + Row(
  355 + children: [
  356 + Text(
  357 + '3555',
  358 + style: TextStyle(
  359 + color: MyColours.color_515151,
  360 + fontSize: ScreenUtil().setSp(40)),
  361 + ),
  362 + Text(
  363 + '个',
  364 + style: TextStyle(
  365 + color: MyColours.color_515151,
  366 + fontSize: ScreenUtil().setSp(22)),
  367 + )
  368 + ],
  369 + ),
  370 + VEmptyView(8),
  371 + Text(
  372 + '月订单量',
  373 + style: TextStyle(
  374 + color: MyColours.color_BFC4D4,
  375 + fontSize: ScreenUtil().setSp(20)),
  376 + ),
  377 + ],
187 ), 378 ),
188 - ),  
189 - VEmptyView(30),  
190 - Container(  
191 - height: ScreenUtil().setWidth(40),  
192 - child: Text(  
193 - model.user.account +  
194 - " | " +  
195 - model.user.role_name,  
196 - style: TextStyle(  
197 - color: MyColours.color_ffffff,  
198 - fontSize: ScreenUtil().setSp(30)),  
199 - )),  
200 - VEmptyView(20),  
201 - InkWell(  
202 - onTap: () {  
203 - // print(myModel.integralSunModel);  
204 - NavigatorUtil.goMyIntegralPage(context,  
205 - sunModel: myModel.integralSunModel);  
206 - },  
207 - child: Container(  
208 - height: ScreenUtil().setWidth(48),  
209 - padding: EdgeInsets.symmetric(  
210 - horizontal: ScreenUtil().setWidth(20),  
211 - vertical: ScreenUtil().setWidth(8)),  
212 - decoration: BoxDecoration(  
213 - borderRadius: BorderRadius.circular(  
214 - ScreenUtil().setWidth(24)),  
215 - border: Border.all(  
216 - width: ScreenUtil().setWidth(2),  
217 - color:  
218 - Color.fromRGBO(255, 255, 255, 0.2)),  
219 - color: Color.fromRGBO(255, 255, 255, 0.1)),  
220 - child: Text(  
221 - '积分${myModel.integralSunModel != null && myModel.integralSunModel.myIntegral != null ? myModel.integralSunModel?.myIntegral : '0'}',  
222 - style: TextStyle(  
223 - color: MyColours.color_ffffff,  
224 - fontSize: ScreenUtil().setSp(22)),  
225 - ), 379 + MyDivider(
  380 + ScreenUtil().setWidth(2),
  381 + ScreenUtil().setWidth(32 * 2),
  382 + color: MyColours.color_f3f3f3,
226 ), 383 ),
227 - )  
228 - ],  
229 - )),  
230 - Positioned(  
231 - right: ScreenUtil().setWidth(40),  
232 - bottom: ScreenUtil().setWidth(116),  
233 - child: RoundButton(  
234 - text: '切换店铺',  
235 - gradientStart: MyColours.color_ffffff,  
236 - gradientEnd: MyColours.color_ffffff,  
237 - borderColor: MyColours.color_ffffff,  
238 - width: ScreenUtil().setWidth(150),  
239 - height: ScreenUtil().setWidth(56),  
240 - fontSize: 28,  
241 - isBold: false,  
242 - textColor: App.sp.getBool("accountLogin") ?? false  
243 - ? MyColours.color_999999  
244 - : MyColours.color_199095,  
245 - radius: ScreenUtil().setWidth(20),  
246 - onPressed: () {  
247 - if (App.sp.getBool("accountLogin") ?? false) {  
248 - return;  
249 - }  
250 -  
251 - print(createStoreModel.storeInfo);  
252 - createStoreModel.storeInfo = StoreInfo();  
253 - NavigatorUtil.goIfNeedCreateStorePage(context,  
254 - changeStatus: true);  
255 - },  
256 - )), 384 + Column(
  385 + mainAxisAlignment: MainAxisAlignment.center,
  386 + children: [
  387 + Row(
  388 + children: [
  389 + Text(
  390 + myModel.smsInfo.isNotEmpty
  391 + ? '${myModel.smsInfo}'
  392 + : '0',
  393 + style: TextStyle(
  394 + color: MyColours.color_515151,
  395 + fontSize: ScreenUtil().setSp(40)),
  396 + ),
  397 + Text(
  398 + '条',
  399 + style: TextStyle(
  400 + color: MyColours.color_515151,
  401 + fontSize: ScreenUtil().setSp(22)),
  402 + )
  403 + ],
  404 + ),
  405 + VEmptyView(8),
  406 + RoundButton(
  407 + text: '充值短信',
  408 + gradientStart: MyColours.color_438E93,
  409 + gradientEnd: MyColours.color_438E93,
  410 + borderColor: MyColours.color_438E93,
  411 + width: ScreenUtil().setWidth(48 * 2),
  412 + height: ScreenUtil().setWidth(18 * 2),
  413 + fontSize: 20,
  414 + isBold: false,
  415 + textColor: MyColours.color_ffffff,
  416 + radius: ScreenUtil().setWidth(8),
  417 + onPressed: () {
  418 + NavigatorUtil.goSmsManagePage(context,
  419 + smsInfoData: smsInfoData);
  420 + })
  421 + ],
  422 + ),
  423 + MyDivider(
  424 + ScreenUtil().setWidth(2),
  425 + ScreenUtil().setWidth(32 * 2),
  426 + color: MyColours.color_f3f3f3,
  427 + ),
  428 + InkWell(
  429 + onTap: () {
  430 + NavigatorUtil.goMyIntegralPage(context,
  431 + sunModel: myModel.integralSunModel);
  432 + },
  433 + child: Column(
  434 + mainAxisAlignment: MainAxisAlignment.center,
  435 + children: [
  436 + Row(
  437 + children: [
  438 + Text(
  439 + '${myModel.integralSunModel != null && myModel.integralSunModel.myIntegral != null ? myModel.integralSunModel?.myIntegral : '0'}',
  440 + style: TextStyle(
  441 + color: MyColours.color_515151,
  442 + fontSize:
  443 + ScreenUtil().setSp(40)),
  444 + ),
  445 + Text(
  446 + '个',
  447 + style: TextStyle(
  448 + color: MyColours.color_515151,
  449 + fontSize:
  450 + ScreenUtil().setSp(22)),
  451 + )
  452 + ],
  453 + ),
  454 + VEmptyView(8),
  455 + RoundButton(
  456 + text: '积分兑换',
  457 + gradientStart: MyColours.color_BFC4D4,
  458 + gradientEnd: MyColours.color_BFC4D4,
  459 + borderColor: MyColours.color_BFC4D4,
  460 + width: ScreenUtil().setWidth(48 * 2),
  461 + height: ScreenUtil().setWidth(18 * 2),
  462 + fontSize: 20,
  463 + isBold: false,
  464 + textColor: MyColours.color_ffffff,
  465 + radius: ScreenUtil().setWidth(8),
  466 + onPressed: () {})
  467 + ],
  468 + ))
  469 + ],
  470 + ),
  471 + ))
257 ], 472 ],
258 ); 473 );
259 }), 474 }),
@@ -263,393 +478,1038 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -263,393 +478,1038 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
263 }, body: Consumer<UserModel>( 478 }, body: Consumer<UserModel>(
264 builder: (BuildContext context, UserModel model, Widget child) { 479 builder: (BuildContext context, UserModel model, Widget child) {
265 UserModel userModel = Provider.of<UserModel>(context, listen: false); 480 UserModel userModel = Provider.of<UserModel>(context, listen: false);
266 - return MediaQuery.removePadding(  
267 - context: context,  
268 - child: SingleChildScrollView(  
269 - child: Column(  
270 - children: <Widget>[  
271 - // Stack(  
272 - // children: [  
273 - // Container(  
274 - // width: double.infinity,  
275 - // height: ScreenUtil().setHeight(200),  
276 - // alignment: Alignment.centerLeft,  
277 - // color: MyColours.color_199095,  
278 - // ),  
279 - // Padding(  
280 - // padding:  
281 - // EdgeInsets.only(left: ScreenUtil().setWidth(40)),  
282 - // child: Column(  
283 - // crossAxisAlignment: CrossAxisAlignment.start,  
284 - // children: [  
285 - // VEmptyView(38),  
286 - // Text(  
287 - // model.user.sellername,  
288 - // style: TextStyle(  
289 - // color: MyColours.color_ffffff,  
290 - // fontSize: ScreenUtil().setSp(36)),  
291 - // ),  
292 - // VEmptyView(38),  
293 - // Text(  
294 - // model.user.account +  
295 - // " | " +  
296 - // model.user.role_name,  
297 - // style: TextStyle(  
298 - // color: MyColours.color_ffffff,  
299 - // fontSize: ScreenUtil().setSp(30)),  
300 - // ),  
301 - // ],  
302 - // ))  
303 - // ],  
304 - // ),  
305 - // VEmptyView(40),  
306 - MyItem(  
307 - title: "线上券创建",  
308 - content: '',  
309 - callback: () {  
310 - NavigatorUtil.goCouponPage(context);  
311 - },  
312 - ),  
313 -  
314 - MyDivider(  
315 - double.infinity,  
316 - ScreenUtil().setHeight(1),  
317 - color: MyColours.color_f3f3f3,  
318 - ),  
319 - // MyItem(  
320 - // title: "联系人",  
321 - // content: '',  
322 - // callback: () {  
323 - // // Utils.goMiniProgramZm(context, "setting/sms");  
324 - // NavigatorUtil.goMyContantPage(  
325 - // context,  
326 - // );  
327 - // },  
328 - // ),  
329 - userModel.user.role_name == '管理员' ||  
330 - userModel.user.role_name == '店长'  
331 - ? MyItem(  
332 - title: "全店客情",  
333 - content: "",  
334 - callback: () {  
335 - // Utils.goMiniProgramZm(context, "roomtype/roomtype");  
336 - NavigatorUtil.goStoreCustomerPage(context);  
337 - },  
338 - )  
339 - : SizedBox(),  
340 - MyItem(  
341 - title: "我的客情",  
342 - content: "",  
343 - callback: () {  
344 - // Utils.goMiniProgramZm(context, "roomtype/roomtype");  
345 - NavigatorUtil.goMyCustomerPage(context);  
346 - },  
347 - ),  
348 -  
349 - VEmptyView(40),  
350 - MyItem(  
351 - title: "个人信息",  
352 - content: "",  
353 - callback: () {  
354 - NavigatorUtil.goBaseInfoPage(  
355 - context, FromPage.FromPageMyPage);  
356 - },  
357 - ),  
358 -  
359 - MyDivider(  
360 - double.infinity,  
361 - ScreenUtil().setHeight(1),  
362 - color: MyColours.color_f3f3f3,  
363 - ),  
364 - MyItem(  
365 - title: "店铺信息",  
366 - content: "",  
367 - callback: () {  
368 - NavigatorUtil.goStoreBaseInfoPage(context);  
369 - },  
370 - ),  
371 -  
372 - MyDivider(  
373 - double.infinity,  
374 - ScreenUtil().setHeight(1),  
375 - color: MyColours.color_f3f3f3,  
376 - ),  
377 - MyItem(  
378 - title: "桌位管理",  
379 - content: "",  
380 - callback: () {  
381 - NavigatorUtil.goMyTableManagerHomePage(context);  
382 - },  
383 - ),  
384 -  
385 - MyDivider(  
386 - double.infinity,  
387 - ScreenUtil().setHeight(1),  
388 - color: MyColours.color_f3f3f3,  
389 - ),  
390 - MyItem(  
391 - title: "短信管理",  
392 - content:  
393 - myModel.smsInfo.isNotEmpty ? '剩余${myModel.smsInfo}条' : '',  
394 - callback: () {  
395 - // Utils.goMiniProgramZm(context, "setting/sms");  
396 - NavigatorUtil.goSmsManagePage(context,  
397 - smsInfoData: smsInfoData);  
398 - },  
399 - ),  
400 - MyDivider(  
401 - double.infinity,  
402 - ScreenUtil().setHeight(1),  
403 - color: MyColours.color_f3f3f3,  
404 - ),  
405 -  
406 - MyItem(  
407 - title: "照片管理",  
408 - content: "",  
409 - callback: () async {  
410 - // Map temp =  
411 - await NavigatorUtil.goPhotoManagerSelectTablePage(  
412 - context, "", DateTime.now().millisecondsSinceEpoch, "1",  
413 - canChoose: true,  
414 - object: null,  
415 - fromPage: "tablePhoto",  
416 - tid: '');  
417 - // if (temp != null && temp['tid'] != '') {  
418 - // // print(temp['tid']);  
419 - // // print(temp['tname']);  
420 - // // tname = temp['tname'];  
421 - // // tid = temp['tid'];  
422 - // // _getTablePhoto(context, temp['tid'], showLoading: true);  
423 - // }  
424 - },  
425 - ),  
426 -  
427 - MyDivider(  
428 - double.infinity,  
429 - ScreenUtil().setHeight(1),  
430 - color: MyColours.color_f3f3f3,  
431 - ),  
432 -  
433 - MyItem(  
434 - title: "员工管理",  
435 - content: "",  
436 - callback: () {  
437 - NavigatorUtil.goPersonnelManagePage(context);  
438 - },  
439 - ),  
440 -  
441 - MyDivider(  
442 - double.infinity,  
443 - ScreenUtil().setHeight(1),  
444 - color: MyColours.color_f3f3f3,  
445 - ),  
446 - MyItem(  
447 - title: "菜单管理",  
448 - content: "",  
449 - callback: () {  
450 - NavigatorUtil.goMenuManagePage(context);  
451 - },  
452 - ),  
453 - MyDivider(  
454 - double.infinity,  
455 - ScreenUtil().setHeight(1),  
456 - color: MyColours.color_f3f3f3,  
457 - ),  
458 -  
459 - MyItem(  
460 - title: "包间类型",  
461 - content: "",  
462 - callback: () {  
463 - NavigatorUtil.goRoomTypeManagePage(context);  
464 - },  
465 - ),  
466 - MyDivider(  
467 - double.infinity,  
468 - ScreenUtil().setHeight(1),  
469 - color: MyColours.color_f3f3f3,  
470 - ),  
471 - MyItem(  
472 - title: "包间类型置满管理",  
473 - content: "",  
474 - callback: () {  
475 - // Utils.goMiniProgramZm(context, "roomtype/roomtype");  
476 - NavigatorUtil.goStoreTypeFillManagePage(context);  
477 - },  
478 - ),  
479 - MyDivider(  
480 - double.infinity,  
481 - ScreenUtil().setHeight(1),  
482 - color: MyColours.color_f3f3f3,  
483 - ),  
484 - MyItem(  
485 - title: "可订时段管理",  
486 - content: "",  
487 - callback: () {  
488 - NavigatorUtil.goBookTimeSetPage(context);  
489 - },  
490 - ),  
491 - MyDivider(  
492 - double.infinity,  
493 - ScreenUtil().setHeight(1),  
494 - color: MyColours.color_f3f3f3,  
495 - ),  
496 - MyItem(  
497 - title: "接单时间管理",  
498 - content: "",  
499 - callback: () {  
500 - NavigatorUtil.goReceiveOrdersTimeSetPage(context);  
501 - },  
502 - ),  
503 - MyDivider(  
504 - double.infinity,  
505 - ScreenUtil().setHeight(1),  
506 - color: MyColours.color_f3f3f3,  
507 - ),  
508 - MyItem(  
509 - title: "常用备注管理",  
510 - content: "",  
511 - callback: () {  
512 - NavigatorUtil.goRemarkManagerPage(context);  
513 - },  
514 - ),  
515 - VEmptyView(40),  
516 - MyItem(  
517 - title: "联系客服",  
518 - content: "09:00~21:00",  
519 - callback: () {  
520 - Utils.goPhone("400-000-9690");  
521 - },  
522 - ),  
523 - MyDivider(  
524 - double.infinity,  
525 - ScreenUtil().setHeight(1),  
526 - color: MyColours.color_f3f3f3,  
527 - ),  
528 - MyItem(  
529 - title: "帮助与反馈",  
530 - content: "",  
531 - callback: () {  
532 - Utils.goHelp(context);  
533 - },  
534 - ),  
535 - MyDivider(double.infinity, ScreenUtil().setHeight(1),  
536 - color: MyColours.color_f3f3f3),  
537 - GestureDetector(  
538 - onTap: () {  
539 - if (newVersion) {  
540 - UpdateModelMy updateModel = new UpdateModelMy();  
541 - updateModel.showUpdateDialog(context, _version);  
542 - } else {  
543 - Utils.showToast("当前已是最新版本");  
544 - }  
545 - },  
546 - child: Container(  
547 - width: double.infinity,  
548 - height: ScreenUtil().setHeight(122),  
549 - color: MyColours.color_ffffff,  
550 - padding: EdgeInsets.symmetric(  
551 - horizontal: ScreenUtil().setWidth(40)),  
552 - alignment: Alignment.center,  
553 - child: Row(  
554 - children: <Widget>[  
555 - Text(  
556 - "版本更新", 481 + return Container(
  482 + color: MyColours.color_F8F9FD,
  483 + padding:
  484 + EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(24)),
  485 + child: MediaQuery.removePadding(
  486 + context: context,
  487 + child: SingleChildScrollView(
  488 + child: Column(
  489 + crossAxisAlignment: CrossAxisAlignment.start,
  490 + children: <Widget>[
  491 + // Stack(
  492 + // children: [
  493 + // Container(
  494 + // width: double.infinity,
  495 + // height: ScreenUtil().setHeight(200),
  496 + // alignment: Alignment.centerLeft,
  497 + // color: MyColours.color_199095,
  498 + // ),
  499 + // Padding(
  500 + // padding:
  501 + // EdgeInsets.only(left: ScreenUtil().setWidth(40)),
  502 + // child: Column(
  503 + // crossAxisAlignment: CrossAxisAlignment.start,
  504 + // children: [
  505 + // VEmptyView(38),
  506 + // Text(
  507 + // model.user.sellername,
  508 + // style: TextStyle(
  509 + // color: MyColours.color_ffffff,
  510 + // fontSize: ScreenUtil().setSp(36)),
  511 + // ),
  512 + // VEmptyView(38),
  513 + // Text(
  514 + // model.user.account +
  515 + // " | " +
  516 + // model.user.role_name,
  517 + // style: TextStyle(
  518 + // color: MyColours.color_ffffff,
  519 + // fontSize: ScreenUtil().setSp(30)),
  520 + // ),
  521 + // ],
  522 + // ))
  523 + // ],
  524 + // ),
  525 + // VEmptyView(40),
  526 +
  527 + Padding(
  528 + padding: EdgeInsets.symmetric(
  529 + vertical: ScreenUtil().setWidth(16)),
  530 + child: Text(
  531 + '我的内容',
557 style: TextStyle( 532 style: TextStyle(
558 - fontSize: ScreenUtil().setSp(30),  
559 - color: MyColours.color_353535),  
560 - ),  
561 - Spacer(),  
562 - newVersion  
563 - ? Container(  
564 - // width: ScreenUtil().setWidth(120),  
565 - height: ScreenUtil().setWidth(34),  
566 - decoration: BoxDecoration(  
567 - color: MyColours.color_E14553,  
568 - borderRadius: BorderRadius.all(  
569 - Radius.circular(  
570 - ScreenUtil().setWidth(6))),  
571 - ),  
572 - child: Padding(  
573 - padding: EdgeInsets.symmetric(  
574 - horizontal: ScreenUtil().setWidth(8)),  
575 - child: Center(  
576 - child: Text(  
577 - "发现新版本", 533 + fontSize: ScreenUtil().setSp(32),
  534 + color: MyColours.color_515151),
  535 + )),
  536 + Padding(
  537 + padding: EdgeInsets.symmetric(
  538 + horizontal: ScreenUtil().setWidth(12 * 2),
  539 + vertical: ScreenUtil().setWidth(20)),
  540 + child: Container(
  541 + padding: EdgeInsets.symmetric(
  542 + vertical: ScreenUtil().setWidth(19 * 2)),
  543 + decoration: BoxDecoration(
  544 + color: MyColours.color_ffffff,
  545 + borderRadius: BorderRadius.circular(
  546 + ScreenUtil().setWidth(14))),
  547 + child: Row(
  548 + mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  549 + children: [
  550 + InkWell(
  551 + onTap: () {
  552 + NavigatorUtil.goBaseInfoPage(
  553 + context, FromPage.FromPageMyPage);
  554 + },
  555 + child: Column(
  556 + children: [
  557 + Image.asset(
  558 + Utils.getImgPath('grxx'),
  559 + width: ScreenUtil().setWidth(32 * 2),
  560 + ),
  561 + VEmptyView(8),
  562 + Text(
  563 + '个人信息',
578 style: TextStyle( 564 style: TextStyle(
579 - fontSize: ScreenUtil().setSp(24),  
580 - color: MyColours.color_ffffff), 565 + color: MyColours.color_999999,
  566 + fontSize:
  567 + ScreenUtil().setWidth(20)),
  568 + )
  569 + ],
  570 + )),
  571 + InkWell(
  572 + onTap: () {
  573 + NavigatorUtil.goMyCustomerPage(context);
  574 + },
  575 + child: Column(
  576 + children: [
  577 + Image.asset(
  578 + Utils.getImgPath('wdkq'),
  579 + width: ScreenUtil().setWidth(32 * 2),
581 ), 580 ),
582 - )),  
583 - )  
584 - : Text(  
585 - cur_version,  
586 - style: TextStyle(  
587 - fontSize: ScreenUtil().setSp(28),  
588 - color: MyColours.color_666666),  
589 - ),  
590 - HEmptyView(20),  
591 - Image.asset(  
592 - "assets/arr_right_gray.png",  
593 - width: ScreenUtil().setWidth(14),  
594 - height: ScreenUtil().setWidth(22),  
595 - )  
596 - ],  
597 - ),  
598 - ),  
599 - ),  
600 - MyDivider(  
601 - double.infinity,  
602 - ScreenUtil().setHeight(1),  
603 - color: MyColours.color_f3f3f3,  
604 - ),  
605 - MyItem(  
606 - title: "隐私政策",  
607 - content: "",  
608 - callback: () {  
609 - NavigatorUtil.goWebPage(context, '隐私政策', "zc", need: true);  
610 - },  
611 - ),  
612 - MyDivider(  
613 - double.infinity,  
614 - ScreenUtil().setHeight(1),  
615 - color: MyColours.color_f3f3f3,  
616 - ),  
617 - VEmptyView(40),  
618 - Consumer<UserModel>(  
619 - builder:  
620 - (BuildContext context, UserModel model, Widget child) {  
621 - return GestureDetector(  
622 - onTap: () {  
623 - model.showLoginOutDialog(context);  
624 - },  
625 - child: Container(  
626 - height: ScreenUtil().setHeight(122),  
627 - color: MyColours.color_ffffff,  
628 - child: Center(  
629 - child: Row(  
630 - mainAxisSize: MainAxisSize.min,  
631 - crossAxisAlignment: CrossAxisAlignment.center,  
632 - children: <Widget>[  
633 - Image.asset(  
634 - "assets/icon_exist.png",  
635 - width: ScreenUtil().setWidth(30),  
636 - height: ScreenUtil().setWidth(30),  
637 - ),  
638 - HEmptyView(18),  
639 - Text("退出登录",  
640 - style: TextStyle(  
641 - color: MyColours.color_199095,  
642 - fontSize: ScreenUtil().setSp(34), 581 + VEmptyView(8),
  582 + Text(
  583 + '我的客情',
  584 + style: TextStyle(
  585 + color: MyColours.color_999999,
  586 + fontSize:
  587 + ScreenUtil().setWidth(20)),
  588 + )
  589 + ],
  590 + )),
  591 + InkWell(
  592 + onTap: () {
  593 + NavigatorUtil.goCouponPage(context);
  594 + },
  595 + child: Column(
  596 + children: [
  597 + Image.asset(
  598 + Utils.getImgPath('yhq'),
  599 + width: ScreenUtil().setWidth(32 * 2),
  600 + ),
  601 + VEmptyView(8),
  602 + Text(
  603 + '优惠券',
  604 + style: TextStyle(
  605 + color: MyColours.color_999999,
  606 + fontSize:
  607 + ScreenUtil().setWidth(20)),
  608 + )
  609 + ],
  610 + )),
  611 + InkWell(
  612 + onTap: () {
  613 + NavigatorUtil.goRemarkManagerPage(context);
  614 + },
  615 + child: Column(
  616 + children: [
  617 + Image.asset(
  618 + Utils.getImgPath('cybz'),
  619 + width: ScreenUtil().setWidth(32 * 2),
  620 + ),
  621 + VEmptyView(8),
  622 + Text(
  623 + '常用备注',
  624 + style: TextStyle(
  625 + color: MyColours.color_999999,
  626 + fontSize:
  627 + ScreenUtil().setWidth(20)),
  628 + )
  629 + ],
643 )) 630 ))
644 ], 631 ],
645 ), 632 ),
646 - ),  
647 - ),  
648 - );  
649 - },  
650 - )  
651 - ],  
652 - ))); 633 + )),
  634 + VEmptyView(20),
  635 +
  636 + Padding(
  637 + padding: EdgeInsets.symmetric(
  638 + vertical: ScreenUtil().setWidth(16)),
  639 + child: Text(
  640 + '店铺相关',
  641 + style: TextStyle(
  642 + fontSize: ScreenUtil().setSp(32),
  643 + color: MyColours.color_515151),
  644 + )),
  645 + Padding(
  646 + padding: EdgeInsets.symmetric(
  647 + horizontal: ScreenUtil().setWidth(12 * 2),
  648 + vertical: ScreenUtil().setWidth(20)),
  649 + child: Container(
  650 + padding: EdgeInsets.symmetric(
  651 + vertical: ScreenUtil().setWidth(19 * 2)),
  652 + decoration: BoxDecoration(
  653 + color: MyColours.color_ffffff,
  654 + borderRadius: BorderRadius.circular(
  655 + ScreenUtil().setWidth(14))),
  656 + child: Column(
  657 + children: [
  658 + Row(
  659 + mainAxisAlignment:
  660 + MainAxisAlignment.spaceEvenly,
  661 + children: [
  662 + InkWell(
  663 + onTap: () async {
  664 + if (userModel.user.role_name == '收银员' ||
  665 + userModel.user.role_name ==
  666 + '服务员' ||
  667 + userModel.user.role_name ==
  668 + '客户经理') {
  669 + } else {
  670 + Map image = await NavigatorUtil
  671 + .goStoreBaseInfoPage(context);
  672 + print(image['image']);
  673 + UserModel userModel =
  674 + Provider.of<UserModel>(context,
  675 + listen: false);
  676 + User user = userModel.user;
  677 + user.sellerimage = image['image'];
  678 + await App.sp.setString('user',
  679 + json.encode(user.toJson()));
  680 + print(userModel.user);
  681 + setState(() {});
  682 + }
  683 + },
  684 + child: Column(
  685 + children: [
  686 + Image.asset(
  687 + userModel.user.role_name ==
  688 + '收银员' ||
  689 + userModel
  690 + .user.role_name ==
  691 + '服务员' ||
  692 + userModel
  693 + .user.role_name ==
  694 + '客户经理'
  695 + ? Utils.getImgPath('dpxx_un')
  696 + : Utils.getImgPath('dpxx'),
  697 + width:
  698 + ScreenUtil().setWidth(32 * 2),
  699 + ),
  700 + VEmptyView(8),
  701 + Text(
  702 + '店铺信息',
  703 + style: TextStyle(
  704 + color: MyColours.color_999999,
  705 + fontSize: ScreenUtil()
  706 + .setWidth(20)),
  707 + )
  708 + ],
  709 + )),
  710 + InkWell(
  711 + onTap: () {
  712 + if (userModel.user.role_name == '收银员' ||
  713 + userModel.user.role_name ==
  714 + '服务员' ||
  715 + userModel.user.role_name ==
  716 + '客户经理') {
  717 + } else {
  718 + NavigatorUtil.goStoreCustomerPage(
  719 + context);
  720 + }
  721 + },
  722 + child: Column(
  723 + children: [
  724 + Image.asset(
  725 + userModel.user.role_name ==
  726 + '收银员' ||
  727 + userModel
  728 + .user.role_name ==
  729 + '服务员' ||
  730 + userModel
  731 + .user.role_name ==
  732 + '客户经理'
  733 + ? Utils.getImgPath('qdkq_un')
  734 + : Utils.getImgPath('qdkq'),
  735 + width:
  736 + ScreenUtil().setWidth(32 * 2),
  737 + ),
  738 + VEmptyView(8),
  739 + Text(
  740 + '全店客情',
  741 + style: TextStyle(
  742 + color: MyColours.color_999999,
  743 + fontSize: ScreenUtil()
  744 + .setWidth(20)),
  745 + )
  746 + ],
  747 + )),
  748 + InkWell(
  749 + onTap: () {
  750 + if (userModel.user.role_name ==
  751 + '收银员' ||
  752 + userModel.user.role_name ==
  753 + '服务员') {
  754 + } else {
  755 + NavigatorUtil
  756 + .goMyTableManagerHomePage(
  757 + context);
  758 + }
  759 + },
  760 + child: Column(
  761 + children: [
  762 + Image.asset(
  763 + userModel.user.role_name ==
  764 + '收银员' ||
  765 + userModel
  766 + .user.role_name ==
  767 + '服务员'
  768 + ? Utils.getImgPath('zwgl_un')
  769 + : Utils.getImgPath('zwgl'),
  770 + width:
  771 + ScreenUtil().setWidth(32 * 2),
  772 + ),
  773 + VEmptyView(8),
  774 + Text(
  775 + '桌位管理',
  776 + style: TextStyle(
  777 + color: MyColours.color_999999,
  778 + fontSize: ScreenUtil()
  779 + .setWidth(20)),
  780 + )
  781 + ],
  782 + )),
  783 + InkWell(
  784 + onTap: () async {
  785 + if (userModel.user.role_name ==
  786 + '收银员' ||
  787 + userModel.user.role_name ==
  788 + '服务员') {
  789 + } else {
  790 + // Map temp =
  791 + await NavigatorUtil
  792 + .goPhotoManagerSelectTablePage(
  793 + context,
  794 + "",
  795 + DateTime.now()
  796 + .millisecondsSinceEpoch,
  797 + "1",
  798 + canChoose: true,
  799 + object: null,
  800 + fromPage: "tablePhoto",
  801 + tid: '');
  802 + // if (temp != null && temp['tid'] != '') {
  803 + // // print(temp['tid']);
  804 + // // print(temp['tname']);
  805 + // // tname = temp['tname'];
  806 + // // tid = temp['tid'];
  807 + // // _getTablePhoto(context, temp['tid'], showLoading: true)
  808 + }
  809 + },
  810 + child: Column(
  811 + children: [
  812 + Image.asset(
  813 + userModel.user.role_name ==
  814 + '收银员' ||
  815 + userModel
  816 + .user.role_name ==
  817 + '服务员'
  818 + ? Utils.getImgPath('zwzp_un')
  819 + : Utils.getImgPath('zwzp'),
  820 + width:
  821 + ScreenUtil().setWidth(32 * 2),
  822 + ),
  823 + VEmptyView(8),
  824 + Text(
  825 + '桌位照片',
  826 + style: TextStyle(
  827 + color: MyColours.color_999999,
  828 + fontSize: ScreenUtil()
  829 + .setWidth(20)),
  830 + )
  831 + ],
  832 + ))
  833 + ],
  834 + ),
  835 + VEmptyView(60),
  836 + Row(
  837 + mainAxisAlignment:
  838 + MainAxisAlignment.spaceEvenly,
  839 + children: [
  840 + InkWell(
  841 + onTap: () {
  842 + if (userModel.user.role_name ==
  843 + '收银员' ||
  844 + userModel.user.role_name ==
  845 + '服务员') {
  846 + } else {
  847 + NavigatorUtil.goPersonnelManagePage(
  848 + context);
  849 + }
  850 + },
  851 + child: Column(
  852 + children: [
  853 + Image.asset(
  854 + userModel.user.role_name ==
  855 + '收银员' ||
  856 + userModel
  857 + .user.role_name ==
  858 + '服务员'
  859 + ? Utils.getImgPath('yggl_un')
  860 + : Utils.getImgPath('yggl'),
  861 + width:
  862 + ScreenUtil().setWidth(32 * 2),
  863 + ),
  864 + VEmptyView(8),
  865 + Text(
  866 + '员工管理',
  867 + style: TextStyle(
  868 + color: MyColours.color_999999,
  869 + fontSize: ScreenUtil()
  870 + .setWidth(20)),
  871 + )
  872 + ],
  873 + )),
  874 + InkWell(
  875 + onTap: () {
  876 + if (userModel.user.role_name ==
  877 + '收银员' ||
  878 + userModel.user.role_name ==
  879 + '服务员') {
  880 + } else {
  881 + NavigatorUtil.goMenuManagePage(
  882 + context);
  883 + }
  884 + },
  885 + child: Column(
  886 + children: [
  887 + Image.asset(
  888 + userModel.user.role_name ==
  889 + '收银员' ||
  890 + userModel
  891 + .user.role_name ==
  892 + '服务员'
  893 + ? Utils.getImgPath('cdgl_un')
  894 + : Utils.getImgPath('cdgl'),
  895 + width:
  896 + ScreenUtil().setWidth(32 * 2),
  897 + ),
  898 + VEmptyView(8),
  899 + Text(
  900 + '菜单管理',
  901 + style: TextStyle(
  902 + color: MyColours.color_999999,
  903 + fontSize: ScreenUtil()
  904 + .setWidth(20)),
  905 + )
  906 + ],
  907 + )),
  908 + InkWell(
  909 + onTap: () {
  910 + if (userModel.user.role_name ==
  911 + '收银员' ||
  912 + userModel.user.role_name ==
  913 + '服务员') {
  914 + } else {
  915 + NavigatorUtil.goRoomTypeManagePage(
  916 + context);
  917 + }
  918 + },
  919 + child: Column(
  920 + children: [
  921 + Image.asset(
  922 + userModel.user.role_name ==
  923 + '收银员' ||
  924 + userModel
  925 + .user.role_name ==
  926 + '服务员'
  927 + ? Utils.getImgPath('bjlx_un')
  928 + : Utils.getImgPath('bjlx'),
  929 + width:
  930 + ScreenUtil().setWidth(32 * 2),
  931 + ),
  932 + VEmptyView(8),
  933 + Text(
  934 + '包间类型',
  935 + style: TextStyle(
  936 + color: MyColours.color_999999,
  937 + fontSize: ScreenUtil()
  938 + .setWidth(20)),
  939 + )
  940 + ],
  941 + )),
  942 + InkWell(
  943 + onTap: () {
  944 + if (userModel.user.role_name ==
  945 + '收银员' ||
  946 + userModel.user.role_name ==
  947 + '服务员') {
  948 + } else {
  949 + NavigatorUtil
  950 + .goStoreTypeFillManagePage(
  951 + context);
  952 + }
  953 + },
  954 + child: Column(
  955 + children: [
  956 + Image.asset(
  957 + userModel.user.role_name ==
  958 + '收银员' ||
  959 + userModel
  960 + .user.role_name ==
  961 + '服务员'
  962 + ? Utils.getImgPath('bjzm_un')
  963 + : Utils.getImgPath('bjzm'),
  964 + width:
  965 + ScreenUtil().setWidth(32 * 2),
  966 + ),
  967 + VEmptyView(8),
  968 + Text(
  969 + '包间置满',
  970 + style: TextStyle(
  971 + color: MyColours.color_999999,
  972 + fontSize: ScreenUtil()
  973 + .setWidth(20)),
  974 + )
  975 + ],
  976 + ))
  977 + ],
  978 + )
  979 + ],
  980 + ))),
  981 +
  982 + VEmptyView(20),
  983 +
  984 + Padding(
  985 + padding: EdgeInsets.symmetric(
  986 + vertical: ScreenUtil().setWidth(16)),
  987 + child: Text(
  988 + '其他设置',
  989 + style: TextStyle(
  990 + fontSize: ScreenUtil().setSp(32),
  991 + color: MyColours.color_515151),
  992 + )),
  993 + Padding(
  994 + padding: EdgeInsets.symmetric(
  995 + horizontal: ScreenUtil().setWidth(12 * 2),
  996 + vertical: ScreenUtil().setWidth(20)),
  997 + child: Container(
  998 + padding: EdgeInsets.symmetric(
  999 + horizontal: ScreenUtil().setWidth(18 * 2),
  1000 + vertical: ScreenUtil().setWidth(18 * 2)),
  1001 + decoration: BoxDecoration(
  1002 + color: MyColours.color_ffffff,
  1003 + borderRadius: BorderRadius.circular(
  1004 + ScreenUtil().setWidth(14))),
  1005 + child: Column(children: [
  1006 + InkWell(
  1007 + onTap: () {
  1008 + Utils.goPhone("400-000-9690");
  1009 + },
  1010 + child: Row(
  1011 + children: [
  1012 + Image.asset(
  1013 + Utils.getImgPath('lxkf'),
  1014 + width: ScreenUtil().setWidth(28 * 2),
  1015 + ),
  1016 + HEmptyView(26),
  1017 + Text(
  1018 + '联系客服',
  1019 + style: TextStyle(
  1020 + color: MyColours.color_515151,
  1021 + fontSize:
  1022 + ScreenUtil().setWidth(28)),
  1023 + ),
  1024 + Spacer(),
  1025 + Text(
  1026 + '400 000 9690',
  1027 + style: TextStyle(
  1028 + color: MyColours.color_999999,
  1029 + fontSize:
  1030 + ScreenUtil().setWidth(24)),
  1031 + ),
  1032 + HEmptyView(14),
  1033 + Image.asset(
  1034 + "assets/arrow_right_new.png",
  1035 + width: ScreenUtil().setWidth(14),
  1036 + height: ScreenUtil().setWidth(22),
  1037 + )
  1038 + ],
  1039 + )),
  1040 + VEmptyView(48),
  1041 + InkWell(
  1042 + onTap: () {
  1043 + NavigatorUtil.goWebPage(
  1044 + context, '隐私政策', "zc",
  1045 + need: true);
  1046 + },
  1047 + child: Row(
  1048 + children: [
  1049 + Image.asset(
  1050 + Utils.getImgPath('yszc'),
  1051 + width: ScreenUtil().setWidth(28 * 2),
  1052 + ),
  1053 + HEmptyView(26),
  1054 + Text(
  1055 + '隐私政策',
  1056 + style: TextStyle(
  1057 + color: MyColours.color_515151,
  1058 + fontSize:
  1059 + ScreenUtil().setWidth(28)),
  1060 + ),
  1061 + Spacer(),
  1062 + Image.asset(
  1063 + "assets/arrow_right_new.png",
  1064 + width: ScreenUtil().setWidth(14),
  1065 + height: ScreenUtil().setWidth(22),
  1066 + )
  1067 + ],
  1068 + )),
  1069 + VEmptyView(48),
  1070 + InkWell(
  1071 + onTap: () {
  1072 + if (newVersion) {
  1073 + UpdateModelMy updateModel =
  1074 + new UpdateModelMy();
  1075 + updateModel.showUpdateDialog(
  1076 + context, _version);
  1077 + } else {
  1078 + Utils.showToast("当前已是最新版本");
  1079 + }
  1080 + },
  1081 + child: Row(
  1082 + children: [
  1083 + Image.asset(
  1084 + Utils.getImgPath('bbsj'),
  1085 + width: ScreenUtil().setWidth(28 * 2),
  1086 + ),
  1087 + HEmptyView(26),
  1088 + Text(
  1089 + '版本升级',
  1090 + style: TextStyle(
  1091 + color: MyColours.color_515151,
  1092 + fontSize:
  1093 + ScreenUtil().setWidth(28)),
  1094 + ),
  1095 + Spacer(),
  1096 + newVersion
  1097 + ? Container(
  1098 + // width: ScreenUtil().setWidth(120),
  1099 + height: ScreenUtil().setWidth(34),
  1100 + decoration: BoxDecoration(
  1101 + color: MyColours.color_E14553,
  1102 + borderRadius: BorderRadius.all(
  1103 + Radius.circular(ScreenUtil()
  1104 + .setWidth(6))),
  1105 + ),
  1106 + child: Padding(
  1107 + padding: EdgeInsets.symmetric(
  1108 + horizontal: ScreenUtil()
  1109 + .setWidth(8)),
  1110 + child: Center(
  1111 + child: Text(
  1112 + "发现新版本",
  1113 + style: TextStyle(
  1114 + fontSize: ScreenUtil()
  1115 + .setSp(24),
  1116 + color: MyColours
  1117 + .color_ffffff),
  1118 + ),
  1119 + )),
  1120 + )
  1121 + : Text(
  1122 + cur_version,
  1123 + style: TextStyle(
  1124 + fontSize:
  1125 + ScreenUtil().setSp(28),
  1126 + color:
  1127 + MyColours.color_999999),
  1128 + ),
  1129 + HEmptyView(20),
  1130 + Image.asset(
  1131 + "assets/arrow_right_new.png",
  1132 + width: ScreenUtil().setWidth(14),
  1133 + height: ScreenUtil().setWidth(22),
  1134 + )
  1135 + ],
  1136 + )),
  1137 + VEmptyView(48),
  1138 + Consumer<UserModel>(
  1139 + builder: (BuildContext context, UserModel model,
  1140 + Widget child) {
  1141 + return RoundButton(
  1142 + text: '退出登录',
  1143 + gradientStart: MyColours.color_ffffff,
  1144 + gradientEnd: MyColours.color_ffffff,
  1145 + borderColor: MyColours.color_438E93,
  1146 + // width: ScreenUtil().setWidth(38 * 2),
  1147 + height: ScreenUtil().setWidth(38 * 2),
  1148 + fontSize: 32,
  1149 + isBold: false,
  1150 + textColor: MyColours.color_438E93,
  1151 + radius: ScreenUtil().setWidth(10),
  1152 + onPressed: () {
  1153 + model.showLoginOutDialog(context);
  1154 + });
  1155 + },
  1156 + )
  1157 + ]))),
  1158 +
  1159 + // MyItem(
  1160 + // title: "线上券创建",
  1161 + // content: '',
  1162 + // callback: () {
  1163 + // NavigatorUtil.goCouponPage(context);
  1164 + // },
  1165 + // ),
  1166 +
  1167 + // MyDivider(
  1168 + // double.infinity,
  1169 + // ScreenUtil().setHeight(1),
  1170 + // color: MyColours.color_f3f3f3,
  1171 + // ),
  1172 + // // MyItem(
  1173 + // // title: "联系人",
  1174 + // // content: '',
  1175 + // // callback: () {
  1176 + // // // Utils.goMiniProgramZm(context, "setting/sms");
  1177 + // // NavigatorUtil.goMyContantPage(
  1178 + // // context,
  1179 + // // );
  1180 + // // },
  1181 + // // ),
  1182 + // userModel.user.role_name == '管理员' ||
  1183 + // userModel.user.role_name == '店长'
  1184 + // ? MyItem(
  1185 + // title: "全店客情",
  1186 + // content: "",
  1187 + // callback: () {
  1188 + // // Utils.goMiniProgramZm(context, "roomtype/roomtype");
  1189 + // NavigatorUtil.goStoreCustomerPage(context);
  1190 + // },
  1191 + // )
  1192 + // : SizedBox(),
  1193 + // MyItem(
  1194 + // title: "我的客情",
  1195 + // content: "",
  1196 + // callback: () {
  1197 + // // Utils.goMiniProgramZm(context, "roomtype/roomtype");
  1198 + // NavigatorUtil.goMyCustomerPage(context);
  1199 + // },
  1200 + // ),
  1201 +
  1202 + // VEmptyView(40),
  1203 + // MyItem(
  1204 + // title: "个人信息",
  1205 + // content: "",
  1206 + // callback: () {
  1207 + // NavigatorUtil.goBaseInfoPage(
  1208 + // context, FromPage.FromPageMyPage);
  1209 + // },
  1210 + // ),
  1211 +
  1212 + // MyDivider(
  1213 + // double.infinity,
  1214 + // ScreenUtil().setHeight(1),
  1215 + // color: MyColours.color_f3f3f3,
  1216 + // ),
  1217 + // MyItem(
  1218 + // title: "店铺信息",
  1219 + // content: "",
  1220 + // callback: () {
  1221 + // NavigatorUtil.goStoreBaseInfoPage(context);
  1222 + // },
  1223 + // ),
  1224 +
  1225 + // MyDivider(
  1226 + // double.infinity,
  1227 + // ScreenUtil().setHeight(1),
  1228 + // color: MyColours.color_f3f3f3,
  1229 + // ),
  1230 + // MyItem(
  1231 + // title: "桌位管理",
  1232 + // content: "",
  1233 + // callback: () {
  1234 + // NavigatorUtil.goMyTableManagerHomePage(context);
  1235 + // },
  1236 + // ),
  1237 +
  1238 + // MyDivider(
  1239 + // double.infinity,
  1240 + // ScreenUtil().setHeight(1),
  1241 + // color: MyColours.color_f3f3f3,
  1242 + // ),
  1243 + // MyItem(
  1244 + // title: "短信管理",
  1245 + // content: myModel.smsInfo.isNotEmpty
  1246 + // ? '剩余${myModel.smsInfo}条'
  1247 + // : '',
  1248 + // callback: () {
  1249 + // // Utils.goMiniProgramZm(context, "setting/sms");
  1250 + // NavigatorUtil.goSmsManagePage(context,
  1251 + // smsInfoData: smsInfoData);
  1252 + // },
  1253 + // ),
  1254 + // MyDivider(
  1255 + // double.infinity,
  1256 + // ScreenUtil().setHeight(1),
  1257 + // color: MyColours.color_f3f3f3,
  1258 + // ),
  1259 +
  1260 + // MyItem(
  1261 + // title: "照片管理",
  1262 + // content: "",
  1263 + // callback: () async {
  1264 + // // Map temp =
  1265 + // await NavigatorUtil.goPhotoManagerSelectTablePage(
  1266 + // context,
  1267 + // "",
  1268 + // DateTime.now().millisecondsSinceEpoch,
  1269 + // "1",
  1270 + // canChoose: true,
  1271 + // object: null,
  1272 + // fromPage: "tablePhoto",
  1273 + // tid: '');
  1274 + // // if (temp != null && temp['tid'] != '') {
  1275 + // // // print(temp['tid']);
  1276 + // // // print(temp['tname']);
  1277 + // // // tname = temp['tname'];
  1278 + // // // tid = temp['tid'];
  1279 + // // // _getTablePhoto(context, temp['tid'], showLoading: true);
  1280 + // // }
  1281 + // },
  1282 + // ),
  1283 +
  1284 + // MyDivider(
  1285 + // double.infinity,
  1286 + // ScreenUtil().setHeight(1),
  1287 + // color: MyColours.color_f3f3f3,
  1288 + // ),
  1289 +
  1290 + // MyItem(
  1291 + // title: "员工管理",
  1292 + // content: "",
  1293 + // callback: () {
  1294 + // NavigatorUtil.goPersonnelManagePage(context);
  1295 + // },
  1296 + // ),
  1297 +
  1298 + // MyDivider(
  1299 + // double.infinity,
  1300 + // ScreenUtil().setHeight(1),
  1301 + // color: MyColours.color_f3f3f3,
  1302 + // ),
  1303 + // MyItem(
  1304 + // title: "菜单管理",
  1305 + // content: "",
  1306 + // callback: () {
  1307 + // NavigatorUtil.goMenuManagePage(context);
  1308 + // },
  1309 + // ),
  1310 + // MyDivider(
  1311 + // double.infinity,
  1312 + // ScreenUtil().setHeight(1),
  1313 + // color: MyColours.color_f3f3f3,
  1314 + // ),
  1315 +
  1316 + // MyItem(
  1317 + // title: "包间类型",
  1318 + // content: "",
  1319 + // callback: () {
  1320 + // NavigatorUtil.goRoomTypeManagePage(context);
  1321 + // },
  1322 + // ),
  1323 + // MyDivider(
  1324 + // double.infinity,
  1325 + // ScreenUtil().setHeight(1),
  1326 + // color: MyColours.color_f3f3f3,
  1327 + // ),
  1328 + // MyItem(
  1329 + // title: "包间类型置满管理",
  1330 + // content: "",
  1331 + // callback: () {
  1332 + // // Utils.goMiniProgramZm(context, "roomtype/roomtype");
  1333 + // NavigatorUtil.goStoreTypeFillManagePage(context);
  1334 + // },
  1335 + // ),
  1336 + // MyDivider(
  1337 + // double.infinity,
  1338 + // ScreenUtil().setHeight(1),
  1339 + // color: MyColours.color_f3f3f3,
  1340 + // ),
  1341 + // MyItem(
  1342 + // title: "可订时段管理",
  1343 + // content: "",
  1344 + // callback: () {
  1345 + // NavigatorUtil.goBookTimeSetPage(context);
  1346 + // },
  1347 + // ),
  1348 + // MyDivider(
  1349 + // double.infinity,
  1350 + // ScreenUtil().setHeight(1),
  1351 + // color: MyColours.color_f3f3f3,
  1352 + // ),
  1353 + // MyItem(
  1354 + // title: "接单时间管理",
  1355 + // content: "",
  1356 + // callback: () {
  1357 + // NavigatorUtil.goReceiveOrdersTimeSetPage(context);
  1358 + // },
  1359 + // ),
  1360 + // MyDivider(
  1361 + // double.infinity,
  1362 + // ScreenUtil().setHeight(1),
  1363 + // color: MyColours.color_f3f3f3,
  1364 + // ),
  1365 + // MyItem(
  1366 + // title: "常用备注管理",
  1367 + // content: "",
  1368 + // callback: () {
  1369 + // NavigatorUtil.goRemarkManagerPage(context);
  1370 + // },
  1371 + // ),
  1372 + // VEmptyView(40),
  1373 + // MyItem(
  1374 + // title: "联系客服",
  1375 + // content: "09:00~21:00",
  1376 + // callback: () {
  1377 + // Utils.goPhone("400-000-9690");
  1378 + // },
  1379 + // ),
  1380 + // MyDivider(
  1381 + // double.infinity,
  1382 + // ScreenUtil().setHeight(1),
  1383 + // color: MyColours.color_f3f3f3,
  1384 + // ),
  1385 + // MyItem(
  1386 + // title: "帮助与反馈",
  1387 + // content: "",
  1388 + // callback: () {
  1389 + // Utils.goHelp(context);
  1390 + // },
  1391 + // ),
  1392 + // MyDivider(double.infinity, ScreenUtil().setHeight(1),
  1393 + // color: MyColours.color_f3f3f3),
  1394 + // GestureDetector(
  1395 + // onTap: () {
  1396 + // if (newVersion) {
  1397 + // UpdateModelMy updateModel = new UpdateModelMy();
  1398 + // updateModel.showUpdateDialog(context, _version);
  1399 + // } else {
  1400 + // Utils.showToast("当前已是最新版本");
  1401 + // }
  1402 + // },
  1403 + // child: Container(
  1404 + // width: double.infinity,
  1405 + // height: ScreenUtil().setHeight(122),
  1406 + // color: MyColours.color_ffffff,
  1407 + // padding: EdgeInsets.symmetric(
  1408 + // horizontal: ScreenUtil().setWidth(40)),
  1409 + // alignment: Alignment.center,
  1410 + // child: Row(
  1411 + // children: <Widget>[
  1412 + // Text(
  1413 + // "版本更新",
  1414 + // style: TextStyle(
  1415 + // fontSize: ScreenUtil().setSp(30),
  1416 + // color: MyColours.color_353535),
  1417 + // ),
  1418 + // Spacer(),
  1419 + // newVersion
  1420 + // ? Container(
  1421 + // // width: ScreenUtil().setWidth(120),
  1422 + // height: ScreenUtil().setWidth(34),
  1423 + // decoration: BoxDecoration(
  1424 + // color: MyColours.color_E14553,
  1425 + // borderRadius: BorderRadius.all(
  1426 + // Radius.circular(
  1427 + // ScreenUtil().setWidth(6))),
  1428 + // ),
  1429 + // child: Padding(
  1430 + // padding: EdgeInsets.symmetric(
  1431 + // horizontal:
  1432 + // ScreenUtil().setWidth(8)),
  1433 + // child: Center(
  1434 + // child: Text(
  1435 + // "发现新版本",
  1436 + // style: TextStyle(
  1437 + // fontSize:
  1438 + // ScreenUtil().setSp(24),
  1439 + // color: MyColours.color_ffffff),
  1440 + // ),
  1441 + // )),
  1442 + // )
  1443 + // : Text(
  1444 + // cur_version,
  1445 + // style: TextStyle(
  1446 + // fontSize: ScreenUtil().setSp(28),
  1447 + // color: MyColours.color_666666),
  1448 + // ),
  1449 + // HEmptyView(20),
  1450 + // Image.asset(
  1451 + // "assets/arr_right_gray.png",
  1452 + // width: ScreenUtil().setWidth(14),
  1453 + // height: ScreenUtil().setWidth(22),
  1454 + // )
  1455 + // ],
  1456 + // ),
  1457 + // ),
  1458 + // ),
  1459 + // MyDivider(
  1460 + // double.infinity,
  1461 + // ScreenUtil().setHeight(1),
  1462 + // color: MyColours.color_f3f3f3,
  1463 + // ),
  1464 + // MyItem(
  1465 + // title: "隐私政策",
  1466 + // content: "",
  1467 + // callback: () {
  1468 + // NavigatorUtil.goWebPage(context, '隐私政策', "zc",
  1469 + // need: true);
  1470 + // },
  1471 + // ),
  1472 + // MyDivider(
  1473 + // double.infinity,
  1474 + // ScreenUtil().setHeight(1),
  1475 + // color: MyColours.color_f3f3f3,
  1476 + // ),
  1477 + // VEmptyView(40),
  1478 + // Consumer<UserModel>(
  1479 + // builder: (BuildContext context, UserModel model,
  1480 + // Widget child) {
  1481 + // return GestureDetector(
  1482 + // onTap: () {
  1483 + // model.showLoginOutDialog(context);
  1484 + // },
  1485 + // child: Container(
  1486 + // height: ScreenUtil().setHeight(122),
  1487 + // color: MyColours.color_ffffff,
  1488 + // child: Center(
  1489 + // child: Row(
  1490 + // mainAxisSize: MainAxisSize.min,
  1491 + // crossAxisAlignment: CrossAxisAlignment.center,
  1492 + // children: <Widget>[
  1493 + // Image.asset(
  1494 + // "assets/icon_exist.png",
  1495 + // width: ScreenUtil().setWidth(30),
  1496 + // height: ScreenUtil().setWidth(30),
  1497 + // ),
  1498 + // HEmptyView(18),
  1499 + // Text("退出登录",
  1500 + // style: TextStyle(
  1501 + // color: MyColours.color_199095,
  1502 + // fontSize: ScreenUtil().setSp(34),
  1503 + // ))
  1504 + // ],
  1505 + // ),
  1506 + // ),
  1507 + // ),
  1508 + // );
  1509 + // },
  1510 + // )
  1511 + ],
  1512 + ))));
653 })), 1513 })),
654 ); 1514 );
655 } 1515 }
  1 +// import 'package:flutter/material.dart';
  2 +// import 'package:flutter_screenutil/flutter_screenutil.dart';
  3 +// import 'package:fluwx/fluwx.dart';
  4 +// import 'package:one_key/constant/state.dart';
  5 +// import 'package:one_key/models/sms_info.dart';
  6 +// import 'package:one_key/models/store_info.dart';
  7 +// import 'package:one_key/models/version.dart';
  8 +// import 'package:one_key/provider/create_store_model.dart';
  9 +// import 'package:one_key/provider/my_model.dart';
  10 +// import 'package:one_key/provider/update_model.dart';
  11 +// import 'package:one_key/provider/user_model.dart';
  12 +// import 'package:one_key/res/colors.dart';
  13 +// import 'package:one_key/utils/event_bus.dart';
  14 +// import 'package:one_key/route/navigator_util.dart';
  15 +// import 'package:one_key/utils/utils.dart';
  16 +// import 'package:one_key/widgets/MyDivider.dart';
  17 +// import 'package:one_key/widgets/app_bar.dart';
  18 +// import 'package:one_key/widgets/h_empty_view.dart';
  19 +// import 'package:one_key/widgets/my_item.dart';
  20 +// import 'package:one_key/widgets/round_button.dart';
  21 +// import 'package:one_key/widgets/v_empty_view.dart';
  22 +// import 'package:provider/provider.dart';
  23 +
  24 +// import '../../app.dart';
  25 +
  26 +// class MyPage extends StatefulWidget {
  27 +// @override
  28 +// State<StatefulWidget> createState() {
  29 +// // TODO: implement createState
  30 +// return new MyPageState();
  31 +// }
  32 +// }
  33 +
  34 +// class MyPageState extends State<MyPage> with WidgetsBindingObserver {
  35 +// String cur_version = "";
  36 +// bool newVersion = false;
  37 +// MyModel myModel;
  38 +// ScrollController controller;
  39 +// Version _version;
  40 +// SmsInfoData smsInfoData;
  41 +// CreateStoreModel createStoreModel;
  42 +
  43 +// @override
  44 +// void initState() {
  45 +// // TODO: implement initState
  46 +// super.initState();
  47 +
  48 +// controller = ScrollController(initialScrollOffset: 0.0);
  49 +// WidgetsBinding.instance.addObserver(this);
  50 +// Utils.changeStatusColor(color: MyColours.color_199095);
  51 +// Utils.getCurrVersion().then((version) {
  52 +// setState(() {
  53 +// cur_version = "v" + version;
  54 +// });
  55 +// });
  56 +// WidgetsBinding.instance.addPostFrameCallback((_) async {
  57 +// ///获取短信余量
  58 +// _getSmsInfo(context);
  59 +
  60 +// ///获取积分
  61 +// _getMyIntegral(context);
  62 +
  63 +// ///apk版本检测
  64 +// checkUpdate();
  65 +// });
  66 +// EventBus().on('changeStatusColor', (arg) {
  67 +// Utils.changeStatusColor(color: MyColours.color_199095);
  68 +// });
  69 +// EventBus().on('refreshMySms', (arg) {
  70 +// _getSmsInfo(context);
  71 +// });
  72 +// }
  73 +
  74 +// @override
  75 +// void dispose() {
  76 +// // TODO: implement dispose
  77 +// super.dispose();
  78 +// EventBus().off('changeStatusColor');
  79 +// EventBus().off('refreshMySms');
  80 +// }
  81 +
  82 +// @override
  83 +// void didChangeAppLifecycleState(AppLifecycleState state) async {
  84 +// // TODO: implement didChangeAppLifecycleState
  85 +// super.didChangeAppLifecycleState(state);
  86 +// switch (state) {
  87 +// case AppLifecycleState.resumed: //应用前台可见
  88 +// // _getSmsInfo(context);
  89 +// break;
  90 +// case AppLifecycleState.inactive:
  91 +// print('inactive');
  92 +// break;
  93 +// case AppLifecycleState.paused:
  94 +// print('paused');
  95 +// break;
  96 +// case AppLifecycleState.detached:
  97 +// print('detached');
  98 +// break;
  99 +
  100 +// default:
  101 +// break;
  102 +// }
  103 +// }
  104 +
  105 +// ///获取短信余量
  106 +// _getSmsInfo(context) async {
  107 +// // myModel = Provider.of<MyModel>(context, listen: false);
  108 +// smsInfoData = await myModel.getSmsInfo(context);
  109 +
  110 +// // setState(() {
  111 +// // if (smsInfoData != null) {
  112 +// // smsInfo = smsInfoData?.lastNum;
  113 +// // }
  114 +// // });
  115 +// }
  116 +
  117 +// ///获取我的积分
  118 +// _getMyIntegral(context) async {
  119 +// await myModel.getMyIntegral(context);
  120 +// }
  121 +
  122 +// //检查版本更新
  123 +// checkUpdate() {
  124 +// UpdateModelMy updateModel = new UpdateModelMy();
  125 +// updateModel.checkUpdate(context, (version) {
  126 +// _version = version;
  127 +// setState(() {
  128 +// newVersion = true;
  129 +// });
  130 +// // updateModel.showUpdateDialog(context, version);
  131 +// }, showToast: false);
  132 +// }
  133 +
  134 +// @override
  135 +// Widget build(BuildContext context) {
  136 +// myModel = Provider.of<MyModel>(context, listen: true);
  137 +// createStoreModel = Provider.of<CreateStoreModel>(context, listen: false);
  138 +// return Scaffold(
  139 +// appBar: AppBar(
  140 +// backgroundColor: MyColours.color_199095, //把appbar的背景色改成透明
  141 +// elevation: 0, //appbar的阴影
  142 +// centerTitle: true, // 标题居中
  143 +// title: Text(
  144 +// '一键订',
  145 +// style: TextStyle(
  146 +// color: MyColours.color_fefefe,
  147 +// fontSize: ScreenUtil().setSp(34),
  148 +// fontWeight: FontWeight.normal,
  149 +// decoration: TextDecoration.none),
  150 +// )),
  151 +// body: NestedScrollView(
  152 +// // controller: _scrollViewController,
  153 +// headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
  154 +// return <Widget>[
  155 +// SliverAppBar(
  156 +// pinned: false,
  157 +// floating: false,
  158 +// expandedHeight: ScreenUtil().setWidth(260 + 40),
  159 +// flexibleSpace: FlexibleSpaceBar(
  160 +// collapseMode: CollapseMode.pin,
  161 +// background: Consumer<UserModel>(builder:
  162 +// (BuildContext context, UserModel model, Widget child) {
  163 +// return Stack(
  164 +// children: [
  165 +// Container(
  166 +// width: double.infinity,
  167 +// height: ScreenUtil().setHeight(260 + 30),
  168 +// alignment: Alignment.centerLeft,
  169 +// color: MyColours.color_199095,
  170 +// ),
  171 +// Padding(
  172 +// padding:
  173 +// EdgeInsets.only(left: ScreenUtil().setWidth(30)),
  174 +// child: Column(
  175 +// crossAxisAlignment: CrossAxisAlignment.start,
  176 +// children: [
  177 +// VEmptyView(58),
  178 +// Container(
  179 +// height: ScreenUtil().setWidth(50),
  180 +// child: Text(
  181 +// model.user.sellername,
  182 +// maxLines: 1,
  183 +// overflow: TextOverflow.ellipsis,
  184 +// style: TextStyle(
  185 +// color: MyColours.color_ffffff,
  186 +// fontSize: ScreenUtil().setSp(36)),
  187 +// ),
  188 +// ),
  189 +// VEmptyView(30),
  190 +// Container(
  191 +// height: ScreenUtil().setWidth(40),
  192 +// child: Text(
  193 +// model.user.account +
  194 +// " | " +
  195 +// model.user.role_name,
  196 +// style: TextStyle(
  197 +// color: MyColours.color_ffffff,
  198 +// fontSize: ScreenUtil().setSp(30)),
  199 +// )),
  200 +// VEmptyView(20),
  201 +// InkWell(
  202 +// onTap: () {
  203 +// // print(myModel.integralSunModel);
  204 +// NavigatorUtil.goMyIntegralPage(context,
  205 +// sunModel: myModel.integralSunModel);
  206 +// },
  207 +// child: Container(
  208 +// height: ScreenUtil().setWidth(48),
  209 +// padding: EdgeInsets.symmetric(
  210 +// horizontal: ScreenUtil().setWidth(20),
  211 +// vertical: ScreenUtil().setWidth(8)),
  212 +// decoration: BoxDecoration(
  213 +// borderRadius: BorderRadius.circular(
  214 +// ScreenUtil().setWidth(24)),
  215 +// border: Border.all(
  216 +// width: ScreenUtil().setWidth(2),
  217 +// color:
  218 +// Color.fromRGBO(255, 255, 255, 0.2)),
  219 +// color: Color.fromRGBO(255, 255, 255, 0.1)),
  220 +// child: Text(
  221 +// '积分${myModel.integralSunModel != null && myModel.integralSunModel.myIntegral != null ? myModel.integralSunModel?.myIntegral : '0'}',
  222 +// style: TextStyle(
  223 +// color: MyColours.color_ffffff,
  224 +// fontSize: ScreenUtil().setSp(22)),
  225 +// ),
  226 +// ),
  227 +// )
  228 +// ],
  229 +// )),
  230 +// Positioned(
  231 +// right: ScreenUtil().setWidth(40),
  232 +// bottom: ScreenUtil().setWidth(116),
  233 +// child: RoundButton(
  234 +// text: '切换店铺',
  235 +// gradientStart: MyColours.color_ffffff,
  236 +// gradientEnd: MyColours.color_ffffff,
  237 +// borderColor: MyColours.color_ffffff,
  238 +// width: ScreenUtil().setWidth(150),
  239 +// height: ScreenUtil().setWidth(56),
  240 +// fontSize: 28,
  241 +// isBold: false,
  242 +// textColor: App.sp.getBool("accountLogin") ?? false
  243 +// ? MyColours.color_999999
  244 +// : MyColours.color_199095,
  245 +// radius: ScreenUtil().setWidth(20),
  246 +// onPressed: () {
  247 +// if (App.sp.getBool("accountLogin") ?? false) {
  248 +// return;
  249 +// }
  250 +
  251 +// print(createStoreModel.storeInfo);
  252 +// createStoreModel.storeInfo = StoreInfo();
  253 +// NavigatorUtil.goIfNeedCreateStorePage(context,
  254 +// changeStatus: true);
  255 +// },
  256 +// )),
  257 +// ],
  258 +// );
  259 +// }),
  260 +// ),
  261 +// )
  262 +// ];
  263 +// }, body: Consumer<UserModel>(
  264 +// builder: (BuildContext context, UserModel model, Widget child) {
  265 +// UserModel userModel = Provider.of<UserModel>(context, listen: false);
  266 +// return MediaQuery.removePadding(
  267 +// context: context,
  268 +// child: SingleChildScrollView(
  269 +// child: Column(
  270 +// children: <Widget>[
  271 +// // Stack(
  272 +// // children: [
  273 +// // Container(
  274 +// // width: double.infinity,
  275 +// // height: ScreenUtil().setHeight(200),
  276 +// // alignment: Alignment.centerLeft,
  277 +// // color: MyColours.color_199095,
  278 +// // ),
  279 +// // Padding(
  280 +// // padding:
  281 +// // EdgeInsets.only(left: ScreenUtil().setWidth(40)),
  282 +// // child: Column(
  283 +// // crossAxisAlignment: CrossAxisAlignment.start,
  284 +// // children: [
  285 +// // VEmptyView(38),
  286 +// // Text(
  287 +// // model.user.sellername,
  288 +// // style: TextStyle(
  289 +// // color: MyColours.color_ffffff,
  290 +// // fontSize: ScreenUtil().setSp(36)),
  291 +// // ),
  292 +// // VEmptyView(38),
  293 +// // Text(
  294 +// // model.user.account +
  295 +// // " | " +
  296 +// // model.user.role_name,
  297 +// // style: TextStyle(
  298 +// // color: MyColours.color_ffffff,
  299 +// // fontSize: ScreenUtil().setSp(30)),
  300 +// // ),
  301 +// // ],
  302 +// // ))
  303 +// // ],
  304 +// // ),
  305 +// // VEmptyView(40),
  306 +// MyItem(
  307 +// title: "线上券创建",
  308 +// content: '',
  309 +// callback: () {
  310 +// NavigatorUtil.goCouponPage(context);
  311 +// },
  312 +// ),
  313 +
  314 +// MyDivider(
  315 +// double.infinity,
  316 +// ScreenUtil().setHeight(1),
  317 +// color: MyColours.color_f3f3f3,
  318 +// ),
  319 +// // MyItem(
  320 +// // title: "联系人",
  321 +// // content: '',
  322 +// // callback: () {
  323 +// // // Utils.goMiniProgramZm(context, "setting/sms");
  324 +// // NavigatorUtil.goMyContantPage(
  325 +// // context,
  326 +// // );
  327 +// // },
  328 +// // ),
  329 +// userModel.user.role_name == '管理员' ||
  330 +// userModel.user.role_name == '店长'
  331 +// ? MyItem(
  332 +// title: "全店客情",
  333 +// content: "",
  334 +// callback: () {
  335 +// // Utils.goMiniProgramZm(context, "roomtype/roomtype");
  336 +// NavigatorUtil.goStoreCustomerPage(context);
  337 +// },
  338 +// )
  339 +// : SizedBox(),
  340 +// MyItem(
  341 +// title: "我的客情",
  342 +// content: "",
  343 +// callback: () {
  344 +// // Utils.goMiniProgramZm(context, "roomtype/roomtype");
  345 +// NavigatorUtil.goMyCustomerPage(context);
  346 +// },
  347 +// ),
  348 +
  349 +// VEmptyView(40),
  350 +// MyItem(
  351 +// title: "个人信息",
  352 +// content: "",
  353 +// callback: () {
  354 +// NavigatorUtil.goBaseInfoPage(
  355 +// context, FromPage.FromPageMyPage);
  356 +// },
  357 +// ),
  358 +
  359 +// MyDivider(
  360 +// double.infinity,
  361 +// ScreenUtil().setHeight(1),
  362 +// color: MyColours.color_f3f3f3,
  363 +// ),
  364 +// MyItem(
  365 +// title: "店铺信息",
  366 +// content: "",
  367 +// callback: () {
  368 +// NavigatorUtil.goStoreBaseInfoPage(context);
  369 +// },
  370 +// ),
  371 +
  372 +// MyDivider(
  373 +// double.infinity,
  374 +// ScreenUtil().setHeight(1),
  375 +// color: MyColours.color_f3f3f3,
  376 +// ),
  377 +// MyItem(
  378 +// title: "桌位管理",
  379 +// content: "",
  380 +// callback: () {
  381 +// NavigatorUtil.goMyTableManagerHomePage(context);
  382 +// },
  383 +// ),
  384 +
  385 +// MyDivider(
  386 +// double.infinity,
  387 +// ScreenUtil().setHeight(1),
  388 +// color: MyColours.color_f3f3f3,
  389 +// ),
  390 +// MyItem(
  391 +// title: "短信管理",
  392 +// content:
  393 +// myModel.smsInfo.isNotEmpty ? '剩余${myModel.smsInfo}条' : '',
  394 +// callback: () {
  395 +// // Utils.goMiniProgramZm(context, "setting/sms");
  396 +// NavigatorUtil.goSmsManagePage(context,
  397 +// smsInfoData: smsInfoData);
  398 +// },
  399 +// ),
  400 +// MyDivider(
  401 +// double.infinity,
  402 +// ScreenUtil().setHeight(1),
  403 +// color: MyColours.color_f3f3f3,
  404 +// ),
  405 +
  406 +// MyItem(
  407 +// title: "照片管理",
  408 +// content: "",
  409 +// callback: () async {
  410 +// // Map temp =
  411 +// await NavigatorUtil.goPhotoManagerSelectTablePage(
  412 +// context, "", DateTime.now().millisecondsSinceEpoch, "1",
  413 +// canChoose: true,
  414 +// object: null,
  415 +// fromPage: "tablePhoto",
  416 +// tid: '');
  417 +// // if (temp != null && temp['tid'] != '') {
  418 +// // // print(temp['tid']);
  419 +// // // print(temp['tname']);
  420 +// // // tname = temp['tname'];
  421 +// // // tid = temp['tid'];
  422 +// // // _getTablePhoto(context, temp['tid'], showLoading: true);
  423 +// // }
  424 +// },
  425 +// ),
  426 +
  427 +// MyDivider(
  428 +// double.infinity,
  429 +// ScreenUtil().setHeight(1),
  430 +// color: MyColours.color_f3f3f3,
  431 +// ),
  432 +
  433 +// MyItem(
  434 +// title: "员工管理",
  435 +// content: "",
  436 +// callback: () {
  437 +// NavigatorUtil.goPersonnelManagePage(context);
  438 +// },
  439 +// ),
  440 +
  441 +// MyDivider(
  442 +// double.infinity,
  443 +// ScreenUtil().setHeight(1),
  444 +// color: MyColours.color_f3f3f3,
  445 +// ),
  446 +// MyItem(
  447 +// title: "菜单管理",
  448 +// content: "",
  449 +// callback: () {
  450 +// NavigatorUtil.goMenuManagePage(context);
  451 +// },
  452 +// ),
  453 +// MyDivider(
  454 +// double.infinity,
  455 +// ScreenUtil().setHeight(1),
  456 +// color: MyColours.color_f3f3f3,
  457 +// ),
  458 +
  459 +// MyItem(
  460 +// title: "包间类型",
  461 +// content: "",
  462 +// callback: () {
  463 +// NavigatorUtil.goRoomTypeManagePage(context);
  464 +// },
  465 +// ),
  466 +// MyDivider(
  467 +// double.infinity,
  468 +// ScreenUtil().setHeight(1),
  469 +// color: MyColours.color_f3f3f3,
  470 +// ),
  471 +// MyItem(
  472 +// title: "包间类型置满管理",
  473 +// content: "",
  474 +// callback: () {
  475 +// // Utils.goMiniProgramZm(context, "roomtype/roomtype");
  476 +// NavigatorUtil.goStoreTypeFillManagePage(context);
  477 +// },
  478 +// ),
  479 +// MyDivider(
  480 +// double.infinity,
  481 +// ScreenUtil().setHeight(1),
  482 +// color: MyColours.color_f3f3f3,
  483 +// ),
  484 +// MyItem(
  485 +// title: "可订时段管理",
  486 +// content: "",
  487 +// callback: () {
  488 +// NavigatorUtil.goBookTimeSetPage(context);
  489 +// },
  490 +// ),
  491 +// MyDivider(
  492 +// double.infinity,
  493 +// ScreenUtil().setHeight(1),
  494 +// color: MyColours.color_f3f3f3,
  495 +// ),
  496 +// MyItem(
  497 +// title: "接单时间管理",
  498 +// content: "",
  499 +// callback: () {
  500 +// NavigatorUtil.goReceiveOrdersTimeSetPage(context);
  501 +// },
  502 +// ),
  503 +// MyDivider(
  504 +// double.infinity,
  505 +// ScreenUtil().setHeight(1),
  506 +// color: MyColours.color_f3f3f3,
  507 +// ),
  508 +// MyItem(
  509 +// title: "常用备注管理",
  510 +// content: "",
  511 +// callback: () {
  512 +// NavigatorUtil.goRemarkManagerPage(context);
  513 +// },
  514 +// ),
  515 +// VEmptyView(40),
  516 +// MyItem(
  517 +// title: "联系客服",
  518 +// content: "09:00~21:00",
  519 +// callback: () {
  520 +// Utils.goPhone("400-000-9690");
  521 +// },
  522 +// ),
  523 +// MyDivider(
  524 +// double.infinity,
  525 +// ScreenUtil().setHeight(1),
  526 +// color: MyColours.color_f3f3f3,
  527 +// ),
  528 +// MyItem(
  529 +// title: "帮助与反馈",
  530 +// content: "",
  531 +// callback: () {
  532 +// Utils.goHelp(context);
  533 +// },
  534 +// ),
  535 +// MyDivider(double.infinity, ScreenUtil().setHeight(1),
  536 +// color: MyColours.color_f3f3f3),
  537 +// GestureDetector(
  538 +// onTap: () {
  539 +// if (newVersion) {
  540 +// UpdateModelMy updateModel = new UpdateModelMy();
  541 +// updateModel.showUpdateDialog(context, _version);
  542 +// } else {
  543 +// Utils.showToast("当前已是最新版本");
  544 +// }
  545 +// },
  546 +// child: Container(
  547 +// width: double.infinity,
  548 +// height: ScreenUtil().setHeight(122),
  549 +// color: MyColours.color_ffffff,
  550 +// padding: EdgeInsets.symmetric(
  551 +// horizontal: ScreenUtil().setWidth(40)),
  552 +// alignment: Alignment.center,
  553 +// child: Row(
  554 +// children: <Widget>[
  555 +// Text(
  556 +// "版本更新",
  557 +// style: TextStyle(
  558 +// fontSize: ScreenUtil().setSp(30),
  559 +// color: MyColours.color_353535),
  560 +// ),
  561 +// Spacer(),
  562 +// newVersion
  563 +// ? Container(
  564 +// // width: ScreenUtil().setWidth(120),
  565 +// height: ScreenUtil().setWidth(34),
  566 +// decoration: BoxDecoration(
  567 +// color: MyColours.color_E14553,
  568 +// borderRadius: BorderRadius.all(
  569 +// Radius.circular(
  570 +// ScreenUtil().setWidth(6))),
  571 +// ),
  572 +// child: Padding(
  573 +// padding: EdgeInsets.symmetric(
  574 +// horizontal: ScreenUtil().setWidth(8)),
  575 +// child: Center(
  576 +// child: Text(
  577 +// "发现新版本",
  578 +// style: TextStyle(
  579 +// fontSize: ScreenUtil().setSp(24),
  580 +// color: MyColours.color_ffffff),
  581 +// ),
  582 +// )),
  583 +// )
  584 +// : Text(
  585 +// cur_version,
  586 +// style: TextStyle(
  587 +// fontSize: ScreenUtil().setSp(28),
  588 +// color: MyColours.color_666666),
  589 +// ),
  590 +// HEmptyView(20),
  591 +// Image.asset(
  592 +// "assets/arr_right_gray.png",
  593 +// width: ScreenUtil().setWidth(14),
  594 +// height: ScreenUtil().setWidth(22),
  595 +// )
  596 +// ],
  597 +// ),
  598 +// ),
  599 +// ),
  600 +// MyDivider(
  601 +// double.infinity,
  602 +// ScreenUtil().setHeight(1),
  603 +// color: MyColours.color_f3f3f3,
  604 +// ),
  605 +// MyItem(
  606 +// title: "隐私政策",
  607 +// content: "",
  608 +// callback: () {
  609 +// NavigatorUtil.goWebPage(context, '隐私政策', "zc", need: true);
  610 +// },
  611 +// ),
  612 +// MyDivider(
  613 +// double.infinity,
  614 +// ScreenUtil().setHeight(1),
  615 +// color: MyColours.color_f3f3f3,
  616 +// ),
  617 +// VEmptyView(40),
  618 +// Consumer<UserModel>(
  619 +// builder:
  620 +// (BuildContext context, UserModel model, Widget child) {
  621 +// return GestureDetector(
  622 +// onTap: () {
  623 +// model.showLoginOutDialog(context);
  624 +// },
  625 +// child: Container(
  626 +// height: ScreenUtil().setHeight(122),
  627 +// color: MyColours.color_ffffff,
  628 +// child: Center(
  629 +// child: Row(
  630 +// mainAxisSize: MainAxisSize.min,
  631 +// crossAxisAlignment: CrossAxisAlignment.center,
  632 +// children: <Widget>[
  633 +// Image.asset(
  634 +// "assets/icon_exist.png",
  635 +// width: ScreenUtil().setWidth(30),
  636 +// height: ScreenUtil().setWidth(30),
  637 +// ),
  638 +// HEmptyView(18),
  639 +// Text("退出登录",
  640 +// style: TextStyle(
  641 +// color: MyColours.color_199095,
  642 +// fontSize: ScreenUtil().setSp(34),
  643 +// ))
  644 +// ],
  645 +// ),
  646 +// ),
  647 +// ),
  648 +// );
  649 +// },
  650 +// )
  651 +// ],
  652 +// )));
  653 +// })),
  654 +// );
  655 +// }
  656 +// }
@@ -67,6 +67,7 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { @@ -67,6 +67,7 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> {
67 _uploadImageProvider.mentou.process = 0.01; 67 _uploadImageProvider.mentou.process = 0.01;
68 _uploadImageProvider.mentou.qiniuUrl = ''; 68 _uploadImageProvider.mentou.qiniuUrl = '';
69 _uploadImageProvider.imgSizeMenTou = 64; 69 _uploadImageProvider.imgSizeMenTou = 64;
  70 + // _uploadImageProvider.mentou.file = null;
70 _getQiniuInfo(); 71 _getQiniuInfo();
71 _getStoreBaseinfo(); 72 _getStoreBaseinfo();
72 }); 73 });
@@ -110,8 +111,8 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { @@ -110,8 +111,8 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> {
110 111
111 params['name'] = _nameController.text; 112 params['name'] = _nameController.text;
112 113
113 - if (_uploadImageProvider.mentou.file != null &&  
114 - _uploadImageProvider.mentou.file != '') { 114 + if (_uploadImageProvider.mentou.path != null &&
  115 + _uploadImageProvider.mentou.path != '') {
115 params['image'] = 116 params['image'] =
116 await MultipartFile.fromFile(_uploadImageProvider.mentou.path); 117 await MultipartFile.fromFile(_uploadImageProvider.mentou.path);
117 } 118 }
@@ -142,7 +143,12 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { @@ -142,7 +143,12 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> {
142 //修改成功 143 //修改成功
143 Utils.showToast('保存成功'); 144 Utils.showToast('保存成功');
144 EventBus().emit('changeStatusColor'); 145 EventBus().emit('changeStatusColor');
145 - Navigator.pop(context); 146 + Navigator.pop(
  147 + context,
  148 + _uploadImageProvider.mentou.qiniuUrl != null &&
  149 + _uploadImageProvider.mentou.qiniuUrl != ''
  150 + ? {'image': _uploadImageProvider.mentou.qiniuUrl}
  151 + : {'image': ''});
146 } else { 152 } else {
147 // Utils.showToast('保存失败'); 153 // Utils.showToast('保存失败');
148 } 154 }
@@ -269,8 +275,8 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { @@ -269,8 +275,8 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> {
269 _uploadImageProvider.mentou.qiniuUrl = null; 275 _uploadImageProvider.mentou.qiniuUrl = null;
270 _uploadImageProvider.mentou.file = File(pickedFile.path); 276 _uploadImageProvider.mentou.file = File(pickedFile.path);
271 _uploadImageProvider.mentou.path = pickedFile.path; 277 _uploadImageProvider.mentou.path = pickedFile.path;
272 - // UploadImageUtil().startUploadOnly(  
273 - // context, File(pickedFile.path), 2, true, _uploadImageProvider); 278 + UploadImageUtil().startUploadOnly(
  279 + context, File(pickedFile.path), 2, true, _uploadImageProvider);
274 } 280 }
275 } 281 }
276 282
1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
2 2
3 class MyColours { 3 class MyColours {
  4 + static const Color color_F8F9FD = Color(0xffF8F9FD);
4 static const Color color_5F7292 = Color(0xff5F7292); 5 static const Color color_5F7292 = Color(0xff5F7292);
5 static const Color color_F2995F = Color(0xffF2995F); 6 static const Color color_F2995F = Color(0xffF2995F);
6 static const Color color_F78D94 = Color(0xffF78D94); 7 static const Color color_F78D94 = Color(0xffF78D94);