Commit 153beb76 authored by skeyboy's avatar skeyboy

android 订阅样式修改

parent ac4c07fb
...@@ -6,6 +6,8 @@ class GoodEntity { ...@@ -6,6 +6,8 @@ class GoodEntity {
String? _goodsName; String? _goodsName;
String? _goodsDesc; String? _goodsDesc;
double? _amount; double? _amount;
double? _originalPrice;
String? _dayDesc;
int? _integral; int? _integral;
String? _createTime; String? _createTime;
String? _updateTime; String? _updateTime;
...@@ -17,8 +19,10 @@ class GoodEntity { ...@@ -17,8 +19,10 @@ class GoodEntity {
GoodEntity( GoodEntity(
{int? id, {int? id,
String? goodsName, String? goodsName,
String? dayDesc,
String? goodsDesc, String? goodsDesc,
double? amount, double? amount,
double? originalPrice,
int? integral, int? integral,
String? createTime, String? createTime,
String? updateTime, String? updateTime,
...@@ -38,6 +42,9 @@ class GoodEntity { ...@@ -38,6 +42,9 @@ class GoodEntity {
if (amount != null) { if (amount != null) {
this._amount = amount; this._amount = amount;
} }
if(originalPrice != null) {
_originalPrice = originalPrice;
}
if (integral != null) { if (integral != null) {
this._integral = integral; this._integral = integral;
} }
...@@ -59,6 +66,9 @@ class GoodEntity { ...@@ -59,6 +66,9 @@ class GoodEntity {
if (count != null) { if (count != null) {
this._count = count; this._count = count;
} }
if(dayDesc != null){
_dayDesc = dayDesc;
}
} }
int? get id => _id; int? get id => _id;
...@@ -69,6 +79,10 @@ class GoodEntity { ...@@ -69,6 +79,10 @@ class GoodEntity {
set goodsDesc(String? goodsDesc) => _goodsDesc = goodsDesc; set goodsDesc(String? goodsDesc) => _goodsDesc = goodsDesc;
double? get amount => _amount; double? get amount => _amount;
set amount(double? amount) => _amount = amount; set amount(double? amount) => _amount = amount;
double? get originalPrice => _originalPrice;
set originalPrice(double? originalPrice) => _originalPrice = originalPrice;
String? get dayDesc => _dayDesc;
set dayDesc(String? dayDesc) => _dayDesc = dayDesc;
int? get integral => _integral; int? get integral => _integral;
set integral(int? integral) => _integral = integral; set integral(int? integral) => _integral = integral;
String? get createTime => _createTime; String? get createTime => _createTime;
...@@ -97,6 +111,8 @@ class GoodEntity { ...@@ -97,6 +111,8 @@ class GoodEntity {
_isShelf = json['isShelf']; _isShelf = json['isShelf'];
_goodsType = json['goodsType']; _goodsType = json['goodsType'];
_count = json['count']; _count = json['count'];
_originalPrice = json['originalPrice'];
_dayDesc = json['dayDesc'] ?? "限时特惠";
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
......
import 'dart:math';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_barrage/flutter_barrage.dart'; import 'package:flutter_barrage/flutter_barrage.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_vibrate/flutter_vibrate.dart'; import 'package:flutter_vibrate/flutter_vibrate.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:glassy/glassy_button.dart'; import 'package:glassy/glassy_button.dart';
...@@ -200,8 +203,10 @@ class PayItemWidget extends GetView<AndroidPayListController> { ...@@ -200,8 +203,10 @@ class PayItemWidget extends GetView<AndroidPayListController> {
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child: IntrinsicHeight( child: IntrinsicHeight(
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: controller.state.items.reversed children: controller.state.items.reversed
.map((element) => Container( .map((element) => Container(
width: min(Get.width, 375).w / 4,
margin: const EdgeInsets.only(right: 10), margin: const EdgeInsets.only(right: 10),
child: InkWell( child: InkWell(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
...@@ -212,7 +217,7 @@ class PayItemWidget extends GetView<AndroidPayListController> { ...@@ -212,7 +217,7 @@ class PayItemWidget extends GetView<AndroidPayListController> {
}, },
child: Ink( child: Ink(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 5, vertical: 10), horizontal: 5, vertical: 20),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
// border: ,Color.argb(255, 62, 67, 95) // border: ,Color.argb(255, 62, 67, 95)
...@@ -249,10 +254,11 @@ class PayItemWidget extends GetView<AndroidPayListController> { ...@@ -249,10 +254,11 @@ class PayItemWidget extends GetView<AndroidPayListController> {
)), )),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.start,
children: [ children: [
Text( Text(
element.goodsName!, element.goodsName!,
maxLines: 1,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: controller.state color: controller.state
...@@ -264,6 +270,7 @@ class PayItemWidget extends GetView<AndroidPayListController> { ...@@ -264,6 +270,7 @@ class PayItemWidget extends GetView<AndroidPayListController> {
), ),
Text( Text(
'¥${element.amount!}', '¥${element.amount!}',
maxLines: 1,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: controller.state color: controller.state
...@@ -274,39 +281,67 @@ class PayItemWidget extends GetView<AndroidPayListController> { ...@@ -274,39 +281,67 @@ class PayItemWidget extends GetView<AndroidPayListController> {
: const Color.fromARGB( : const Color.fromARGB(
255, 241, 197, 131)), 255, 241, 197, 131)),
), ),
Container( if (element.originalPrice != null)
width: Get.width / 3.5, Text(
child: Column( '¥${element.originalPrice!}',
children: element.goodsDesc! maxLines: 1,
.split('、') style: TextStyle(
.map((e) => Text( decoration:
e, TextDecoration.combine([
textAlign: // TextDecoration.underline,
TextAlign.center, TextDecoration.lineThrough
style: TextStyle( ]),
fontWeight: fontWeight: FontWeight.bold,
FontWeight.bold, color: Color.fromARGB(
color: controller 255, 140, 145, 151)),
.state
.selectedItem
.id ==
element.id
? const Color
.fromARGB(
255,
230,
31,
32)
: const Color
.fromARGB(
255,
241,
197,
131)),
))
.toList(),
), ),
), if (element.dayDesc != null)
Text(
element.dayDesc!,
maxLines: 1,
style: TextStyle(
fontWeight: FontWeight.bold,
color: controller.state
.selectedItem.id ==
element.id
? const Color.fromARGB(
255, 230, 31, 32)
: const Color.fromARGB(
255, 241, 197, 131)),
),
// Container(
// width: Get.width / 3.5,
// child: Column(
// children: element.goodsDesc!
// .split('、')
// .map((e) => Text(
// e,
// textAlign:
// TextAlign.center,
// style: TextStyle(
// fontWeight:
// FontWeight.bold,
// color: controller
// .state
// .selectedItem
// .id ==
// element.id
// ? const Color
// .fromARGB(
// 255,
// 230,
// 31,
// 32)
// : const Color
// .fromARGB(
// 255,
// 241,
// 197,
// 131)),
// ))
// .toList(),
// ),
// ),
// Text( // Text(
// '¥${(double.parse(element.goodsDesc!) * 1.2).toStringAsFixed(2)}', // '¥${(double.parse(element.goodsDesc!) * 1.2).toStringAsFixed(2)}',
// style: TextStyle( // style: TextStyle(
......
...@@ -690,13 +690,16 @@ class SignInPage extends GetView<SignInController> { ...@@ -690,13 +690,16 @@ class SignInPage extends GetView<SignInController> {
child: Container( child: Container(
width: Get.width - 40, width: Get.width - 40,
height: 45, height: 45,
child: ElevatedButton( child: Padding(
// style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Color(0xFF6F35A5))), padding: const EdgeInsets.all(8.0),
onPressed: () { child: ElevatedButton(
controller.handleSignIn(); // style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Color(0xFF6F35A5))),
}, onPressed: () {
child: Text( controller.handleSignIn();
"登录".toUpperCase(), },
child: Text(
"登录".toUpperCase(),
),
), ),
), ),
), ),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment