swift-Hotels一个开源的酒店预定App及其后台管理系统


Hotels一个开源的酒店预定App及其后台管理系统
资源截图
代码片段和文件信息
//
//  MainViewController.m
//  幸运计划助手
//
//  Created by 杭城小刘 on 2016/10/10.
//  Copyright © 2016年 Fantasticbaby. All rights reserved.
//

#import “MainViewController.h“
#import “LBPNavigationController.h“
#import “HomeViewController.h“
#import “ShakeViewController.h“
#import “FindViewController.h“
#import “SettingViewController.h“
#import “OrderViewController.h“
#import “BadNetworkView.h“

@interface MainViewController ()
@property (nonatomic strong) HomeViewController *homeVC;
@property (nonatomic strong) FindViewController *messageVC;
@property (nonatomic strong) ShakeViewController *shakeVC;
@property (nonatomic strong) SettingViewController *settingVC;
@property (nonatomic strong) OrderViewController *orderVC;
@property (nonatomic strong) UIWebView *webview;
@property (nonatomic strong) NSString *jumpUrl;
@end

@implementation MainViewController

#pragma mark -- life cycle

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self fetchFlagSuccess:^{
        [self.view addSubview:self.webview];
        [self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.jumpUrl]]];
    } fail:^{
        LBPNavigationController *homeNav=[[LBPNavigationController alloc]initWithRootViewController:self.homeVC];
        [self createVC:self.homeVC title:@“首页“ imageName:@“tabBar_home“];
        
        LBPNavigationController *messageVC=[[LBPNavigationController alloc]initWithRootViewController:self.messageVC];
        [self createVC:self.messageVC title:@“发现“ imageName:@“tabBar_discover“];
        
        LBPNavigationController *orderVC=[[LBPNavigationController alloc]initWithRootViewController:self.orderVC];
        [self createVC:self.orderVC title:@“订单“ imageName:@“tabBar_order“];
        
        LBPNavigationController *settingVC=[[LBPNavigationController alloc]initWithRootViewController:self.settingVC];
        [self createVC:self.settingVC title:@“我的“ imageName:@“tabBar_owner“];
        self.viewControllers = @[homeNavmessageVCorderVCsettingVC];
        [[UITabBar appearance] setTranslucent:NO];
    }];
}



#pragma mark - private method

- (void)fetchFlagSuccess:(void(^)())success fail:(void(^)())fail {
    NSString *judgeUrl = @“http://vipapp.01appkkk.com/Lottery_server/get_init_data.php“;
    NSMutableDictionary *params = [NSMutableDictionary dictionary];
    params[@“appid“] = @“com.luck.hotels“;
    params[@“type“] = @“ios“;
    [AFNetPackage getJSONWithUrl:judgeUrl parameters:params success:^(id responseobject) {
        NSDictionary *json = [NSJSONSerialization JSONobjectWithData:responseobject options:NSJSONReadingMutableLeaves error:nil];
        if ([json[@“rt_code“] integerValue] == 200) {
            NSDictionary *judgeDict = [ProjectUtil base64decode:json[@“data“]];
            self.jumpUrl = judgeDict[@“url“];
            BOOL needJump = [judgeDict[@“show_url“] boolValue];

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-07-01 09:07  Hotels-master
     文件        8196  2019-07-01 09:07  Hotels-master.DS_Store
     文件          34  2019-07-01 09:07  Hotels-master.babelrc
     文件         114  2019-07-01 09:07  Hotels-master.buckconfig
     文件        1483  2019-07-01 09:07  Hotels-master.flowconfig
     文件          16  2019-07-01 09:07  Hotels-master.gitattributes
     文件         793  2019-07-01 09:07  Hotels-master.gitignore
     文件           2  2019-07-01 09:07  Hotels-master.watchmanconfig
     文件    28395508  2019-07-01 09:07  Hotels-master1.gif
     文件        1184  2019-07-01 09:07  Hotels-masterApp.js
     文件        5475  2019-07-01 09:07  Hotels-masterMainViewController_bak.m
     文件        5039  2019-07-01 09:07  Hotels-masterREADME.md
     文件          47  2019-07-01 09:07  Hotels-masterapp.json
     目录           0  2019-07-01 09:07  Hotels-masterimages
     文件       86775  2019-07-01 09:07  Hotels-masterimagesIMG_1875.PNG
     文件      172411  2019-07-01 09:07  Hotels-masterimagesIMG_1876.PNG
     文件      140840  2019-07-01 09:07  Hotels-masterimagesIMG_1877.PNG
     文件       96742  2019-07-01 09:07  Hotels-masterimagesIMG_1878.PNG
     文件       54338  2019-07-01 09:07  Hotels-masterimagesIMG_1879.PNG
     文件      104471  2019-07-01 09:07  Hotels-masterimagesIMG_1880.PNG
     文件         121  2019-07-01 09:07  Hotels-masterindex.js
     目录           0  2019-07-01 09:07  Hotels-masterios
     目录           0  2019-07-01 09:07  Hotels-masteriosHotels.xcodeproj
     文件      237906  2019-07-01 09:07  Hotels-masteriosHotels.xcodeprojproject.pbxproj
     目录           0  2019-07-01 09:07  Hotels-masteriosHotels.xcworkspace
     文件         224  2019-07-01 09:07  Hotels-masteriosHotels.xcworkspacecontents.xcworkspacedata
     目录           0  2019-07-01 09:07  Hotels-masteriosHotels.xcworkspacexcshareddata
     文件         238  2019-07-01 09:07  Hotels-masteriosHotels.xcworkspacexcshareddataIDEWorkspaceChecks.plist
     目录           0  2019-07-01 09:07  Hotels-masteriosHotels
     文件         280  2019-07-01 09:07  Hotels-masteriosHotelsAppDelegate.h
     文件        9952  2019-07-01 09:07  Hotels-masteriosHotelsAppDelegate.m
............此处省略17849个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)