Commit 86acdff252dece54937b4f2bcf23ac12ba28fea2

Authored by wdn127929
1 parent a7734a57

菜单管理图片尺寸调整

... ... @@ -149,6 +149,9 @@ class Cookbooklist extends Object {
@JsonKey(name: 'num')
String number;
@JsonKey(name: 'practice_name')
String practiceName;
Cookbooklist(
this.id,
this.orderid,
... ... @@ -167,6 +170,7 @@ class Cookbooklist extends Object {
this.identity,
this.cdate,
this.number,
this.practiceName
);
factory Cookbooklist.fromJson(Map<String, dynamic> srcJson) =>
... ...
... ... @@ -85,7 +85,8 @@ Cookbooklist _$CookbooklistFromJson(Map<String, dynamic> json) {
json['status'] as String,
json['identity'] as String,
json['cdate'] as String,
json['num'] as String);
json['num'] as String,
json['practice_name'] as String);
}
Map<String, dynamic> _$CookbooklistToJson(Cookbooklist instance) =>
... ... @@ -106,7 +107,8 @@ Map<String, dynamic> _$CookbooklistToJson(Cookbooklist instance) =>
'status': instance.status,
'identity': instance.identity,
'cdate': instance.cdate,
'num': instance.number
'num': instance.number,
'practice_name':instance.practiceName
};
Seller _$SellerFromJson(Map<String, dynamic> json) {
... ...
... ... @@ -296,9 +296,22 @@ class _MessageHasOrderFoodPageState extends State<MessageHasOrderFoodPage> {
width: ScreenUtil().setWidth(150 * 2),
child: Text(
_orderFoodProvider
.orderList[i][_orderFoodProvider
.orderList[i].keys.first][index]
.cookname,
.orderList[i][
_orderFoodProvider
.orderList[i]
.keys
.first][index]
.cookname +
(_orderFoodProvider
.orderList[i][
_orderFoodProvider
.orderList[i]
.keys
.first][index]
.practiceName ==
null
? ''
: "(${_orderFoodProvider.orderList[i][_orderFoodProvider.orderList[i].keys.first][index].practiceName})"),
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setWidth(30)),
... ...
... ... @@ -110,7 +110,8 @@ class _MenuManagePageState extends State<MenuManagePage> {
}
_getDzSellerConf() async {
bool success = await menuManageProvider.getDzSellerConf(context,showLoading: false);
bool success =
await menuManageProvider.getDzSellerConf(context, showLoading: false);
if (success) {
themeColerModel1 = themeColorData[menuManageProvider
.dzSellerConfModel.cookStyle ==
... ... @@ -244,17 +245,19 @@ class _MenuManagePageState extends State<MenuManagePage> {
Text(
model.name,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: font(20),
color: themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
fontWeight: FontWeight.bold,
fontSize: font(20),
color: themeColerModel1.name == '珍珠白'
? MyColours.color_515151
: MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
),
if ((model.taste != null &&
model.taste != '' &&
... ... @@ -281,37 +284,43 @@ class _MenuManagePageState extends State<MenuManagePage> {
? '味型:${model.taste} 烹调:${model.cooks}'
: '',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: font(12),
color: themeColerModel1.name == '珍珠白' ? MyColours.color_515151 :MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
)),
fontWeight: FontWeight.bold,
fontSize: font(12),
color: themeColerModel1.name == '珍珠白'
? MyColours.color_515151
: MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
)),
VEmptyView(20),
model.spec != null
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: _priceWidget(model))
: Text(
'¥${model.price}/${model.unit} 会员 ¥${model.price}/${model.unit} ',
model.member_price == '0' || model.member_price == null
? '¥${model.price}/${model.unit}'
: '¥${model.price}/${model.unit} 会员 ¥${model.member_price}/${model.unit} ',
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: font(14),
color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
fontWeight: FontWeight.bold,
fontSize: font(14),
color: themeColerModel1.name == '珍珠白'
? MyColours.color_515151
: MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
),
],
),
... ... @@ -333,20 +342,24 @@ class _MenuManagePageState extends State<MenuManagePage> {
tempPrice.forEach((element) {
textWidgetList.add(
Text(
'¥${element.price}/${element.specs} 会员 ¥${element.memberPrice ?? ''}/${element.specs} ',
element.memberPrice == '0' || element.memberPrice == null
? '¥${element.price}/${element.specs}'
: '¥${element.price}/${element.specs} 会员 ¥${element.memberPrice ?? ''}/${element.specs} ',
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: font(14),
color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
fontWeight: FontWeight.bold,
fontSize: font(14),
color: themeColerModel1.name == '珍珠白'
? MyColours.color_515151
: MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
),
);
});
... ... @@ -362,17 +375,19 @@ class _MenuManagePageState extends State<MenuManagePage> {
Text(
model.name,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: font(20),
color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
fontWeight: FontWeight.bold,
fontSize: font(20),
color: themeColerModel1.name == '珍珠白'
? MyColours.color_515151
: MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
),
if ((model.taste != null &&
model.taste != '' &&
... ... @@ -401,7 +416,9 @@ class _MenuManagePageState extends State<MenuManagePage> {
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: font(12),
color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 :MyColours.color_F8F9FD
color: themeColerModel1.name == '珍珠白'
? MyColours.color_515151
: MyColours.color_F8F9FD
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
... ... @@ -416,12 +433,16 @@ class _MenuManagePageState extends State<MenuManagePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: _priceWidget(model))
: Text(
'¥${model.price}/${model.unit} 会员 ¥${model.member_price ?? ''}/${model.unit} ',
model.member_price == '0' || model.member_price == null
? '¥${model.price}/${model.unit}'
: '¥${model.price}/${model.unit} 会员 ¥${model.member_price ?? ''}/${model.unit} ',
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: font(14),
color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD
color: themeColerModel1.name == '珍珠白'
? MyColours.color_515151
: MyColours.color_F8F9FD
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
... ... @@ -451,17 +472,19 @@ class _MenuManagePageState extends State<MenuManagePage> {
Text(
model.name,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: font(20),
color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
fontWeight: FontWeight.bold,
fontSize: font(20),
color: themeColerModel1.name == '珍珠白'
? MyColours.color_515151
: MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
),
if ((model.taste != null &&
model.taste != '' &&
... ... @@ -488,17 +511,19 @@ class _MenuManagePageState extends State<MenuManagePage> {
? '味型:${model.taste} 烹调:${model.cooks}'
: '',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: font(12),
color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
))
fontWeight: FontWeight.bold,
fontSize: font(12),
color: themeColerModel1.name == '珍珠白'
? MyColours.color_515151
: MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
))
],
),
)),
... ... @@ -508,20 +533,24 @@ class _MenuManagePageState extends State<MenuManagePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: _priceWidget(model))
: Text(
'¥${model.price}/${model.unit} 会员 ¥${model.price}/${model.unit} ',
model.member_price == '0' || model.member_price == null
? '¥${model.price}/${model.unit}'
: '¥${model.price}/${model.unit} 会员 ¥${model.member_price}/${model.unit} ',
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: font(14),
color: themeColerModel1.name == '珍珠白' ? MyColours.color_515151 :MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
fontWeight: FontWeight.bold,
fontSize: font(14),
color: themeColerModel1.name == '珍珠白'
? MyColours.color_515151
: MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
),
],
);
... ... @@ -540,17 +569,19 @@ class _MenuManagePageState extends State<MenuManagePage> {
child: Text(
model.name,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: font(20),
color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
fontWeight: FontWeight.bold,
fontSize: font(20),
color: themeColerModel1.name == '珍珠白'
? MyColours.color_515151
: MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
)),
if ((model.taste != null &&
model.taste != '' &&
... ... @@ -579,17 +610,19 @@ class _MenuManagePageState extends State<MenuManagePage> {
? '味型:${model.taste} 烹调:${model.cooks}'
: '',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: font(12),
color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
fontWeight: FontWeight.bold,
fontSize: font(12),
color: themeColerModel1.name == '珍珠白'
? MyColours.color_515151
: MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
)),
VEmptyView(20),
Padding(
... ... @@ -599,29 +632,41 @@ class _MenuManagePageState extends State<MenuManagePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: _priceWidget(model))
: Text(
'¥${model.price}/${model.unit} 会员 ¥${model.member_price}/${model.unit} ',
model.member_price == '0' || model.member_price == null
? '¥${model.price}/${model.unit}'
: '¥${model.price}/${model.unit} 会员 ¥${model.member_price}/${model.unit} ',
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: font(14),
color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
fontWeight: FontWeight.bold,
fontSize: font(14),
color: themeColerModel1.name == '珍珠白'
? MyColours.color_515151
: MyColours.color_F8F9FD,
// shadows: [
// BoxShadow(
// color: MyColours.color_FBF6F1,
// offset: Offset(0, 1),
// blurRadius: w(2),
// spreadRadius: w(20))
// ]
),
)),
VEmptyView(30),
if (model.image != null)
CachedNetworkImage(
imageUrl: model.image,
fit: BoxFit.cover,
width: ScreenUtil().screenWidth / 2,
height: w(125),
),
Container(
constraints: BoxConstraints(
maxHeight: ScreenUtil().screenWidth / 2,
),
child: CachedNetworkImage(
imageUrl: model.image,
fit: BoxFit.contain,
// width: double.infinity,
// height: w(250),
height: ScreenUtil().screenWidth / 2,
// fit: BoxFit.cover,
width: ScreenUtil().screenWidth / 2,
// height: w(125),
)),
if (model.desc != null && model.desc != '')
Padding(
padding: EdgeInsets.symmetric(horizontal: w(10), vertical: w(10)),
... ... @@ -1012,12 +1057,24 @@ class _MenuManagePageState extends State<MenuManagePage> {
: _topLeft(
model)),
if (model.image != null)
CachedNetworkImage(
imageUrl: model.image,
fit: BoxFit.cover,
width: double.infinity,
height: w(250),
),
Container(
constraints:
BoxConstraints(
maxHeight:
ScreenUtil()
.screenWidth,
),
child:
CachedNetworkImage(
imageUrl:
model.image,
fit: BoxFit.contain,
width:
double.infinity,
// height: w(250),
// height: ScreenUtil()
// .screenWidth,
)),
if (model.desc != null &&
model.desc != '')
Align(
... ...
... ... @@ -311,7 +311,7 @@ class _MenuSetPricePageState extends State<MenuSetPricePage> {
Map object =
await NavigatorUtil.goMenuUnitPage(
context, data[index].specid,specids);
context, data[index].specid, specids);
if (object != null) {
// 'specs': menuManageProvider
// .specSunModel[index].name,
... ... @@ -374,7 +374,10 @@ class _MenuSetPricePageState extends State<MenuSetPricePage> {
onPressed: () {
data.forEach((element) {
element.price = element.priceC.text;
element.memberPrice = element.memberPriceC.text;
element.memberPrice =
element.memberPriceC.text.trim().length == 0
? null
: element.memberPriceC.text.trim();
});
bool isContains = data.any((element) => element.select);
if (!isContains) {
... ...
... ... @@ -361,7 +361,9 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: _priceWidget(model))
: Text(
'¥${model.price}/${model.unit} 会员 ¥${model.price}/${model.unit} ',
model.member_price == '0' || model.member_price == null
? '¥${model.price}/${model.unit}'
: '¥${model.price}/${model.unit} 会员 ¥${model.member_price}/${model.unit} ',
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: FontWeight.bold,
... ... @@ -398,7 +400,9 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
tempPrice.forEach((element) {
textWidgetList.add(
Text(
'¥${element.price}/${element.specs} 会员 ¥${element.memberPrice ?? ''}/${element.specs} ',
element.memberPrice == '0' || element.memberPrice == null
? '¥${element.price}/${element.specs}'
: '¥${element.price}/${element.specs} 会员 ¥${element.memberPrice ?? ''}/${element.specs} ',
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: FontWeight.bold,
... ... @@ -487,7 +491,9 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: _priceWidget(model))
: Text(
'¥${model.price}/${model.unit} 会员 ¥${model.member_price ?? ''}/${model.unit} ',
model.member_price == '0' || model.member_price == null
? '¥${model.price}/${model.unit}'
: '¥${model.price}/${model.unit} 会员 ¥${model.member_price ?? ''}/${model.unit} ',
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: FontWeight.bold,
... ... @@ -585,7 +591,9 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: _priceWidget(model))
: Text(
'¥${model.price}/${model.unit} 会员 ¥${model.price}/${model.unit} ',
model.member_price == '0' || model.member_price == null
? '¥${model.price}/${model.unit}'
: '¥${model.price}/${model.unit} 会员 ¥${model.member_price}/${model.unit} ',
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: FontWeight.bold,
... ... @@ -682,7 +690,9 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: _priceWidget(model))
: Text(
'¥${model.price}/${model.unit} 会员 ¥${model.member_price}/${model.unit} ',
model.member_price == '0' || model.member_price == null
? '¥${model.price}/${model.unit}'
: '¥${model.price}/${model.unit} 会员 ¥${model.member_price}/${model.unit} ',
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: FontWeight.bold,
... ... @@ -701,12 +711,16 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
)),
VEmptyView(30),
if (model.image != null)
CachedNetworkImage(
imageUrl: model.image,
fit: BoxFit.cover,
width: ScreenUtil().screenWidth / 2,
height: w(125),
),
Container(
constraints: BoxConstraints(
maxHeight: ScreenUtil().screenWidth / 2,
),
child: CachedNetworkImage(
imageUrl: model.image,
fit: BoxFit.contain,
width: ScreenUtil().screenWidth / 2,
// height: w(125),
)),
if (model.desc != null && model.desc != '')
Padding(
padding: EdgeInsets.symmetric(horizontal: w(10), vertical: w(10)),
... ... @@ -945,12 +959,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
: _topLeft(
model)),
if (model.image != null)
CachedNetworkImage(
imageUrl: model.image,
fit: BoxFit.cover,
width: double.infinity,
height: w(250),
),
Container(
constraints: BoxConstraints(
maxHeight: ScreenUtil()
.screenWidth,
),
child: CachedNetworkImage(
imageUrl: model.image,
fit: BoxFit.contain,
width: double.infinity,
// height: w(250),
)),
if (model.desc != null &&
model.desc != '')
Align(
... ...