• 大小: 78.58MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-18
  • 语言: 其他
  • 标签:

资源简介

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-master\1.gif
     文件        1184  2019-07-01 09:07  Hotels-master\App.js
     文件        5475  2019-07-01 09:07  Hotels-master\MainViewController_bak.m
     文件        5039  2019-07-01 09:07  Hotels-master\README.md
     文件          47  2019-07-01 09:07  Hotels-master\app.json
     目录           0  2019-07-01 09:07  Hotels-master\images\
     文件       86775  2019-07-01 09:07  Hotels-master\images\IMG_1875.PNG
     文件      172411  2019-07-01 09:07  Hotels-master\images\IMG_1876.PNG
     文件      140840  2019-07-01 09:07  Hotels-master\images\IMG_1877.PNG
     文件       96742  2019-07-01 09:07  Hotels-master\images\IMG_1878.PNG
     文件       54338  2019-07-01 09:07  Hotels-master\images\IMG_1879.PNG
     文件      104471  2019-07-01 09:07  Hotels-master\images\IMG_1880.PNG
     文件         121  2019-07-01 09:07  Hotels-master\index.js
     目录           0  2019-07-01 09:07  Hotels-master\ios\
     目录           0  2019-07-01 09:07  Hotels-master\ios\Hotels.xcodeproj\
     文件      237906  2019-07-01 09:07  Hotels-master\ios\Hotels.xcodeproj\project.pbxproj
     目录           0  2019-07-01 09:07  Hotels-master\ios\Hotels.xcworkspace\
     文件         224  2019-07-01 09:07  Hotels-master\ios\Hotels.xcworkspace\contents.xcworkspacedata
     目录           0  2019-07-01 09:07  Hotels-master\ios\Hotels.xcworkspace\xcshareddata\
     文件         238  2019-07-01 09:07  Hotels-master\ios\Hotels.xcworkspace\xcshareddata\IDEWorkspaceChecks.plist
     目录           0  2019-07-01 09:07  Hotels-master\ios\Hotels\
     文件         280  2019-07-01 09:07  Hotels-master\ios\Hotels\AppDelegate.h
     文件        9952  2019-07-01 09:07  Hotels-master\ios\Hotels\AppDelegate.m
............此处省略17849个文件信息

评论

共有 条评论