|
@@ -14,6 +14,7 @@ import 'package:sport/services/api/inject_api.dart';
|
|
import 'package:sport/utils/toast.dart';
|
|
import 'package:sport/utils/toast.dart';
|
|
import 'package:sport/widgets/appbar.dart';
|
|
import 'package:sport/widgets/appbar.dart';
|
|
import 'package:sport/widgets/button_primary.dart';
|
|
import 'package:sport/widgets/button_primary.dart';
|
|
|
|
+import 'package:sport/widgets/decoration.dart';
|
|
import 'package:sport/widgets/space.dart';
|
|
import 'package:sport/widgets/space.dart';
|
|
|
|
|
|
class ScoreShopPage extends StatefulWidget {
|
|
class ScoreShopPage extends StatefulWidget {
|
|
@@ -89,7 +90,7 @@ class _ScoreShopPageState extends ViewStateLifecycle<ScoreShopPage, ShopModel>
|
|
},
|
|
},
|
|
),
|
|
),
|
|
Text(
|
|
Text(
|
|
- "",
|
|
|
|
|
|
+ "积分商城",
|
|
style: TextStyle(
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
color: Colors.white,
|
|
fontSize: 18,
|
|
fontSize: 18,
|
|
@@ -269,23 +270,13 @@ class _ScoreShopPageState extends ViewStateLifecycle<ScoreShopPage, ShopModel>
|
|
crossAxisCount: 2,
|
|
crossAxisCount: 2,
|
|
crossAxisSpacing: 18,
|
|
crossAxisSpacing: 18,
|
|
mainAxisSpacing:18,
|
|
mainAxisSpacing:18,
|
|
- childAspectRatio: 157 / 181),
|
|
|
|
|
|
+ childAspectRatio: 150 / 181),
|
|
delegate: SliverChildBuilderDelegate(
|
|
delegate: SliverChildBuilderDelegate(
|
|
(BuildContext context, int index) {
|
|
(BuildContext context, int index) {
|
|
Items item = model?.shop?.items[index];
|
|
Items item = model?.shop?.items[index];
|
|
return Container(
|
|
return Container(
|
|
- decoration: BoxDecoration(
|
|
|
|
- borderRadius:
|
|
|
|
- BorderRadius.all(Radius.circular(10.0)),
|
|
|
|
- color: Colors.white,
|
|
|
|
- boxShadow: [
|
|
|
|
- BoxShadow(
|
|
|
|
- offset: Offset(0.0, 0),
|
|
|
|
- blurRadius: 5,
|
|
|
|
- spreadRadius: 0,
|
|
|
|
- color: Color.fromRGBO(0, 0, 0, 0.1))
|
|
|
|
- ],
|
|
|
|
- ),
|
|
|
|
|
|
+ margin: EdgeInsets.all(5.0),
|
|
|
|
+ decoration: card(),
|
|
child: Column(
|
|
child: Column(
|
|
children: <Widget>[
|
|
children: <Widget>[
|
|
Space(height: 10.0,),
|
|
Space(height: 10.0,),
|
|
@@ -297,7 +288,7 @@ class _ScoreShopPageState extends ViewStateLifecycle<ScoreShopPage, ShopModel>
|
|
Container(
|
|
Container(
|
|
alignment: Alignment.center,
|
|
alignment: Alignment.center,
|
|
child: Text(
|
|
child: Text(
|
|
- "${item?.name}",
|
|
|
|
|
|
+ "${item?.name}${item.price}积分",
|
|
style: TextStyle(
|
|
style: TextStyle(
|
|
color: Color(0xff333333),
|
|
color: Color(0xff333333),
|
|
fontSize: 14.0),
|
|
fontSize: 14.0),
|
|
@@ -313,7 +304,9 @@ class _ScoreShopPageState extends ViewStateLifecycle<ScoreShopPage, ShopModel>
|
|
callback: () async {
|
|
callback: () async {
|
|
// print("${item.id}-----------------------------");
|
|
// print("${item.id}-----------------------------");
|
|
var data = (await api.buyItem('${item.id}'));
|
|
var data = (await api.buyItem('${item.id}'));
|
|
- ToastUtil.show("${data.msg}");
|
|
|
|
|
|
+ // ToastUtil.show("${data.msg}");
|
|
|
|
+ ToastUtil.show("兑换成功,当前改名卡数量${data.data == null ? 0 : data.data}");
|
|
|
|
+ model.init();
|
|
},
|
|
},
|
|
content: "兑换",
|
|
content: "兑换",
|
|
height: 35.0,
|
|
height: 35.0,
|