Commit 83ee84aa2d0745af6e23b4b8d7201cf9ac753db0

Authored by wdn127929
1 parent 9dba4148

部分UI

... ... @@ -11,14 +11,14 @@ if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = "181"
def flutterVersionCode = "190"
if (flutterVersionCode == null) {
flutterVersionCode = '181'
flutterVersionCode = '190'
}
def flutterVersionName = "1.8.1"
def flutterVersionName = "1.9.0"
if (flutterVersionName == null) {
flutterVersionName = '1.8.1'
flutterVersionName = '1.9.0'
}
apply plugin: 'com.android.application'
... ...
... ... @@ -111,8 +111,9 @@ class _CouponEidtPageState extends State<CouponEidtPage> {
child: Text(
title,
style: TextStyle(
color: MyColours.color_333333,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(30)),
fontSize: ScreenUtil().setSp(34)),
),
),
HEmptyView(20),
... ... @@ -128,7 +129,7 @@ class _CouponEidtPageState extends State<CouponEidtPage> {
// widget.isSelect ? Colors.white : MyColours.color_199095,
//输入文本的样式
style: TextStyle(
fontSize: ScreenUtil().setSp(26),
fontSize: ScreenUtil().setSp(32),
),
focusNode: title == '券名称' ? _nameFocusNode : _requireFocusNode,
// textAlignVertical: TextAlignVertical.bottom,
... ... @@ -139,7 +140,7 @@ class _CouponEidtPageState extends State<CouponEidtPage> {
hintText: hintText,
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(26),
fontSize: ScreenUtil().setSp(32),
),
// contentPadding: EdgeInsets.only(
// bottom: ScreenUtil().setWidth(30)), //ios 17
... ... @@ -246,8 +247,9 @@ class _CouponEidtPageState extends State<CouponEidtPage> {
title,
textAlign: TextAlign.left,
style: TextStyle(
color: MyColours.color_333333,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(30)),
fontSize: ScreenUtil().setSp(34)),
)),
),
VEmptyView(10),
... ... @@ -261,6 +263,10 @@ class _CouponEidtPageState extends State<CouponEidtPage> {
decoration: InputDecoration(
contentPadding: EdgeInsets.all(ScreenUtil().setWidth(20)),
hintText: hintText,
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(32),
),
fillColor: MyColours.color_EEEEEE,
filled: true,
border: OutlineInputBorder(
... ... @@ -295,8 +301,9 @@ class _CouponEidtPageState extends State<CouponEidtPage> {
child: Text(
title,
style: TextStyle(
color: MyColours.color_333333,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(30)),
fontSize: ScreenUtil().setSp(34)),
),
),
Spacer(),
... ... @@ -340,10 +347,15 @@ class _CouponEidtPageState extends State<CouponEidtPage> {
children: [
VEmptyView(20),
_textfield('券名称', '例:9折券/200元代金券/菜品券'),
VEmptyView(20),
_textfield('券要求', '例:无门槛/满2000元'),
VEmptyView(20),
_select('有效期从', fromDate),
VEmptyView(20),
_select('有效期至', endDate),
VEmptyView(20),
_explain('券说明', '例:可用包间,停车免费,不与店内其他活动共享等'),
VEmptyView(20),
_canUse('是否立即启用'),
],
))),
... ...
... ... @@ -44,13 +44,16 @@ class _CouponItemState extends State<CouponItem> {
children: [
Container(
// width: ScreenUtil().setWidth(610),
margin: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(30),
vertical: ScreenUtil().setWidth(12)),
margin: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(40),
ScreenUtil().setWidth(0),
ScreenUtil().setWidth(40),
ScreenUtil().setWidth(30)),
padding: EdgeInsets.all(ScreenUtil().setWidth(30)),
decoration: BoxDecoration(
color: notSelect ? MyColours.app_main : MyColours.color_E0E0E0,
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))),
color:
notSelect ? MyColours.color_FFF0E5 : MyColours.color_EEF0F2,
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20))),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
... ... @@ -68,8 +71,10 @@ class _CouponItemState extends State<CouponItem> {
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(34),
color: notSelect
? MyColours.color_F05522
: MyColours.color_999999,
fontSize: ScreenUtil().setSp(44),
fontWeight: FontWeight.bold),
),
),
... ... @@ -82,13 +87,31 @@ class _CouponItemState extends State<CouponItem> {
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(22),
fontWeight: FontWeight.bold)),
color: notSelect
? MyColours.color_F05522
: MyColours.color_999999,
fontSize: ScreenUtil().setSp(30),
fontWeight: FontWeight.normal)),
))
],
),
),
(ObjectUtil.isNotEmpty(sunModel.stime) &&
sunModel.stime != '0') ||
(ObjectUtil.isNotEmpty(sunModel.etime) &&
sunModel.etime != '0')
? Container(
padding:
EdgeInsets.only(top: ScreenUtil().setWidth(20)),
child: Text(
'有效期:${ObjectUtil.isNotEmpty(sunModel.stime) ? Utils.getDateStrFromJiekou(sunModel.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.etime) ? Utils.getDateStrFromJiekou(sunModel.etime) : '--'}',
style: TextStyle(
color: notSelect
? MyColours.color_EF7249
: MyColours.color_B7B7B7,
fontSize: ScreenUtil().setSp(22))),
)
: Container(),
ObjectUtil.isNotEmpty(sunModel.explain)
? Container(
margin: EdgeInsets.only(top: ScreenUtil().setWidth(30)),
... ... @@ -100,27 +123,13 @@ class _CouponItemState extends State<CouponItem> {
softWrap: false,
style: TextStyle(
color: notSelect
? MyColours.app_main
: MyColours.color_e5e5e5,
fontSize: ScreenUtil().setSp(22))),
? MyColours.color_EF7249
: MyColours.color_999999,
fontSize: ScreenUtil().setSp(24))),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10))),
)
: Container(),
(ObjectUtil.isNotEmpty(sunModel.stime) &&
sunModel.stime != '0') ||
(ObjectUtil.isNotEmpty(sunModel.etime) &&
sunModel.etime != '0')
? Container(
padding:
EdgeInsets.only(top: ScreenUtil().setWidth(20)),
child: Text(
'有效期:${ObjectUtil.isNotEmpty(sunModel.stime) ? Utils.getDateStrFromJiekou(sunModel.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.etime) ? Utils.getDateStrFromJiekou(sunModel.etime) : '--'}',
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(22))),
ScreenUtil().setWidth(30))),
)
: Container(),
],
... ... @@ -138,12 +147,16 @@ class _CouponItemState extends State<CouponItem> {
children: [
Text('被领取:${sunModel.receiveNum}张',
style: TextStyle(
color: MyColours.color_ffffff,
color: notSelect
? MyColours.color_EF7249
: MyColours.color_B7B7B7,
fontSize: ScreenUtil().setSp(22))),
VEmptyView(5),
Text('已使用:${sunModel.useNum}张',
style: TextStyle(
color: MyColours.color_ffffff,
color: notSelect
? MyColours.color_EF7249
: MyColours.color_B7B7B7,
fontSize: ScreenUtil().setSp(22))),
],
),
... ... @@ -152,11 +165,17 @@ class _CouponItemState extends State<CouponItem> {
? RoundButton(
width: ScreenUtil().setWidth(100),
height: ScreenUtil().setWidth(50),
radius: ScreenUtil().setWidth(10),
radius: ScreenUtil().setWidth(40),
text: notSelect ? '停用' : '启用',
textColor: MyColours.color_666666,
gradientStart: Colors.white,
gradientEnd: Colors.white,
textColor: notSelect
? MyColours.color_F05522
: MyColours.color_999999,
gradientStart: notSelect
? MyColours.color_FFE2D3
: MyColours.color_E9E9E9,
gradientEnd: notSelect
? MyColours.color_FFE2D3
: MyColours.color_E9E9E9,
onPressed: widget.onPressedSwich,
)
: Container()
... ...
... ... @@ -112,13 +112,15 @@ class _CouponPageState extends State<CouponPage> {
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
return Container(
margin: EdgeInsets.all(ScreenUtil().setWidth(40)),
padding:
EdgeInsets.all(ScreenUtil().setWidth(20)),
EdgeInsets.all(ScreenUtil().setWidth(30)),
color: MyColours.color_F0F0F0,
child: Text(
'使用说明:需在结账前出示优惠券二维码,店内工作人员微信扫码核销。超过有效期的券,会自动作废并移出列表。优惠券不可找零、兑现。',
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_666666,
fontSize: ScreenUtil().setSp(24),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
... ...
... ... @@ -209,7 +209,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
// ),
VEmptyView(40),
MyItem(
title: "活动创建",
title: "线上券创建",
content: '',
callback: () {
NavigatorUtil.goCouponPage(context);
... ...
... ... @@ -60,4 +60,11 @@ class MyColours {
static const Color color_0D0D0D = Color(0xff0D0D0D);
static const Color color_24A4A8 = Color(0xff24A4A8);
static const Color color_F59A23 = Color(0xffF59A23);
static const Color color_FFF0E5 = Color(0xffFFF0E5);
static const Color color_F05522 = Color(0xffF05522);
static const Color color_EF7249 = Color(0xffEF7249);
static const Color color_FFE2D3 = Color(0xffFFE2D3);
static const Color color_EEF0F2 = Color(0xffEEF0F2);
static const Color color_B7B7B7 = Color(0xffB7B7B7);
static const Color color_E9E9E9 = Color(0xffE9E9E9);
}
... ...
... ... @@ -62,7 +62,9 @@ class SystemAppBar extends StatelessWidget implements PreferredSizeWidget {
alignment: Alignment.center,
child: Text(
rightImgName,
style: TextStyle(color: MyColours.app_main),
style: TextStyle(
color: MyColours.color_199095,
fontSize: ScreenUtil().setSp(34)),
),
)),
)
... ...