Initial commit

This commit is contained in:
ifish
2017-08-15 16:59:01 +08:00
commit bdc83e07ef
5766 changed files with 423223 additions and 0 deletions
@@ -0,0 +1,20 @@
//
// ShopErWeiMaViewController.h
// Ifish
//
// Created by imac on 17/4/11.
// Copyright © 2017年 lianlian. All rights reserved.
//
#import "WhiteNavBaseViewController.h"
@interface ShopErWeiMaViewController : WhiteNavBaseViewController
@property (weak, nonatomic) IBOutlet UIView *holdBackView;
@property (weak, nonatomic) IBOutlet UIImageView *erweimaCode;
@property (weak, nonatomic) IBOutlet UILabel *bootomLabel;
@property (nonatomic,strong) NSString *shopId;
@property (nonatomic,strong) NSString *shopName;
@property (weak, nonatomic) IBOutlet UILabel *shopNameLabel;
@end
@@ -0,0 +1,52 @@
//
// ShopErWeiMaViewController.m
// Ifish
//
// Created by imac on 17/4/11.
// Copyright © 2017年 lianlian. All rights reserved.
//
#import "ShopErWeiMaViewController.h"
#import "QRCodeGenerator.h"
@interface ShopErWeiMaViewController ()
@end
@implementation ShopErWeiMaViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
[self addTitleViewWithTitle:@"店铺二维码"];
self.shopNameLabel.text = self.shopName;
self.view.backgroundColor = RGB(242, 242, 242);
NSString*str=[NSString stringWithFormat:@"IfishShopId:%@",self.shopId];
self.erweimaCode.image=[QRCodeGenerator qrImageForString:str imageSize:self.erweimaCode.bounds.size.width];
self.holdBackView.layer.masksToBounds = YES;
self.holdBackView.layer.cornerRadius = 10;
self.holdBackView.layer.shadowOffset = CGSizeZero;
self.holdBackView.layer.shadowOpacity = 0.8f;
UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:self.holdBackView.bounds];
self.holdBackView.layer.shadowPath = shadowPath.CGPath;
self.bootomLabel.textColor = RGB(153, 153, 153);
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina5_5" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ShopErWeiMaViewController">
<connections>
<outlet property="bootomLabel" destination="UuP-kA-TfK" id="Zih-H5-FOZ"/>
<outlet property="erweimaCode" destination="05F-gK-U1w" id="tPD-DZ-7bG"/>
<outlet property="holdBackView" destination="1vQ-jh-MAG" id="HNH-Fj-NKT"/>
<outlet property="shopNameLabel" destination="Lqe-Kp-zVX" id="57L-AL-NFF"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="店铺名" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lqe-Kp-zVX">
<rect key="frame" x="16" y="108" width="382" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="ojJ-RS-5x4"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UuP-kA-TfK">
<rect key="frame" x="16" y="676" width="381" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="e6v-j3-bs1"/>
</constraints>
<attributedString key="attributedText">
<fragment content="顾客使用爱鱼奇扫一扫上面的二维码,即可成为您的店铺会员。">
<attributes>
<font key="NSFont" size="15" name=".PingFangSC-Regular"/>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="9" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1vQ-jh-MAG">
<rect key="frame" x="25" y="173" width="364" height="362.33333333333337"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XNJ-hE-WBg">
<rect key="frame" x="0.0" y="0.0" width="364" height="26"/>
<color key="backgroundColor" red="1" green="0.59999999999999998" blue="0.16470588235294117" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="26" id="YM5-W5-7H6"/>
</constraints>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="05F-gK-U1w">
<rect key="frame" x="55" y="53" width="254" height="254"/>
<constraints>
<constraint firstAttribute="width" secondItem="05F-gK-U1w" secondAttribute="height" multiplier="1:1" id="YkZ-TB-oMK"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="用爱鱼奇扫一扫,成为店铺会员" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zf0-5v-MaE">
<rect key="frame" x="82" y="326" width="200" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.98039215686274506" green="0.70980392156862748" blue="0.41568627450980394" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="1vQ-jh-MAG" secondAttribute="height" multiplier="325:323" id="18A-kV-gxE"/>
<constraint firstItem="zf0-5v-MaE" firstAttribute="top" secondItem="05F-gK-U1w" secondAttribute="bottom" constant="19" id="3Xe-d7-YuB"/>
<constraint firstAttribute="trailing" secondItem="XNJ-hE-WBg" secondAttribute="trailing" id="5Ou-QZ-tSr"/>
<constraint firstItem="05F-gK-U1w" firstAttribute="centerX" secondItem="zf0-5v-MaE" secondAttribute="centerX" id="9rT-ae-Llu"/>
<constraint firstItem="05F-gK-U1w" firstAttribute="centerX" secondItem="1vQ-jh-MAG" secondAttribute="centerX" id="FTF-p9-5p6"/>
<constraint firstItem="XNJ-hE-WBg" firstAttribute="leading" secondItem="1vQ-jh-MAG" secondAttribute="leading" id="Nbj-az-5ba"/>
<constraint firstItem="XNJ-hE-WBg" firstAttribute="top" secondItem="1vQ-jh-MAG" secondAttribute="top" id="TX3-7P-bIZ"/>
<constraint firstItem="05F-gK-U1w" firstAttribute="leading" secondItem="1vQ-jh-MAG" secondAttribute="leading" constant="55" id="aaR-oj-CnD"/>
<constraint firstItem="05F-gK-U1w" firstAttribute="top" secondItem="XNJ-hE-WBg" secondAttribute="bottom" constant="27" id="jVv-nn-9in"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="UuP-kA-TfK" secondAttribute="bottom" constant="20" id="4sH-RI-dEJ"/>
<constraint firstItem="1vQ-jh-MAG" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="25" id="9KD-rN-ZgL"/>
<constraint firstItem="Lqe-Kp-zVX" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="CaD-7y-CF7"/>
<constraint firstAttribute="trailing" secondItem="Lqe-Kp-zVX" secondAttribute="trailing" constant="16" id="KNd-nh-QSY"/>
<constraint firstItem="Lqe-Kp-zVX" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="16" id="M8W-Cd-IsG"/>
<constraint firstItem="Lqe-Kp-zVX" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="108" id="Nh9-df-SQf"/>
<constraint firstAttribute="trailing" secondItem="1vQ-jh-MAG" secondAttribute="trailing" constant="25" id="Yzq-tk-aO0"/>
<constraint firstAttribute="trailing" secondItem="UuP-kA-TfK" secondAttribute="trailing" constant="17" id="fMd-bS-Pbt"/>
<constraint firstItem="1vQ-jh-MAG" firstAttribute="top" secondItem="Lqe-Kp-zVX" secondAttribute="bottom" constant="44" id="q5y-b0-WXf"/>
<constraint firstItem="UuP-kA-TfK" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="16" id="vlz-um-ZpD"/>
</constraints>
<point key="canvasLocation" x="25" y="52"/>
</view>
</objects>
</document>
@@ -0,0 +1,13 @@
//
// WoShiShangJiaViewController.h
// Ifish
//
// Created by imac on 17/2/9.
// Copyright © 2017年 lianlian. All rights reserved.
//
#import "WhiteNavBaseViewController.h"
@interface WoShiShangJiaViewController : WhiteNavBaseViewController
@end
@@ -0,0 +1,465 @@
//
// WoShiShangJiaViewController.m
// Ifish
//
// Created by imac on 17/2/9.
// Copyright © 2017年 lianlian. All rights reserved.
//
#import "WoShiShangJiaViewController.h"
#import "ShopServiceListData.h"
#import "ShopNotCertifyViewCell.h"
#import "ShopAlreadyCertifyViewCell.h"
#import "ShopServiceListCell.h"
#import "UINavigationBar+Background.h"
#import "ShopCertificationViewController.h"
#import "ShopCertifyFailViewController.h"
#import "IfishShopDetailViewController.h"
#import "ShopEditViewController.h"
#import "IfishShopEditeNewViewController.h"
#import "WorkbechViewController.h"
#import "IfishKanHuGuanLiViewController.h"
#import "ShopCertificationIntroduceController.h"
#import "MemberManageViewController.h"
#import "ShopErWeiMaViewController.h"
#import "IfishGoodsManageViewController.h"
#import "ShopGoodsManageViewController.h"
@interface WoShiShangJiaViewController ()<UITableViewDelegate,UITableViewDataSource>
@property(nonatomic,strong)UITableView *tableView;
@property(nonatomic,strong) NSMutableArray *dataArr;
@property(nonatomic,strong) CertificationShopModel *ShopsInfo;
@end
@implementation WoShiShangJiaViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self getData];
// Do any additional setup after loading the view.
//self.title = @"我是商家";
[self addTitleViewWithTitle:@"我是商家"];
[self creatTab];
self.view.backgroundColor =[UIColor whiteColor];
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
UserModel *user = [dataContorl getUserInfo];
if ([user.userType isEqualToString:@"1"]) {
self.ShopsInfo= [[DataCenter defaultDtacenter] valueForKey:@"ShopsInfo"];
NSIndexPath *path =[NSIndexPath indexPathForRow:0 inSection:0];
NSArray *pathArr =@[path];
[self.tableView reloadRowsAtIndexPaths:pathArr withRowAnimation:UITableViewRowAnimationNone];
}
}
-(void)goBackAction{
[self.navigationController popViewControllerAnimated:YES];
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
[self.navigationController.navigationBar resetBackgroundImage];
}
-(void)getData{
NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"ShopService" ofType:@"plist"];
if (!_dataArr) {
_dataArr = [[NSMutableArray alloc] init];
NSArray *data = [[NSArray alloc] initWithContentsOfFile:plistPath];
for (NSDictionary *listDic in data) {
ShopServiceListData *model=[[ShopServiceListData alloc] init];
model.serviceIcon = listDic[@"serviceIcon"];
model.serviceName= listDic[@"title"];
model.serviceDt = listDic [@"dsc"];
[_dataArr addObject:model];
}
}
}
-(void)creatTab{
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0,self.view.frame.size.width,self.view.frame.size.height) style:UITableViewStylePlain];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.scrollEnabled = YES;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.showsVerticalScrollIndicator = NO;
self.tableView.backgroundColor = [UIColor whiteColor];
[self.view addSubview:self.tableView];
}
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section ==0) {
return 1;
}else{
return 5;
}
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section ==0) {
UserModel *user = [dataContorl getUserInfo];
if ([user.userType isEqualToString:@"1"]) {
return 186.0f;
}else{
return self.view.frame.size.width*0.21;
}
}else{
return self.view.frame.size.width*0.16;
}
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
if (section ==0) {
return 5.0f;
}else{
CGFloat ViewH =self.view.frame.size.width * 0.093;
return ViewH + 10.0f;
}
}
-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
if (section ==1) {
CGFloat ViewH =self.view.frame.size.width * 0.093;
UIView *HoldView=[[UIView alloc] initWithFrame:CGRectMake(0,0, self.view.frame.size.width, ViewH + 10)];
HoldView.backgroundColor = JWUIColorFromRGB(0xf2f2f2);
//CGFloat whiteH = ViewH - 10;
UIView *whiteHoldView=[[UIView alloc] initWithFrame:CGRectMake(0, 10, self.view.frame.size.width,ViewH)];
whiteHoldView.backgroundColor = [UIColor whiteColor];
[HoldView addSubview:whiteHoldView];
CGFloat pointW = 6.0f;
UIView *headpoint=[[UIView alloc] initWithFrame:CGRectMake(15, ViewH/2 -pointW/2, pointW, pointW)];
headpoint.layer.masksToBounds = YES;
headpoint.layer.cornerRadius = pointW/2;
[whiteHoldView addSubview:headpoint];
UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(headpoint.frame) + 5, ViewH/2 - 30/2, 280, 30)];
title.textColor = RGB(102, 102, 102);
title.font = [UIFont systemFontOfSize:12.0];
[whiteHoldView addSubview:title];
UIView *lineView=[[UIView alloc] initWithFrame:CGRectMake(0,CGRectGetHeight(whiteHoldView.frame) -1, self.view.frame.size.width, 1)];
lineView.backgroundColor = RGB(221, 221, 221);
[whiteHoldView addSubview:lineView];
UserModel *user = [dataContorl getUserInfo];
if ([user.userType isEqualToString:@"1"]) {
headpoint.backgroundColor = RGB(50,184, 254);
title.text = @"您已通过爱鱼奇商家认证,可以使用以下服务";
}else{
headpoint.backgroundColor = RGB(221, 221, 221);
title.text = @"完成商家认证,即可使用以下服务";
}
return HoldView;
}else if (section ==1){
UIView *Footerback=[[UIView alloc] init];
Footerback.backgroundColor = JWUIColorFromRGB(0xf2f2f2);
return Footerback;
}
return nil;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section==0) {
UserModel *user = [dataContorl getUserInfo];
if ([user.userType isEqualToString:@"1"]) {
//商家
ShopAlreadyCertifyViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ShopAlreadyCertifyViewCell"];
if (!cell) {
cell = [[[NSBundle mainBundle]loadNibNamed:@"ShopAlreadyCertifyViewCell" owner:self options:nil]lastObject];
}
CertificationShopModel *ShopsInfo= [[DataCenter defaultDtacenter] valueForKey:@"ShopsInfo"];
[cell loadDataWith:ShopsInfo];
[cell.shopDetailBtn addTarget:self action:@selector(shopDetailBtnAction) forControlEvents:UIControlEventTouchUpInside];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
[cell.saomaBtn addTarget:self action:@selector(saomaBtnClick) forControlEvents:UIControlEventTouchUpInside];
return cell;
}else{
ShopNotCertifyViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ShopNotCertifyViewCell"];
if (!cell) {
cell = [[[NSBundle mainBundle]loadNibNamed:@"ShopNotCertifyViewCell" owner:self options:nil]lastObject];
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
}else{
ShopServiceListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ShopServiceListCell"];
if (!cell) {
cell = [[[NSBundle mainBundle]loadNibNamed:@"ShopServiceListCell" owner:self options:nil]lastObject];
}
ShopServiceListData *mode =self.dataArr[indexPath.row];
[cell setCellDataWith:mode];
return cell;
}
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
UserModel *user = [dataContorl getUserInfo];
if ([user.userType isEqualToString:@"1"]) {
if (indexPath.section ==0) {
return;
}
switch (indexPath.row) {
case 0:
{
//店铺管理
// ShopEditViewController *shopeditVC= [[ShopEditViewController alloc] init];
IfishShopEditeNewViewController *shopeditVC= [[IfishShopEditeNewViewController alloc] init];
shopeditVC.shopInfo = self.ShopsInfo;
self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:shopeditVC animated:YES];
}
break;
case 1:
{//看护管理
//看护工作 台
if ([self.ShopsInfo.status isEqualToString:@"3"]) {
[self.view makeToast:@"此商户已被禁用"];
return;
}
// WorkbechViewController *workVC=[[WorkbechViewController alloc] init];
IfishKanHuGuanLiViewController *workVC = [[IfishKanHuGuanLiViewController alloc] init];
workVC.shopsInfo = self.ShopsInfo;
self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:workVC animated:YES];
}
break;
case 2:
{
//会员管理
MemberManageViewController *memberManageVC = [[MemberManageViewController alloc] init];
self.hidesBottomBarWhenPushed = YES;
memberManageVC.shopId = self.ShopsInfo.shopsId;
[self.navigationController pushViewController:memberManageVC animated:YES];
}
break;
case 3:
{
//进货管理
IfishGoodsManageViewController *goodsVC=[[IfishGoodsManageViewController alloc] init];
self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:goodsVC animated:YES];
}
break;
case 4:
{
if ([self.ShopsInfo.shopsId isKindOfClass:[NSNull class]]||!self.ShopsInfo.shopsId) {
return;
}
//商品管理
ShopGoodsManageViewController *shopGoodsVC=[[ShopGoodsManageViewController alloc] init];
self.hidesBottomBarWhenPushed = YES;
shopGoodsVC.shopID = self.ShopsInfo.shopsId;
[self.navigationController pushViewController:shopGoodsVC animated:YES];
}
break;
default:
break;
}
}else{
if (indexPath.section ==0) {
//认证
//商户验证
UserModel *user = [dataContorl getUserInfo];
if ([user.userType isEqualToString:@"0"]) {
//普通用户 普通用户展示认证入口
CertificationShopModel *CSModel= [[DataCenter defaultDtacenter] valueForKey:@"ShopsInfo"];
if (CSModel.shopsId) {
[self testShopStatusWith:CSModel];
}else{
ShopCertificationIntroduceController *introduce=[[ShopCertificationIntroduceController alloc] init];
self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:introduce animated:YES];
}
}
}else{
[self.view makeToast:@"请先完成商家认证"];
}
}
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark - 审核状态查询
-(void)testShopStatusWith:(CertificationShopModel *)CSModel{
[IFISHHTTPTOOL shopCertifyStausWith:CSModel.shopsId huishuiShiJian:^(ShopCertifyStausModel *shopCertifyd) {
ShopCertifyStausModel *statusmodel = [[ShopCertifyStausModel alloc] init];
statusmodel=shopCertifyd;
[self pushStatusViewWith:statusmodel];
}];
}
-(void)pushStatusViewWith:(ShopCertifyStausModel*)model{
UIViewController *puVC;
Class cls= nil;
//model.status = nil;
if (model.status) {
//model.status =@"0";
if ([model.status isEqualToString:@"0"]){
//审核不通过
// cls=NSClassFromString(@"ShopCertifyFailViewController");
ShopCertifyFailViewController *puVC=[[ShopCertifyFailViewController alloc] init];
puVC.statusModel = model;
self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:puVC animated:YES];
}else if ([model.status isEqualToString:@"1"]){
cls=NSClassFromString(@"ShopCertifySucssesViewController");
puVC=[[cls alloc] initWithNibName:@"ShopCertifyFailViewController" bundle:nil];
self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:puVC animated:YES];
}else if ([model.status isEqualToString:@"2"]){
cls=NSClassFromString(@"ShopCertifyCheckViewController");
puVC=[[cls alloc] initWithNibName:@"ShopCertifyFailViewController" bundle:nil];
self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:puVC animated:YES];
}else if ([model.status isEqualToString:@"3"]){
//禁用
[self.view makeToast:@"已禁用"];
return;
}
}else{
[self.view makeToast:@"请求错误"];
}
}
#pragma mark - 店铺详情
-(void)shopDetailBtnAction{
IfishShopDetailViewController *shopDetailVC=[[IfishShopDetailViewController alloc] init];
CertificationShopModel *ShopsInfo= [[DataCenter defaultDtacenter] valueForKey:@"ShopsInfo"];
IfishShopInfo *shopinfo = [[IfishShopInfo alloc] init];
shopinfo.shopsId = ShopsInfo.shopsId;
shopinfo.userId = ShopsInfo.userId;
shopinfo.userImg = ShopsInfo.userImg;
shopinfo.userName = ShopsInfo.userName;
shopinfo.shopsName = ShopsInfo.shopsName;
shopinfo.shopsPhone = ShopsInfo.shopsPhone;
shopinfo.shopsProvince = ShopsInfo.shopsProvince;
shopinfo.shopsArea = ShopsInfo.shopsArea;
shopinfo.shopsCity = ShopsInfo.shopsCity;
shopinfo.shopsAddress = ShopsInfo.shopsAddress;
shopinfo.picture4 = ShopsInfo.picture4;
shopinfo.remark = ShopsInfo.remark;
//shopinfo.distance = ShopsInfo.
shopinfo.weixinCode = ShopsInfo.wechat;
shopinfo.shopLink = ShopsInfo.shoplink;
shopDetailVC.shopInfo = shopinfo;
self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:shopDetailVC animated:YES];
}
#pragma mark 店铺二维码
-(void)saomaBtnClick
{
ShopErWeiMaViewController *erweimaVC = [[ShopErWeiMaViewController alloc] init];
self.hidesBottomBarWhenPushed = YES;
erweimaVC.shopId =self.ShopsInfo.shopsId;
erweimaVC.shopName = self.ShopsInfo.shopsName;
[self.navigationController pushViewController:erweimaVC animated:YES];
}
@end