6 Commits 72ab75cbb5 ... 15ce167761

Autor SHA1 Mensagem Data
  Lailin 15ce167761 列表提交 4 anos atrás
  Lailin fe78755a41 提交列表显示 4 anos atrás
  Lailin a897959d09 创建 model 4 anos atrás
  lailin f9a07789d1 提交 首页信息 4 anos atrás
  lailin c57b6ffe85 idea 配置文件 4 anos atrás
  damon.tan 72ab75cbb5 'home页面' 4 anos atrás

+ 41 - 0
.gitignore

@@ -0,0 +1,41 @@
+.DS_Store
+.dart_tool/
+
+.packages
+.pub/
+
+.idea/
+.vagrant/
+.sconsign.dblite
+.svn/
+
+*.swp
+profile
+
+DerivedData/
+
+.generated/
+
+*.pbxuser
+*.mode1v3
+*.mode2v3
+*.perspectivev3
+
+!default.pbxuser
+!default.mode1v3
+!default.mode2v3
+!default.perspectivev3
+
+xcuserdata
+
+*.moved-aside
+
+*.pyc
+*sync/
+Icon?
+.tags*
+
+build/
+.android/
+.ios/
+.flutter-plugins

+ 8 - 0
taskservice/gen/com/jxzs/taskservice/BuildConfig.java

@@ -0,0 +1,8 @@
+/*___Generated_by_IDEA___*/
+
+package com.jxzs.taskservice;
+
+/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
+public final class BuildConfig {
+  public final static boolean DEBUG = Boolean.parseBoolean(null);
+}

+ 7 - 0
taskservice/gen/com/jxzs/taskservice/Manifest.java

@@ -0,0 +1,7 @@
+/*___Generated_by_IDEA___*/
+
+package com.jxzs.taskservice;
+
+/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
+public final class Manifest {
+}

+ 7 - 0
taskservice/gen/com/jxzs/taskservice/R.java

@@ -0,0 +1,7 @@
+/*___Generated_by_IDEA___*/
+
+package com.jxzs.taskservice;
+
+/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
+public final class R {
+}

+ 1 - 0
taskservice/ios/Flutter/.last_build_id

@@ -0,0 +1 @@
+e2594066e4398d9986034c8d0f74712b

+ 0 - 3
taskservice/ios/Runner.xcodeproj/project.pbxproj

@@ -245,7 +245,6 @@
 /* Begin XCBuildConfiguration section */
 		249021D3217E4FDB00AE95B9 /* Profile */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_ANALYZER_NONNULL = YES;
@@ -319,7 +318,6 @@
 		};
 		97C147031CF9000F007C117D /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_ANALYZER_NONNULL = YES;
@@ -375,7 +373,6 @@
 		};
 		97C147041CF9000F007C117D /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_ANALYZER_NONNULL = YES;

+ 31 - 0
taskservice/lib/Common/JXColors.dart

@@ -0,0 +1,31 @@
+import 'package:flutter/material.dart';
+
+/*
+颜色统一处理
+* */
+class JXColors {
+  // white
+  static Color kFFFFFF = hexColor(0xFFFFFF);
+  static Color kF0F0F0 = hexColor(0xF0F0F0);
+  static Color kE6E6E6 = hexColor(0xE6E6E6);
+  static Color k747A7E = hexColor(0x747A7E);
+  // dark
+  static Color k2E3032 = hexColor(0x2E3032);
+  static Color k101E40 = hexColor(0x101E40);
+  static Color k1F2529 = hexColor(0x1F2529);
+
+  /// 十六进制颜色,
+  /// hex, 十六进制值,例如:0xffffff,
+  /// alpha, 透明度 [0.0,1.0]
+  static Color hexColor(int hex,{double alpha = 1}){
+    if (alpha < 0){
+      alpha = 0;
+    }else if (alpha > 1){
+      alpha = 1;
+    }
+    return Color.fromRGBO((hex & 0xFF0000) >> 16 ,
+        (hex & 0x00FF00) >> 8,
+        (hex & 0x0000FF) >> 0,
+        alpha);
+  }
+}

+ 19 - 0
taskservice/lib/Model/JXMemberModel.dart

@@ -0,0 +1,19 @@
+
+/*
+用户信息模型
+* */
+class JXMemberModel {
+  /*姓名*/
+  String name;
+  /*电话*/
+  String tel;
+  /*生日信息*/
+  String birth;
+  /*地址*/
+  String prov;
+  String city;
+  String area;
+  String addr;
+  /*其他*/
+  String remark;
+}

+ 22 - 0
taskservice/lib/Model/JXServiceModel.dart

@@ -0,0 +1,22 @@
+
+/*
+服务信息模型
+* */
+class JXServiceModel {
+  String _id;
+  String kind;
+
+  /*提醒周期*/
+  int cycle;
+  String cycleUnit;
+
+  /*提醒时间
+  -n 提前n天提醒
+  n 延后n天提醒
+  0 当天提醒,默认一般当天提醒
+  * */
+  int remindDay;
+
+  /*备注*/
+  String remark;
+}

+ 146 - 4
taskservice/lib/main.dart

@@ -1,5 +1,5 @@
 import 'package:flutter/material.dart';
-import 'package:taskservice/src/home/home.dart';
+import 'package:taskservice/Common/JXColors.dart';
 
 void main() {
   runApp(MyApp());
@@ -10,11 +10,153 @@ class MyApp extends StatelessWidget {
   @override
   Widget build(BuildContext context) {
     return MaterialApp(
+      title: 'JXZS',
       theme: ThemeData(
-        primaryColor: Colors.black,
+        // This is the theme of your application.
+        //
+        // Try running your application with "flutter run". You'll see the
+        // application has a blue toolbar. Then, without quitting the app, try
+        // changing the primarySwatch below to Colors.green and then invoke
+        // "hot reload" (press "r" in the console where you ran "flutter run",
+        // or simply save your changes to "hot reload" in a Flutter IDE).
+        // Notice that the counter didn't reset back to zero; the application
+        // is not restarted.
+        primarySwatch: Colors.blue,
+        // This makes the visual density adapt to the platform that you ru
+        // the app on. For desktop platforms, the controls will be smaller and
+        // closer together (more dense) than on mobile platforms.
         visualDensity: VisualDensity.adaptivePlatformDensity,
       ),
-      home: HomePage(),
+      home: MyHomePage(title: 'JXZS'),
     );
   }
-}
+}
+
+class MyHomePage extends StatefulWidget {
+  MyHomePage({Key key, this.title}) : super(key: key);
+
+  final String title;
+
+  @override
+  _MyHomePageState createState() => _MyHomePageState();
+}
+
+class _MyHomePageState extends State<MyHomePage> {
+  // 参数
+  /*空白区域键盘消失控制*/
+  FocusNode blankNode = FocusNode();
+  /*搜索值*/
+  String _searchText;
+
+  /*筛选列表数据*/
+  void filterListView() {
+    print('筛选:$_searchText');
+    String text = _searchText;
+
+  }
+  /*显示列表*/
+  List<Widget> theCellData() {
+    List<Widget> widgets = [];
+    for (int i = 0; i < 100; i++) {
+      widgets.add(
+          Padding(
+          padding: EdgeInsets.all(10.0),
+          child: Text("Row $i"),
+          )
+      );
+    }
+    return widgets;
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return GestureDetector(
+        onTap: () {
+          FocusScope.of(context).requestFocus(blankNode);
+        },
+        child: Scaffold(
+          appBar: AppBar(
+            title: Text(widget.title),
+          ),
+          body: SafeArea(
+            child: Column(
+              mainAxisAlignment: MainAxisAlignment.start,
+              children: <Widget>[
+                Container(
+                    color: JXColors.kF0F0F0,
+                    alignment: Alignment.center,
+                    padding: EdgeInsets.fromLTRB(12.0, 4.0, 12.0, 4.0),
+                    height: 50.0,
+                    child: Row(children: <Widget>[
+                      Container(
+                          width: 44.0,
+                          child: Icon(
+                            Icons.search,
+                            size: 24.0,
+                          )),
+                      Expanded(
+                        child: TextField(
+                          focusNode: blankNode,
+                          obscureText: false,
+                          cursorColor: JXColors.k1F2529,
+                          decoration: InputDecoration(
+                            border: InputBorder.none,
+                            hintText: '快速筛选',
+                            labelStyle: TextStyle(
+                              color: JXColors.k2E3032,
+                              fontSize: 18,
+                            ),
+                          ),
+                          onSubmitted: (value) {
+                            setState(() {
+                              _searchText = value;
+                            });
+                            filterListView();
+                          },
+                        ),
+                      ),
+                    ])),
+                Expanded(
+                    flex: 1,
+                    child: Container(
+                      color: JXColors.kF0F0F0,
+                      child: ListView(children: theCellData()),
+                    )),
+                Container(
+                  color: JXColors.kF0F0F0,
+                  height: 44.0,
+                  child: Row(
+                    children: <Widget>[
+                      Expanded(
+                        child: FlatButton(
+                          onPressed: () {
+                            print('新建会员');
+                          },
+                          padding: EdgeInsets.all(0),
+                          color: JXColors.kFFFFFF,
+                          textColor: JXColors.k1F2529,
+                          child: const Text('新建会员',
+                              style: TextStyle(fontSize: 14)),
+                        ),
+                      ),
+                      Expanded(
+                        child: FlatButton(
+                          onPressed: () {
+                            print('会员列表');
+                          },
+                          padding: EdgeInsets.all(0),
+                          color: JXColors.k1F2529,
+                          textColor: JXColors.kFFFFFF,
+                          child: const Text('会员列表',
+                              style: TextStyle(fontSize: 14)),
+                        ),
+                      ),
+                    ],
+                  ),
+                ),
+              ],
+            ),
+          ),
+        ));
+  }
+}

+ 0 - 33
taskservice/lib/src/home/home.dart

@@ -1,33 +0,0 @@
-import 'package:flutter/cupertino.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter/widgets.dart';
-
-class HomePage extends StatelessWidget {
-  @override
-  Widget build(BuildContext context) {
-    return Scaffold(
-        appBar: AppBar(
-          title: Text('吉祥之舍'),
-          centerTitle: true,
-        ),
-        body: SafeArea(
-          child: Container(
-            color: Colors.grey.withOpacity(0.3),
-            child: Column(children: <Widget>[
-              TextField(
-                decoration: InputDecoration(
-                  icon: Icon(Icons.search),
-                  hintText: 'Search',
-                ),
-              ),
-              Container(alignment: Alignment.centerLeft, padding: EdgeInsets.symmetric(vertical: 12, horizontal: 6),child: Text('今日任务'), decoration: BoxDecoration(color: Colors.grey.withOpacity(0.1)),),
-              Expanded(child: ListView()),
-              Row(children: <Widget>[
-                Expanded(child: RaisedButton(onPressed: ()=>null, child: Text('新增会员'),color: Colors.white,)),
-                Expanded(child: MaterialButton(onPressed: ()=>null, child: Text('会员列表',), color: Colors.indigoAccent,)),
-              ],)
-            ]),
-          ),
-        ));
-  }
-}