Commit 622d2b788604e17b017232569fa17ab29c653593

Authored by wdn127929
1 parent 0f83db29

个人资料页面部分

@@ -198,7 +198,7 @@ class _CreateStorePageState extends State<CreateStorePage> { @@ -198,7 +198,7 @@ class _CreateStorePageState extends State<CreateStorePage> {
198 } 198 }
199 }); 199 });
200 if (pickedFile != null) { 200 if (pickedFile != null) {
201 - model.imgSizeTouxiang = 64; 201 + model.imgSizeTouxiang = 84;
202 model.touxiang.qiniuUrl = null; 202 model.touxiang.qiniuUrl = null;
203 UploadImageUtil().startUpload(context, File(pickedFile.path), 203 UploadImageUtil().startUpload(context, File(pickedFile.path),
204 title == '头像' ? 0 : 1, true, model, UploadType.StoreFrontUploadType); 204 title == '头像' ? 0 : 1, true, model, UploadType.StoreFrontUploadType);
@@ -11,6 +11,7 @@ import 'package:one_key/models/check_seller_acc_model.dart'; @@ -11,6 +11,7 @@ import 'package:one_key/models/check_seller_acc_model.dart';
11 import 'package:one_key/models/user.dart'; 11 import 'package:one_key/models/user.dart';
12 import 'package:one_key/pages/create_store/create_store.dart'; 12 import 'package:one_key/pages/create_store/create_store.dart';
13 import 'package:one_key/pages/login/if_need_create_store_item.dart'; 13 import 'package:one_key/pages/login/if_need_create_store_item.dart';
  14 +import 'package:one_key/provider/base_info_provider.dart';
14 import 'package:one_key/provider/create_store_model.dart'; 15 import 'package:one_key/provider/create_store_model.dart';
15 import 'package:one_key/provider/other_login_provider.dart'; 16 import 'package:one_key/provider/other_login_provider.dart';
16 import 'package:one_key/provider/user_model.dart'; 17 import 'package:one_key/provider/user_model.dart';
@@ -39,6 +40,9 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> @@ -39,6 +40,9 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore>
39 with WidgetsBindingObserver { 40 with WidgetsBindingObserver {
40 ScrollController _controller = ScrollController(); 41 ScrollController _controller = ScrollController();
41 OtherLoginProvider otherLoginProvider; 42 OtherLoginProvider otherLoginProvider;
  43 + BaseIndoProvider _baseIndoProvider;
  44 + String phone = ''; //客户经理个人资料电话
  45 + String name = ''; //客户经理个人资料姓名
42 46
43 @override 47 @override
44 void initState() { 48 void initState() {
@@ -46,6 +50,7 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> @@ -46,6 +50,7 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore>
46 WidgetsBinding.instance.addObserver(this); 50 WidgetsBinding.instance.addObserver(this);
47 WidgetsBinding.instance.addPostFrameCallback((_) { 51 WidgetsBinding.instance.addPostFrameCallback((_) {
48 _checkSellerAcc(); 52 _checkSellerAcc();
  53 + _getCustomerActivityBaseinfo();
49 }); 54 });
50 bus.on("refresh_store_list", (arg) { 55 bus.on("refresh_store_list", (arg) {
51 _checkSellerAcc(); 56 _checkSellerAcc();
@@ -82,6 +87,23 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> @@ -82,6 +87,23 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore>
82 } 87 }
83 } 88 }
84 89
  90 + _getCustomerActivityBaseinfo() async {
  91 + Map<String, String> params = {
  92 + 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
  93 + "uid": Provider.of<UserModel>(context, listen: false).user.openid,
  94 + };
  95 + bool success = await _baseIndoProvider
  96 + .getCustomerActivityBaseinfo(context, params, isShowLoading: false);
  97 + if (success) {
  98 + name = _baseIndoProvider.baseInfoSunModel.name != null
  99 + ? _baseIndoProvider.baseInfoSunModel.name
  100 + : '';
  101 + phone = _baseIndoProvider.baseInfoSunModel.phone != null
  102 + ? _baseIndoProvider.baseInfoSunModel.phone
  103 + : '';
  104 + } else {}
  105 + }
  106 +
85 ///获取是否有店 107 ///获取是否有店
86 _checkSellerAcc({showLoading = false}) async { 108 _checkSellerAcc({showLoading = false}) async {
87 CreateStoreModel createStoreModel = 109 CreateStoreModel createStoreModel =
@@ -95,6 +117,17 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> @@ -95,6 +117,17 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore>
95 showLoading: showLoading); 117 showLoading: showLoading);
96 } 118 }
97 119
  120 + ///点击某个店铺
  121 + _clickStore(context, CheckSellerAccSunModel sunModel) {
  122 + //判断进入个人信息还是直接进入主页
  123 + if (name == '' || phone == '') {
  124 + //姓名或者电话有一个为空时,进入个人资料填写页面
  125 + NavigatorUtil.goBaseInfoPage(context);
  126 + } else {
  127 + _loginStore(context, sunModel);
  128 + }
  129 + }
  130 +
98 ///进入某个店铺 131 ///进入某个店铺
99 _loginStore(context, CheckSellerAccSunModel sunModel) { 132 _loginStore(context, CheckSellerAccSunModel sunModel) {
100 UserModel userModel = Provider.of<UserModel>(context, listen: false); 133 UserModel userModel = Provider.of<UserModel>(context, listen: false);
@@ -126,6 +159,7 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> @@ -126,6 +159,7 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore>
126 @override 159 @override
127 Widget build(BuildContext context) { 160 Widget build(BuildContext context) {
128 otherLoginProvider = Provider.of<OtherLoginProvider>(context, listen: true); 161 otherLoginProvider = Provider.of<OtherLoginProvider>(context, listen: true);
  162 + _baseIndoProvider = Provider.of<BaseIndoProvider>(context, listen: true);
129 return WillPopScope( 163 return WillPopScope(
130 onWillPop: () async { 164 onWillPop: () async {
131 if (widget.changeStatus) { 165 if (widget.changeStatus) {
@@ -310,21 +344,21 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> @@ -310,21 +344,21 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore>
310 return InkWell( 344 return InkWell(
311 onTap: () async { 345 onTap: () async {
312 if (widget.changeStatus) { 346 if (widget.changeStatus) {
313 - UserModel userModel =  
314 - Provider.of<UserModel>(context,  
315 - listen: false);  
316 - bool success = await userModel  
317 - .loginOutOnly(context, {  
318 - "seller_code":  
319 - userModel.user.sellercode,  
320 - "account": userModel.user.account  
321 - });  
322 - if (success) {  
323 - _loginStore(  
324 - context, model.sellerList[index]);  
325 - } 347 + UserModel userModel =
  348 + Provider.of<UserModel>(context,
  349 + listen: false);
  350 + bool success = await userModel
  351 + .loginOutOnly(context, {
  352 + "seller_code":
  353 + userModel.user.sellercode,
  354 + "account": userModel.user.account
  355 + });
  356 + if (success) {
  357 + _clickStore(
  358 + context, model.sellerList[index]);
  359 + }
326 } else { 360 } else {
327 - _loginStore( 361 + _clickStore(
328 context, model.sellerList[index]); 362 context, model.sellerList[index]);
329 } 363 }
330 }, 364 },
@@ -169,6 +169,21 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { @@ -169,6 +169,21 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver {
169 }); 169 });
170 } 170 }
171 171
  172 + //获取用户信息
  173 + _getUserInfo(String access_token, String openid) async {
  174 + Response response = await DioUtil.getInstance().getDio().get(
  175 + "https://api.weixin.qq.com/sns/userinfo?access_token=$access_token&openid=$openid");
  176 + LogUtil.v('userinfo:' + response.data);
  177 + Map<String, dynamic> responseData = json.decode(response.data.toString());
  178 + if (responseData["errcode"] != null) {
  179 + App.sp.setString("headImg", '');
  180 +// Utils.showToast(responseData["errmsg"]??"登录,请稍后重试");
  181 + } else {
  182 + // App.sp.setString("nickName", responseData["nickname"]);
  183 + App.sp.setString("headImg", responseData["headimgurl"]);
  184 + }
  185 + }
  186 +
172 ///获取微信登录access_token 187 ///获取微信登录access_token
173 _getAccessToken(String code) async { 188 _getAccessToken(String code) async {
174 Response response = await DioUtil.getInstance().getDio().get( 189 Response response = await DioUtil.getInstance().getDio().get(
@@ -181,6 +196,8 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { @@ -181,6 +196,8 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver {
181 } else { 196 } else {
182 App.sp.setString("openid", responseData["openid"]); 197 App.sp.setString("openid", responseData["openid"]);
183 App.sp.setString("unionid", responseData["unionid"]); 198 App.sp.setString("unionid", responseData["unionid"]);
  199 + await _getUserInfo(
  200 + responseData["access_token"], responseData["openid"]); //获取用户信息
184 201
185 //跳转至手机号绑定页面 202 //跳转至手机号绑定页面
186 //判断是否已经绑定手机号码 ******调用接口******* 203 //判断是否已经绑定手机号码 ******调用接口*******
1 import 'dart:io'; 1 import 'dart:io';
  2 +import 'dart:ui';
2 3
3 import 'package:cached_network_image/cached_network_image.dart'; 4 import 'package:cached_network_image/cached_network_image.dart';
4 import 'package:flutter/material.dart'; 5 import 'package:flutter/material.dart';
@@ -54,7 +55,7 @@ class _BaseInfoPageState extends State<BaseInfoPage> { @@ -54,7 +55,7 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
54 _uploadImageProvider.touxiang.qiniuUrl = ''; 55 _uploadImageProvider.touxiang.qiniuUrl = '';
55 _uploadImageProvider.erweima.process = 0.01; 56 _uploadImageProvider.erweima.process = 0.01;
56 _uploadImageProvider.erweima.qiniuUrl = ''; 57 _uploadImageProvider.erweima.qiniuUrl = '';
57 - _uploadImageProvider.imgSizeTouxiang = 64; 58 + _uploadImageProvider.imgSizeTouxiang = 84;
58 _uploadImageProvider.imgSizeErweima = 22; 59 _uploadImageProvider.imgSizeErweima = 22;
59 _getQiniuInfo(); 60 _getQiniuInfo();
60 _getCustomerActivityBaseinfo(); 61 _getCustomerActivityBaseinfo();
@@ -139,28 +140,24 @@ class _BaseInfoPageState extends State<BaseInfoPage> { @@ -139,28 +140,24 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
139 } 140 }
140 141
141 ///输入框 142 ///输入框
142 - Widget _textfield(String title, String hintText, 143 + Widget _textfield(String image, String hintText,
143 TextEditingController editingController, FocusNode focusNode) { 144 TextEditingController editingController, FocusNode focusNode) {
144 return Container( 145 return Container(
145 child: Row( 146 child: Row(
146 mainAxisAlignment: MainAxisAlignment.spaceBetween, 147 mainAxisAlignment: MainAxisAlignment.spaceBetween,
  148 + crossAxisAlignment: CrossAxisAlignment.center,
147 children: [ 149 children: [
148 Container( 150 Container(
149 - child: Text(  
150 - title,  
151 - style: TextStyle(  
152 - color: MyColours.color_333333,  
153 - fontWeight: FontWeight.bold,  
154 - fontSize: ScreenUtil().setSp(34)),  
155 - ),  
156 - ),  
157 - HEmptyView(80),  
158 - Container(  
159 - width: ScreenUtil().setWidth(231 * 2), 151 + child: Image.asset(
  152 + Utils.getImgPath(image),
  153 + width: ScreenUtil().setWidth(34 * 2),
  154 + )),
  155 + HEmptyView(24),
  156 + Expanded(
160 child: TextField( 157 child: TextField(
161 controller: editingController, 158 controller: editingController,
162 - textAlign: TextAlign.right,  
163 - textAlignVertical: TextAlignVertical.bottom, 159 + // textAlign: TextAlign.right,
  160 + // textAlignVertical: TextAlignVertical.bottom,
164 maxLines: 1, 161 maxLines: 1,
165 // //光标颜色 162 // //光标颜色
166 // cursorColor: 163 // cursorColor:
@@ -190,6 +187,17 @@ class _BaseInfoPageState extends State<BaseInfoPage> { @@ -190,6 +187,17 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
190 }, 187 },
191 keyboardType: TextInputType.text, 188 keyboardType: TextInputType.text,
192 ), 189 ),
  190 + ),
  191 + Text('修改',
  192 + style: TextStyle(
  193 + color: MyColours.color_BFC4D4,
  194 + fontSize: ScreenUtil().setSp(24),
  195 + )),
  196 + HEmptyView(20),
  197 + Image.asset(
  198 + Utils.getImgPath('arrow_right_new'),
  199 + // width: ScreenUtil().setWidth(16),
  200 + height: ScreenUtil().setWidth(34),
193 ) 201 )
194 ], 202 ],
195 ), 203 ),
@@ -242,10 +250,10 @@ class _BaseInfoPageState extends State<BaseInfoPage> { @@ -242,10 +250,10 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
242 }); 250 });
243 if (pickedFile != null) { 251 if (pickedFile != null) {
244 if (title == '头像') { 252 if (title == '头像') {
245 - _uploadImageProvider.imgSizeTouxiang = 64; 253 + _uploadImageProvider.imgSizeTouxiang = 84;
246 _uploadImageProvider.touxiang.qiniuUrl = null; 254 _uploadImageProvider.touxiang.qiniuUrl = null;
247 } else { 255 } else {
248 - _uploadImageProvider.imgSizeErweima = 64; 256 + _uploadImageProvider.imgSizeErweima = 76;
249 _uploadImageProvider.erweima.qiniuUrl = null; 257 _uploadImageProvider.erweima.qiniuUrl = null;
250 } 258 }
251 UploadImageUtil().startUploadOnly(context, File(pickedFile.path), 259 UploadImageUtil().startUploadOnly(context, File(pickedFile.path),
@@ -258,111 +266,91 @@ class _BaseInfoPageState extends State<BaseInfoPage> { @@ -258,111 +266,91 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
258 String title, UploadImgModel model, double imgSize, double radius) { 266 String title, UploadImgModel model, double imgSize, double radius) {
259 return InkWell( 267 return InkWell(
260 onTap: () { 268 onTap: () {
261 - Utils.getPickPermission(context, () {  
262 - _getFromPictureOrCamera(title, model, ImageSource.gallery);  
263 - }, Platform.isAndroid ? Permission.storage : Permission.photos);  
264 - },  
265 - child: Container(  
266 - margin: EdgeInsets.only(  
267 - top: ScreenUtil().setWidth(40),  
268 - left: ScreenUtil().setWidth(40),  
269 - right: ScreenUtil().setWidth(40)),  
270 - height: ScreenUtil().setWidth(imgSize * 2),  
271 - child: Row(  
272 - mainAxisAlignment: MainAxisAlignment.spaceBetween,  
273 - children: [  
274 - Text(  
275 - title,  
276 - textAlign: TextAlign.left,  
277 - style: TextStyle(  
278 - color: MyColours.color_333333,  
279 - fontWeight: FontWeight.bold,  
280 - fontSize: ScreenUtil().setSp(34)),  
281 - ),  
282 - Spacer(),  
283 - Stack(  
284 - children: [  
285 - InkWell(  
286 - onTap: () {  
287 - double process;  
288 - String qiniuUrl;  
289 - List<String> tempList = [];  
290 - if (title == '头像') {  
291 - process = _uploadImageProvider.touxiang.process;  
292 - qiniuUrl = _uploadImageProvider.touxiang.qiniuUrl;  
293 - } else {  
294 - process = _uploadImageProvider.erweima.process;  
295 - qiniuUrl = _uploadImageProvider.erweima.qiniuUrl;  
296 - } 269 + double process;
  270 + String qiniuUrl;
  271 + List<String> tempList = [];
  272 + if (title == '头像') {
  273 + process = _uploadImageProvider.touxiang.process;
  274 + qiniuUrl = _uploadImageProvider.touxiang.qiniuUrl;
  275 + } else {
  276 + process = _uploadImageProvider.erweima.process;
  277 + qiniuUrl = _uploadImageProvider.erweima.qiniuUrl;
  278 + }
297 279
298 - if (qiniuUrl != null && qiniuUrl != '') {  
299 - tempList.add(qiniuUrl); 280 + if (qiniuUrl != null && qiniuUrl != '') {
  281 + tempList.add(qiniuUrl);
300 282
301 - ///没有上传完成的不可以点击  
302 - _showPhotoView(context, 0, tempList);  
303 - } else {  
304 - Utils.getPickPermission(context, () {  
305 - _getFromPictureOrCamera(  
306 - title, model, ImageSource.gallery);  
307 - },  
308 - Platform.isAndroid  
309 - ? Permission.storage  
310 - : Permission.photos);  
311 - }  
312 - },  
313 - child: ClipRRect(  
314 - borderRadius:  
315 - BorderRadius.circular(ScreenUtil().setWidth(radius)),  
316 - child: model.file == null  
317 - ? model.qiniuUrl != null && model.qiniuUrl != ''  
318 - ? Image.network(  
319 - model.qiniuUrl,  
320 - fit: BoxFit.cover,  
321 - width: ScreenUtil().setWidth(imgSize * 2),  
322 - height: ScreenUtil().setWidth(imgSize * 2),  
323 - )  
324 - : Image.asset(  
325 - Utils.getImgPath(  
326 - title == '头像' ? 'touxiang' : 'erweima'),  
327 - fit: BoxFit.cover,  
328 - width: ScreenUtil().setWidth(imgSize * 2),  
329 - height: ScreenUtil().setWidth(imgSize * 2),  
330 - )  
331 - : Image.file(  
332 - model.file,  
333 - fit: BoxFit.cover,  
334 - width: ScreenUtil().setWidth(imgSize * 2),  
335 - height: ScreenUtil().setWidth(imgSize * 2),  
336 - ),  
337 - ),  
338 - ),  
339 - (model.file != null) &&  
340 - model.process != 1 &&  
341 - model.process != 0.01  
342 - ? Container(  
343 - width: ScreenUtil().setWidth(imgSize * 2),  
344 - height: ScreenUtil().setWidth(imgSize * 2),  
345 - decoration: BoxDecoration(  
346 - borderRadius: BorderRadius.circular(radius),  
347 - color: Color.fromRGBO(0, 0, 0, 0.6)),  
348 - child: Center(  
349 - child: Text('上传中',  
350 - style:  
351 - TextStyle(color: MyColours.color_999999)),  
352 - ),  
353 - )  
354 - : Container(),  
355 - ], 283 + ///没有上传完成的不可以点击
  284 + _showPhotoView(context, 0, tempList);
  285 + } else {
  286 + Utils.getPickPermission(context, () {
  287 + _getFromPictureOrCamera(title, model, ImageSource.gallery);
  288 + }, Platform.isAndroid ? Permission.storage : Permission.photos);
  289 + }
  290 + },
  291 + child: Stack(clipBehavior: Clip.none, children: [
  292 + Container(
  293 + width: ScreenUtil().setWidth(imgSize * 2),
  294 + height: ScreenUtil().setWidth(imgSize * 2),
  295 + margin: EdgeInsets.only(
  296 + right: ScreenUtil().setWidth(14),
356 ), 297 ),
357 - HEmptyView(30),  
358 - Image.asset(  
359 - "assets/arr_right_gray.png",  
360 - width: ScreenUtil().setWidth(14),  
361 - height: ScreenUtil().setWidth(22),  
362 - )  
363 - ],  
364 - ),  
365 - )); 298 + child: ClipRRect(
  299 + borderRadius:
  300 + BorderRadius.circular(ScreenUtil().setWidth(radius)),
  301 + child: model.file == null
  302 + ? model.qiniuUrl != null && model.qiniuUrl != ''
  303 + ? Image.network(
  304 + model.qiniuUrl,
  305 + fit: BoxFit.cover,
  306 + width: ScreenUtil().setWidth(imgSize * 2),
  307 + height: ScreenUtil().setWidth(imgSize * 2),
  308 + )
  309 + : Image.asset(
  310 + Utils.getImgPath(
  311 + title == '头像' ? 'touxiang' : 'erweima'),
  312 + fit: BoxFit.cover,
  313 + width: ScreenUtil().setWidth(imgSize * 2),
  314 + height: ScreenUtil().setWidth(imgSize * 2),
  315 + )
  316 + : Image.file(
  317 + model.file,
  318 + fit: BoxFit.cover,
  319 + width: ScreenUtil().setWidth(imgSize * 2),
  320 + height: ScreenUtil().setWidth(imgSize * 2),
  321 + ),
  322 + )),
  323 + // (model.file != null) && model.process != 1 && model.process != 0.01
  324 + // ? Container(
  325 + // width: ScreenUtil().setWidth(imgSize * 2),
  326 + // height: ScreenUtil().setWidth(imgSize * 2),
  327 + // decoration: BoxDecoration(
  328 + // borderRadius: BorderRadius.circular(radius),
  329 + // color: Color.fromRGBO(0, 0, 0, 0.6)),
  330 + // child: Center(
  331 + // child: Text('上传中',
  332 + // style: TextStyle(color: MyColours.color_999999)),
  333 + // ),
  334 + // )
  335 + // : Container(),
  336 + Positioned(
  337 + right: ScreenUtil().setWidth(-14),
  338 + top: ScreenUtil().setWidth(56),
  339 + child: InkWell(
  340 + onTap: () {
  341 + Utils.getPickPermission(context, () {
  342 + _getFromPictureOrCamera(
  343 + title, model, ImageSource.gallery);
  344 + },
  345 + Platform.isAndroid
  346 + ? Permission.storage
  347 + : Permission.photos);
  348 + },
  349 + child: Image.asset(
  350 + Utils.getImgPath('base_tx'),
  351 + width: ScreenUtil().setWidth(28 * 2),
  352 + )))
  353 + ]));
366 } 354 }
367 355
368 @override 356 @override
@@ -390,106 +378,104 @@ class _BaseInfoPageState extends State<BaseInfoPage> { @@ -390,106 +378,104 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
390 }, 378 },
391 child: Container( 379 child: Container(
392 color: MyColours.color_ffffff, 380 color: MyColours.color_ffffff,
393 - child: Column(children: [  
394 - Expanded(  
395 - child: SingleChildScrollView(  
396 - controller: _scrollController,  
397 - physics: BouncingScrollPhysics(),  
398 - child: Column(  
399 - children: [  
400 - _imageWidget(  
401 - '头像',  
402 - _uploadImageProvider.touxiang,  
403 - _uploadImageProvider.imgSizeTouxiang,  
404 - 64),  
405 - VEmptyView(30),  
406 - Container(  
407 - height: ScreenUtil().setWidth(2),  
408 - color: MyColours.color_efefef,  
409 - margin: EdgeInsets.only(  
410 - left: ScreenUtil().setWidth(108 * 2),  
411 - right: ScreenUtil().setWidth(40)),  
412 - ),  
413 - VEmptyView(10),  
414 - Padding(  
415 - padding: EdgeInsets.symmetric(  
416 - horizontal: ScreenUtil().setWidth(40),  
417 - ),  
418 - child: _textfield('姓名', '请填写您的姓名',  
419 - _nameController, _nameFocusNode)),  
420 - VEmptyView(10),  
421 - Container(  
422 - height: ScreenUtil().setWidth(2),  
423 - color: MyColours.color_efefef,  
424 - margin: EdgeInsets.only(  
425 - left: ScreenUtil().setWidth(108 * 2),  
426 - right: ScreenUtil().setWidth(40)),  
427 - ),  
428 - VEmptyView(10),  
429 - Padding(  
430 - padding: EdgeInsets.symmetric(  
431 - horizontal: ScreenUtil().setWidth(40),  
432 - ),  
433 - child: _textfield('电话', '请填写您的联系电话',  
434 - _phoneController, _phoneFocusNode)),  
435 - VEmptyView(10),  
436 - Container(  
437 - height: ScreenUtil().setWidth(2),  
438 - color: MyColours.color_efefef,  
439 - margin: EdgeInsets.only(  
440 - left: ScreenUtil().setWidth(108 * 2),  
441 - right: ScreenUtil().setWidth(40)),  
442 - ),  
443 - VEmptyView(10),  
444 - Padding(  
445 - padding: EdgeInsets.symmetric(  
446 - horizontal: ScreenUtil().setWidth(40),  
447 - ),  
448 - child: _textfield(  
449 - '职位',  
450 - '请填写您在餐厅中担任的职位',  
451 - _positionController,  
452 - _positionFocusNode)),  
453 - VEmptyView(10),  
454 - Container(  
455 - height: ScreenUtil().setWidth(2),  
456 - color: MyColours.color_efefef,  
457 - margin: EdgeInsets.only(  
458 - left: ScreenUtil().setWidth(108 * 2),  
459 - right: ScreenUtil().setWidth(40)),  
460 - ),  
461 - VEmptyView(40),  
462 - // _imageWidget('微信二维码', _uploadImageProvider.erweima,  
463 - // _uploadImageProvider.imgSizeErweima, 0),  
464 - Padding(  
465 - padding: EdgeInsets.symmetric(  
466 - horizontal: ScreenUtil().setWidth(40),  
467 - ),  
468 - child: _textfield('微信号', '请填写您的微信号',  
469 - _wechatController, _wechatFocusNode)),  
470 - VEmptyView(30),  
471 - ],  
472 - )),  
473 - ),  
474 - VEmptyView(20),  
475 - Padding(  
476 - padding: EdgeInsets.fromLTRB(  
477 - ScreenUtil().setWidth(40),  
478 - 0,  
479 - ScreenUtil().setWidth(40),  
480 - ScreenUtil().setWidth(40)),  
481 - child: RoundButton(  
482 - onPressed: () {  
483 - //接口  
484 - _setCustomerActivityBaseinfo();  
485 - },  
486 - text: '保存',  
487 - fontSize: 34,  
488 - isBold: false,  
489 - height: ScreenUtil().setWidth(80),  
490 - width: double.infinity,  
491 - radius: ScreenUtil().setWidth(10),  
492 - ))  
493 - ]))))); 381 + child: Column(
  382 + // crossAxisAlignment: CrossAxisAlignment.center,
  383 + crossAxisAlignment: CrossAxisAlignment.center,
  384 + mainAxisAlignment: MainAxisAlignment.center,
  385 + children: [
  386 + Expanded(
  387 + child: SingleChildScrollView(
  388 + controller: _scrollController,
  389 + physics: BouncingScrollPhysics(),
  390 + child: Column(
  391 + crossAxisAlignment: CrossAxisAlignment.center,
  392 + mainAxisAlignment: MainAxisAlignment.center,
  393 + children: [
  394 + VEmptyView(66),
  395 + _imageWidget(
  396 + '头像',
  397 + _uploadImageProvider.touxiang,
  398 + _uploadImageProvider.imgSizeTouxiang,
  399 + 76),
  400 + VEmptyView(26),
  401 + Text('未填写',
  402 + style: TextStyle(
  403 + fontSize: ScreenUtil().setWidth(50),
  404 + color: true
  405 + ? MyColours.color_27262B
  406 + : MyColours.color_BFC4D4)),
  407 + VEmptyView(8),
  408 + Text('18739383883',
  409 + style: TextStyle(
  410 + fontSize: ScreenUtil().setWidth(30),
  411 + color: MyColours.color_BFC4D4)),
  412 + VEmptyView(80),
  413 +
  414 + Padding(
  415 + padding: EdgeInsets.symmetric(
  416 + horizontal: ScreenUtil().setWidth(48),
  417 + ),
  418 + child: _textfield(
  419 + 'base_name',
  420 + '您希望顾客看到的名字',
  421 + _nameController,
  422 + _nameFocusNode)),
  423 + VEmptyView(26),
  424 +
  425 + Padding(
  426 + padding: EdgeInsets.symmetric(
  427 + horizontal: ScreenUtil().setWidth(40),
  428 + ),
  429 + child: _textfield(
  430 + 'base_phone',
  431 + '顾客联系您的手机号',
  432 + _phoneController,
  433 + _phoneFocusNode)),
  434 + VEmptyView(26),
  435 + Padding(
  436 + padding: EdgeInsets.symmetric(
  437 + horizontal: ScreenUtil().setWidth(40),
  438 + ),
  439 + child: _textfield(
  440 + 'base_position',
  441 + '告知顾客您的职位',
  442 + _positionController,
  443 + _positionFocusNode)),
  444 + VEmptyView(26),
  445 + // _imageWidget('微信二维码', _uploadImageProvider.erweima,
  446 + // _uploadImageProvider.imgSizeErweima, 0),
  447 + Padding(
  448 + padding: EdgeInsets.symmetric(
  449 + horizontal: ScreenUtil().setWidth(40),
  450 + ),
  451 + child: _textfield(
  452 + 'base_wechat',
  453 + '微信号方便顾客加您微信',
  454 + _wechatController,
  455 + _wechatFocusNode)),
  456 + VEmptyView(30),
  457 + ],
  458 + )),
  459 + ),
  460 + VEmptyView(20),
  461 + Padding(
  462 + padding: EdgeInsets.fromLTRB(
  463 + ScreenUtil().setWidth(40),
  464 + 0,
  465 + ScreenUtil().setWidth(40),
  466 + ScreenUtil().setWidth(40)),
  467 + child: RoundButton(
  468 + onPressed: () {
  469 + //接口
  470 + _setCustomerActivityBaseinfo();
  471 + },
  472 + text: '保存',
  473 + fontSize: 34,
  474 + isBold: false,
  475 + height: ScreenUtil().setWidth(80),
  476 + width: double.infinity,
  477 + radius: ScreenUtil().setWidth(10),
  478 + ))
  479 + ])))));
494 } 480 }
495 } 481 }
  1 +// import 'dart:io';
  2 +
  3 +// import 'package:cached_network_image/cached_network_image.dart';
  4 +// import 'package:flutter/material.dart';
  5 +// import 'package:flutter_screenutil/screenutil.dart';
  6 +// import 'package:one_key/models/upload_img_model.dart';
  7 +// import 'package:one_key/models/user.dart';
  8 +// import 'package:one_key/pages/online_check/photo_view_wiget.dart';
  9 +// import 'package:one_key/pages/online_check/progress.dart';
  10 +// import 'package:one_key/provider/base_info_provider.dart';
  11 +// import 'package:one_key/provider/upload_img_provider.dart';
  12 +// import 'package:one_key/provider/user_model.dart';
  13 +// import 'package:one_key/res/colors.dart';
  14 +// import 'package:one_key/utils/event_bus.dart';
  15 +// import 'package:one_key/utils/upload_image_util.dart';
  16 +// import 'package:one_key/utils/utils.dart';
  17 +// import 'package:one_key/widgets/h_empty_view.dart';
  18 +// import 'package:one_key/widgets/round_button.dart';
  19 +// import 'package:one_key/widgets/system_app_bar.dart';
  20 +// import 'package:one_key/widgets/v_empty_view.dart';
  21 +// import 'package:image_picker/image_picker.dart';
  22 +// import 'package:permission_handler/permission_handler.dart';
  23 +// import 'package:provider/provider.dart';
  24 +
  25 +// class BaseInfoPage extends StatefulWidget {
  26 +// BaseInfoPage({Key key}) : super(key: key);
  27 +
  28 +// @override
  29 +// _BaseInfoPageState createState() => _BaseInfoPageState();
  30 +// }
  31 +
  32 +// class _BaseInfoPageState extends State<BaseInfoPage> {
  33 +// ScrollController _scrollController;
  34 +// TextEditingController _nameController = TextEditingController();
  35 +// TextEditingController _phoneController = TextEditingController();
  36 +// TextEditingController _positionController = TextEditingController();
  37 +// TextEditingController _wechatController = TextEditingController();
  38 +// FocusNode _nameFocusNode = FocusNode();
  39 +// FocusNode _phoneFocusNode = FocusNode();
  40 +// FocusNode _positionFocusNode = FocusNode();
  41 +// FocusNode _wechatFocusNode = FocusNode();
  42 +
  43 +// final picker = ImagePicker();
  44 +
  45 +// UploadImageProvider _uploadImageProvider;
  46 +// BaseIndoProvider _baseIndoProvider;
  47 +
  48 +// @override
  49 +// void initState() {
  50 +// super.initState();
  51 +// _scrollController = ScrollController();
  52 +// WidgetsBinding.instance.addPostFrameCallback((_) {
  53 +// _uploadImageProvider.touxiang.process = 0.01;
  54 +// _uploadImageProvider.touxiang.qiniuUrl = '';
  55 +// _uploadImageProvider.erweima.process = 0.01;
  56 +// _uploadImageProvider.erweima.qiniuUrl = '';
  57 +// _uploadImageProvider.imgSizeTouxiang = 64;
  58 +// _uploadImageProvider.imgSizeErweima = 22;
  59 +// _getQiniuInfo();
  60 +// _getCustomerActivityBaseinfo();
  61 +// });
  62 +// }
  63 +
  64 +// _getCustomerActivityBaseinfo() async {
  65 +// Map<String, String> params = {
  66 +// 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
  67 +// "uid": Provider.of<UserModel>(context, listen: false).user.openid,
  68 +// };
  69 +// bool success =
  70 +// await _baseIndoProvider.getCustomerActivityBaseinfo(context, params);
  71 +// if (success) {
  72 +// _nameController.text = _baseIndoProvider.baseInfoSunModel.name;
  73 +// _uploadImageProvider.touxiang.qiniuUrl =
  74 +// _baseIndoProvider.baseInfoSunModel.photo;
  75 +// _uploadImageProvider.erweima.qiniuUrl =
  76 +// _baseIndoProvider.baseInfoSunModel.qrcode;
  77 +// _phoneController.text = _baseIndoProvider.baseInfoSunModel.phone;
  78 +// _wechatController.text = _baseIndoProvider.baseInfoSunModel.wechat;
  79 +// _positionController.text = _baseIndoProvider.baseInfoSunModel.position;
  80 +// _uploadImageProvider.imgSizeErweima = 64;
  81 +// // setState(() {});
  82 +// _uploadImageProvider.notifyListeners();
  83 +// }
  84 +// }
  85 +
  86 +// ///获取七牛云token
  87 +// ///
  88 +// _getQiniuInfo() async {
  89 +// await _uploadImageProvider.getQiniuInfo(context, {});
  90 +// }
  91 +
  92 +// //客户经理添加/修改基本信息
  93 +// _setCustomerActivityBaseinfo() async {
  94 +// FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  95 +
  96 +// User user = Provider.of<UserModel>(context, listen: false).user;
  97 +// Map<String, String> params = {
  98 +// 'sellerid': user.sellerid,
  99 +// "uid": user.openid,
  100 +// "name": _nameController.text.trim().length == 0
  101 +// ? user.sellername
  102 +// : _nameController.text.trim(),
  103 +// "photo": _uploadImageProvider.touxiang.qiniuUrl.trim().length == 0
  104 +// ? 'http://nosqn.colorcun.com/yd_person.png'
  105 +// : _uploadImageProvider.touxiang.qiniuUrl,
  106 +// "position": _positionController.text.trim().length == 0
  107 +// ? '经理'
  108 +// : _positionController.text,
  109 +// };
  110 +// if (_phoneController.text.trim().length == 0) {
  111 +// if (user.userphone != null) {
  112 +// params['phone'] = user.userphone;
  113 +// }
  114 +// } else {
  115 +// params['phone'] = _phoneController.text.trim();
  116 +// }
  117 +// if (_wechatController.text.trim().length > 0) {
  118 +// params['wechat'] = _wechatController.text;
  119 +// }
  120 +// if (_uploadImageProvider.erweima.qiniuUrl != null &&
  121 +// _uploadImageProvider.erweima.qiniuUrl != '') {
  122 +// params['qrcode'] = _uploadImageProvider.erweima.qiniuUrl;
  123 +// }
  124 +// if (_baseIndoProvider.baseInfoSunModel != null) {
  125 +// params['id'] = _baseIndoProvider.baseInfoSunModel.id;
  126 +// }
  127 +// bool isSuccess =
  128 +// await _baseIndoProvider.setCustomerActivityBaseinfo(context, params);
  129 +// // _baseIndoProvider.baseInfoSunModel = null;
  130 +// if (isSuccess) {
  131 +// _uploadImageProvider.touxiang.file = null;
  132 +// _uploadImageProvider.erweima.file = null;
  133 +// //成功之后跳回前一个页面
  134 +// // bus.emit('refresh_coupon_list');
  135 +// Utils.showToast('保存成功');
  136 +// EventBus().emit('changeStatusColor');
  137 +// Navigator.pop(context, true);
  138 +// }
  139 +// }
  140 +
  141 +// ///输入框
  142 +// Widget _textfield(String title, String hintText,
  143 +// TextEditingController editingController, FocusNode focusNode) {
  144 +// return Container(
  145 +// child: Row(
  146 +// mainAxisAlignment: MainAxisAlignment.spaceBetween,
  147 +// children: [
  148 +// Container(
  149 +// child: Text(
  150 +// title,
  151 +// style: TextStyle(
  152 +// color: MyColours.color_333333,
  153 +// fontWeight: FontWeight.bold,
  154 +// fontSize: ScreenUtil().setSp(34)),
  155 +// ),
  156 +// ),
  157 +// HEmptyView(80),
  158 +// Container(
  159 +// width: ScreenUtil().setWidth(231 * 2),
  160 +// child: TextField(
  161 +// controller: editingController,
  162 +// textAlign: TextAlign.right,
  163 +// textAlignVertical: TextAlignVertical.bottom,
  164 +// maxLines: 1,
  165 +// // //光标颜色
  166 +// // cursorColor:
  167 +// // widget.isSelect ? Colors.white : MyColours.color_199095,
  168 +// //输入文本的样式
  169 +// style: TextStyle(
  170 +// fontSize: ScreenUtil().setSp(32),
  171 +// ),
  172 +// focusNode: focusNode,
  173 +// decoration: InputDecoration(
  174 +// border: OutlineInputBorder(borderSide: BorderSide.none),
  175 +// hintText: hintText,
  176 +// hintStyle: TextStyle(
  177 +// color: MyColours.color_999999,
  178 +// fontSize: ScreenUtil().setSp(32),
  179 +// ),
  180 +// enabledBorder: new UnderlineInputBorder(
  181 +// borderSide: BorderSide.none,
  182 +// ),
  183 +// focusedBorder: new UnderlineInputBorder(
  184 +// borderSide: BorderSide.none,
  185 +// ),
  186 +// ),
  187 +// onChanged: (value) {},
  188 +// onEditingComplete: () {
  189 +// FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  190 +// },
  191 +// keyboardType: TextInputType.text,
  192 +// ),
  193 +// )
  194 +// ],
  195 +// ),
  196 +// );
  197 +// }
  198 +
  199 +// //查看大图
  200 +// _showPhotoView(BuildContext context, int index, List imgs,
  201 +// {isShow = false, List dashName}) async {
  202 +// // if (imgs.length == 1 &&
  203 +// // imgs[0] ==
  204 +// // 'http://nosqn.colorcun.com/custom/lite-online/image/def-banner.png') {
  205 +// // imgs[0] = 'http://nosqn.colorcun.com/app/seller-hj-empty.png';
  206 +// // }
  207 +// Utils.setBarStatus(false, color: Colors.black);
  208 +// dynamic result = await showGeneralDialog(
  209 +// context: context,
  210 +// barrierDismissible: false,
  211 +// // barrierColor: Colors.red,
  212 +// barrierLabel:
  213 +// MaterialLocalizations.of(context).modalBarrierDismissLabel,
  214 +// transitionDuration: const Duration(milliseconds: 150),
  215 +// pageBuilder: (BuildContext context, Animation animation,
  216 +// Animation secondaryAnimation) {
  217 +// Widget child = Stack(
  218 +// children: <Widget>[
  219 +// PhotoPreview(
  220 +// initialIndex: index,
  221 +// photoList: imgs,
  222 +// isShow: isShow,
  223 +// dashName: dashName)
  224 +// ],
  225 +// );
  226 +// return child;
  227 +// });
  228 +// Utils.setBarStatus(true, color: Colors.white);
  229 +// }
  230 +
  231 +// ///#相机拍照,单图选择
  232 +// Future _getFromPictureOrCamera(
  233 +// String title, UploadImgModel imgModel, imageSource) async {
  234 +// final pickedFile = await picker.getImage(source: imageSource);
  235 +// setState(() {
  236 +// if (pickedFile != null) {
  237 +// imgModel.file = File(pickedFile.path);
  238 +// imgModel.process = 0.01;
  239 +// } else {
  240 +// print('No image selected.');
  241 +// }
  242 +// });
  243 +// if (pickedFile != null) {
  244 +// if (title == '头像') {
  245 +// _uploadImageProvider.imgSizeTouxiang = 64;
  246 +// _uploadImageProvider.touxiang.qiniuUrl = null;
  247 +// } else {
  248 +// _uploadImageProvider.imgSizeErweima = 64;
  249 +// _uploadImageProvider.erweima.qiniuUrl = null;
  250 +// }
  251 +// UploadImageUtil().startUploadOnly(context, File(pickedFile.path),
  252 +// title == '头像' ? 0 : 1, true, _uploadImageProvider);
  253 +// }
  254 +// }
  255 +
  256 +// ///图片 头像和二维码
  257 +// Widget _imageWidget(
  258 +// String title, UploadImgModel model, double imgSize, double radius) {
  259 +// return InkWell(
  260 +// onTap: () {
  261 +// Utils.getPickPermission(context, () {
  262 +// _getFromPictureOrCamera(title, model, ImageSource.gallery);
  263 +// }, Platform.isAndroid ? Permission.storage : Permission.photos);
  264 +// },
  265 +// child: Container(
  266 +// margin: EdgeInsets.only(
  267 +// top: ScreenUtil().setWidth(40),
  268 +// left: ScreenUtil().setWidth(40),
  269 +// right: ScreenUtil().setWidth(40)),
  270 +// height: ScreenUtil().setWidth(imgSize * 2),
  271 +// child: Row(
  272 +// mainAxisAlignment: MainAxisAlignment.spaceBetween,
  273 +// children: [
  274 +// Text(
  275 +// title,
  276 +// textAlign: TextAlign.left,
  277 +// style: TextStyle(
  278 +// color: MyColours.color_333333,
  279 +// fontWeight: FontWeight.bold,
  280 +// fontSize: ScreenUtil().setSp(34)),
  281 +// ),
  282 +// Spacer(),
  283 +// Stack(
  284 +// children: [
  285 +// InkWell(
  286 +// onTap: () {
  287 +// double process;
  288 +// String qiniuUrl;
  289 +// List<String> tempList = [];
  290 +// if (title == '头像') {
  291 +// process = _uploadImageProvider.touxiang.process;
  292 +// qiniuUrl = _uploadImageProvider.touxiang.qiniuUrl;
  293 +// } else {
  294 +// process = _uploadImageProvider.erweima.process;
  295 +// qiniuUrl = _uploadImageProvider.erweima.qiniuUrl;
  296 +// }
  297 +
  298 +// if (qiniuUrl != null && qiniuUrl != '') {
  299 +// tempList.add(qiniuUrl);
  300 +
  301 +// ///没有上传完成的不可以点击
  302 +// _showPhotoView(context, 0, tempList);
  303 +// } else {
  304 +// Utils.getPickPermission(context, () {
  305 +// _getFromPictureOrCamera(
  306 +// title, model, ImageSource.gallery);
  307 +// },
  308 +// Platform.isAndroid
  309 +// ? Permission.storage
  310 +// : Permission.photos);
  311 +// }
  312 +// },
  313 +// child: ClipRRect(
  314 +// borderRadius:
  315 +// BorderRadius.circular(ScreenUtil().setWidth(radius)),
  316 +// child: model.file == null
  317 +// ? model.qiniuUrl != null && model.qiniuUrl != ''
  318 +// ? Image.network(
  319 +// model.qiniuUrl,
  320 +// fit: BoxFit.cover,
  321 +// width: ScreenUtil().setWidth(imgSize * 2),
  322 +// height: ScreenUtil().setWidth(imgSize * 2),
  323 +// )
  324 +// : Image.asset(
  325 +// Utils.getImgPath(
  326 +// title == '头像' ? 'touxiang' : 'erweima'),
  327 +// fit: BoxFit.cover,
  328 +// width: ScreenUtil().setWidth(imgSize * 2),
  329 +// height: ScreenUtil().setWidth(imgSize * 2),
  330 +// )
  331 +// : Image.file(
  332 +// model.file,
  333 +// fit: BoxFit.cover,
  334 +// width: ScreenUtil().setWidth(imgSize * 2),
  335 +// height: ScreenUtil().setWidth(imgSize * 2),
  336 +// ),
  337 +// ),
  338 +// ),
  339 +// (model.file != null) &&
  340 +// model.process != 1 &&
  341 +// model.process != 0.01
  342 +// ? Container(
  343 +// width: ScreenUtil().setWidth(imgSize * 2),
  344 +// height: ScreenUtil().setWidth(imgSize * 2),
  345 +// decoration: BoxDecoration(
  346 +// borderRadius: BorderRadius.circular(radius),
  347 +// color: Color.fromRGBO(0, 0, 0, 0.6)),
  348 +// child: Center(
  349 +// child: Text('上传中',
  350 +// style:
  351 +// TextStyle(color: MyColours.color_999999)),
  352 +// ),
  353 +// )
  354 +// : Container(),
  355 +// ],
  356 +// ),
  357 +// HEmptyView(30),
  358 +// Image.asset(
  359 +// "assets/arr_right_gray.png",
  360 +// width: ScreenUtil().setWidth(14),
  361 +// height: ScreenUtil().setWidth(22),
  362 +// )
  363 +// ],
  364 +// ),
  365 +// ));
  366 +// }
  367 +
  368 +// @override
  369 +// Widget build(BuildContext context) {
  370 +// _uploadImageProvider =
  371 +// Provider.of<UploadImageProvider>(context, listen: true);
  372 +// _baseIndoProvider = Provider.of<BaseIndoProvider>(context, listen: true);
  373 +// return Scaffold(
  374 +// backgroundColor: MyColours.color_fefefe,
  375 +// appBar: SystemAppBar(
  376 +// '个人信息',
  377 +// onTap: () {
  378 +// EventBus().emit('changeStatusColor');
  379 +// Navigator.of(context).pop();
  380 +// },
  381 +// ),
  382 +// body: WillPopScope(
  383 +// onWillPop: () {
  384 +// EventBus().emit('changeStatusColor');
  385 +// Navigator.of(context).pop();
  386 +// },
  387 +// child: InkWell(
  388 +// onTap: () {
  389 +// FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  390 +// },
  391 +// child: Container(
  392 +// color: MyColours.color_ffffff,
  393 +// child: Column(children: [
  394 +// Expanded(
  395 +// child: SingleChildScrollView(
  396 +// controller: _scrollController,
  397 +// physics: BouncingScrollPhysics(),
  398 +// child: Column(
  399 +// children: [
  400 +// _imageWidget(
  401 +// '头像',
  402 +// _uploadImageProvider.touxiang,
  403 +// _uploadImageProvider.imgSizeTouxiang,
  404 +// 64),
  405 +// VEmptyView(30),
  406 +// Container(
  407 +// height: ScreenUtil().setWidth(2),
  408 +// color: MyColours.color_efefef,
  409 +// margin: EdgeInsets.only(
  410 +// left: ScreenUtil().setWidth(108 * 2),
  411 +// right: ScreenUtil().setWidth(40)),
  412 +// ),
  413 +// VEmptyView(10),
  414 +// Padding(
  415 +// padding: EdgeInsets.symmetric(
  416 +// horizontal: ScreenUtil().setWidth(40),
  417 +// ),
  418 +// child: _textfield('姓名', '请填写您的姓名',
  419 +// _nameController, _nameFocusNode)),
  420 +// VEmptyView(10),
  421 +// Container(
  422 +// height: ScreenUtil().setWidth(2),
  423 +// color: MyColours.color_efefef,
  424 +// margin: EdgeInsets.only(
  425 +// left: ScreenUtil().setWidth(108 * 2),
  426 +// right: ScreenUtil().setWidth(40)),
  427 +// ),
  428 +// VEmptyView(10),
  429 +// Padding(
  430 +// padding: EdgeInsets.symmetric(
  431 +// horizontal: ScreenUtil().setWidth(40),
  432 +// ),
  433 +// child: _textfield('电话', '请填写您的联系电话',
  434 +// _phoneController, _phoneFocusNode)),
  435 +// VEmptyView(10),
  436 +// Container(
  437 +// height: ScreenUtil().setWidth(2),
  438 +// color: MyColours.color_efefef,
  439 +// margin: EdgeInsets.only(
  440 +// left: ScreenUtil().setWidth(108 * 2),
  441 +// right: ScreenUtil().setWidth(40)),
  442 +// ),
  443 +// VEmptyView(10),
  444 +// Padding(
  445 +// padding: EdgeInsets.symmetric(
  446 +// horizontal: ScreenUtil().setWidth(40),
  447 +// ),
  448 +// child: _textfield(
  449 +// '职位',
  450 +// '请填写您在餐厅中担任的职位',
  451 +// _positionController,
  452 +// _positionFocusNode)),
  453 +// VEmptyView(10),
  454 +// Container(
  455 +// height: ScreenUtil().setWidth(2),
  456 +// color: MyColours.color_efefef,
  457 +// margin: EdgeInsets.only(
  458 +// left: ScreenUtil().setWidth(108 * 2),
  459 +// right: ScreenUtil().setWidth(40)),
  460 +// ),
  461 +// VEmptyView(40),
  462 +// // _imageWidget('微信二维码', _uploadImageProvider.erweima,
  463 +// // _uploadImageProvider.imgSizeErweima, 0),
  464 +// Padding(
  465 +// padding: EdgeInsets.symmetric(
  466 +// horizontal: ScreenUtil().setWidth(40),
  467 +// ),
  468 +// child: _textfield('微信号', '请填写您的微信号',
  469 +// _wechatController, _wechatFocusNode)),
  470 +// VEmptyView(30),
  471 +// ],
  472 +// )),
  473 +// ),
  474 +// VEmptyView(20),
  475 +// Padding(
  476 +// padding: EdgeInsets.fromLTRB(
  477 +// ScreenUtil().setWidth(40),
  478 +// 0,
  479 +// ScreenUtil().setWidth(40),
  480 +// ScreenUtil().setWidth(40)),
  481 +// child: RoundButton(
  482 +// onPressed: () {
  483 +// //接口
  484 +// _setCustomerActivityBaseinfo();
  485 +// },
  486 +// text: '保存',
  487 +// fontSize: 34,
  488 +// isBold: false,
  489 +// height: ScreenUtil().setWidth(80),
  490 +// width: double.infinity,
  491 +// radius: ScreenUtil().setWidth(10),
  492 +// ))
  493 +// ])))));
  494 +// }
  495 +// }
@@ -19,7 +19,7 @@ class UploadImageProvider extends ChangeNotifier { @@ -19,7 +19,7 @@ class UploadImageProvider extends ChangeNotifier {
19 UploadImgModel erweima = UploadImgModel(); //二维码 19 UploadImgModel erweima = UploadImgModel(); //二维码
20 UploadImgModel mentou = UploadImgModel(); //店铺信息----门头照片 20 UploadImgModel mentou = UploadImgModel(); //店铺信息----门头照片
21 UploadImgModel dish = UploadImgModel(); //菜品 21 UploadImgModel dish = UploadImgModel(); //菜品
22 - double imgSizeTouxiang = 64; 22 + double imgSizeTouxiang = 84;
23 double imgSizeErweima = 22; 23 double imgSizeErweima = 22;
24 double imgSizeMenTou = 64; 24 double imgSizeMenTou = 64;
25 List<UploadImgModel> imageListDenvironment = []; //环境信息列表 25 List<UploadImgModel> imageListDenvironment = []; //环境信息列表
1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
2 2
3 class MyColours { 3 class MyColours {
  4 +
  5 +
  6 + static const Color color_27262B = Color(0xff27262B);
  7 + static const Color color_BFC4D4 = Color(0xffBFC4D4);
4 static const Color color_C9C9C9 = Color(0xffC9C9C9); 8 static const Color color_C9C9C9 = Color(0xffC9C9C9);
5 static const Color color_F7F7F7 = Color(0xffF7F7F7); 9 static const Color color_F7F7F7 = Color(0xffF7F7F7);
6 static const Color color_A3A3A3 = Color(0xffA3A3A3); 10 static const Color color_A3A3A3 = Color(0xffA3A3A3);
@@ -506,7 +506,9 @@ var ifNeedCreateStorePageHandler = new Handler( @@ -506,7 +506,9 @@ var ifNeedCreateStorePageHandler = new Handler(
506 FluroConvertUtils.string2bool(params["changeStatus"].first); 506 FluroConvertUtils.string2bool(params["changeStatus"].first);
507 return ChangeNotifierProvider<OtherLoginProvider>( 507 return ChangeNotifierProvider<OtherLoginProvider>(
508 create: (_) => OtherLoginProvider(), 508 create: (_) => OtherLoginProvider(),
509 - child: IfNeedCreateStore(changeStatus: changeStatus)); 509 + child: ChangeNotifierProvider<BaseIndoProvider>(
  510 + create: (_) => BaseIndoProvider(),
  511 + child: IfNeedCreateStore(changeStatus: changeStatus)));
510 }); 512 });
511 513
512 ///新建店铺页面 514 ///新建店铺页面