Commit 456ee5e9d41825875027e5bdce3e4dc0cb3d7f1d

Authored by wdn127929
1 parent e4185d48

保存店铺信息时更新缓存(店铺名称、店铺地址、店铺电话)+预订安排定制输入可换行(店铺介绍+厨师介绍)

... ... @@ -14,16 +14,16 @@ if (flutterRoot == null) {
def flutterVersionCode = "461"
def flutterVersionCode = "462"
if (flutterVersionCode == null) {
flutterVersionCode = '461'
flutterVersionCode = '462'
}
def flutterVersionName = "4.6.1"
def flutterVersionName = "4.6.2"
if (flutterVersionName == null) {
flutterVersionName = '4.6.1'
flutterVersionName = '4.6.2'
}
... ...
... ... @@ -2,6 +2,7 @@ import 'dart:convert';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:image_picker/image_picker.dart';
import 'package:one_key/widgets/v_empty_view.dart';
... ... @@ -411,7 +412,8 @@ class _ChefIntroducePageState extends State<ChefIntroducePage> {
contentPadding: EdgeInsets.zero,
border: OutlineInputBorder(borderSide: BorderSide.none),
),
keyboardType: TextInputType.text,
keyboardType: TextInputType.multiline,
textInputAction: TextInputAction.newline,
onChanged: (value) {
setState(() {
// currentRemark = value ?? "";
... ... @@ -648,127 +650,130 @@ class _ChefIntroducePageState extends State<ChefIntroducePage> {
_marketingCenterProvider =
Provider.of<MarketingCenterProvider>(context, listen: true);
return Scaffold(
backgroundColor: MyColours.color_ffffff,
appBar: SystemAppBar(
'主厨介绍',
onTap: () {
Navigator.pop(context);
},
),
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Column(
children: [
_selectBtnWidget(),
VEmptyView(24),
Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: w(16)),
height: w(48),
child: Text(
'效果预览',
style: TextStyle(
fontSize: font(16), color: MyColours.color_515151),
),
return KeyboardDismissOnTap(
child: Scaffold(
backgroundColor: MyColours.color_ffffff,
appBar: SystemAppBar(
'主厨介绍',
onTap: () {
Navigator.pop(context);
},
),
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Column(
children: [
_selectBtnWidget(),
VEmptyView(24),
Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: w(16)),
height: w(48),
child: Text(
'效果预览',
style: TextStyle(
fontSize: font(16),
color: MyColours.color_515151),
),
),
VEmptyView(24),
currIndex == 0
? _noTextWidget()
: currIndex == 1
? _mergingWidget()
: _separateWidget(),
VEmptyView(18),
],
),
VEmptyView(24),
currIndex == 0
? _noTextWidget()
: currIndex == 1
? _mergingWidget()
: _separateWidget(),
VEmptyView(18),
],
),
)),
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.only(
left: w(45), right: w(45), top: w(12), bottom: w(25)),
child: RoundButton(
text: '保存',
gradientStart: MyColours.color_199095,
gradientEnd: MyColours.color_199095,
// borderColor: MyColours.color_999999,
radius: r(5),
fontSize: 34,
height: w(40),
isBold: true,
onPressed: () async {
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
if ((currIndex == 1 || currIndex == 2)) {
if (chefNameC.text.trim().length == 0) {
Utils.showToast('请输入主厨姓名!');
return false;
}
if (chefIntroduceC.text.trim().length == 0) {
Utils.showToast('请输入主厨介绍文字!');
return false;
}
if (_uploadImageProvider.firstImage.qiniuUrl == null) {
Utils.showToast('请上传图片!');
return false;
}
if (_uploadImageProvider.firstImage.process < 1) {
Utils.showToast('正在上传图片,请稍等');
return false;
}
}
// List<String> images = [];
// if (_uploadImageProvider.storeImage1.qiniuUrl != null &&
// _uploadImageProvider.storeImage1.qiniuUrl != '') {
// images.add(_uploadImageProvider.storeImage1.qiniuUrl);
// }
// if (_uploadImageProvider.storeImage2.qiniuUrl != null &&
// _uploadImageProvider.storeImage2.qiniuUrl != '') {
// images.add(_uploadImageProvider.storeImage2.qiniuUrl);
// }
// if (_uploadImageProvider.storeImage3.qiniuUrl != null &&
// _uploadImageProvider.storeImage3.qiniuUrl != '') {
// images.add(_uploadImageProvider.storeImage3.qiniuUrl);
// }
// if (_uploadImageProvider.storeImage3.qiniuUrl != null &&
// _uploadImageProvider.storeImage3.qiniuUrl != '') {
// images.add(_uploadImageProvider.storeImage3.qiniuUrl);
// }
// if (images.length == 0) {
// Utils.showToast('请至少上传一张图片!');
// return false;
// }
//接口
Map chefData = {
'style': currIndex.toString(),
'seller_name': sellername,
'chef_name': chefNameC.text,
'introduce': chefIntroduceC.text,
'image': _uploadImageProvider.firstImage.qiniuUrl
};
Map<String, String> params = {
'sid': Provider.of<UserModel>(context, listen: false)
.user
.sellerid,
'chef': json.encode(chefData)
};
bool success = await _marketingCenterProvider
.setSellerTemplateConf(context, params,
showLoading: true);
if (success) {
Utils.showToast('保存成功');
Navigator.pop(context);
}
},
),
)
],
));
)),
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.only(
left: w(45), right: w(45), top: w(12), bottom: w(25)),
child: RoundButton(
text: '保存',
gradientStart: MyColours.color_199095,
gradientEnd: MyColours.color_199095,
// borderColor: MyColours.color_999999,
radius: r(5),
fontSize: 34,
height: w(40),
isBold: true,
onPressed: () async {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
if ((currIndex == 1 || currIndex == 2)) {
if (chefNameC.text.trim().length == 0) {
Utils.showToast('请输入主厨姓名!');
return false;
}
if (chefIntroduceC.text.trim().length == 0) {
Utils.showToast('请输入主厨介绍文字!');
return false;
}
if (_uploadImageProvider.firstImage.qiniuUrl == null) {
Utils.showToast('请上传图片!');
return false;
}
if (_uploadImageProvider.firstImage.process < 1) {
Utils.showToast('正在上传图片,请稍等');
return false;
}
}
// List<String> images = [];
// if (_uploadImageProvider.storeImage1.qiniuUrl != null &&
// _uploadImageProvider.storeImage1.qiniuUrl != '') {
// images.add(_uploadImageProvider.storeImage1.qiniuUrl);
// }
// if (_uploadImageProvider.storeImage2.qiniuUrl != null &&
// _uploadImageProvider.storeImage2.qiniuUrl != '') {
// images.add(_uploadImageProvider.storeImage2.qiniuUrl);
// }
// if (_uploadImageProvider.storeImage3.qiniuUrl != null &&
// _uploadImageProvider.storeImage3.qiniuUrl != '') {
// images.add(_uploadImageProvider.storeImage3.qiniuUrl);
// }
// if (_uploadImageProvider.storeImage3.qiniuUrl != null &&
// _uploadImageProvider.storeImage3.qiniuUrl != '') {
// images.add(_uploadImageProvider.storeImage3.qiniuUrl);
// }
// if (images.length == 0) {
// Utils.showToast('请至少上传一张图片!');
// return false;
// }
//接口
Map chefData = {
'style': currIndex.toString(),
'seller_name': sellername,
'chef_name': chefNameC.text,
'introduce': chefIntroduceC.text,
'image': _uploadImageProvider.firstImage.qiniuUrl
};
Map<String, String> params = {
'sid': Provider.of<UserModel>(context, listen: false)
.user
.sellerid,
'chef': json.encode(chefData)
};
bool success = await _marketingCenterProvider
.setSellerTemplateConf(context, params,
showLoading: true);
if (success) {
Utils.showToast('保存成功');
Navigator.pop(context);
}
},
),
)
],
)));
}
}
... ...
... ... @@ -507,57 +507,120 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> {
Color textColor = MyColours.color_515151,
Color hintColor = MyColours.color_999999,
BoxDecoration boxDecoration}) {
return Container(
width: width,
alignment: Alignment.centerLeft,
padding: edgeInsets,
decoration: boxDecoration,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Introduce',
style: TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
),
Text(
'品牌介绍',
style: TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
),
VEmptyView(16),
Text(
'${_marketingCenterProvider.markDataModel.store.sellerName}',
style: TextStyle(color: textColor, fontSize: font(14)),
),
VEmptyView(32),
Container(
width: double.infinity,
// margin: EdgeInsets.symmetric(horizontal: w(10)),
// padding: EdgeInsets.symmetric(horizontal: w(6)),
decoration: BoxDecoration(
border: Border(
left: BorderSide(
width: w(2), color: MyColours.color_EEAE74))),
child: Container(
Widget container;
if (edgeInsets.top == w(23)) {
//图文合并
container = Container(
width: width,
height:
ScreenUtil().setWidth(_uploadImageProvider.imgSizefirstImage * 2),
alignment: Alignment.centerLeft,
padding: edgeInsets,
decoration: boxDecoration,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Introduce',
style:
TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
),
Text(
'品牌介绍',
style:
TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
),
VEmptyView(16),
Text(
'${_marketingCenterProvider.markDataModel.store.sellerName}',
style: TextStyle(color: textColor, fontSize: font(14)),
),
VEmptyView(32),
Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(12),
),
alignment: Alignment.topLeft,
child: Text(
_marketingCenterProvider.markDataModel.store.introduce,
style: TextStyle(
height: 2,
color: textColor,
fontSize: ScreenUtil().setSp(20),
textBaseline: TextBaseline.alphabetic),
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
maxLines: 7,
),
)),
],
),
);
// margin: EdgeInsets.symmetric(horizontal: w(10)),
// padding: EdgeInsets.symmetric(horizontal: w(6)),
decoration: BoxDecoration(
border: Border(
left: BorderSide(
width: w(2), color: MyColours.color_EEAE74))),
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(12),
),
alignment: Alignment.topLeft,
child: Text(
_marketingCenterProvider.markDataModel.store.introduce,
style: TextStyle(
height: 2,
color: textColor,
fontSize: ScreenUtil().setSp(20),
textBaseline: TextBaseline.alphabetic),
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
maxLines: 7,
),
)),
],
),
);
} else {
container = Container(
width: width,
alignment: Alignment.centerLeft,
padding: edgeInsets,
decoration: boxDecoration,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Introduce',
style:
TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
),
Text(
'品牌介绍',
style:
TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
),
VEmptyView(16),
Text(
'${_marketingCenterProvider.markDataModel.store.sellerName}',
style: TextStyle(color: textColor, fontSize: font(14)),
),
VEmptyView(32),
Container(
width: double.infinity,
// margin: EdgeInsets.symmetric(horizontal: w(10)),
// padding: EdgeInsets.symmetric(horizontal: w(6)),
decoration: BoxDecoration(
border: Border(
left: BorderSide(
width: w(2), color: MyColours.color_EEAE74))),
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(12),
),
alignment: Alignment.topLeft,
child: Text(
_marketingCenterProvider.markDataModel.store.introduce,
style: TextStyle(
height: 2,
color: textColor,
fontSize: ScreenUtil().setSp(20),
textBaseline: TextBaseline.alphabetic),
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
),
)),
],
),
);
}
return container;
}
///无文字
... ... @@ -765,71 +828,148 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> {
Color textColor = MyColours.color_515151,
Color hintColor = MyColours.color_999999,
BoxDecoration boxDecoration}) {
return Container(
width: width,
// height: _uploadImageProvider.imgSizefirstImage,
alignment: Alignment.centerRight,
padding: edgeInsets,
decoration: boxDecoration,
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
'Chief Cook',
style: TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
),
Text(
'知名主厨',
style: TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
),
VEmptyView(16),
// Text(
// '${sellername}',
// style: TextStyle(color: textColor, fontSize: font(14)),
// ),
Container(
width: double.infinity,
alignment: Alignment.topRight,
child: Text(
_marketingCenterProvider.markDataModel.chef.chefName,
textAlign: TextAlign.right,
style: TextStyle(
color: textColor,
fontSize: ScreenUtil().setSp(28),
textBaseline: TextBaseline.alphabetic),
maxLines: 1,
Widget container;
if (edgeInsets.top == w(23)) {
//图文合并
container = Container(
width: width,
// height: _uploadImageProvider.imgSizefirstImage,
height:
ScreenUtil().setWidth(_uploadImageProvider.imgSizefirstImage * 2),
alignment: Alignment.centerRight,
padding: edgeInsets,
decoration: boxDecoration,
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
'Chief Cook',
style:
TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
),
),
VEmptyView(32),
Container(
width: double.infinity,
// margin: EdgeInsets.symmetric(horizontal: w(10)),
// padding: EdgeInsets.symmetric(horizontal: w(6)),
decoration: BoxDecoration(
border: Border(
right: BorderSide(
width: w(2), color: MyColours.color_EEAE74))),
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(12),
),
alignment: Alignment.topRight,
child: Text(
_marketingCenterProvider.markDataModel.chef.introduce,
textAlign: TextAlign.right,
style: TextStyle(
height: 2,
color: textColor,
fontSize: ScreenUtil().setSp(20),
textBaseline: TextBaseline.alphabetic),
maxLines: 7,
overflow: TextOverflow.ellipsis,
)),
),
],
),
);
Text(
'知名主厨',
style:
TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
),
VEmptyView(16),
// Text(
// '${sellername}',
// style: TextStyle(color: textColor, fontSize: font(14)),
// ),
Container(
width: double.infinity,
alignment: Alignment.topRight,
child: Text(
_marketingCenterProvider.markDataModel.chef.chefName,
textAlign: TextAlign.right,
style: TextStyle(
color: textColor,
fontSize: ScreenUtil().setSp(28),
textBaseline: TextBaseline.alphabetic),
maxLines: 1,
),
),
VEmptyView(32),
Container(
width: double.infinity,
// margin: EdgeInsets.symmetric(horizontal: w(10)),
// padding: EdgeInsets.symmetric(horizontal: w(6)),
decoration: BoxDecoration(
border: Border(
right: BorderSide(
width: w(2), color: MyColours.color_EEAE74))),
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(12),
),
alignment: Alignment.topRight,
child: Text(
_marketingCenterProvider.markDataModel.chef.introduce,
textAlign: TextAlign.right,
style: TextStyle(
height: 2,
color: textColor,
fontSize: ScreenUtil().setSp(20),
textBaseline: TextBaseline.alphabetic),
maxLines: 7,
overflow: TextOverflow.ellipsis,
)),
),
],
),
);
} else {
container = Container(
width: width,
// height: _uploadImageProvider.imgSizefirstImage,
alignment: Alignment.centerRight,
padding: edgeInsets,
decoration: boxDecoration,
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
'Chief Cook',
style:
TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
),
Text(
'知名主厨',
style:
TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
),
VEmptyView(16),
// Text(
// '${sellername}',
// style: TextStyle(color: textColor, fontSize: font(14)),
// ),
Container(
width: double.infinity,
alignment: Alignment.topRight,
child: Text(
_marketingCenterProvider.markDataModel.chef.chefName,
textAlign: TextAlign.right,
style: TextStyle(
color: textColor,
fontSize: ScreenUtil().setSp(28),
textBaseline: TextBaseline.alphabetic),
maxLines: 1,
),
),
VEmptyView(32),
Container(
width: double.infinity,
// margin: EdgeInsets.symmetric(horizontal: w(10)),
// padding: EdgeInsets.symmetric(horizontal: w(6)),
decoration: BoxDecoration(
border: Border(
right: BorderSide(
width: w(2), color: MyColours.color_EEAE74))),
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(12),
),
alignment: Alignment.topRight,
child: Text(
_marketingCenterProvider.markDataModel.chef.introduce,
textAlign: TextAlign.right,
style: TextStyle(
height: 2,
color: textColor,
fontSize: ScreenUtil().setSp(20),
textBaseline: TextBaseline.alphabetic),
// maxLines: 7,
overflow: TextOverflow.ellipsis,
)),
),
],
),
);
}
return container;
}
///招牌菜展示
... ... @@ -1129,70 +1269,75 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> {
padding: EdgeInsets.only(
left: w(20), right: w(20), top: w(12), bottom: w(25)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
_marketingCenterProvider.markDataModel.marketing != null &&
_marketingCenterProvider
.markDataModel.marketing.isOnlineBook ==
'1'
? RoundButton(
text: '再次预订',
width: w(100),
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
borderColor: MyColours.color_0143A3,
textColor: MyColours.color_0143A3,
radius: r(21),
fontSize: 32,
height: w(42),
isBold: true,
onPressed: () async {},
)
: SizedBox(),
_marketingCenterProvider.markDataModel.marketing != null &&
_marketingCenterProvider
.markDataModel.marketing.isArrival ==
'1'
? RoundButton(
text: '确认赴约',
width: w(100),
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
borderColor: MyColours.color_0143A3,
textColor: MyColours.color_0143A3,
radius: r(21),
fontSize: 32,
height: w(42),
isBold: true,
onPressed: () async {},
)
: SizedBox(),
Container(
if (_marketingCenterProvider.markDataModel.marketing !=
null &&
_marketingCenterProvider
.markDataModel.marketing.isOnlineBook ==
'1')
RoundButton(
text: '再次预订',
width: w(100),
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
borderColor: MyColours.color_0143A3,
textColor: MyColours.color_0143A3,
radius: r(21),
fontSize: 32,
height: w(42),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(21)),
gradient: LinearGradient(
stops: [
-0.57,
0.55,
1.48
],
colors: [
MyColours.color_4C8DAD,
MyColours.color_0143A3,
MyColours.color_42A5FF
],
begin: Alignment.topLeft,
end: Alignment.bottomRight)),
child: Text(
'转发给客人',
style: TextStyle(
fontSize: font(16),
color: MyColours.color_F8F9FD,
fontWeight: FontWeight.bold),
)),
isBold: true,
onPressed: () async {},
),
if (_marketingCenterProvider.markDataModel.marketing !=
null &&
_marketingCenterProvider
.markDataModel.marketing.isArrival ==
'1')
RoundButton(
text: '确认赴约',
width: w(100),
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
borderColor: MyColours.color_0143A3,
textColor: MyColours.color_0143A3,
radius: r(21),
fontSize: 32,
height: w(42),
isBold: true,
onPressed: () async {},
),
if (_marketingCenterProvider.markDataModel.marketing !=
null &&
_marketingCenterProvider
.markDataModel.marketing.isTranspond ==
'1')
Container(
width: w(100),
height: w(42),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(21)),
gradient: LinearGradient(
stops: [
-0.57,
0.55,
1.48
],
colors: [
MyColours.color_4C8DAD,
MyColours.color_0143A3,
MyColours.color_42A5FF
],
begin: Alignment.topLeft,
end: Alignment.bottomRight)),
child: Text(
'转发给客人',
style: TextStyle(
fontSize: font(16),
color: MyColours.color_F8F9FD,
fontWeight: FontWeight.bold),
)),
],
),
)
... ...
... ... @@ -2,6 +2,7 @@ import 'dart:convert';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
... ... @@ -271,7 +272,8 @@ class _StoreIntroducePageState extends State<StoreIntroducePage> {
contentPadding: EdgeInsets.zero,
border: OutlineInputBorder(borderSide: BorderSide.none),
),
keyboardType: TextInputType.text,
keyboardType: TextInputType.multiline,
textInputAction: TextInputAction.newline,
onChanged: (value) {
setState(() {
// currentRemark = value ?? "";
... ... @@ -435,113 +437,116 @@ class _StoreIntroducePageState extends State<StoreIntroducePage> {
Provider.of<UploadImageProvider>(context, listen: true);
marketingCenterProvider =
Provider.of<MarketingCenterProvider>(context, listen: true);
return Scaffold(
backgroundColor: MyColours.color_ffffff,
appBar: SystemAppBar(
'店铺介绍',
onTap: () {
Navigator.pop(context);
},
),
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
controller: controller,
child: Column(
children: [
_selectBtnWidget(),
VEmptyView(24),
Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: w(16)),
height: w(48),
child: Text(
'效果预览',
style: TextStyle(
fontSize: font(16), color: MyColours.color_515151),
),
return KeyboardDismissOnTap(
child: Scaffold(
backgroundColor: MyColours.color_ffffff,
appBar: SystemAppBar(
'店铺介绍',
onTap: () {
Navigator.pop(context);
},
),
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
controller: controller,
child: Column(
children: [
_selectBtnWidget(),
VEmptyView(24),
Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: w(16)),
height: w(48),
child: Text(
'效果预览',
style: TextStyle(
fontSize: font(16),
color: MyColours.color_515151),
),
),
VEmptyView(24),
currIndex == 0
? _noTextWidget()
: currIndex == 1
? _mergingWidget()
: _separateWidget(),
VEmptyView(18),
],
),
VEmptyView(24),
currIndex == 0
? _noTextWidget()
: currIndex == 1
? _mergingWidget()
: _separateWidget(),
VEmptyView(18),
],
),
)),
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.only(
left: w(45), right: w(45), top: w(12), bottom: w(25)),
child: RoundButton(
text: '保存',
gradientStart: MyColours.color_199095,
gradientEnd: MyColours.color_199095,
// borderColor: MyColours.color_999999,
radius: r(5),
fontSize: 34,
height: w(40),
isBold: true,
onPressed: () async {
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
)),
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.only(
left: w(45), right: w(45), top: w(12), bottom: w(25)),
child: RoundButton(
text: '保存',
gradientStart: MyColours.color_199095,
gradientEnd: MyColours.color_199095,
// borderColor: MyColours.color_999999,
radius: r(5),
fontSize: 34,
height: w(40),
isBold: true,
onPressed: () async {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
if ((currIndex == 1 || currIndex == 2) &&
storeIntroduceC.text.trim().length == 0) {
Utils.showToast('请输入餐厅介绍文字!');
return false;
}
if ((currIndex == 1 || currIndex == 2) &&
storeIntroduceC.text.trim().length == 0) {
Utils.showToast('请输入餐厅介绍文字!');
return false;
}
List<String> images = [];
if (_uploadImageProvider.storeImage1.qiniuUrl != null &&
_uploadImageProvider.storeImage1.qiniuUrl != '') {
images.add(_uploadImageProvider.storeImage1.qiniuUrl);
}
if (_uploadImageProvider.storeImage2.qiniuUrl != null &&
_uploadImageProvider.storeImage2.qiniuUrl != '') {
images.add(_uploadImageProvider.storeImage2.qiniuUrl);
}
if (_uploadImageProvider.storeImage3.qiniuUrl != null &&
_uploadImageProvider.storeImage3.qiniuUrl != '') {
images.add(_uploadImageProvider.storeImage3.qiniuUrl);
}
if (_uploadImageProvider.storeImage3.qiniuUrl != null &&
_uploadImageProvider.storeImage3.qiniuUrl != '') {
images.add(_uploadImageProvider.storeImage3.qiniuUrl);
}
if (images.length == 0) {
Utils.showToast('请至少上传一张图片!');
return false;
}
List<String> images = [];
if (_uploadImageProvider.storeImage1.qiniuUrl != null &&
_uploadImageProvider.storeImage1.qiniuUrl != '') {
images.add(_uploadImageProvider.storeImage1.qiniuUrl);
}
if (_uploadImageProvider.storeImage2.qiniuUrl != null &&
_uploadImageProvider.storeImage2.qiniuUrl != '') {
images.add(_uploadImageProvider.storeImage2.qiniuUrl);
}
if (_uploadImageProvider.storeImage3.qiniuUrl != null &&
_uploadImageProvider.storeImage3.qiniuUrl != '') {
images.add(_uploadImageProvider.storeImage3.qiniuUrl);
}
if (_uploadImageProvider.storeImage3.qiniuUrl != null &&
_uploadImageProvider.storeImage3.qiniuUrl != '') {
images.add(_uploadImageProvider.storeImage3.qiniuUrl);
}
if (images.length == 0) {
Utils.showToast('请至少上传一张图片!');
return false;
}
//接口
Map storeData = {
'style': currIndex.toString(),
'seller_name': sellername,
'introduce': storeIntroduceC.text,
'images': json.encode(images)
};
//接口
Map storeData = {
'style': currIndex.toString(),
'seller_name': sellername,
'introduce': storeIntroduceC.text,
'images': json.encode(images)
};
Map<String, String> params = {
'sid': Provider.of<UserModel>(context, listen: false)
.user
.sellerid,
'store': json.encode(storeData)
};
Map<String, String> params = {
'sid': Provider.of<UserModel>(context, listen: false)
.user
.sellerid,
'store': json.encode(storeData)
};
bool success = await marketingCenterProvider
.setSellerTemplateConf(context, params,
showLoading: true);
if (success) {
Utils.showToast('保存成功');
Navigator.pop(context);
}
},
),
)
],
));
bool success = await marketingCenterProvider
.setSellerTemplateConf(context, params,
showLoading: true);
if (success) {
Utils.showToast('保存成功');
Navigator.pop(context);
}
},
),
)
],
)));
}
}
... ...
... ... @@ -446,7 +446,7 @@ class _PersonnelManagePageState extends State<PersonnelManagePage> {
: MyColours
.color_BFC4D4,
width: ScreenUtil()
.setWidth(62 * 2),
.setWidth(72 * 2),
height: ScreenUtil()
.setWidth(18 * 2),
fontSize: 20,
... ... @@ -469,7 +469,7 @@ class _PersonnelManagePageState extends State<PersonnelManagePage> {
.color_438E93,
width: ScreenUtil()
.setWidth(
58 * 2),
68 * 2),
height: ScreenUtil()
.setWidth(
18 * 2),
... ...
... ... @@ -429,6 +429,11 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> {
userModel.user.morning = morningStr;
userModel.user.noon = noonStr;
userModel.user.night = nightStr;
userModel.user.sellername = _nameController.text;
userModel.user.sellerphone =
_phoneController.text + ',' + _phoneController2.text;
userModel.user.sellerAddr = _addressController.text;
print(userModel.user);
// morning =
// userModel.user.morning.isEmpty ? "00:00-00:00" : userModel.user.morning;
... ...