|
@@ -14,6 +14,7 @@ import 'package:sport/services/api/inject_api.dart';
|
|
|
import 'package:sport/utils/toast.dart';
|
|
|
import 'package:sport/widgets/appbar.dart';
|
|
|
import 'package:sport/widgets/button_primary.dart';
|
|
|
+import 'package:sport/widgets/decoration.dart';
|
|
|
import 'package:sport/widgets/space.dart';
|
|
|
|
|
|
class ScoreShopPage extends StatefulWidget {
|
|
@@ -89,7 +90,7 @@ class _ScoreShopPageState extends ViewStateLifecycle<ScoreShopPage, ShopModel>
|
|
|
},
|
|
|
),
|
|
|
Text(
|
|
|
- "",
|
|
|
+ "积分商城",
|
|
|
style: TextStyle(
|
|
|
color: Colors.white,
|
|
|
fontSize: 18,
|
|
@@ -269,23 +270,13 @@ class _ScoreShopPageState extends ViewStateLifecycle<ScoreShopPage, ShopModel>
|
|
|
crossAxisCount: 2,
|
|
|
crossAxisSpacing: 18,
|
|
|
mainAxisSpacing:18,
|
|
|
- childAspectRatio: 157 / 181),
|
|
|
+ childAspectRatio: 150 / 181),
|
|
|
delegate: SliverChildBuilderDelegate(
|
|
|
(BuildContext context, int index) {
|
|
|
Items item = model?.shop?.items[index];
|
|
|
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(
|
|
|
children: <Widget>[
|
|
|
Space(height: 10.0,),
|
|
@@ -297,7 +288,7 @@ class _ScoreShopPageState extends ViewStateLifecycle<ScoreShopPage, ShopModel>
|
|
|
Container(
|
|
|
alignment: Alignment.center,
|
|
|
child: Text(
|
|
|
- "${item?.name}",
|
|
|
+ "${item?.name}${item.price}积分",
|
|
|
style: TextStyle(
|
|
|
color: Color(0xff333333),
|
|
|
fontSize: 14.0),
|
|
@@ -313,7 +304,9 @@ class _ScoreShopPageState extends ViewStateLifecycle<ScoreShopPage, ShopModel>
|
|
|
callback: () async {
|
|
|
// print("${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: "兑换",
|
|
|
height: 35.0,
|