Browse Source

safety

master
fmk 3 years ago
parent
commit
2bc21fed79
  1. 3
      lib/retrofit/data/store_info.dart
  2. 41
      lib/store/store_order.dart
  3. 8
      lib/union/union_view/store_info.dart

3
lib/retrofit/data/store_info.dart

@ -17,6 +17,7 @@ class StoreInfo {
DeliveryInfo deliveryInfo;
String district;
String headMobile;
String tel;
String headName;
String id;
num isAutoSendRefundAddress;
@ -67,6 +68,7 @@ class StoreInfo {
: DeliveryInfo.fromJson(json['deliveryInfo'] as Map<String, dynamic>)
..district = json['district'] as String
..headMobile = json['headMobile'] as String
..tel = json['tel'] as String
..headName = json['headName'] as String
..id = json['id'] as String
..isVip = json['isVip']
@ -115,6 +117,7 @@ class StoreInfo {
'deliveryInfo': this.deliveryInfo.toJson(),
'district': this.district,
'headMobile': this.headMobile,
'tel': this.tel,
'headName': this.headName,
'id': this.id,
'isAutoSendRefundAddress': this.isAutoSendRefundAddress,

41
lib/store/store_order.dart

@ -24,7 +24,7 @@ class StoreOrderPage extends StatefulWidget {
}
class _StoreOrderPage extends State<StoreOrderPage>
with TickerProviderStateMixin, AutomaticKeepAliveClientMixin {
with TickerProviderStateMixin/*, AutomaticKeepAliveClientMixin */{
TabController tabcontroller;
ApiService apiService;
StoreInfo storeInfo;
@ -34,8 +34,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
void initState() {
super.initState();
refreshController = RefreshController(initialRefresh: false);
queryStoreInfo();
}
@ -72,13 +70,14 @@ class _StoreOrderPage extends State<StoreOrderPage>
child: DefaultTabController(
length: 2,
child: SmartRefresher(
controller: refreshController,
controller: refreshController =
RefreshController(initialRefresh: false),
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
physics: BouncingScrollPhysics(),
onRefresh: () {
setState(() {});
queryStoreInfo();
},
child: NestedScrollView(
headerSliverBuilder:
@ -88,10 +87,32 @@ class _StoreOrderPage extends State<StoreOrderPage>
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(
context),
sliver: SliverAppBar(
title: Text(""),
expandedHeight: 365.h,
title: Text(
"百年川椒",
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18.sp,
),
),
expandedHeight: (storeInfo != null && storeInfo.couponVOList != null) ? 425.h : 365.h,
floating: false,
snap: false,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
pinned: true,
flexibleSpace: FlexibleSpaceBar(
background: Stack(
@ -194,10 +215,12 @@ class _StoreOrderPage extends State<StoreOrderPage>
physics: BouncingScrollPhysics(),
children: [
Container(
color: Colors.white,
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width,
),
Container(
color: Colors.white,
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width,
)
@ -216,6 +239,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
);
}
@override
bool get wantKeepAlive => true;
// @override
// bool get wantKeepAlive => true;
}

8
lib/union/union_view/store_info.dart

@ -262,12 +262,12 @@ class _StoreInfos extends State<StoreInfos> {
title: Text(S.of(context).bodadianhua),
actions: [
if (widget.storeInfo != null &&
widget.storeInfo.headMobile != null &&
widget.storeInfo.headMobile != "")
widget.storeInfo.tel != null &&
widget.storeInfo.tel != "")
CupertinoActionSheetAction(
child: Text(widget.storeInfo.headMobile),
child: Text(widget.storeInfo.tel),
onPressed: () {
callMobile(widget.storeInfo.headMobile);
callMobile(widget.storeInfo.tel);
Navigator.of(context).pop();
},
isDefaultAction: true,

Loading…
Cancel
Save