huxiaoqiang пре 4 година
родитељ
комит
0c2f22409f

+ 12 - 0
images/svg/店铺.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="21px" height="21px" viewBox="0 0 21 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <!-- Generator: Sketch 54.1 (76490) - https://sketchapp.com -->
+    <title>店铺</title>
+    <desc>Created with Sketch.</desc>
+    <g id="店铺" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <rect id="矩形" fill="#FD3C31" x="0" y="0" width="21" height="21" rx="4"></rect>
+        <g id="编组" transform="translate(4.000000, 5.000000)" fill="#FFFFFF">
+            <path d="M6.35725366,10.0425231 L2.86247317,11.7311385 C2.72644878,11.7972923 2.56379024,11.7840615 2.44044878,11.6972923 C2.31774146,11.6108308 2.2546439,11.4646769 2.2771561,11.3185231 L2.85200976,7.57113846 L0.117253659,4.86775385 C0.0104,4.76252308 -0.0270146341,4.60836923 0.0199121951,4.46806154 C0.0668390244,4.32775385 0.190497561,4.22436923 0.340156098,4.20006154 L4.19069268,3.57298462 L5.9951561,0.213292308 C6.06554634,0.0822153846 6.20505854,6.15384615e-05 6.35725366,6.15384615e-05 C6.50913171,6.15384615e-05 6.6486439,0.0822153846 6.71871707,0.213292308 L8.52318049,3.57298462 L12.3737171,4.20006154 C12.5236927,4.22436923 12.6473512,4.32775385 12.693961,4.46806154 C12.7412049,4.60836923 12.7037902,4.76252308 12.5969366,4.86775385 L9.86218049,7.57113846 L10.4370341,11.3185231 C10.4595463,11.4643692 10.3967659,11.6108308 10.2740585,11.6976 C10.1510341,11.7843692 9.98837561,11.7976 9.85203415,11.7317538 L6.35725366,10.0419077 L6.35725366,10.0425231 Z" id="Fill-1"></path>
+        </g>
+    </g>
+</svg>

+ 9 - 0
images/svg/电话.svg

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <!-- Generator: Sketch 54.1 (76490) - https://sketchapp.com -->
+    <title>电话</title>
+    <desc>Created with Sketch.</desc>
+    <g id="电话" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <path d="M8.99995206,18 C4.02950193,18 0,13.9704927 0,8.99994007 C0,4.02950729 4.02950193,0 8.99995206,0 C13.9704741,0 18,4.02950729 18,8.99994007 C18,13.9704927 13.9704741,18 8.99995206,18 Z M8.99995206,16.7727507 C13.2927661,16.7727507 16.7727284,13.2927598 16.7727284,8.99994007 C16.7727284,4.70724019 13.2927661,1.2272493 8.99995206,1.2272493 C4.70723392,1.2272493 1.22724767,4.70724019 1.22724767,8.99994007 C1.22724767,13.2927598 4.70723392,16.7727507 8.99995206,16.7727507 Z M13.0908895,12.4649496 C13.0895711,12.8098086 12.8106305,13.0891091 12.4657959,13.0908829 C8.2931203,13.0991287 4.90911052,9.71427544 4.90911052,5.53495452 C4.90994948,5.18999964 5.18915377,4.91041145 5.53420407,4.90909309 L7.05189804,4.90909309 C7.39498278,4.90722341 7.67476236,5.18371945 7.67699159,5.52680466 C7.67785451,6.03327061 7.75714777,6.53729161 7.91098818,7.01997915 C7.98486418,7.24311756 7.92587365,7.48881192 7.75884965,7.65406235 L6.90874831,8.51154763 C7.49882147,9.60679315 8.3963837,10.5054832 9.49086071,11.0969714 L10.33938,10.2468689 C10.5073628,10.0816904 10.7530569,10.0230833 10.9775852,10.0947062 C11.4582107,10.251639 11.9610086,10.330381 12.4666349,10.3278641 C12.8113017,10.3297338 13.0900505,10.6091302 13.0908895,10.9537975 L13.0908895,12.4649496 Z" id="liebiao-bodadianhua" fill="#FF4233"></path>
+    </g>
+</svg>

+ 6 - 0
lib/beans/system_information_bean_entity.dart

@@ -0,0 +1,6 @@
+import 'package:bbyyy/generated/json/base/json_convert_content.dart';
+
+class SystemInformationBeanEntity with JsonConvert<SystemInformationBeanEntity> {
+	String type;
+	String content;
+}

+ 10 - 0
lib/generated/json/base/json_convert_content.dart

@@ -37,6 +37,8 @@ import 'package:bbyyy/beans/smart_order_bean_entity.dart';
 import 'package:bbyyy/generated/json/smart_order_bean_entity_helper.dart';
 import 'package:bbyyy/beans/android_app_version_bean_entity.dart';
 import 'package:bbyyy/generated/json/android_app_version_bean_entity_helper.dart';
+import 'package:bbyyy/beans/system_information_bean_entity.dart';
+import 'package:bbyyy/generated/json/system_information_bean_entity_helper.dart';
 import 'package:bbyyy/beans/vp_pricing_bean_entity.dart';
 import 'package:bbyyy/generated/json/vp_pricing_bean_entity_helper.dart';
 import 'package:bbyyy/beans/offline_payment_bean_entity.dart';
@@ -157,6 +159,8 @@ class JsonConvert<T> {
 				return androidAppVersionBeanEntityFromJson(data as AndroidAppVersionBeanEntity, json) as T;
 			case AndroidAppVersionBeanData:
 				return androidAppVersionBeanDataFromJson(data as AndroidAppVersionBeanData, json) as T;
+			case SystemInformationBeanEntity:
+				return systemInformationBeanEntityFromJson(data as SystemInformationBeanEntity, json) as T;
 			case VpPricingBeanEntity:
 				return vpPricingBeanEntityFromJson(data as VpPricingBeanEntity, json) as T;
 			case VpPricingBeanData:
@@ -322,6 +326,8 @@ class JsonConvert<T> {
 				return androidAppVersionBeanEntityToJson(data as AndroidAppVersionBeanEntity);
 			case AndroidAppVersionBeanData:
 				return androidAppVersionBeanDataToJson(data as AndroidAppVersionBeanData);
+			case SystemInformationBeanEntity:
+				return systemInformationBeanEntityToJson(data as SystemInformationBeanEntity);
 			case VpPricingBeanEntity:
 				return vpPricingBeanEntityToJson(data as VpPricingBeanEntity);
 			case VpPricingBeanData:
@@ -488,6 +494,8 @@ class JsonConvert<T> {
 			return AndroidAppVersionBeanEntity().fromJson(json);
 		}	else if(type == (AndroidAppVersionBeanData).toString()){
 			return AndroidAppVersionBeanData().fromJson(json);
+		}	else if(type == (SystemInformationBeanEntity).toString()){
+			return SystemInformationBeanEntity().fromJson(json);
 		}	else if(type == (VpPricingBeanEntity).toString()){
 			return VpPricingBeanEntity().fromJson(json);
 		}	else if(type == (VpPricingBeanData).toString()){
@@ -654,6 +662,8 @@ class JsonConvert<T> {
 			return data.map<AndroidAppVersionBeanEntity>((e) => AndroidAppVersionBeanEntity().fromJson(e)).toList() as M;
 		}	else if(<AndroidAppVersionBeanData>[] is M){
 			return data.map<AndroidAppVersionBeanData>((e) => AndroidAppVersionBeanData().fromJson(e)).toList() as M;
+		}	else if(<SystemInformationBeanEntity>[] is M){
+			return data.map<SystemInformationBeanEntity>((e) => SystemInformationBeanEntity().fromJson(e)).toList() as M;
 		}	else if(<VpPricingBeanEntity>[] is M){
 			return data.map<VpPricingBeanEntity>((e) => VpPricingBeanEntity().fromJson(e)).toList() as M;
 		}	else if(<VpPricingBeanData>[] is M){

+ 18 - 0
lib/generated/json/system_information_bean_entity_helper.dart

@@ -0,0 +1,18 @@
+import 'package:bbyyy/beans/system_information_bean_entity.dart';
+
+systemInformationBeanEntityFromJson(SystemInformationBeanEntity data, Map<String, dynamic> json) {
+	if (json['type'] != null) {
+		data.type = json['type'].toString();
+	}
+	if (json['content'] != null) {
+		data.content = json['content'].toString();
+	}
+	return data;
+}
+
+Map<String, dynamic> systemInformationBeanEntityToJson(SystemInformationBeanEntity entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['type'] = entity.type;
+	data['content'] = entity.content;
+	return data;
+}

+ 73 - 0
lib/main.dart

@@ -22,6 +22,7 @@ import 'package:rxdart/rxdart.dart';
 
 import 'beans/my_shop_bean_entity.dart';
 import 'beans/new_order_bean_entity.dart';
+import 'beans/system_information_bean_entity.dart';
 import 'https/MyDio.dart';
 import 'my_tools/const.dart';
 import 'my_tools/dims.dart';
@@ -113,6 +114,13 @@ class MyApp extends StatelessWidget with WidgetsBindingObserver {
       newOrder = arg;
       displayPendingOrders();
     });
+    EventBus().on('systemInformation', (arg) {
+      print('systemInformationasdasdasd');
+      if(arg is SystemInformationBeanEntity){
+        print('systemInformationasdasdasdcccccccccccccccccccccccccccccccccccccccc');
+        showSystemMessages(arg);
+      }
+    });
     return super.createElement();
   }
 
@@ -967,6 +975,71 @@ class MyApp extends StatelessWidget with WidgetsBindingObserver {
     //   }
     // }, (e) {}, context);
   }
+
+  void showSystemMessages(SystemInformationBeanEntity arg) {
+    EasyLoading.instance
+      ..contentPadding = EdgeInsets.symmetric(horizontal: 12, vertical: 12)
+      ..alignment = Alignment.center
+      ..contentMargin = EdgeInsets.fromLTRB(20, 20, 20, 65);
+    EasyLoading.show(
+      indicator: Material(
+        color: Colors.white,
+        child: Center(
+          child: Container(
+            decoration: BoxDecoration(
+              borderRadius: BorderRadius.circular(16),
+              color: Colors.white,
+            ),
+            height: 180,
+            padding: EdgeInsets.symmetric(horizontal: 8, vertical: 12),
+            child: Column(
+              children: [
+                Expanded(
+                  child: Center(
+                    child: Container(
+                      child: MyViews().myText(arg.content, MyColors.c333333, 14),
+                      margin: EdgeInsets.symmetric(horizontal: 20),
+                    ),
+                  ),
+                ),
+                Container(
+                  height: 0.5,
+                  color: MyColors.cE7E7E7,
+                  margin: EdgeInsets.only(bottom: 12),
+                ),
+                Container(
+                  margin: EdgeInsets.symmetric(horizontal: 10),
+                  child: Row(
+                    children: [
+                      Expanded(
+                        child: GestureDetector(
+                          onTap: () {
+                            EasyLoading.dismiss();
+                          },
+                          behavior: HitTestBehavior.translucent,
+                          child: Container(
+                            decoration: BoxDecoration(
+                                borderRadius: BorderRadius.circular(20),
+                                border: Border.all(
+                                    color: MyColors.cFF4233, width: 1.1),
+                                color: Colors.white),
+                            child: MyViews().myText('我知道了', MyColors.cFF4233, 14),
+                            height: 40,
+                            alignment: Alignment.center,
+                          ),
+                        ),
+                      ),
+                    ],
+                  ),
+                )
+              ],
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            ),
+          ),
+        ),
+      ),
+    );
+  }
 }
 
 class FallbackCupertinoLocalisationsDelegate

+ 2 - 2
lib/my_tools/my_views.dart

@@ -237,14 +237,14 @@ class MyViews {
                 child: Row(
                   children: [
                     ClipRRect(
-                      child: MyViews().netImg(imgURL(data.userPic), 20, 20),
+                      child: Container(height: 20,),
                       borderRadius: BorderRadius.all(Radius.circular(10)),
                     ),
                     Expanded(
                       child: Container(
                         margin: EdgeInsets.only(right: 5, left: 5),
                         child: Text(
-                          data.userName,
+                          '',
                           style: TextStyle(
                             color: MyColors.c999999,
                             fontSize: 10,

+ 16 - 2
lib/nsq/nsq.dart

@@ -14,6 +14,7 @@ import 'package:bbyyy/my_tools/const.dart';
 import 'package:bbyyy/my_tools/event_bus.dart';
 import 'package:bbyyy/my_tools/my_cookie.dart';
 import 'package:flutter_local_notifications/flutter_local_notifications.dart';
+import 'package:bbyyy/beans/system_information_bean_entity.dart';
 
 import '../main.dart';
 
@@ -56,7 +57,8 @@ Future<void> handlerMessage(Message message) async {
       NewOrderBeanEntity order =
           NewOrderBeanEntity().fromJson(json.decode(utf8.decode(message.Body)));
       EventBus().emit('hasNewOrder', order);
-    } else if (entity.type == notifyTypeNewMsg) {
+    }
+    else if (entity.type == notifyTypeNewMsg) {
       MessageBeanEntity entity =
           MessageBeanEntity().fromJson(json.decode(utf8.decode(message.Body)));
       MsgDB msgDB =
@@ -67,9 +69,21 @@ Future<void> handlerMessage(Message message) async {
       await msgDB.addTableData([entity.content]);
       EventBus().emit('hasNewMsg', entity);
       EventBus().emit('hasNewMsgInMsgPage', entity);
-    } else if (entity.type == notifyTypeOrderPaymentIsSuccessful) {
+    }
+    else if (entity.type == notifyTypeOrderPaymentIsSuccessful) {
       EventBus().emit('alipayPaymentCallback');
     }
+    else if(entity.type == notifyTypeSysMsg){
+      print('$notifyTypeSysMsg---------------------------\n${utf8.decode(message.Body)}\n---------------------');
+      SystemInformationBeanEntity entity = SystemInformationBeanEntity().fromJson(json.decode(utf8.decode(message.Body)));
+      String systemInformation = MyCookie().prefs.getString('${MyCookie().getUID()}系统消息');
+      if(systemInformation==null){
+        MyCookie().prefs.setString('${MyCookie().getUID()}系统消息', entity.content);
+      }else{
+        MyCookie().prefs.setString('${MyCookie().getUID()}系统消息', '${entity.content}!@##@!$systemInformation');
+      }
+      EventBus().emit('systemInformation',entity);
+    }
   } catch (e) {}
   return;
 }

+ 386 - 101
lib/paegs/gang_page/gang_in_page/gang_in_page.dart

@@ -7,9 +7,11 @@ import 'package:bbyyy/beans/my_shop_bean_entity.dart';
 import 'package:bbyyy/beans/new_order_bean_entity.dart';
 import 'package:bbyyy/beans/pay_by_alipay_bean_entity.dart';
 import 'package:bbyyy/beans/smart_order_bean_entity.dart';
+import 'package:bbyyy/beans/store_bean_entity.dart';
 import 'package:bbyyy/beans/user_balance_entity.dart';
 import 'package:bbyyy/https/MyDio.dart';
 import 'package:bbyyy/https/my_request.dart';
+import 'package:bbyyy/https/url.dart';
 import 'package:bbyyy/my_tools/const.dart';
 import 'package:bbyyy/my_tools/dims.dart';
 import 'package:bbyyy/my_tools/easy_loading/easy_loading.dart';
@@ -27,6 +29,7 @@ import 'package:flutter_slidable/flutter_slidable.dart';
 import 'package:flutter_svg/svg.dart';
 import 'package:pull_to_refresh/pull_to_refresh.dart';
 import 'package:tobias/tobias.dart';
+import 'package:url_launcher/url_launcher.dart';
 
 import 'gang_information_page/gang_information_page.dart';
 
@@ -71,6 +74,7 @@ class _GangInPageState extends State<GangInPage> {
     if (widget.data.ownerUid == MyCookie().getUID()) {
       selectedIndex = 1;
     }
+    queryStoreInformation();
   }
 
   @override
@@ -87,19 +91,308 @@ class _GangInPageState extends State<GangInPage> {
       body: Column(
         children: [
           MyViews().myAppBar(widget.data.shopName, context, [
-            IconButton(
-                icon: Icon(Icons.more_horiz),
-                onPressed: () {
-                  MyTools()
-                      .toPage(context, GangInformationPage(widget.data), (then) {
-                        if(then=='删除货帮'){
-                          Navigator.pop(context,'删除货帮');
-                        }
-                  });
-                })
+            Visibility(
+              visible: widget.data.ownerUid == MyCookie().getUID(),
+              child: IconButton(
+                  icon: Icon(Icons.more_horiz),
+                  onPressed: () {
+                    MyTools().toPage(context, GangInformationPage(widget.data),
+                        (then) {
+                      if (then == '删除货帮') {
+                        Navigator.pop(context, '删除货帮');
+                      }
+                    });
+                  }),
+            )
           ]),
+          Container(
+            color: MyColors.cF7F7F7,
+            child: Container(
+              decoration: BoxDecoration(
+                  borderRadius: BorderRadius.circular(4), color: Colors.white),
+              margin: EdgeInsets.all(10),
+              child: Column(
+                children: [
+                  GestureDetector(
+                    onTap: () {
+                      showDialog(
+                        context: context,
+                        builder: (BuildContext context) {
+                          return Material(
+                            color: Colors.black12,
+                            child: Center(
+                              child: Container(
+                                decoration: BoxDecoration(
+                                  borderRadius: BorderRadius.circular(16),
+                                  color: Colors.white,
+                                ),
+                                height: 510,
+                                margin: EdgeInsets.symmetric(horizontal: 28),
+                                padding: EdgeInsets.symmetric(
+                                    horizontal: 14, vertical: 15),
+                                child: Column(
+                                  children: [
+                                    Container(
+                                      height:
+                                          MediaQuery.of(context).size.width -
+                                              71,
+                                      width: MediaQuery.of(context).size.width -
+                                          56,
+                                      child: Stack(
+                                        children: [
+                                          ClipRRect(
+                                            child: MyViews().netImg(
+                                                imgURL(widget.data.shopPic),
+                                                MediaQuery.of(context)
+                                                        .size
+                                                        .width -
+                                                    84,
+                                                MediaQuery.of(context)
+                                                        .size
+                                                        .width -
+                                                    84),
+                                            borderRadius:
+                                                BorderRadius.circular(4),
+                                          ),
+                                          Positioned(
+                                            right: 0,
+                                            top: 0,
+                                            child: IconButton(
+                                                icon: Icon(
+                                                  Icons.cancel,
+                                                  color: MyColors.cC9C9C9,
+                                                  size: 24,
+                                                ),
+                                                onPressed: () {
+                                                  Navigator.pop(context);
+                                                }),
+                                          ),
+                                        ],
+                                      ),
+                                    ),
+                                    Row(
+                                      children: [
+                                        SvgPicture.asset(
+                                          'images/svg/店铺.svg',
+                                          height: 21,
+                                          width: 21,
+                                        ),
+                                        Container(
+                                          width: 6,
+                                        ),
+                                        Expanded(
+                                            child: Text(
+                                          widget.data.shopName,
+                                          style: TextStyle(
+                                              color: MyColors.c333333,
+                                              fontSize: 16),
+                                        ))
+                                      ],
+                                    ),
+                                    Container(height: 10,),
+                                    Text(
+                                      store == null
+                                          ? '店铺介绍:暂无'
+                                          : '店铺介绍:${store.introduction}',
+                                      style: TextStyle(
+                                        color: MyColors.c333333,
+                                        fontSize: 12,
+                                      ),
+                                      maxLines: 3,
+                                      overflow: TextOverflow.ellipsis,
+                                      softWrap: true,
+                                    ),  Container(height: 10,),
+                                    Row(
+                                      children: [
+                                        SvgPicture.asset(
+                                          'images/svg/地址.svg',
+                                          color: MyColors.c666666,
+                                          height: 12,
+                                          width: 12,
+                                        ),
+                                        Container(
+                                          width: 5,
+                                        ),
+                                        Expanded(
+                                          child: Text(
+                                            store == null
+                                                ? '暂无'
+                                                : store.address,
+                                            style: TextStyle(
+                                                color: MyColors.c666666,
+                                                fontSize: 11),
+                                            maxLines: 1,
+                                            overflow: TextOverflow.ellipsis,
+                                            softWrap: true,
+                                          ),
+                                        ),
+                                      ],
+                                    ),  Container(height: 10,),
+                                    GestureDetector(
+                                      onTap: (){
+                                        launch('tel:${store.mobile}');
+                                      },
+                                      behavior: HitTestBehavior.translucent,
+                                      child: Container(
+                                        decoration: BoxDecoration(
+                                          color: MyColors.cFF4233,
+                                          borderRadius: BorderRadius.circular(20),
+                                        ),
+                                        height: 40,
+                                        child: Row(children: [
+                                          SvgPicture.asset('images/svg/电话.svg',color: Colors.white,height: 24,width: 24,),
+                                          Container(width: 4,),
+                                          Text(store==null?'':store.mobile,style: TextStyle(color: Colors.white,fontSize: 15),),
+                                        ],mainAxisAlignment: MainAxisAlignment.center,),
+                                        alignment: Alignment.center,
+                                      ),
+                                    )
+                                  ],
+                                  mainAxisAlignment:
+                                      MainAxisAlignment.spaceAround,
+                                  crossAxisAlignment: CrossAxisAlignment.start,
+                                ),
+                              ),
+                            ),
+                          );
+                        },
+                      );
+                    },
+                    behavior: HitTestBehavior.translucent,
+                    child: Row(
+                      children: [
+                        Container(
+                          margin: EdgeInsets.only(
+                              right: 10, top: 6, left: 6, bottom: 6),
+                          child: ClipRRect(
+                            child: MyViews()
+                                .netImg(imgURL(widget.data.shopPic), 65, 65),
+                            borderRadius: BorderRadius.circular(4),
+                          ),
+                        ),
+                        Expanded(
+                          child: Container(
+                            height: 65,
+                            margin: EdgeInsets.only(right: 6),
+                            child: Column(
+                              children: [
+                                Text(
+                                  widget.data.shopName,
+                                  style: TextStyle(
+                                      color: MyColors.c333333, fontSize: 13),
+                                  maxLines: 1,
+                                  overflow: TextOverflow.ellipsis,
+                                  softWrap: true,
+                                ),
+                                Row(
+                                  children: [
+                                    Expanded(
+                                      child: Text(
+                                        store == null
+                                            ? '店铺介绍:无'
+                                            : '店铺介绍:${store.introduction}',
+                                        style: TextStyle(
+                                            color: MyColors.c666666,
+                                            fontSize: 11),
+                                        maxLines: 1,
+                                        overflow: TextOverflow.ellipsis,
+                                        softWrap: true,
+                                      ),
+                                    ),
+                                    SvgPicture.asset(
+                                      'images/svg/箭头.svg',
+                                      color: MyColors.c666666,
+                                      height: 10,
+                                      width: 10,
+                                    )
+                                  ],
+                                  crossAxisAlignment: CrossAxisAlignment.center,
+                                ),
+                                Row(
+                                  children: [
+                                    SvgPicture.asset(
+                                      'images/svg/地址.svg',
+                                      color: MyColors.c666666,
+                                      height: 12,
+                                      width: 12,
+                                    ),
+                                    Container(
+                                      width: 5,
+                                    ),
+                                    Expanded(
+                                      child: Text(
+                                        store == null ? '暂无' : store.address,
+                                        style: TextStyle(
+                                            color: MyColors.c666666,
+                                            fontSize: 11),
+                                        maxLines: 1,
+                                        overflow: TextOverflow.ellipsis,
+                                        softWrap: true,
+                                      ),
+                                    ),
+                                  ],
+                                ),
+                              ],
+                              crossAxisAlignment: CrossAxisAlignment.start,
+                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                            ),
+                          ),
+                        )
+                      ],
+                    ),
+                  ),
+                  Container(
+                    height: 0.5,
+                    color: MyColors.cE7E7E7,
+                  ),
+                  Container(
+                    margin: EdgeInsets.all(6),
+                    child: Row(
+                      children: [
+                        Row(
+                          children: [
+                            SvgPicture.asset(
+                              'images/svg/电话.svg',
+                              height: 18,
+                              width: 18,
+                            ),
+                            Container(
+                              width: 5,
+                            ),
+                            Text(
+                              store == null ? '暂无' : store.mobile,
+                              style: TextStyle(
+                                  color: MyColors.cFF4233, fontSize: 12),
+                            ),
+                          ],
+                        ),
+                        GestureDetector(
+                          onTap: () {
+                            launch('tel:${store.mobile}');
+                          },
+                          behavior: HitTestBehavior.translucent,
+                          child: Container(
+                            decoration: BoxDecoration(
+                              color: MyColors.cFF4233,
+                              borderRadius: BorderRadius.circular(10),
+                            ),
+                            height: 20,
+                            width: 50,
+                            child: MyViews().myText('点击拨打', Colors.white, 9),
+                            alignment: Alignment.center,
+                          ),
+                        )
+                      ],
+                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                    ),
+                  )
+                ],
+              ),
+            ),
+          ),
           Visibility(
-            visible: widget.data.privateShop||widget.data.ownerUid==MyCookie().getUID(),
+            visible: widget.data.privateShop ||
+                widget.data.ownerUid == MyCookie().getUID(),
             child: Container(
               height: 40,
               color: Colors.white,
@@ -242,8 +535,8 @@ class _GangInPageState extends State<GangInPage> {
                   Expanded(
                     child: GestureDetector(
                       onTap: () {
-                        MyTools().toPage(
-                            context, PayToTheHelperPage(widget.data), (then) {});
+                        MyTools().toPage(context,
+                            PayToTheHelperPage(widget.data), (then) {});
                       },
                       behavior: HitTestBehavior.translucent,
                       child: Container(
@@ -305,8 +598,8 @@ class _GangInPageState extends State<GangInPage> {
               : ListView.builder(
                   itemBuilder: (c, index) {
                     return Slidable(
-                      child:
-                          MyViews().getNoPayGoodsItem(orders[index], context,widget.data.ownerUid),
+                      child: MyViews().getNoPayGoodsItem(
+                          orders[index], context, widget.data.ownerUid),
                       actionPane: SlidableDrawerActionPane(),
                       enabled: widget.data.ownerUid == MyCookie().getUID(),
                       actionExtentRatio: 0.25,
@@ -318,13 +611,19 @@ class _GangInPageState extends State<GangInPage> {
                                 borderRadius: BorderRadius.circular(30),
                                 color: MyColors.cFF4233,
                               ),
-                              height: 60,width: 60,
-                              child: SvgPicture.asset('images/svg/del.svg',height: 40,width: 40,),
+                              height: 60,
+                              width: 60,
+                              child: SvgPicture.asset(
+                                'images/svg/del.svg',
+                                height: 40,
+                                width: 40,
+                              ),
                               alignment: Alignment.center,
                             ),
                           ),
-                          onTap: (){
-                            showSimpleDialog('将删除订单(${orders[index].uid})', context, (){
+                          onTap: () {
+                            showSimpleDialog(
+                                '将删除订单(${orders[index].uid})', context, () {
                               Navigator.pop(context);
                               deleteOrder(orders[index]);
                             });
@@ -350,7 +649,8 @@ class _GangInPageState extends State<GangInPage> {
               ? noData()
               : ListView.builder(
                   itemBuilder: (c, index) {
-                    return MyViews().getNoPayGoodsItem(orders[index], context,widget.data.ownerUid);
+                    return MyViews().getNoPayGoodsItem(
+                        orders[index], context, widget.data.ownerUid);
                   },
                   itemCount: orders.length,
                   padding: EdgeInsets.only(left: 10, right: 10, top: 10),
@@ -389,7 +689,7 @@ class _GangInPageState extends State<GangInPage> {
     MyDio().query({
       "key": "commodity",
       "filters": {
-        "conditions": ["shop_uid == ${widget.data.shopUid}","on_sale == true"]
+        "conditions": ["shop_uid == ${widget.data.shopUid}", "on_sale == true"]
       },
       "dims": commodityDims,
       "paging": [page, 20]
@@ -484,92 +784,56 @@ class _GangInPageState extends State<GangInPage> {
     data.buyerPic = '';
     data.amount = widget.order.amount;
     data.uid = widget.order.uID;
-    showPayDialog(data,context,(){
+    showPayDialog(data, context, () {
       Navigator.pop(context);
       getUserWalletBalance((re, hE) {
         if (!hE) {
           UserBalanceEntity balance =
-          UserBalanceEntity()
-              .fromJson(json.decode(re
-              .data
-              .toString()));
-          if (balance.data >=
-              widget.order.amount) {
-            payOrder(
-                payWayWallet, widget.order.uID,
-                    (re, hE) {
-                  if (!hE) {
-                    showToast('支付成功');
-                    EventBus()
-                        .emit('payAnOrder');
-                  }
-                }, (e) {}, context);
+              UserBalanceEntity().fromJson(json.decode(re.data.toString()));
+          if (balance.data >= widget.order.amount) {
+            payOrder(payWayWallet, widget.order.uID, (re, hE) {
+              if (!hE) {
+                showToast('支付成功');
+                EventBus().emit('payAnOrder');
+              }
+            }, (e) {}, context);
           } else {
-            payOrder(
-                payWayAliPay, widget.order.uID,
-                    (re, hE) {
-                  if (!hE) {
-                    PayByAlipayBeanEntity
-                    entity =
-                    PayByAlipayBeanEntity()
-                        .fromJson(
-                        json.decode(re
-                            .data
-                            .toString()));
-                    EventBus().on(
-                        'alipayPaymentCallback',
-                            (arg) {
-                          EventBus().off(
-                              'alipayPaymentCallback');
-                          EasyLoading.dismiss();
-                          showToast('支付成功');
-                          EventBus().emit(
-                              'reNoPayOrder');
-                        });
-                    print(entity.data);
-                    EasyLoading.instance
-                      ..contentPadding =
-                      EdgeInsets
-                          .symmetric(
-                          horizontal:
-                          20,
-                          vertical:
-                          12)
-                      ..alignment =
-                          Alignment.center
-                      ..contentMargin =
-                      EdgeInsets.all(20);
-                    EasyLoading.show();
-                    aliPay(entity.data)
-                        .then((value) {
-                      print(
-                          json.encode(value));
-                      AlipayResultBeanEntity
-                      e =
-                      AlipayResultBeanEntity()
-                          .fromJson(json
-                          .decode(json
-                          .encode(
-                          value)));
-                      try {
-                        int r = int.parse(
-                            e.resultStatus);
-                        if (r == 9000) {
-                          showToast('支付成功');
-                        } else {
-                          showToast(
-                              aliPayResultStatus(
-                                  r));
-                          resetOrder(
-                              widget.order.uID);
-                        }
-                      } catch (e) {
-                        EasyLoading.dismiss();
-                      }
-                    });
-                    // EventBus().emit('payAnOrder');
+            payOrder(payWayAliPay, widget.order.uID, (re, hE) {
+              if (!hE) {
+                PayByAlipayBeanEntity entity = PayByAlipayBeanEntity()
+                    .fromJson(json.decode(re.data.toString()));
+                EventBus().on('alipayPaymentCallback', (arg) {
+                  EventBus().off('alipayPaymentCallback');
+                  EasyLoading.dismiss();
+                  showToast('支付成功');
+                  EventBus().emit('reNoPayOrder');
+                });
+                print(entity.data);
+                EasyLoading.instance
+                  ..contentPadding =
+                      EdgeInsets.symmetric(horizontal: 20, vertical: 12)
+                  ..alignment = Alignment.center
+                  ..contentMargin = EdgeInsets.all(20);
+                EasyLoading.show();
+                aliPay(entity.data).then((value) {
+                  print(json.encode(value));
+                  AlipayResultBeanEntity e = AlipayResultBeanEntity()
+                      .fromJson(json.decode(json.encode(value)));
+                  try {
+                    int r = int.parse(e.resultStatus);
+                    if (r == 9000) {
+                      showToast('支付成功');
+                    } else {
+                      showToast(aliPayResultStatus(r));
+                      resetOrder(widget.order.uID);
+                    }
+                  } catch (e) {
+                    EasyLoading.dismiss();
                   }
-                }, (e) {}, context);
+                });
+                // EventBus().emit('payAnOrder');
+              }
+            }, (e) {}, context);
             // showToast('积分余额不足');
           }
         }
@@ -786,4 +1050,25 @@ class _GangInPageState extends State<GangInPage> {
       }
     }, (error) {});
   }
+
+  StoreBeanDataData store;
+
+  queryStoreInformation() {
+    MyDio().query({
+      "key": "shop",
+      "filters": {
+        "conditions": ["uid == ${widget.data.shopUid}"]
+      },
+      "dims": shopDims,
+      "paging": [1, 5]
+    }, (response, hasError) {
+      if (!hasError) {
+        StoreBeanEntity entity =
+            StoreBeanEntity().fromJson(json.decode(response.data.toString()));
+        store = entity.data.data[0];
+        setState(() {});
+      }
+      endRe(controller);
+    }, (error) {});
+  }
 }

+ 1 - 1
lib/paegs/gang_page/gang_page.dart

@@ -295,7 +295,7 @@ class _GangPageState extends State<GangPage>
                               children: [
                                 Expanded(
                                   child: Text(
-                                    'UID:${data.shopUid}',
+                                    'ID:${data.shopUid}',
                                     style: TextStyle(
                                         color: MyColors.c888888, fontSize: 12),
                                   ),

+ 274 - 121
lib/paegs/msg_page/msg_page.dart

@@ -13,6 +13,7 @@ import 'package:bbyyy/my_tools/my_cookie.dart';
 import 'package:bbyyy/my_tools/my_tools.dart';
 import 'package:bbyyy/my_tools/my_views.dart';
 import 'package:bbyyy/paegs/chat_page/chat_page.dart';
+import 'package:bbyyy/paegs/system_information_page/system_information_page.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_slidable/flutter_slidable.dart';
@@ -32,6 +33,9 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
   TextEditingController _description = TextEditingController();
   FocusNode _descriptionFocus = FocusNode();
   RefreshController controller = RefreshController(initialRefresh: true);
+  bool haveSysMsg = false;
+  var sysMsgRead = false;
+  String systemInformation;
 
   @override
   void initState() {
@@ -59,6 +63,10 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
     EventBus().on('hasNewMsgInMsgPage', (arg) {
       queryChatRoom();
     });
+    EventBus().on('haveSysMsg', (arg) {
+      haveSysMsg = true;
+      setState(() {});
+    });
   }
 
   @override
@@ -66,6 +74,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
     // TODO: implement dispose
     super.dispose();
     EventBus().off('hasNewMsgInMsgPage');
+    EventBus().off('haveSysMsg');
   }
 
   @override
@@ -228,7 +237,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
               child: SmartRefresher(
                 onRefresh: onRefresh,
                 controller: controller,
-                child: lastMsg.length == 0
+                child: lastMsg.length == 0 && !haveSysMsg
                     ? noData()
                     : ListView.builder(
                         itemBuilder: (c, index) {
@@ -346,139 +355,261 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
       chatWith.userUid = data.senderUid;
       chatWith.userPic = data.senderPic;
     }
-    return Slidable(
-      actionPane: SlidableDrawerActionPane(),
-      actionExtentRatio: 0.25,
-      child: GestureDetector(
-        onTap: () {
-          MyTools().toPage(context, ChatPage(chatWith, null), (then) {
-            var now = new DateTime.now();
-            MyCookie().prefs.setString(
-                '${MyCookie().getUID()}_${chatWith.userUid}',
-                now.toString().substring(0, 19));
-            queryChatRoom();
-          });
-        },
-        behavior: HitTestBehavior.translucent,
-        child: Container(
-          height: 73,
-          child: Column(
-            children: [
-              Expanded(
-                child: Row(
-                  children: [
-                    Container(
-                      margin: EdgeInsets.only(left: 14, right: 14),
-                      child: ClipRRect(
-                        child: uid == 0
-                            ? Image.asset(
-                                'images/app_logo.png',
-                                height: 45,
-                                width: 45,
-                              )
-                            : MyViews().netImg(imgURL(pic), 45, 45,
-                                placeholder: 'images/svg/占位图.svg'),
-                        borderRadius: BorderRadius.all(Radius.circular(4)),
+    if (data.senderUid == -1) {
+      return Slidable(
+        actionPane: SlidableDrawerActionPane(),
+        actionExtentRatio: 0.25,
+        child: GestureDetector(
+          onTap: () {
+            MyTools().toPage(context, SystemInformationPage(), (then) {});
+          },
+          behavior: HitTestBehavior.translucent,
+          child: Container(
+            height: 73,
+            child: Column(
+              children: [
+                Expanded(
+                  child: Row(
+                    children: [
+                      Container(
+                        margin: EdgeInsets.only(left: 14, right: 14),
+                        child: ClipRRect(
+                          child: Image.asset(
+                            'images/app_logo.png',
+                            height: 45,
+                            width: 45,
+                          ),
+                          borderRadius: BorderRadius.all(Radius.circular(4)),
+                        ),
                       ),
-                    ),
-                    Expanded(
-                      child: Container(
-                        height: 45,
-                        padding: EdgeInsets.only(right: 14),
-                        child: Column(
-                          children: [
-                            Row(
-                              children: [
-                                Expanded(
-                                    child: Text(
-                                  uid == 0 ? '客服' : name,
-                                  style: TextStyle(
-                                      color: MyColors.c333333, fontSize: 15),
-                                )),
-                                Text(
-                                  data.sentAt,
-                                  style: TextStyle(
-                                      color: MyColors.c888888, fontSize: 12),
-                                ),
-                              ],
-                            ),
-                            Row(
-                              children: [
-                                Expanded(
-                                  child: Text(
-                                    data.type != chatMsgTypeText
-                                        ? '[${data.type}]'
-                                        : data.content,
+                      Expanded(
+                        child: Container(
+                          height: 45,
+                          padding: EdgeInsets.only(right: 14),
+                          child: Column(
+                            children: [
+                              Row(
+                                children: [
+                                  Expanded(
+                                      child: Text(
+                                    '系统消息',
+                                    style: TextStyle(
+                                        color: MyColors.c333333, fontSize: 15),
+                                  )),
+                                  Text(
+                                    '',
                                     style: TextStyle(
                                         color: MyColors.c888888, fontSize: 12),
-                                    maxLines: 1,
-                                    overflow: TextOverflow.ellipsis,
-                                    softWrap: true,
                                   ),
-                                ),
-                                Visibility(
-                                  visible: showRedPoint(
-                                      chatWith.userUid, data.sentAt),
-                                  child: Container(
-                                    decoration: BoxDecoration(
-                                        color: MyColors.cFF4233,
-                                        borderRadius: BorderRadius.all(
-                                            Radius.circular(4))),
-                                    height: 8,
-                                    width: 8,
-                                    padding: EdgeInsets.only(left: 5, right: 5),
-                                    alignment: Alignment.center,
+                                ],
+                              ),
+                              Row(
+                                children: [
+                                  Expanded(
+                                    child: Text(
+                                      data.content,
+                                      style: TextStyle(
+                                          color: MyColors.c888888,
+                                          fontSize: 12),
+                                      maxLines: 1,
+                                      overflow: TextOverflow.ellipsis,
+                                      softWrap: true,
+                                    ),
                                   ),
+                                ],
+                              )
+                            ],
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          ),
+                        ),
+                      )
+                    ],
+                  ),
+                ),
+                Container(
+                  margin: EdgeInsets.only(left: 73, right: 14),
+                  height: 0.5,
+                  color: MyColors.cE7E7E7,
+                )
+              ],
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            ),
+          ),
+        ),
+        secondaryActions: <Widget>[
+          SlideAction(
+            child: Container(
+              child: Container(
+                decoration: BoxDecoration(
+                  borderRadius: BorderRadius.circular(30),
+                  color: MyColors.cFF4233,
+                ),
+                height: 40,
+                width: 40,
+                child: SvgPicture.asset(
+                  'images/svg/del.svg',
+                  height: 25,
+                  width: 25,
+                ),
+                alignment: Alignment.center,
+              ),
+            ),
+            onTap: () {
+              showSimpleDialog('是否删除系统消息', context, () async {
+                Navigator.pop(context);
+                MyCookie().prefs.remove('${MyCookie().getUID()}系统消息');
+                chatRoom.remove('系统消息');
+                lastMsg.remove(data);
+                setState(() {});
+                queryChatRoom();
+              });
+            },
+          )
+        ],
+      );
+    } else {
+      return Slidable(
+        actionPane: SlidableDrawerActionPane(),
+        actionExtentRatio: 0.25,
+        child: GestureDetector(
+          onTap: () {
+            MyTools().toPage(context, ChatPage(chatWith, null), (then) {
+              var now = new DateTime.now();
+              MyCookie().prefs.setString(
+                  '${MyCookie().getUID()}_${chatWith.userUid}',
+                  now.toString().substring(0, 19));
+              queryChatRoom();
+            });
+          },
+          behavior: HitTestBehavior.translucent,
+          child: Container(
+            height: 73,
+            child: Column(
+              children: [
+                Expanded(
+                  child: Row(
+                    children: [
+                      Container(
+                        margin: EdgeInsets.only(left: 14, right: 14),
+                        child: ClipRRect(
+                          child: uid == 0
+                              ? Image.asset(
+                                  'images/app_logo.png',
+                                  height: 45,
+                                  width: 45,
                                 )
-                              ],
-                            )
-                          ],
-                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                              : MyViews().netImg(imgURL(pic), 45, 45,
+                                  placeholder: 'images/svg/占位图.svg'),
+                          borderRadius: BorderRadius.all(Radius.circular(4)),
                         ),
                       ),
-                    )
-                  ],
+                      Expanded(
+                        child: Container(
+                          height: 45,
+                          padding: EdgeInsets.only(right: 14),
+                          child: Column(
+                            children: [
+                              Row(
+                                children: [
+                                  Expanded(
+                                      child: Text(
+                                    uid == 0 ? '客服' : name,
+                                    style: TextStyle(
+                                        color: MyColors.c333333, fontSize: 15),
+                                  )),
+                                  Text(
+                                    data.sentAt,
+                                    style: TextStyle(
+                                        color: MyColors.c888888, fontSize: 12),
+                                  ),
+                                ],
+                              ),
+                              Row(
+                                children: [
+                                  Expanded(
+                                    child: Text(
+                                      data.type != chatMsgTypeText
+                                          ? '[${data.type}]'
+                                          : data.content,
+                                      style: TextStyle(
+                                          color: MyColors.c888888,
+                                          fontSize: 12),
+                                      maxLines: 1,
+                                      overflow: TextOverflow.ellipsis,
+                                      softWrap: true,
+                                    ),
+                                  ),
+                                  Visibility(
+                                    visible: showRedPoint(
+                                        chatWith.userUid, data.sentAt),
+                                    child: Container(
+                                      decoration: BoxDecoration(
+                                          color: MyColors.cFF4233,
+                                          borderRadius: BorderRadius.all(
+                                              Radius.circular(4))),
+                                      height: 8,
+                                      width: 8,
+                                      padding:
+                                          EdgeInsets.only(left: 5, right: 5),
+                                      alignment: Alignment.center,
+                                    ),
+                                  )
+                                ],
+                              )
+                            ],
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                          ),
+                        ),
+                      )
+                    ],
+                  ),
                 ),
-              ),
-              Container(
-                margin: EdgeInsets.only(left: 73, right: 14),
-                height: 0.5,
-                color: MyColors.cE7E7E7,
-              )
-            ],
-            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                Container(
+                  margin: EdgeInsets.only(left: 73, right: 14),
+                  height: 0.5,
+                  color: MyColors.cE7E7E7,
+                )
+              ],
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            ),
           ),
         ),
-      ),
-      secondaryActions: <Widget>[
-        SlideAction(
-          child: Container(
+        secondaryActions: <Widget>[
+          SlideAction(
             child: Container(
-              decoration: BoxDecoration(
-                borderRadius: BorderRadius.circular(30),
-                color: MyColors.cFF4233,
+              child: Container(
+                decoration: BoxDecoration(
+                  borderRadius: BorderRadius.circular(30),
+                  color: MyColors.cFF4233,
+                ),
+                height: 40,
+                width: 40,
+                child: SvgPicture.asset(
+                  'images/svg/del.svg',
+                  height: 25,
+                  width: 25,
+                ),
+                alignment: Alignment.center,
               ),
-              height: 40,width: 40,
-              child: SvgPicture.asset('images/svg/del.svg',height: 25,width: 25,),
-              alignment: Alignment.center,
             ),
-          ),
-          onTap: (){
-            showSimpleDialog(
-                '将删除与(${name.isEmpty ? '客服' : name})的聊天记录,确认删除?', context,
-                    () async {
-                  Navigator.pop(context);
-                  MsgDB msgDB = MsgDB('table${MyCookie().getUID()}_$uid');
-                  await msgDB.deleteTableData();
-                  chatRoom.remove(uid);
-                  lastMsg.remove(data);
-                  setState(() {});
-                  queryChatRoom();
-                });
-          },
-        )
-      ],
-    );
+            onTap: () {
+              showSimpleDialog(
+                  '将删除与(${name.isEmpty ? '客服' : name})的聊天记录,确认删除?', context,
+                  () async {
+                Navigator.pop(context);
+                MsgDB msgDB = MsgDB('table${MyCookie().getUID()}_$uid');
+                await msgDB.deleteTableData();
+                chatRoom.remove(uid);
+                lastMsg.remove(data);
+                setState(() {});
+                queryChatRoom();
+              });
+            },
+          )
+        ],
+      );
+    }
+
     // }
   }
 
@@ -508,7 +639,29 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
           chatRoom.forEach((key, value) {
             lastMsg.add(value);
           });
-          lastMsg.sort((left, right) => right.sentAt.compareTo(left.sentAt));
+          lastMsg.sort((left, right) {
+            if (left.senderUid == -1) {
+              return -1;
+            } else if (right.senderUid == -1) {
+              return 1;
+            } else {
+              return right.sentAt.compareTo(left.sentAt);
+            }
+          });
+          systemInformation =
+              MyCookie().prefs.getString('${MyCookie().getUID()}系统消息');
+          if (systemInformation != null) {
+            print(systemInformation);
+            MessageBeanContent sysMsg = MessageBeanContent();
+            sysMsg.senderName = '系统消息';
+            sysMsg.senderUid = -1;
+            sysMsg.content = systemInformation.split('!@##@!')[0];
+            chatRoom['系统消息'] = sysMsg;
+            if (!lastMsg.any((element) => element.senderUid == -1)) {
+              lastMsg.insert(0, chatRoom['系统消息']);
+            }
+          }
+
           setState(() {});
         });
       }

+ 104 - 0
lib/paegs/system_information_page/system_information_page.dart

@@ -0,0 +1,104 @@
+import 'package:bbyyy/my_tools/my_colors.dart';
+import 'package:bbyyy/my_tools/my_cookie.dart';
+import 'package:bbyyy/my_tools/my_tools.dart';
+import 'package:bbyyy/my_tools/my_views.dart';
+import 'package:flutter/material.dart';
+
+class SystemInformationPage extends StatefulWidget {
+  @override
+  _SystemInformationPageState createState() => _SystemInformationPageState();
+}
+
+class _SystemInformationPageState extends State<SystemInformationPage> {
+  List<String> sysMsg = [];
+
+  @override
+  void initState() {
+    // TODO: implement initState
+    super.initState();
+    String s = MyCookie().prefs.getString('${MyCookie().getUID()}系统消息');
+    if (s != null) {
+      sysMsg = s.split('!@##@!');
+    }
+    setState(() {});
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      body: Column(
+        children: [
+          MyViews().myAppBar('系统消息', context, []),
+          Expanded(
+            child: ListView.builder(
+              itemBuilder: (BuildContext context, int index) {
+                return GestureDetector(
+                  onTap: () {
+                    MyTools().toPage(context,
+                        SystemMessageDetailsPage(sysMsg[index]), (then) {});
+                  },
+                  behavior: HitTestBehavior.translucent,
+                  child: Column(
+                    children: [
+                      Container(
+                        color: Colors.white,
+                        child: Text(
+                          sysMsg[index],
+                          maxLines: 2,
+                          overflow: TextOverflow.ellipsis,
+                          softWrap: true,
+                          style:
+                              TextStyle(color: MyColors.c333333, fontSize: 14),
+                        ),
+                        alignment: Alignment.centerLeft,
+                        padding: EdgeInsets.all(10),
+                      ),
+                      Container(
+                        height: 0.5,
+                        color: MyColors.cF7F7F7,
+                      )
+                    ],
+                  ),
+                );
+              },
+              itemCount: sysMsg.length,
+              padding: EdgeInsets.all(0),
+            ),
+          )
+        ],
+      ),
+    );
+  }
+}
+
+class SystemMessageDetailsPage extends StatefulWidget {
+  String sysMsg;
+
+  SystemMessageDetailsPage(this.sysMsg);
+
+  @override
+  _SystemMessageDetailsPageState createState() =>
+      _SystemMessageDetailsPageState();
+}
+
+class _SystemMessageDetailsPageState extends State<SystemMessageDetailsPage> {
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      body: Column(
+        children: [
+          MyViews().myAppBar('系统消息详情', context, []),
+          Expanded(
+            child: Container(
+              margin: EdgeInsets.all(20),
+              child: Text(
+                widget.sysMsg,
+                style: TextStyle(color: MyColors.c333333, fontSize: 20),
+              ),
+            ),
+          ),
+        ],
+      ),
+    );
+  }
+}