|
...
|
...
|
@@ -41,7 +41,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
late MarketingCenterProvider marketingCenterProvider;
|
|
|
|
ScrollController controller = ScrollController();
|
|
|
|
|
|
|
|
String miniType = '2-4';
|
|
|
|
String miniType = '3';
|
|
|
|
late PageController pageController;
|
|
|
|
double? pageOffset = 0;
|
|
|
|
|
|
...
|
...
|
@@ -49,6 +49,9 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
|
|
|
|
List<String> types = [
|
|
|
|
'0',
|
|
|
|
'1',
|
|
|
|
'2',
|
|
|
|
'3',
|
|
|
|
'1-1',
|
|
|
|
'1-2',
|
|
|
|
'1-3',
|
|
...
|
...
|
@@ -89,10 +92,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
showLoading: false, selfDismiss: true);
|
|
|
|
if (success) {
|
|
|
|
marketingCenterProvider.pageStateSettingMini = PageState.Success;
|
|
|
|
miniType = marketingCenterProvider.dzSellerConfModel!.liteStyle ?? '2-4';
|
|
|
|
if (miniType == '1' || miniType == '2' || miniType == '3') {
|
|
|
|
miniType = '2-4';
|
|
|
|
}
|
|
|
|
miniType = marketingCenterProvider.dzSellerConfModel!.liteStyle ?? '3';
|
|
|
|
tilteContentC.text = marketingCenterProvider
|
|
|
|
.dzSellerConfModel!.liteStyleTitle ??
|
|
|
|
"您预订的${Provider.of<UserModel>(context, listen: false).user!.sellername},已经安排,点击查看详情";
|
|
...
|
...
|
@@ -224,7 +224,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
return Container(
|
|
|
|
color: MyColours.color_99000000,
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(10)),
|
|
|
|
width: w(210),
|
|
|
|
// width: w(210),
|
|
|
|
height: h(168),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
...
|
...
|
@@ -237,6 +237,58 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
fontSize: font(20)),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
} else if (types[index] == '1' ||
|
|
|
|
types[index] == '2' ||
|
|
|
|
types[index] == '3') {
|
|
|
|
return Container(
|
|
|
|
color: Color.fromRGBO(81, 81, 81, 0.4),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(10)),
|
|
|
|
// width: w(180),
|
|
|
|
height: h(168),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'${Provider.of<UserModel>(context, listen: false).user!.sellername!}',
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
maxLines: 2,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_FFEFC5,
|
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
VEmptyView(54),
|
|
|
|
Text(
|
|
|
|
'${Utils.addZeroNumber(DateTime.now().month)}月${Utils.addZeroNumber(DateTime.now().day)}日',
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
maxLines: 2,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_FFEFC5,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(36)),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Text(
|
|
|
|
returnWeek(DateTime.now(), context) +
|
|
|
|
(types[index] == '1'
|
|
|
|
? '中午'
|
|
|
|
: types[index] == '2'
|
|
|
|
? (user!.noon != '00:00'
|
|
|
|
? user!.noon!.split('-')[0]
|
|
|
|
: '14:30')
|
|
|
|
: '午餐'),
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
maxLines: 2,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_FFEFC5,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(18)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
List<String> subType = types[index].split('-');
|
|
|
|
String subType0 = subType[0]; //几号模版
|
|
...
|
...
|
@@ -244,12 +296,13 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
if (subType0 == '1') {
|
|
|
|
//1号模版
|
|
|
|
String month =
|
|
|
|
'${Utils.addZeroNumber(DateTime.now().month)}月${Utils.addZeroNumber(DateTime.now().day)}日 ';
|
|
|
|
String week = returnWeek(DateTime.now(), context);
|
|
|
|
'${Utils.addZeroNumber(DateTime.now().month)}月${Utils.addZeroNumber(DateTime.now().day)}日';
|
|
|
|
String week =
|
|
|
|
returnWeek(DateTime.now(), context).trim();
|
|
|
|
String hour = subType1 == '1' || subType1 == '3'
|
|
|
|
? (user!.noon != '00:00'
|
|
|
|
? '${user!.noon!.split('-')[0]} '
|
|
|
|
: '14:30 ')
|
|
|
|
? '${user!.noon!.split('-')[0]}'
|
|
|
|
: '14:30')
|
|
|
|
: '';
|
|
|
|
String section =
|
|
|
|
subType1 == '1' || subType1 == '4'
|
|
...
|
...
|
@@ -258,7 +311,12 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
? '中午'
|
|
|
|
: '';
|
|
|
|
|
|
|
|
String time = month + week + hour + section;
|
|
|
|
if (hour != '' && section != '') {
|
|
|
|
hour = hour + ' ';
|
|
|
|
}
|
|
|
|
|
|
|
|
String time =
|
|
|
|
month + ' ' + week + ' ' + hour + section;
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
...
|
...
|
@@ -272,8 +330,8 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
alignment: Alignment.center,
|
|
|
|
// color: Color.fromRGBO(81, 81, 81, 0.4),
|
|
|
|
color: MyColours.color_99000000,
|
|
|
|
width: w(210),
|
|
|
|
height: h(26),
|
|
|
|
// width: w(210),
|
|
|
|
height: h(28),
|
|
|
|
child: Text(
|
|
|
|
'${Provider.of<UserModel>(context, listen: false).user!.sellername}',
|
|
|
|
textAlign: TextAlign.center,
|
|
...
|
...
|
@@ -282,14 +340,16 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_FFEFC5,
|
|
|
|
fontSize: font(12)),
|
|
|
|
fontSize: font(16)),
|
|
|
|
)),
|
|
|
|
Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(2)),
|
|
|
|
// color: Color.fromRGBO(81, 81, 81, 0.4),
|
|
|
|
color: MyColours.color_99000000,
|
|
|
|
width: w(210),
|
|
|
|
height: h(26),
|
|
|
|
// width: w(220),
|
|
|
|
height: h(28),
|
|
|
|
child: Text(
|
|
|
|
time,
|
|
|
|
textAlign: TextAlign.center,
|
|
...
|
...
|
@@ -298,7 +358,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_FFEFC5,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(12)),
|
|
|
|
fontSize: font(16)),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
...
|
...
|
@@ -326,11 +386,11 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
color: MyColours.color_99000000,
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: w(10)),
|
|
|
|
width: w(210),
|
|
|
|
// width: w(210),
|
|
|
|
height: h(168),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(66),
|
|
|
|
VEmptyView(64),
|
|
|
|
Text(
|
|
|
|
'${Provider.of<UserModel>(context, listen: false).user!.sellername}',
|
|
|
|
textAlign: TextAlign.center,
|
|
...
|
...
|
@@ -339,20 +399,21 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_FFEFC5,
|
|
|
|
fontSize: font(12)),
|
|
|
|
fontSize: font(16)),
|
|
|
|
),
|
|
|
|
VEmptyView(60),
|
|
|
|
Text(
|
|
|
|
'${Utils.addZeroNumber(DateTime.now().month)}/${Utils.addZeroNumber(DateTime.now().day)}',
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
maxLines: 2,
|
|
|
|
maxLines: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
height: 1,
|
|
|
|
color: MyColours.color_FFEFC5,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(24)),
|
|
|
|
fontSize: font(36)),
|
|
|
|
),
|
|
|
|
VEmptyView(8),
|
|
|
|
// VEmptyView(8),
|
|
|
|
Text(
|
|
|
|
time,
|
|
|
|
textAlign: TextAlign.center,
|
|
...
|
...
|
@@ -361,7 +422,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_FFEFC5,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(12)),
|
|
|
|
fontSize: font(16)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
...
|
...
|
@@ -391,23 +452,24 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
|
|
|
|
return Container(
|
|
|
|
color: MyColours.color_99000000,
|
|
|
|
width: w(210),
|
|
|
|
// width: w(210),
|
|
|
|
height: h(168),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
right: w(20), bottom: w(20)),
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
alignment: Alignment.centerLeft,
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: w(20),
|
|
|
|
top: w(18),
|
|
|
|
left: w(12),
|
|
|
|
right: w(12)),
|
|
|
|
// color: Color.fromRGBO(81, 81, 81, 0.4),
|
|
|
|
|
|
|
|
width: w(210),
|
|
|
|
// width: w(210),
|
|
|
|
// height: h(26),
|
|
|
|
child: Text(
|
|
|
|
'${Provider.of<UserModel>(context, listen: false).user!.sellername}',
|
|
...
|
...
|
@@ -417,7 +479,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_FFEFC5,
|
|
|
|
fontSize: font(12)),
|
|
|
|
fontSize: font(16)),
|
|
|
|
)),
|
|
|
|
Column(
|
|
|
|
// crossAxisAlignment:
|
|
...
|
...
|
@@ -427,14 +489,14 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
height: w(34),
|
|
|
|
// height: w(34),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
month,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.right,
|
|
|
|
maxLines: 1,
|
|
|
|
overflow:
|
|
|
|
TextOverflow.ellipsis,
|
|
...
|
...
|
@@ -443,11 +505,12 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
.color_FFEFC5,
|
|
|
|
fontWeight:
|
|
|
|
FontWeight.bold,
|
|
|
|
fontSize: font(24)),
|
|
|
|
fontSize: font(40)),
|
|
|
|
),
|
|
|
|
HEmptyView(5),
|
|
|
|
Container(
|
|
|
|
width: w(10),
|
|
|
|
height: w(34),
|
|
|
|
width: w(16),
|
|
|
|
// height: w(34),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
|
|
week,
|
|
...
|
...
|
@@ -463,11 +526,11 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
.color_FFEFC5,
|
|
|
|
fontWeight:
|
|
|
|
FontWeight.bold,
|
|
|
|
fontSize: font(12)),
|
|
|
|
fontSize: font(16)),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
VEmptyView(14),
|
|
|
|
// VEmptyView(14),
|
|
|
|
Container(
|
|
|
|
|
|
|
|
// constraints: BoxConstraints(
|
|
...
|
...
|
@@ -488,7 +551,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_FFEFC5,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(10)),
|
|
|
|
fontSize: font(16)),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
...
|
...
|
@@ -498,7 +561,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
} else {
|
|
|
|
//4号模版
|
|
|
|
String month =
|
|
|
|
'${Utils.addZeroNumber(DateTime.now().month)}/${Utils.addZeroNumber(DateTime.now().day)}';
|
|
|
|
'${Utils.addZeroNumber(DateTime.now().month)}/${Utils.addZeroNumber(DateTime.now().day)} ';
|
|
|
|
String week = returnWeek(DateTime.now(), context);
|
|
|
|
String hour = subType1 == '1' || subType1 == '3'
|
|
|
|
? (user!.noon != '00:00'
|
|
...
|
...
|
@@ -513,97 +576,75 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
: '';
|
|
|
|
|
|
|
|
if (section != '' && hour != '') {
|
|
|
|
hour = hour + ' ';
|
|
|
|
hour = hour + ' ';
|
|
|
|
}
|
|
|
|
|
|
|
|
String time = hour + section;
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
width: w(210),
|
|
|
|
// width: w(210),
|
|
|
|
height: h(168),
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment.spaceAround,
|
|
|
|
children: [
|
|
|
|
Spacer(),
|
|
|
|
Container(
|
|
|
|
// height: w(45),
|
|
|
|
color: MyColours.color_99000000,
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: w(8),
|
|
|
|
left: w(8),
|
|
|
|
bottom: w(8),
|
|
|
|
right: w(13)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
top: w(6),
|
|
|
|
// left: w(8),
|
|
|
|
bottom: w(6),
|
|
|
|
// right: w(13)
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
Text(
|
|
|
|
'${Provider.of<UserModel>(context, listen: false).user!.sellername}',
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_FFEFC5,
|
|
|
|
fontSize: font(10)),
|
|
|
|
)),
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.end,
|
|
|
|
fontSize: font(16)),
|
|
|
|
),
|
|
|
|
VEmptyView(16),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
alignment:
|
|
|
|
Alignment.centerRight,
|
|
|
|
// height: w(34),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
month,
|
|
|
|
textAlign:
|
|
|
|
TextAlign.right,
|
|
|
|
maxLines: 1,
|
|
|
|
overflow: TextOverflow
|
|
|
|
.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_FFEFC5,
|
|
|
|
fontWeight:
|
|
|
|
FontWeight
|
|
|
|
.bold,
|
|
|
|
fontSize:
|
|
|
|
font(10)),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
Container(
|
|
|
|
// width: w(10),
|
|
|
|
// height: w(34),
|
|
|
|
child: Text(
|
|
|
|
week,
|
|
|
|
textAlign:
|
|
|
|
TextAlign.right,
|
|
|
|
// maxLines: 3,
|
|
|
|
overflow: TextOverflow
|
|
|
|
.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
// writingMode: TextWritingMode.verticalLr,
|
|
|
|
color: MyColours
|
|
|
|
.color_FFEFC5,
|
|
|
|
fontWeight:
|
|
|
|
FontWeight
|
|
|
|
.bold,
|
|
|
|
fontSize:
|
|
|
|
font(10)),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
VEmptyView(8),
|
|
|
|
Text(
|
|
|
|
month,
|
|
|
|
// textAlign: TextAlign.right,
|
|
|
|
maxLines: 1,
|
|
|
|
overflow:
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_FFEFC5,
|
|
|
|
fontWeight:
|
|
|
|
FontWeight.bold,
|
|
|
|
fontSize: font(16)),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
week,
|
|
|
|
// textAlign: TextAlign.right,
|
|
|
|
// maxLines: 3,
|
|
|
|
overflow:
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
// writingMode: TextWritingMode.verticalLr,
|
|
|
|
color: MyColours
|
|
|
|
.color_FFEFC5,
|
|
|
|
fontWeight:
|
|
|
|
FontWeight.bold,
|
|
|
|
fontSize: font(16)),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
width: w(56),
|
|
|
|
// width: w(87),
|
|
|
|
// height: w(13),
|
|
|
|
// constraints: BoxConstraints(
|
|
|
|
// maxWidth: w(300)),
|
|
...
|
...
|
@@ -616,8 +657,8 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
r(3))),
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(
|
|
|
|
// horizontal: w(1),
|
|
|
|
vertical: w(3)),
|
|
|
|
horizontal: w(4),
|
|
|
|
vertical: w(2)),
|
|
|
|
// height: h(26),
|
|
|
|
child: Text(
|
|
|
|
time,
|
|
...
|
...
|
@@ -629,7 +670,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
.color_FFEFC5,
|
|
|
|
fontWeight:
|
|
|
|
FontWeight.bold,
|
|
|
|
fontSize: font(10)),
|
|
|
|
fontSize: font(16)),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
...
|
...
|
@@ -668,7 +709,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { |
|
|
|
},
|
|
|
|
index: swiperController.index,
|
|
|
|
itemCount: types.length,
|
|
|
|
viewportFraction: 0.5,
|
|
|
|
viewportFraction: 0.58,
|
|
|
|
scale: 0.4,
|
|
|
|
))
|
|
|
|
],
|
...
|
...
|
|