From e6ae9a28c4fad726bc1d288642c6c5886ebfc2e5 Mon Sep 17 00:00:00 2001 From: Weller <1812208341@qq.com> Date: Sun, 27 Sep 2020 10:25:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=82=80=E8=AF=B7=E5=A5=BD?= =?UTF-8?q?=E5=8F=8B=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/ios/Runner/AppDelegate.m | 4 +- .../invited_friends/invited_friends.dart | 65 +++++++++++++++++++ lib/register.dart | 12 ++-- 3 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 lib/pages/invited_friends/invited_friends.dart diff --git a/example/ios/Runner/AppDelegate.m b/example/ios/Runner/AppDelegate.m index 9eaa23a..dd6f455 100644 --- a/example/ios/Runner/AppDelegate.m +++ b/example/ios/Runner/AppDelegate.m @@ -27,8 +27,8 @@ // 获取设置 - (NSDictionary*)getSetting { return @{ - // @"domain": @"http://120.76.175.204:8989" - @"domain": @"http://192.168.0.113:5000" + @"domain": @"http://inapi.izhyin.cn" + //@"domain": @"http://192.168.0.113:5000" }; } diff --git a/lib/pages/invited_friends/invited_friends.dart b/lib/pages/invited_friends/invited_friends.dart new file mode 100644 index 0000000..88511c7 --- /dev/null +++ b/lib/pages/invited_friends/invited_friends.dart @@ -0,0 +1,65 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:zhiying_comm/zhiying_comm.dart'; + +// 邀请好友 +class InvitedFriendsPage extends StatefulWidget { + final Map model; + + const InvitedFriendsPage(this.model, {Key key}) : super(key: key); + + @override + _InvitedFriendsPageState createState() => _InvitedFriendsPageState(); +} + +class _InvitedFriendsPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: _createNav(), + ); + } + + // 导航栏 + Widget _createNav() { + return CupertinoNavigationBar( + border: Border( + bottom: BorderSide( + width: 0.0, // One physical pixel. + style: BorderStyle.none, + ), + ), + backgroundColor: HexColor.fromHex('#ffffff'), + leading: Navigator.canPop(context) + ? GestureDetector( + child: Container( + padding: EdgeInsets.zero, + child: Icon( + Icons.arrow_back_ios, + size: 20, + ), + ), + onTap: () { + if (Navigator.canPop(context)) { + Navigator.pop(context); + } + }, + ) + : Container(), + middle: Text( + '邀请好友', + style: TextStyle( + fontSize: 15, + color: HexColor.fromHex('#333333'), + ), + ), + trailing: Text( + '规则', + style: TextStyle( + fontSize: 15, + color: HexColor.fromHex('#333333'), + ), + ), + ); + } +} diff --git a/lib/register.dart b/lib/register.dart index 925ac08..b19852e 100644 --- a/lib/register.dart +++ b/lib/register.dart @@ -11,6 +11,7 @@ import 'package:zhiying_base_widget/pages/setting_page/setting_page.dart'; import 'package:zhiying_base_widget/pages/sreach_result_page/sreach_result_page.dart'; import 'package:zhiying_base_widget/pages/wallet_page/wallet_page.dart'; import 'package:zhiying_base_widget/pages/webview/base_webview.dart'; +import 'package:zhiying_base_widget/pages/invited_friends/invited_friends.dart'; import 'package:zhiying_base_widget/widgets/goods_details/footer/goods_details_footer_widget.dart'; import 'package:zhiying_base_widget/widgets/goods_details/price/goods_details_price_widget.dart'; import 'package:zhiying_base_widget/widgets/goods_details/slide_banner/goods_details_slide_banner_widget.dart'; @@ -80,17 +81,20 @@ class BaseWidgetRegister { 'pub.flutter.profile_settings', (model) => MineDetailPage()); PageFactory.regist('pub.flutter.settings', (model) => SettingPage(model)); - PageFactory.regist('pub.flutter.my_orders', (model) => OrdersPage(model)); + PageFactory.regist('pub.flutter.my_order', (model) => OrdersPage(model)); PageFactory.regist( 'pub.flutter.account_security', (model) => SecurityPage(model)); PageFactory.regist('pub.flutter.account_security_alipay', - (model) => SecurityBindAlipayPage(model)); + (model) => SecurityBindAlipayPage(model)); // 登录密码 PageFactory.regist('pub.flutter.account_security_password', - (model) => SecurityPassword(model)); + (model) => SecurityPassword(model)); // 修改手机号 PageFactory.regist('pub.flutter.account_security_mobile', - (model) => SecurityMobile(model)); + (model) => SecurityMobile(model)); + // 邀请好友 + PageFactory.regist('pub.flutter.invite_friends', + (model) => InvitedFriendsPage(model)); } // 注册控件