Initial commit
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// GoNetShopViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/14.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface GoNetShopViewCell : UITableViewCell
|
||||
|
||||
@end
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// GoNetShopViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/14.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GoNetShopViewCell.h"
|
||||
|
||||
@implementation GoNetShopViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="GoNetShopViewCell" id="KGk-i7-Jjw" customClass="GoNetShopViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="38"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="37"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="进入我的网店" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XzP-dF-Igl">
|
||||
<rect key="frame" x="15" y="8" width="120" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.36078431372549019" green="0.69019607843137254" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<point key="canvasLocation" x="4" y="38"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// IFishShopsViewCell.h
|
||||
// CollectionViewTest
|
||||
//
|
||||
// Created by imac on 17/1/16.
|
||||
// Copyright © 2017年 xiang. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "IfishShopInfo.h"
|
||||
@interface IFishShopsViewCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *shopName;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *shopYear;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *shopLoaction;
|
||||
|
||||
-(void)subviewsCorner;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *v_label;
|
||||
|
||||
-(void)loadDataWtih:(IfishShopInfo *)shopInfo;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *shopImg;
|
||||
|
||||
@end
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// IFishShopsViewCell.m
|
||||
// CollectionViewTest
|
||||
//
|
||||
// Created by imac on 17/1/16.
|
||||
// Copyright © 2017年 xiang. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IFishShopsViewCell.h"
|
||||
#import "UIImageView+WebCache.h"
|
||||
@implementation IFishShopsViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
}
|
||||
-(void)loadDataWtih:(IfishShopInfo *)shopInfo
|
||||
{
|
||||
self.shopLoaction.text = [NSString stringWithFormat:@"%@%@",shopInfo.shopsProvince,shopInfo.shopsCity];
|
||||
self.shopYear.text = shopInfo.remark;
|
||||
self.shopName.text = shopInfo.shopsName;
|
||||
NSString*str=[NSString stringWithFormat:@"%@%@",kGetIconUrl,shopInfo.userImg];
|
||||
[self.shopImg sd_setImageWithURL:[NSURL URLWithString:str] placeholderImage:[UIImage imageNamed:@""]];
|
||||
|
||||
|
||||
}
|
||||
-(void)subviewsCorner
|
||||
{
|
||||
|
||||
NSString *str= @"已认证";
|
||||
NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithString:str];
|
||||
NSTextAttachment *attch = [[NSTextAttachment alloc] init];
|
||||
attch.image = [UIImage imageNamed:@"businesslistings_v"];
|
||||
attch.bounds = CGRectMake(0,0,9,8);
|
||||
|
||||
NSAttributedString *attristr=[NSAttributedString attributedStringWithAttachment:attch];
|
||||
[attri insertAttributedString:attristr atIndex:0];
|
||||
self.v_label.attributedText = attri;
|
||||
self.v_label.layer.masksToBounds = YES;
|
||||
self.v_label.layer.cornerRadius = self.v_label.bounds.size.height/2;
|
||||
//self.shopLoaction.layer.masksToBounds = YES;
|
||||
//self.shopLoaction.layer.cornerRadius = self.shopLoaction.bounds.size.height/2;
|
||||
//self.shopYear.layer.masksToBounds = YES;
|
||||
//self.shopYear.layer.cornerRadius = self.shopYear.bounds.size.height/2;
|
||||
|
||||
self.shopImg.layer.masksToBounds = YES;
|
||||
self.shopImg.layer.cornerRadius = self.shopImg.bounds.size.height/2;
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
}
|
||||
|
||||
@end
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
<?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" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="IFishShopsViewCell" rowHeight="70" id="KGk-i7-Jjw" customClass="IFishShopsViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="318" height="70"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="318" height="69"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_ifish.png" translatesAutoresizingMaskIntoConstraints="NO" id="2gp-YE-2na">
|
||||
<rect key="frame" x="8" y="17" width="35" height="35"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="35" id="rfO-49-rJu"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="shopName" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eAm-Ak-3RP">
|
||||
<rect key="frame" x="51" y="18" width="70" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="18" id="UxY-Vk-hLl"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yol-sP-gTv">
|
||||
<rect key="frame" x="92" y="39" width="29" height="14"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="14" id="fdl-ow-VwR"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="57y-ln-xwG">
|
||||
<rect key="frame" x="51" y="39" width="29" height="14"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="14" id="aLb-Vn-KYp"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KNI-F6-SW6">
|
||||
<rect key="frame" x="129" y="21" width="54" height="12"/>
|
||||
<color key="backgroundColor" red="1" green="0.55294117647058827" blue="0.25490196078431371" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="12" id="Pro-Zn-Y7F"/>
|
||||
<constraint firstAttribute="width" constant="54" id="hDp-xQ-1Lv"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="2gp-YE-2na" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" id="8Sa-St-4x9"/>
|
||||
<constraint firstItem="2gp-YE-2na" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="9" id="Scs-YM-lE3"/>
|
||||
<constraint firstItem="yol-sP-gTv" firstAttribute="top" secondItem="eAm-Ak-3RP" secondAttribute="bottom" constant="3" id="UDL-1c-d5o"/>
|
||||
<constraint firstItem="yol-sP-gTv" firstAttribute="leading" secondItem="57y-ln-xwG" secondAttribute="trailing" constant="12.5" id="WEJ-y5-wvb"/>
|
||||
<constraint firstItem="KNI-F6-SW6" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="13" id="ZaI-Cf-zPb"/>
|
||||
<constraint firstItem="2gp-YE-2na" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="dre-eS-XWf"/>
|
||||
<constraint firstItem="eAm-Ak-3RP" firstAttribute="leading" secondItem="2gp-YE-2na" secondAttribute="trailing" constant="8" symbolic="YES" id="foD-KY-1cm"/>
|
||||
<constraint firstItem="KNI-F6-SW6" firstAttribute="leading" secondItem="eAm-Ak-3RP" secondAttribute="trailing" constant="8" id="ios-wt-58z"/>
|
||||
<constraint firstItem="57y-ln-xwG" firstAttribute="leading" secondItem="2gp-YE-2na" secondAttribute="trailing" constant="8" symbolic="YES" id="pwW-Fc-evk"/>
|
||||
<constraint firstItem="57y-ln-xwG" firstAttribute="top" secondItem="eAm-Ak-3RP" secondAttribute="bottom" constant="3" id="qhU-cB-b5w"/>
|
||||
<constraint firstItem="eAm-Ak-3RP" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="10" id="vux-Oc-flg"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="shopImg" destination="2gp-YE-2na" id="BCG-98-DKs"/>
|
||||
<outlet property="shopLoaction" destination="57y-ln-xwG" id="RzD-h1-Gud"/>
|
||||
<outlet property="shopName" destination="eAm-Ak-3RP" id="pmq-ut-ODt"/>
|
||||
<outlet property="shopYear" destination="yol-sP-gTv" id="Zq6-HJ-Mrt"/>
|
||||
<outlet property="v_label" destination="KNI-F6-SW6" id="F6g-oG-8Ha"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-280" y="-46"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_ifish.png" width="80" height="80"/>
|
||||
</resources>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4_7.fullscreen"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// IfishShopDetailViewController.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/13.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BaseVIewContorller.h"
|
||||
#import "IfishShopInfo.h"
|
||||
|
||||
@interface IfishShopDetailViewController : BaseVIewContorller
|
||||
@property (nonatomic,strong) IfishShopInfo *shopInfo;
|
||||
|
||||
@end
|
||||
+489
@@ -0,0 +1,489 @@
|
||||
//
|
||||
// IfishShopDetailViewController.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/13.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IfishShopDetailViewController.h"
|
||||
#import "ShopDetailViewfirstCell.h"
|
||||
#import "ShopDetailThredViewCell.h"
|
||||
#import "ShopDetailCodeFirstCell.h"
|
||||
#import "IfishSessionViewController.h"
|
||||
#import "MineKanHuViewController.h"
|
||||
#import "GoNetShopViewCell.h"
|
||||
#import "ShopInfosViewCell.h"
|
||||
#import "PushMasssageWebViewController.h"
|
||||
#import "ShopDetailViewGoodsViewCell.h"
|
||||
#import "ShopGoodsListData.h"
|
||||
#import "IFishVideoPalyViewController.h"
|
||||
@interface IfishShopDetailViewController ()<UITableViewDelegate,UITableViewDataSource,IfishShopGoodsListDelegate>
|
||||
@property(nonatomic,strong)UITableView *tableView;
|
||||
@property (nonatomic,strong) NSMutableArray *goodsArr;
|
||||
@end
|
||||
|
||||
@implementation IfishShopDetailViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
[self addTitleViewWithTitle:@"店铺详情"];
|
||||
_goodsArr= [[NSMutableArray alloc] init];
|
||||
self.view.backgroundColor =[UIColor redColor];
|
||||
[self creatTab];
|
||||
[self loadDatas];
|
||||
}
|
||||
-(void)creatTab{
|
||||
CGFloat BtnH = self.view.frame.size.width * 0.12;
|
||||
|
||||
[self.tableView registerNib:[UINib nibWithNibName:@"ShopDetailCodeFirstCell" bundle:nil] forCellReuseIdentifier:@"ShopDetailCodeFirstCell"];
|
||||
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width,self.view.frame.size.height - BtnH) style:UITableViewStyleGrouped];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.scrollEnabled = YES;
|
||||
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
self.tableView.showsVerticalScrollIndicator = NO;
|
||||
self.tableView.backgroundColor = TABLE_BACKGROUD_COLOR;
|
||||
|
||||
[self.view addSubview:self.tableView];
|
||||
|
||||
|
||||
NSString *str= @" 咨询TA";
|
||||
NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithString:str];
|
||||
NSTextAttachment *attch = [[NSTextAttachment alloc] init];
|
||||
attch.image = [UIImage imageNamed:@"businesslistings_comments"];
|
||||
attch.bounds = CGRectMake(0,-4,17,16);//35*33
|
||||
NSAttributedString *attristr=[NSAttributedString attributedStringWithAttachment:attch];
|
||||
[attri insertAttributedString:attristr atIndex:0];
|
||||
UIButton *zixunbtn =[UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[zixunbtn setAttributedTitle:attri forState:UIControlStateNormal];
|
||||
zixunbtn.frame = CGRectMake(0,CGRectGetMaxY(self.tableView.frame),self.view.frame.size.width/2, BtnH);
|
||||
zixunbtn.backgroundColor = RGB(255, 115, 92);
|
||||
[attri addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:NSMakeRange(0,str.length+1)];
|
||||
[attri addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:15] range:NSMakeRange(0,str.length+1)];
|
||||
[zixunbtn addTarget:self action:@selector(ziXunBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
[self.view addSubview:zixunbtn];
|
||||
|
||||
NSString *str2= @" 让TA帮我看护";
|
||||
NSMutableAttributedString *attri2 = [[NSMutableAttributedString alloc] initWithString:str2];
|
||||
NSTextAttachment *attch2 = [[NSTextAttachment alloc] init];
|
||||
attch2.image = [UIImage imageNamed:@"businesslistings_nurse"];
|
||||
attch2.bounds = CGRectMake(0,-3,14,16);//33*39
|
||||
NSAttributedString *attristr2=[NSAttributedString attributedStringWithAttachment:attch2];
|
||||
[attri2 insertAttributedString:attristr2 atIndex:0];
|
||||
UIButton *kanhubtn =[UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[kanhubtn setAttributedTitle:attri2 forState:UIControlStateNormal];
|
||||
kanhubtn.frame = CGRectMake(CGRectGetMaxX(zixunbtn.frame),CGRectGetMinY(zixunbtn.frame), self.view.frame.size.width/2, BtnH);
|
||||
kanhubtn.backgroundColor = RGB(0, 180,239);
|
||||
[attri2 addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:NSMakeRange(0,str2.length+1)];
|
||||
[attri2 addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:15] range:NSMakeRange(0,str2.length+1)];
|
||||
[kanhubtn addTarget:self action:@selector(kanHuAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self.view addSubview:kanhubtn];
|
||||
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Table view data source
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
|
||||
return 5;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
if (section ==1) {
|
||||
return 3;
|
||||
}
|
||||
return 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
if (indexPath.section ==0) {
|
||||
|
||||
ShopDetailCodeFirstCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ShopDetailCodeFirstCell"];
|
||||
if(cell==nil){
|
||||
|
||||
cell = [[ShopDetailCodeFirstCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"ShopDetailCodeFirstCell"];
|
||||
cell.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
}
|
||||
[cell loadDataWith:self.shopInfo];
|
||||
|
||||
return cell;
|
||||
|
||||
}else if (indexPath.section ==1){
|
||||
|
||||
ShopInfosViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ShopInfosViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"ShopInfosViewCell" owner:self options:nil]lastObject];
|
||||
}
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[cell loadDataWith:self.shopInfo atIndex:indexPath];
|
||||
|
||||
return cell;
|
||||
|
||||
}else if (indexPath.section ==2){
|
||||
|
||||
GoNetShopViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GoNetShopViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"GoNetShopViewCell" owner:self options:nil]lastObject];
|
||||
}
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
|
||||
return cell;
|
||||
|
||||
}else if (indexPath.section ==4){
|
||||
|
||||
static NSString *identfire=@"ShopDetailViewGoodsViewCell";
|
||||
ShopDetailViewGoodsViewCell *cell=[tableView dequeueReusableCellWithIdentifier:identfire];
|
||||
|
||||
if (!cell) {
|
||||
|
||||
cell=[[ShopDetailViewGoodsViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identfire];
|
||||
cell.backgroundColor = [UIColor whiteColor];
|
||||
}
|
||||
|
||||
cell.delegate = self;
|
||||
[cell setGoodsdataArr:_goodsArr];
|
||||
[cell refreshCollellction];
|
||||
return cell;
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
ShopDetailThredViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ShopDetailThredViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"ShopDetailThredViewCell" owner:self options:nil]lastObject];
|
||||
}
|
||||
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[cell loadDataWith:self.shopInfo];
|
||||
return cell;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
//750 * 1080
|
||||
|
||||
if (indexPath.section ==0 ){
|
||||
|
||||
return self.view.frame.size.width*0.39;
|
||||
|
||||
}else if (indexPath.section ==1){
|
||||
|
||||
return 40;
|
||||
|
||||
}else if (indexPath.section ==2){
|
||||
|
||||
return self.view.frame.size.width*0.12;
|
||||
|
||||
}else if (indexPath.section==4)
|
||||
{
|
||||
CGFloat Itemwidth = (kScreenSize.width-1)/2;
|
||||
CGFloat ItemH = Itemwidth*1.03 +1;
|
||||
if (_goodsArr.count!=0) {
|
||||
|
||||
int total = (int)[_goodsArr count];
|
||||
int rowCount =total%2==0?total/2:total/2+1;
|
||||
return ItemH*rowCount;
|
||||
}
|
||||
return ItemH*2;
|
||||
|
||||
}else{
|
||||
|
||||
return self.view.frame.size.width*0.60;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
if (section ==3||section==4) {
|
||||
return self.view.frame.size.width*0.12 + 1;
|
||||
|
||||
}else if (section ==0){
|
||||
return 1;
|
||||
}
|
||||
else{
|
||||
return 0.000001;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
if (section ==2||section==3) {
|
||||
return 10;
|
||||
}else if (section ==0||section ==1){
|
||||
return 1;
|
||||
}
|
||||
return 0.000001;
|
||||
}
|
||||
|
||||
|
||||
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
|
||||
|
||||
if (section ==3||section==4) {
|
||||
|
||||
UIView *backvew =[[UIView alloc] initWithFrame:CGRectMake(0,0, self.view.frame.size.width, self.view.frame.size.width*0.12)];
|
||||
backvew.backgroundColor = [UIColor whiteColor];
|
||||
//backvew.backgroundColor = [UIColor blueColor];
|
||||
UILabel *zhanshiLabel = [[UILabel alloc] init];
|
||||
zhanshiLabel.frame = CGRectMake(16,CGRectGetHeight(backvew.frame)/2 - 5,self.view.frame.size.width, CGRectGetHeight(backvew.frame)/2);
|
||||
if (section==3) {
|
||||
zhanshiLabel.text = @"店铺门面展示";
|
||||
}else{
|
||||
zhanshiLabel.text = @"商品列表";
|
||||
}
|
||||
//zhanshiLabel.text = @"店铺门面展示";
|
||||
zhanshiLabel.textColor = RGB(0, 0, 0);
|
||||
zhanshiLabel.font = [UIFont systemFontOfSize:15];
|
||||
//zhanshiLabel.backgroundColor = [UIColor redColor];
|
||||
[zhanshiLabel sizeToFit];
|
||||
[backvew addSubview:zhanshiLabel];
|
||||
UIView *backlinevew =[[UIView alloc] initWithFrame:CGRectMake(0,CGRectGetMaxY(backvew.frame) , self.view.frame.size.width,1)];
|
||||
backlinevew.backgroundColor = TABLE_BACKGROUD_COLOR;
|
||||
[backvew addSubview:backlinevew];
|
||||
return backvew;
|
||||
}
|
||||
|
||||
return nil;
|
||||
|
||||
}
|
||||
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
if (indexPath.section==2) {
|
||||
//进入网店
|
||||
if ([self.shopInfo.shopLink isKindOfClass:[NSNull class]]||!self.shopInfo.shopLink||[self.shopInfo.shopLink isEqualToString:@""]) {
|
||||
[self.view makeToast:@"商家暂未开通网店"];
|
||||
return;
|
||||
}
|
||||
|
||||
PushMasssageWebViewController *web=[[PushMasssageWebViewController alloc] init];
|
||||
web.pushlink = self.shopInfo.shopLink;
|
||||
web.pushtitle = @"网店";
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
[self.navigationController pushViewController:web animated:YES];
|
||||
}else if (indexPath.section==1&&indexPath.row ==0){
|
||||
|
||||
//拨打电话
|
||||
if ([UIApplication instancesRespondToSelector:@selector(canOpenURL:)]) {
|
||||
|
||||
NSString *telNumber = [NSString stringWithFormat:@"telprompt://%@",self.shopInfo.shopsPhone];
|
||||
|
||||
NSURL *aURL = [NSURL URLWithString: telNumber];
|
||||
|
||||
if ([[UIApplication sharedApplication] canOpenURL:aURL])
|
||||
|
||||
{
|
||||
[[UIApplication sharedApplication] openURL:aURL];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
- (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.
|
||||
}
|
||||
*/
|
||||
#pragma mark - vziXunBtnAction
|
||||
|
||||
-(void)ziXunBtnAction
|
||||
{
|
||||
|
||||
UserModel*model=[dataContorl getUserInfo];
|
||||
|
||||
NSString *myAcount = [NSString stringWithFormat:@"%@",model.userId];
|
||||
|
||||
NSString *tarGetAcount = [NSString stringWithFormat:@"%@",self.shopInfo.userId];
|
||||
if ([myAcount isEqualToString:tarGetAcount]) {
|
||||
|
||||
[self.view makeToast:@"不能和自己聊天哦"];
|
||||
return;
|
||||
}
|
||||
|
||||
[[NIMSDK sharedSDK].loginManager login:myAcount token:model.neteaseToken completion:^(NSError *error) {
|
||||
if (!error) {
|
||||
NSLog(@"登录成功");
|
||||
//创建session
|
||||
NIMSession *session = [NIMSession session:tarGetAcount type:NIMSessionTypeP2P];
|
||||
//创建聊天页,这个页面继承自 NIMKit 中的组件 NIMSessionViewController
|
||||
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
IfishSessionViewController *vc = [[IfishSessionViewController alloc] initWithSession:session];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
|
||||
}else{
|
||||
NSLog(@"登录失败");
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - 看护action
|
||||
-(void)kanHuAction{
|
||||
//判断是否已有看护商家
|
||||
UserModel *model = [dataContorl getUserInfo];
|
||||
if ([model.userType isEqualToString:@"1"]) {
|
||||
[self.view makeToast:@"您是商家,不能让别人进行看护。"];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//判断是否是自己的店铺
|
||||
NSString *userId = [dataContorl dataControlGetUserIdInfo];
|
||||
NSString *shopUserId =[NSString stringWithFormat:@"%@", self.shopInfo.userId];
|
||||
if ([shopUserId isEqualToString:userId]) {
|
||||
[self.view makeToast:@"您是商家,不能让别人进行看护。"];
|
||||
return;
|
||||
}
|
||||
|
||||
__weak typeof (self)weskSelf=self;
|
||||
UIAlertController*ac=[UIAlertController alertControllerWithTitle:@"" message:@"确认看护后,该商家对您的爱鱼进行实时的看护,确认让这位商家对您的爱鱼看护吗?" preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[self presentViewController:ac animated:YES completion:nil];
|
||||
[ac addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction*action){
|
||||
|
||||
|
||||
}]];
|
||||
[ac addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction*action){
|
||||
|
||||
[weskSelf kanhuWith:userId];
|
||||
|
||||
}]];
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)kanhuWith:(NSString *)userId
|
||||
{
|
||||
[AFHttpTool newChoiceShops:self.shopInfo.userId userId:userId success:^(id response) {
|
||||
|
||||
NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
|
||||
|
||||
if ([reDic[@"result"] isEqualToString:@"100"]) {
|
||||
//选择看护商家成功加金币
|
||||
[[IfishUserObsever sharedInstance] addGoldWith:CHIOCELOOKSHOPS addType:IFISHADDGOLDTYPE1];
|
||||
|
||||
CertificationShopModel*kanHuShangJiaXinXi=[[CertificationShopModel alloc] init];
|
||||
|
||||
kanHuShangJiaXinXi.userId= self.shopInfo.userId;
|
||||
kanHuShangJiaXinXi.userName= self.shopInfo.userName;
|
||||
kanHuShangJiaXinXi.userImg = self.shopInfo.userImg;
|
||||
kanHuShangJiaXinXi.shopsPhone= self.shopInfo.shopsPhone;
|
||||
kanHuShangJiaXinXi.shopsName= self.shopInfo.shopsName;
|
||||
kanHuShangJiaXinXi.shopsProvince= self.shopInfo.shopsProvince;
|
||||
kanHuShangJiaXinXi.shopsCity= self.shopInfo.shopsCity;
|
||||
kanHuShangJiaXinXi.shopsArea= self.shopInfo.shopsArea;
|
||||
kanHuShangJiaXinXi.shopsAddress= self.shopInfo.shopsAddress;
|
||||
kanHuShangJiaXinXi.shopsId = self.shopInfo.shopsId;
|
||||
kanHuShangJiaXinXi.picture4 = self.shopInfo.picture4;
|
||||
|
||||
//存储
|
||||
[[DataCenter defaultDtacenter]setValue:kanHuShangJiaXinXi forKey:@"ShopsInfo2"];
|
||||
|
||||
MineKanHuViewController *wodeKanHu=[[MineKanHuViewController alloc] init];
|
||||
|
||||
wodeKanHu.xinXiModel = kanHuShangJiaXinXi;
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
[self.navigationController pushViewController:wodeKanHu animated:YES];
|
||||
|
||||
}else{
|
||||
|
||||
[self.view makeToast:@"请求失败"];
|
||||
}
|
||||
|
||||
} failure:^(NSError *err) {
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - 商品列表
|
||||
|
||||
-(void)loadDatas
|
||||
{
|
||||
__weak typeof (self)weskSelf=self;
|
||||
NSString *shopId = weskSelf.shopInfo.shopsId;
|
||||
[AFHttpTool getCommodityInfoByPage:shopId pageSize:20 firstResult:0 commodityState:@"0" success:^(id response) {
|
||||
NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
|
||||
|
||||
if ([reDic[@"result"] isEqualToString:@"100"]){
|
||||
|
||||
NSArray*goodsArr=reDic[@"data"];
|
||||
for (NSDictionary *goodsDic in goodsArr) {
|
||||
ShopGoodsListData *goodsData=[[ShopGoodsListData alloc] initWithDict:goodsDic];
|
||||
|
||||
[weskSelf.goodsArr addObject:goodsData];
|
||||
}
|
||||
|
||||
NSIndexSet *asset = [NSIndexSet indexSetWithIndex:4];
|
||||
[weskSelf.tableView reloadSections:asset withRowAnimation:UITableViewRowAnimationNone];
|
||||
}
|
||||
|
||||
} failure:^(NSError *err) {
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -商品详情视频
|
||||
|
||||
-(void)tapTtemListAt:(NSString *)goodslink commdyId:(NSString *)commdyId
|
||||
{
|
||||
|
||||
if ([goodslink isKindOfClass:[NSNull class]]||!goodslink) {
|
||||
[self.view makeToast:@"空链接"];
|
||||
return;
|
||||
}
|
||||
|
||||
IFishVideoPalyViewController *palyvc= [[IFishVideoPalyViewController alloc] init];
|
||||
|
||||
palyvc.videoPath = goodslink;
|
||||
|
||||
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:palyvc];
|
||||
|
||||
[self presentViewController:nav animated:YES completion:nil];
|
||||
[self addClickNumber:commdyId];
|
||||
}
|
||||
|
||||
#pragma mark -商品点击数加1
|
||||
|
||||
-(void)addClickNumber:(NSString *)commdyId{
|
||||
|
||||
[AFHttpTool updateCommodityClickCount:commdyId success:^(id response) {
|
||||
NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
|
||||
if ([reDic[@"result"] isEqualToString:@"100"]){
|
||||
|
||||
}
|
||||
|
||||
} failure:^(NSError *err) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// IfishShopInfo.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/17.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface IfishShopInfo : NSObject
|
||||
@property ( nonatomic,strong) NSString *shopsId;
|
||||
@property ( nonatomic,strong) NSString *userId;
|
||||
@property ( nonatomic,strong) NSString *userImg;
|
||||
@property ( nonatomic,strong) NSString *userName;
|
||||
@property ( nonatomic,strong) NSString *shopsName;
|
||||
@property ( nonatomic,strong) NSString *shopsPhone;
|
||||
@property ( nonatomic,strong) NSString *shopsCity;
|
||||
@property ( nonatomic,strong) NSString *shopsArea;
|
||||
@property ( nonatomic,strong) NSString *shopsProvince;
|
||||
@property ( nonatomic,strong) NSString *shopsAddress;
|
||||
@property ( nonatomic,strong) NSString *picture4;
|
||||
@property ( nonatomic,strong) NSString *remark;
|
||||
@property ( nonatomic,strong) NSString *distance;
|
||||
@property ( nonatomic,strong) NSString *weixinCode;
|
||||
@property ( nonatomic,strong) NSString *shopLink;
|
||||
|
||||
@end
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// IfishShopInfo.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/17.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IfishShopInfo.h"
|
||||
|
||||
@implementation IfishShopInfo
|
||||
|
||||
@end
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// KanHuFirstSectionViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/17.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface KanHuFirstSectionViewCell : UITableViewCell
|
||||
|
||||
@end
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// KanHuFirstSectionViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/17.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "KanHuFirstSectionViewCell.h"
|
||||
|
||||
@implementation KanHuFirstSectionViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="KanHuFirstSectionViewCell" rowHeight="70" id="KGk-i7-Jjw" customClass="KanHuFirstSectionViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="70"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="69.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="lPr-bp-xM8">
|
||||
<rect key="frame" x="8" y="17" width="4" height="13"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.98431372549019602" green="0.36470588235294116" blue="0.29019607843137257" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="前往认证" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IFi-hg-gTH">
|
||||
<rect key="frame" x="17" y="13" width="107" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="认证后您的店铺会出现在当前列表里" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ua5-Fo-sG6">
|
||||
<rect key="frame" x="8" y="38" width="232" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="kankan_rowindicator.png" translatesAutoresizingMaskIntoConstraints="NO" id="Alg-cW-Ywc">
|
||||
<rect key="frame" x="289" y="20" width="12" height="24"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<point key="canvasLocation" x="-54" y="74"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="kankan_rowindicator.png" width="18" height="36"/>
|
||||
</resources>
|
||||
</document>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// KanHuFuWuViewController.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/13.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BaseVIewContorller.h"
|
||||
|
||||
@interface KanHuFuWuViewController : BaseVIewContorller
|
||||
|
||||
@end
|
||||
+482
@@ -0,0 +1,482 @@
|
||||
//
|
||||
// KanHuFuWuViewController.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/13.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "KanHuFuWuViewController.h"
|
||||
#import "IFishShopsViewCell.h"
|
||||
#import "IfishShopInfo.h"
|
||||
#import "KanHuFirstSectionViewCell.h"
|
||||
#import "IfishShopDetailViewController.h"
|
||||
#import "CertificationShopModel.h"
|
||||
#import "ShopCertificationIntroduceController.h"
|
||||
#import "ShopCertifyFailViewController.h"
|
||||
#import "JHRefresh.h"
|
||||
#import "WoShiShangJiaViewController.h"
|
||||
#import "IfishZiXunAdViewCell.h"
|
||||
#import "PushMasssageWebViewController.h"
|
||||
#import "IfishAlibcWebViewController.h"
|
||||
#import <AlibcTradeSDK/AlibcTradeSDK.h>
|
||||
@interface KanHuFuWuViewController ()<UITableViewDelegate,UITableViewDataSource>
|
||||
{
|
||||
BOOL _isRefreshing;
|
||||
BOOL _isLoadMore;
|
||||
BOOL _isPushed;
|
||||
}
|
||||
@property(nonatomic)BOOL isRefreshing;
|
||||
@property(nonatomic)BOOL isLoadMore;
|
||||
@property(nonatomic,copy) NSString* total;
|
||||
@property(nonatomic) int page;
|
||||
@property(nonatomic,strong)NSDictionary*para;
|
||||
@property(nonatomic,strong)UITableView *tableView;
|
||||
@property(nonatomic,strong) NSMutableArray *dataArr;
|
||||
@property (nonatomic,strong) NSMutableArray *bannerDataArr;
|
||||
|
||||
@end
|
||||
|
||||
@implementation KanHuFuWuViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
[self addTitleViewWithTitle:@"优选商家"];
|
||||
self.dataArr = [[NSMutableArray alloc] init];
|
||||
_bannerDataArr = [[NSMutableArray alloc] init];
|
||||
_isPushed = NO;
|
||||
[self loadData];
|
||||
[self creatTab];
|
||||
[self creatReatRefreshView];
|
||||
[self initBannerData];
|
||||
|
||||
}
|
||||
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
if (_isPushed ) {
|
||||
NSIndexSet *asset = [NSIndexSet indexSetWithIndex:0];
|
||||
[self.tableView reloadSections:asset withRowAnimation:UITableViewRowAnimationNone];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)loadData{
|
||||
_page = 0;
|
||||
NSInteger first = 0;
|
||||
NSInteger pageSize= 10;
|
||||
[self addTaskWithfirsStr:first pageSize:pageSize isRefresh:YES];
|
||||
|
||||
}
|
||||
|
||||
-(void)creatReatRefreshView{
|
||||
__weak typeof (self)weskSelf=self;
|
||||
// 下拉刷新
|
||||
|
||||
[weskSelf.tableView addRefreshHeaderViewWithAniViewClass:[JHRefreshAmazingAniView class] beginRefresh:^{
|
||||
if (weskSelf.isRefreshing) {
|
||||
return ;
|
||||
}
|
||||
weskSelf.isRefreshing=YES;
|
||||
[weskSelf loadData];
|
||||
|
||||
}];
|
||||
|
||||
|
||||
//上拉加载更多
|
||||
|
||||
[weskSelf.tableView addRefreshFooterViewWithAniViewClass:[JHRefreshCommonAniView class] beginRefresh:^{
|
||||
if (weskSelf.isLoadMore) {
|
||||
return ;
|
||||
}
|
||||
weskSelf.isLoadMore=YES;
|
||||
|
||||
NSInteger pagecount =[_total integerValue]/10+1;
|
||||
if (_page<pagecount-1) {
|
||||
_page++;
|
||||
|
||||
NSInteger first=(NSInteger)_page*10;
|
||||
NSInteger pageSize= 10;
|
||||
[weskSelf addTaskWithfirsStr:first pageSize:pageSize isRefresh:NO];
|
||||
|
||||
}else{
|
||||
[weskSelf endRefreshing];
|
||||
[weskSelf.view makeToast:@"已无更多数据"];
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)endRefreshing{
|
||||
if (self.isRefreshing) {
|
||||
self.isRefreshing=NO;
|
||||
[self.tableView headerEndRefreshingWithResult:JHRefreshResultNone];
|
||||
}
|
||||
|
||||
if (self.isLoadMore) {
|
||||
self.isLoadMore=NO;
|
||||
[self.tableView footerEndRefreshing];
|
||||
}
|
||||
}
|
||||
-(void)addTaskWithfirsStr:(NSInteger)firsStr pageSize:(NSInteger)pageSize isRefresh:(BOOL)isRefresh{
|
||||
|
||||
__weak typeof (self)weskSelf=self;
|
||||
|
||||
NSString *userId= [dataContorl dataControlGetUserIdInfo];
|
||||
[AFHttpTool getShopsinfo:userId firstResult:firsStr pageSize:pageSize success:^(id response) {
|
||||
|
||||
NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
|
||||
if (isRefresh) {
|
||||
[weskSelf.dataArr removeAllObjects];
|
||||
}
|
||||
|
||||
if ([reDic[@"result"] isEqualToString:@"100"]) {
|
||||
|
||||
NSLog(@"reDidata%@",reDic[@"data"]);
|
||||
NSArray *arr = reDic[@"data"];
|
||||
_total = reDic[@"total"];
|
||||
for (NSDictionary *dict in arr) {
|
||||
IfishShopInfo *ShopInfo = [[IfishShopInfo alloc] init];
|
||||
ShopInfo.shopsId = dict[@"shopsId"];
|
||||
ShopInfo.userId = dict[@"userId"];
|
||||
ShopInfo.userImg = dict[@"userImg"];
|
||||
ShopInfo.userName = dict[@"userName"];
|
||||
ShopInfo.shopsName = dict[@"shopsName"];
|
||||
ShopInfo.shopsPhone = dict[@"shopsPhone"];
|
||||
ShopInfo.shopsCity = dict[@"shopsCity"];
|
||||
ShopInfo.shopsArea = dict[@"shopsArea"];
|
||||
ShopInfo.shopsProvince = dict[@"shopsProvince"];
|
||||
ShopInfo.shopsAddress = dict[@"shopsAddress"];
|
||||
ShopInfo.picture4 = dict[@"picture4"];
|
||||
ShopInfo.remark = dict[@"remark"];
|
||||
ShopInfo.distance = dict[@"distance"];
|
||||
ShopInfo.weixinCode =dict[@"weixinCode"];
|
||||
ShopInfo.shopLink = dict[@"shopLink"];
|
||||
[weskSelf.dataArr addObject:ShopInfo];
|
||||
|
||||
}
|
||||
|
||||
[weskSelf.tableView reloadData];
|
||||
|
||||
}else if ([reDic[@"result"] isEqualToString:@"101"]){
|
||||
|
||||
[weskSelf.view makeToast:@"请求失败101"];
|
||||
}
|
||||
|
||||
[weskSelf endRefreshing];
|
||||
|
||||
} failure:^(NSError *err) {
|
||||
[weskSelf endRefreshing];
|
||||
[weskSelf.view makeToast:@"没有加载成功"];
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
-(void)creatTab{
|
||||
|
||||
self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.scrollEnabled = YES;
|
||||
self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
|
||||
self.tableView.showsVerticalScrollIndicator = NO;
|
||||
self.tableView.backgroundColor = TABLE_BACKGROUD_COLOR;
|
||||
[self.view addSubview:self.tableView];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Table view data source
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
|
||||
if (section ==0 ||section ==1) {
|
||||
|
||||
return 1;
|
||||
|
||||
}else
|
||||
{
|
||||
return [self.dataArr count];
|
||||
}
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
if (indexPath.section ==0) {
|
||||
IfishZiXunAdViewCell*cell =[tableView dequeueReusableCellWithIdentifier:@"IfishZiXunAdViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"IfishZiXunAdViewCell" owner:self options:nil]lastObject];
|
||||
|
||||
}
|
||||
if (_bannerDataArr.count !=0) {
|
||||
NSArray *ads =self.bannerDataArr;
|
||||
NSMutableArray *imgs = [[NSMutableArray alloc] init];
|
||||
[ads enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if ([obj isKindOfClass:[IfishBannerData class]]) {
|
||||
IfishBannerData *banner = (IfishBannerData *)obj;
|
||||
[imgs addObject:banner.adImage];
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
cell.newsAdview.adList = imgs;
|
||||
__weak typeof (self)weakSelf = self;
|
||||
cell.newsAdview.tapActionBlock =^(LXAdScrollView *adScrollView) {
|
||||
IfishBannerData *bdata = _bannerDataArr[adScrollView.currentPage];
|
||||
[weakSelf tapAdWithLink:bdata.adLink];
|
||||
};
|
||||
|
||||
}else{
|
||||
//默认加载本地
|
||||
cell.newsAdview.adList = @[@"Ifishbanner_shops.jpg"];
|
||||
cell.newsAdview.tapActionBlock =^(LXAdScrollView *adScrollView) {
|
||||
|
||||
};
|
||||
}
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
return cell;
|
||||
|
||||
}else if (indexPath.section ==1){
|
||||
KanHuFirstSectionViewCell *cell =[tableView dequeueReusableCellWithIdentifier:@"KanHuFirstSectionViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"KanHuFirstSectionViewCell" owner:self options:nil]lastObject];
|
||||
|
||||
}
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
return cell;
|
||||
}else{
|
||||
|
||||
IFishShopsViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"IFishShopsViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"IFishShopsViewCell" owner:self options:nil]lastObject];
|
||||
}
|
||||
IfishShopInfo *shopinfo = self.dataArr[indexPath.row];
|
||||
|
||||
[cell loadDataWtih:shopinfo];
|
||||
[cell subviewsCorner];
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
|
||||
return cell;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (indexPath.section ==0) {
|
||||
return self.view.frame.size.width * 0.427;
|
||||
}
|
||||
return 70.0f;
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
return 0.01f;
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
return 0.01f;
|
||||
}
|
||||
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
if (indexPath.section ==0) {
|
||||
return;
|
||||
}
|
||||
if (indexPath.section ==1) {
|
||||
//商户验证
|
||||
UserModel *user = [dataContorl getUserInfo];
|
||||
if ([user.userType isEqualToString:@"0"]) {
|
||||
|
||||
WoShiShangJiaViewController *shangjiaVC = [[WoShiShangJiaViewController alloc] init];
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
_isPushed = YES;
|
||||
[self.navigationController pushViewController:shangjiaVC animated:YES];
|
||||
|
||||
}else{
|
||||
|
||||
[self.view makeToast:@"您已完成认证"];
|
||||
}
|
||||
|
||||
}else if(indexPath.section ==2){
|
||||
IfishShopInfo *shopinfo = self.dataArr [indexPath.row];
|
||||
IfishShopDetailViewController *shopdetail = [[IfishShopDetailViewController alloc] init];
|
||||
shopdetail.shopInfo = shopinfo;
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
_isPushed = YES;
|
||||
[self.navigationController pushViewController:shopdetail animated:YES];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
#pragma mark - 审核状态查询
|
||||
|
||||
-(void)testShopStatus:(CertificationShopModel *)CSModel{
|
||||
|
||||
|
||||
|
||||
// [IFISHHTTPTOOL shopCertifyStausWith:CSModel.shopsId huishuiShiJian:^(ShopCertifyStausModel *shopCertifyd) {
|
||||
|
||||
// ShopCertifyStausModel *statusmodel = [[ShopCertifyStausModel alloc] init];
|
||||
// statusmodel=shopCertifyd;
|
||||
// [self pushStatusViewWith:statusmodel];
|
||||
|
||||
// }];
|
||||
__weak typeof (self)weskSelf=self;
|
||||
[IFISHHTTPTOOL newshopCertifyStausWith:CSModel.shopsId huishuiShiJian:^(ShopCertifyStausModel *shopCertifyd) {
|
||||
|
||||
ShopCertifyStausModel *statusmodel = [[ShopCertifyStausModel alloc] init];
|
||||
statusmodel=shopCertifyd;
|
||||
[weskSelf 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;
|
||||
_isPushed = YES;
|
||||
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];
|
||||
_isPushed = YES;
|
||||
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];
|
||||
_isPushed = YES;
|
||||
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)initBannerData{
|
||||
__weak typeof (self)weakSelf = self;
|
||||
[AFHttpTool getIfishBannerData:IfishAdTypeYouXuanShop success:^(id response) {
|
||||
NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
|
||||
NSString *result=reDic[@"result"];
|
||||
if ([result isEqualToString:@"100"]) {
|
||||
NSArray *data= reDic[@"data"];
|
||||
if (data&&data.count!=0) {
|
||||
for (NSDictionary *dic in data) {
|
||||
IfishBannerData *bannerdata = [[IfishBannerData alloc] initWithDict:dic];
|
||||
[_bannerDataArr addObject:bannerdata];
|
||||
}
|
||||
NSIndexSet *asset = [NSIndexSet indexSetWithIndex:0];
|
||||
[weakSelf.tableView reloadSections:asset withRowAnimation:UITableViewRowAnimationNone];
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
//[weakSelf.view makeToast:@"广告位获取失败"];
|
||||
}
|
||||
|
||||
} failure:^(NSError *err) {
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
-(void)tapAdWithLink:(NSString *)pushlink
|
||||
{
|
||||
|
||||
if (![pushlink isKindOfClass:[NSNull class]] && pushlink && ![pushlink isEqualToString:@""]) {
|
||||
_isPushed = YES;
|
||||
//字条串是否包含有某字符串
|
||||
if ([pushlink rangeOfString:@"taobao"].location == NSNotFound) {
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
PushMasssageWebViewController*webVC=[[PushMasssageWebViewController alloc]init];
|
||||
webVC.pushlink =pushlink;
|
||||
webVC.pushtitle = @"详情";
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
|
||||
} else {
|
||||
|
||||
[self openAliBCWithLink:pushlink];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)openAliBCWithLink:(NSString *)linkUrl{
|
||||
|
||||
//535991514644
|
||||
//根据商品ID
|
||||
//id<AlibcTradePage> page = [AlibcTradePageFactory itemDetailPage: @"535991514644"];
|
||||
//根据链接打开页面
|
||||
id<AlibcTradePage> page = [AlibcTradePageFactory page:linkUrl];
|
||||
AlibcTradeShowParams* showParam = [[AlibcTradeShowParams alloc] init];
|
||||
//app 内闭环交易 强制H5 打开
|
||||
showParam.openType = AlibcOpenTypeH5;
|
||||
|
||||
//AlibcWebViewController* myView = [[AlibcWebViewController alloc] init];
|
||||
//自定义web
|
||||
IfishAlibcWebViewController* myView = [[IfishAlibcWebViewController alloc] init];
|
||||
NSInteger ret = [[AlibcTradeSDK sharedInstance].tradeService show:self.navigationController webView:myView.webView page:page showParams:showParam taoKeParams:nil trackParam:nil tradeProcessSuccessCallback:^(AlibcTradeResult * _Nullable result) {
|
||||
|
||||
} tradeProcessFailedCallback:^(NSError * _Nullable error) {
|
||||
|
||||
}]; //返回1,说明h5打开,否则不应该展示页面
|
||||
|
||||
|
||||
if (ret == 1) {
|
||||
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
[self.navigationController pushViewController:myView animated:YES];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// ShopDetailCodeFirstCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/19.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "IfishShopInfo.h"
|
||||
@interface ShopDetailCodeFirstCell : UITableViewCell
|
||||
@property(nonatomic,strong) UIImageView *shopImg;
|
||||
|
||||
@property(nonatomic,strong) UILabel *nYear;
|
||||
@property(nonatomic,strong) UILabel *vRenZheng;
|
||||
@property(nonatomic,strong)UILabel *province;
|
||||
@property(nonatomic,strong)UILabel *shopUser;
|
||||
@property(nonatomic,strong)UILabel *ShopName;
|
||||
|
||||
-(void)loadDataWith:(IfishShopInfo *)info;
|
||||
|
||||
@end
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
//
|
||||
// ShopDetailCodeFirstCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/19.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ShopDetailCodeFirstCell.h"
|
||||
#import "UIImageView+WebCache.h"
|
||||
|
||||
@implementation ShopDetailCodeFirstCell
|
||||
|
||||
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
|
||||
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
|
||||
if (self) {
|
||||
|
||||
[self setUI];
|
||||
[self setItemsCorner];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
}
|
||||
|
||||
-(void)setUI{
|
||||
|
||||
CGFloat CellH = kScreenSize.width*0.38;
|
||||
CGFloat ImgTopMargin = CellH * 0.14;
|
||||
CGFloat ImgW = CellH *0.40;
|
||||
|
||||
self.shopImg = [[UIImageView alloc] initWithFrame:CGRectMake(kScreenSize.width/2-ImgW/2, ImgTopMargin,ImgW, ImgW)];
|
||||
[self addSubview:self.shopImg];
|
||||
|
||||
CGFloat labelH= 13;
|
||||
CGFloat labelW= 48;
|
||||
self.nYear = [[UILabel alloc] initWithFrame:CGRectMake(self.shopImg.frame.origin.x - labelW -1, self.shopImg.center.y -labelH/2,labelW, labelH)];
|
||||
self.nYear.font = [UIFont systemFontOfSize:10];
|
||||
self.nYear.textColor = [UIColor whiteColor];
|
||||
self.nYear.backgroundColor = RGB(0, 180, 239);
|
||||
self.nYear.textAlignment = NSTextAlignmentCenter;
|
||||
|
||||
[self addSubview:self.nYear];
|
||||
|
||||
|
||||
CGFloat nYearOrignx = CGRectGetMaxX(self.shopImg.frame);
|
||||
CGFloat nYearOrignY =CellH *0.18;
|
||||
|
||||
self.province = [[UILabel alloc] initWithFrame:CGRectMake(nYearOrignx - 2, nYearOrignY,52,labelH)];
|
||||
self.province.textAlignment = NSTextAlignmentCenter;
|
||||
self.province.font = [UIFont systemFontOfSize:10];
|
||||
self.province.textColor = [UIColor whiteColor];
|
||||
self.province.backgroundColor = RGB(255,115,92);
|
||||
|
||||
[self addSubview:self.province];
|
||||
// 255 169 86
|
||||
CGFloat vRenZhengOrignY =CellH *0.45;
|
||||
self.vRenZheng = [[UILabel alloc] initWithFrame:CGRectMake(nYearOrignx - 6, vRenZhengOrignY,48,labelH)];
|
||||
self.vRenZheng.textAlignment = NSTextAlignmentCenter;
|
||||
self.vRenZheng.font = [UIFont systemFontOfSize:10];
|
||||
self.vRenZheng.textColor = [UIColor whiteColor];
|
||||
self.vRenZheng.backgroundColor = RGB(255,169,86);
|
||||
[self addSubview:self.vRenZheng];
|
||||
|
||||
|
||||
self.shopUser = [[UILabel alloc] initWithFrame:CGRectMake(0,CGRectGetMaxY(self.shopImg.frame) + CellH*0.13,kScreenSize.width,16)];
|
||||
|
||||
self.shopUser.textColor = [UIColor blackColor];
|
||||
self.shopUser.font = [UIFont boldSystemFontOfSize:15];
|
||||
self.shopUser.textAlignment = NSTextAlignmentCenter;
|
||||
[self addSubview:self.shopUser];
|
||||
|
||||
self.ShopName = [[UILabel alloc] initWithFrame:CGRectMake(0,CGRectGetMaxY(self.shopUser.frame) + CellH*0.04,kScreenSize.width,16)];
|
||||
self.ShopName.font = [UIFont systemFontOfSize:13];
|
||||
self.ShopName.textColor = RGB(102, 102, 102);
|
||||
self.ShopName.textAlignment = NSTextAlignmentCenter;
|
||||
|
||||
[self addSubview:self.ShopName];
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)setItemsCorner
|
||||
{
|
||||
|
||||
CGFloat W = self.shopImg.frame.size.height;
|
||||
self.shopImg.layer.masksToBounds = YES;
|
||||
self.shopImg.layer.cornerRadius = W/2;
|
||||
self.shopImg.layer.borderWidth = 2;
|
||||
self.shopImg.layer.borderColor = RGB(162,210, 255).CGColor;
|
||||
self.province.layer.masksToBounds = YES;
|
||||
self.province.layer.cornerRadius = self.province.frame.size.height/2;
|
||||
self.vRenZheng.layer.masksToBounds = YES;
|
||||
self.vRenZheng.layer.cornerRadius = self.vRenZheng.frame.size.height/2;
|
||||
self.nYear.layer.masksToBounds = YES;
|
||||
self.nYear.layer.cornerRadius = self.nYear.frame.size.height/2;
|
||||
|
||||
}
|
||||
|
||||
-(void)loadDataWith:(IfishShopInfo *)info
|
||||
{
|
||||
NSString*str=[NSString stringWithFormat:@"%@%@",kGetIconUrl,info.userImg];
|
||||
[self.shopImg sd_setImageWithURL:[NSURL URLWithString:str]];
|
||||
|
||||
self.nYear.text = info.remark;
|
||||
if (info.remark.length >0) {
|
||||
|
||||
self.nYear.hidden = NO;
|
||||
}else{
|
||||
self.nYear.hidden = YES;
|
||||
}
|
||||
|
||||
NSString *str2= @"已认证";
|
||||
NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithString:str2];
|
||||
NSTextAttachment *attch = [[NSTextAttachment alloc] init];
|
||||
attch.image = [UIImage imageNamed:@"businesslistings_v"];
|
||||
attch.bounds = CGRectMake(0,0,9,8);
|
||||
|
||||
NSAttributedString *attristr=[NSAttributedString attributedStringWithAttachment:attch];
|
||||
[attri insertAttributedString:attristr atIndex:0];
|
||||
self.vRenZheng.attributedText = attri;
|
||||
self.province.text = [NSString stringWithFormat:@"%@%@",info.shopsProvince,info.shopsCity];
|
||||
if (self.province.text.length>=8) {
|
||||
|
||||
NSString *sub = [self.province.text substringWithRange:NSMakeRange(0,7)];
|
||||
self.province.text = [NSString stringWithFormat:@"%@...",sub];
|
||||
}
|
||||
self.shopUser.text = info.userName;
|
||||
self.ShopName.text = info.shopsName;
|
||||
[self resetProvinceFrame];
|
||||
|
||||
}
|
||||
|
||||
-(void)resetProvinceFrame{
|
||||
|
||||
CGFloat labelH= 13;
|
||||
CGFloat CellH = kScreenSize.width*0.38;
|
||||
CGFloat nYearOrignx = CGRectGetMaxX(self.shopImg.frame);
|
||||
CGFloat nYearOrignY =CellH *0.18;
|
||||
if (self.province.text.length>4 && self.province.text.length<6) {
|
||||
|
||||
self.province.frame = CGRectMake(nYearOrignx - 2, nYearOrignY,60,labelH);
|
||||
|
||||
}else if (self.province.text.length>=6 && self.province.text.length<7){
|
||||
|
||||
self.province.frame = CGRectMake(nYearOrignx - 2, nYearOrignY,70,labelH);
|
||||
|
||||
}else if (self.province.text.length>=7 && self.province.text.length<8){
|
||||
|
||||
self.province.frame = CGRectMake(nYearOrignx - 2, nYearOrignY,80,labelH);
|
||||
|
||||
}else if (self.province.text.length>=8){
|
||||
|
||||
self.province.frame = CGRectMake(nYearOrignx - 2, nYearOrignY,90,labelH);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// ShopDetailThredViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/17.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "IfishShopInfo.h"
|
||||
@interface ShopDetailThredViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *shopDetailImg;
|
||||
-(void)loadDataWith:(IfishShopInfo *)info;
|
||||
@end
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// ShopDetailThredViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/17.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ShopDetailThredViewCell.h"
|
||||
#import "UIImageView+WebCache.h"
|
||||
@implementation ShopDetailThredViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
-(void)loadDataWith:(IfishShopInfo *)info
|
||||
{
|
||||
//获取系统当前的时间戳
|
||||
NSDate* dat = [NSDate dateWithTimeIntervalSinceNow:0];
|
||||
NSTimeInterval time=[dat timeIntervalSince1970]*1000;
|
||||
NSString *timeString = [NSString stringWithFormat:@"%.0f",time];
|
||||
|
||||
NSString * imgUrl = [NSString stringWithFormat:@"%@/shops/%@/%@?time=%@",JIEKOUPORTHTTP,info.userId,info.picture4,timeString];
|
||||
|
||||
|
||||
// [self.shopDetailImg sd_setImageWithURL:[NSURL URLWithString:imgUrl]];
|
||||
[self.shopDetailImg sd_setImageWithURL:[NSURL URLWithString:imgUrl] placeholderImage:[UIImage imageNamed:@"shopdetail_palceholder"]];
|
||||
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ShopDetailThredViewCell" rowHeight="194" id="KGk-i7-Jjw" customClass="ShopDetailThredViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="194"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="193"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xoK-wo-lsm">
|
||||
<rect key="frame" x="15" y="8" width="290" height="164"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="shopDetailImg" destination="xoK-wo-lsm" id="5cd-8K-VzF"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="25" y="35"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// ShopDetailViewfirstCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/17.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "IfishShopInfo.h"
|
||||
@interface ShopDetailViewfirstCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *shopImg;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *province;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *vRenZheng;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nYear;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *shopUser;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *ShopName;
|
||||
|
||||
-(void)loadDataWith:(IfishShopInfo *)info;
|
||||
|
||||
@end
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ShopDetailViewfirstCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/1/17.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ShopDetailViewfirstCell.h"
|
||||
#import "UIImageView+WebCache.h"
|
||||
@implementation ShopDetailViewfirstCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
[self setItemsCorner];
|
||||
}
|
||||
//frame reset
|
||||
-(void)setItemsCorner
|
||||
{
|
||||
|
||||
CGFloat W = self.shopImg.frame.size.height;
|
||||
self.shopImg.layer.masksToBounds = YES;
|
||||
self.shopImg.layer.cornerRadius = W/2;
|
||||
self.shopImg.layer.borderWidth = 3;
|
||||
self.shopImg.layer.borderColor = RGB(162,210, 255).CGColor;
|
||||
self.province.layer.masksToBounds = YES;
|
||||
self.province.layer.cornerRadius = self.province.frame.size.height/2;
|
||||
self.vRenZheng.layer.masksToBounds = YES;
|
||||
self.vRenZheng.layer.cornerRadius = self.vRenZheng.frame.size.height/2;
|
||||
self.nYear.layer.masksToBounds = YES;
|
||||
self.nYear.layer.cornerRadius = self.nYear.frame.size.height/2;
|
||||
|
||||
}
|
||||
|
||||
-(void)loadDataWith:(IfishShopInfo *)info
|
||||
{
|
||||
NSString*str=[NSString stringWithFormat:@"%@%@",kGetIconUrl,info.userImg];
|
||||
[self.shopImg sd_setImageWithURL:[NSURL URLWithString:str]];
|
||||
self.nYear.text = info.remark;
|
||||
|
||||
NSString *str2= @"已认证";
|
||||
NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithString:str2];
|
||||
NSTextAttachment *attch = [[NSTextAttachment alloc] init];
|
||||
attch.image = [UIImage imageNamed:@"businesslistings_v"];
|
||||
attch.bounds = CGRectMake(0,0,9,8);
|
||||
|
||||
NSAttributedString *attristr=[NSAttributedString attributedStringWithAttachment:attch];
|
||||
[attri insertAttributedString:attristr atIndex:0];
|
||||
self.vRenZheng.attributedText = attri;
|
||||
self.province.text = info.shopsProvince;
|
||||
self.shopUser.text = info.userName;
|
||||
self.ShopName.text = info.shopsName;
|
||||
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ShopDetailViewfirstCell" rowHeight="126" id="KGk-i7-Jjw" customClass="ShopDetailViewfirstCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="126"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="125.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="atv-ic-rw4">
|
||||
<rect key="frame" x="135" y="19" width="51" height="51"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="省市" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ed1-tn-HTg">
|
||||
<rect key="frame" x="187" y="31" width="20.5" height="13"/>
|
||||
<color key="backgroundColor" red="1" green="0.45098039215686275" blue="0.36078431372549019" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="13" id="8la-rN-3re"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kma-2t-UWw">
|
||||
<rect key="frame" x="144" y="101" width="33" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="aWs-TI-H7J"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="n年老店" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mKa-fm-edZ">
|
||||
<rect key="frame" x="99" y="38" width="37" height="13"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.70588235294117641" blue="0.93725490196078431" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="13" id="ZWt-aJ-We6"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="748" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nnp-y2-hGf">
|
||||
<rect key="frame" x="140" y="86" width="40" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="18" id="Imh-aO-Mlt"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="v已认证" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CGT-gu-PMN">
|
||||
<rect key="frame" x="187" y="57" width="48" height="13"/>
|
||||
<color key="backgroundColor" red="1" green="0.66274509803921566" blue="0.33725490196078434" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="13" id="PAG-dP-Cha"/>
|
||||
<constraint firstAttribute="width" constant="48" id="jrM-of-iRX"/>
|
||||
</constraints>
|
||||
<edgeInsets key="layoutMargins" top="8" left="8" bottom="8" right="8"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="atv-ic-rw4" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="0GV-mJ-7Hc"/>
|
||||
<constraint firstItem="Nnp-y2-hGf" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="1OE-uD-cFz"/>
|
||||
<constraint firstItem="atv-ic-rw4" firstAttribute="leading" secondItem="mKa-fm-edZ" secondAttribute="trailing" constant="-1" id="IFE-6Y-ttA"/>
|
||||
<constraint firstItem="mKa-fm-edZ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" constant="91" id="IgH-Fu-SUj"/>
|
||||
<constraint firstItem="CGT-gu-PMN" firstAttribute="bottom" secondItem="atv-ic-rw4" secondAttribute="bottom" id="JMY-xZ-oiU"/>
|
||||
<constraint firstItem="Kma-2t-UWw" firstAttribute="bottom" secondItem="H2p-sc-9uM" secondAttribute="bottomMargin" id="QLT-TD-erm"/>
|
||||
<constraint firstItem="Kma-2t-UWw" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="TmU-X8-tId"/>
|
||||
<constraint firstItem="atv-ic-rw4" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="11" id="Uz7-63-rHz"/>
|
||||
<constraint firstItem="Ed1-tn-HTg" firstAttribute="top" secondItem="atv-ic-rw4" secondAttribute="top" constant="12" id="Yvy-uv-Mi8"/>
|
||||
<constraint firstItem="atv-ic-rw4" firstAttribute="centerY" secondItem="mKa-fm-edZ" secondAttribute="centerY" id="c6D-a3-N3M"/>
|
||||
<constraint firstItem="CGT-gu-PMN" firstAttribute="leading" secondItem="atv-ic-rw4" secondAttribute="trailing" constant="1" id="lIF-32-L91"/>
|
||||
<constraint firstItem="Ed1-tn-HTg" firstAttribute="leading" secondItem="atv-ic-rw4" secondAttribute="trailing" constant="1" id="o9X-jN-dVS"/>
|
||||
<constraint firstItem="Kma-2t-UWw" firstAttribute="top" secondItem="Nnp-y2-hGf" secondAttribute="bottom" constant="-3" id="roX-Nh-JwE"/>
|
||||
<constraint firstItem="Nnp-y2-hGf" firstAttribute="top" secondItem="atv-ic-rw4" secondAttribute="bottom" constant="16" id="yiu-bA-KdR"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="ShopName" destination="Kma-2t-UWw" id="xIO-xW-3cu"/>
|
||||
<outlet property="nYear" destination="mKa-fm-edZ" id="3cX-rP-nau"/>
|
||||
<outlet property="province" destination="Ed1-tn-HTg" id="op9-uf-6eY"/>
|
||||
<outlet property="shopImg" destination="atv-ic-rw4" id="Aqu-Wa-Fwu"/>
|
||||
<outlet property="shopUser" destination="Nnp-y2-hGf" id="ZEm-Lj-blD"/>
|
||||
<outlet property="vRenZheng" destination="CGT-gu-PMN" id="p0E-n6-b6g"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-495" y="6"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4_7.fullscreen"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// ShopInfosViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/14.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "IfishShopInfo.h"
|
||||
#import "CustomeLabel.h"
|
||||
@interface ShopInfosViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *InfoTile;
|
||||
@property (weak, nonatomic) IBOutlet CustomeLabel *InfoDetail;
|
||||
-(void)loadDataWith:(IfishShopInfo *)info atIndex:(NSIndexPath*)indexPath;
|
||||
|
||||
@end
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// ShopInfosViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/14.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ShopInfosViewCell.h"
|
||||
|
||||
@implementation ShopInfosViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
-(void)loadDataWith:(IfishShopInfo *)info atIndex:(NSIndexPath*)indexPath
|
||||
{
|
||||
|
||||
if (indexPath.row==0 &&indexPath.section==1) {
|
||||
|
||||
self.InfoTile.text = @"联系电话";
|
||||
self.InfoDetail.text = info.shopsPhone;
|
||||
|
||||
}else if (indexPath.row==1 &&indexPath.section==1){
|
||||
self.InfoTile.text = @"微信号";
|
||||
//[self addtouchWith:self.InfoDetail];
|
||||
if ([info.weixinCode isKindOfClass:[NSNull class]]||!info.weixinCode||[info.weixinCode isEqualToString:@""]) {
|
||||
info.weixinCode = @"商家暂未设置微信号";
|
||||
}
|
||||
self.InfoDetail.text = info.weixinCode;
|
||||
|
||||
}else if (indexPath.row==2 &&indexPath.section==1){
|
||||
self.InfoTile.text = @"详细地址";
|
||||
self.InfoDetail.text = [NSString stringWithFormat:@"%@%@%@%@",info.shopsProvince,info.shopsCity,info.shopsArea,info.shopsAddress];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ShopInfosViewCell" id="KGk-i7-Jjw" customClass="ShopInfosViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="36"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="36"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Ifish_Imgpoint.png" translatesAutoresizingMaskIntoConstraints="NO" id="dZa-He-Igz">
|
||||
<rect key="frame" x="15" y="9" width="6" height="6"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="6" id="3oo-gr-BfX"/>
|
||||
<constraint firstAttribute="width" constant="6" id="xjJ-Bb-Cbf"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="InfoTilte" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LDP-uN-a4M">
|
||||
<rect key="frame" x="32" y="6" width="131" height="13"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="131" id="nGU-8f-vve"/>
|
||||
<constraint firstAttribute="height" constant="13" id="vpb-oX-loJ"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="商家暂未设置微信号" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="X3u-Sr-ue5" customClass="CustomeLabel">
|
||||
<rect key="frame" x="32" y="21" width="280" height="9"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="dZa-He-Igz" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="1B6-RI-QKZ"/>
|
||||
<constraint firstItem="X3u-Sr-ue5" firstAttribute="leading" secondItem="LDP-uN-a4M" secondAttribute="leading" id="2RD-7a-Ly4"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="X3u-Sr-ue5" secondAttribute="trailing" id="QMh-rO-PO7"/>
|
||||
<constraint firstItem="dZa-He-Igz" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="1" id="cer-W3-mNc"/>
|
||||
<constraint firstItem="LDP-uN-a4M" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="-2" id="gXt-7J-sHx"/>
|
||||
<constraint firstItem="LDP-uN-a4M" firstAttribute="leading" secondItem="dZa-He-Igz" secondAttribute="trailing" constant="11" id="hYN-6N-4D8"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="X3u-Sr-ue5" secondAttribute="bottom" constant="-2.5" id="i2y-2v-GZU"/>
|
||||
<constraint firstItem="X3u-Sr-ue5" firstAttribute="top" secondItem="LDP-uN-a4M" secondAttribute="bottom" constant="2" id="ovd-Ra-Ls5"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="InfoDetail" destination="X3u-Sr-ue5" id="WIW-Q4-xjy"/>
|
||||
<outlet property="InfoTile" destination="LDP-uN-a4M" id="UOB-Xf-vTv"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="Ifish_Imgpoint.png" width="17" height="17"/>
|
||||
</resources>
|
||||
</document>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// ShopDetailViewGoodsViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/5/24.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
//商家详情页商品列表
|
||||
|
||||
@protocol IfishShopGoodsListDelegate <NSObject>
|
||||
-(void)tapTtemListAt:(NSString *)goodslink commdyId:(NSString *)commdyId;
|
||||
@end
|
||||
|
||||
@interface ShopDetailViewGoodsViewCell : UITableViewCell<UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout>
|
||||
@property(nonatomic,strong) UICollectionView *collectionView;
|
||||
@property (nonatomic, assign) id<IfishShopGoodsListDelegate>delegate;
|
||||
@property (nonatomic,strong)NSArray *goodsdataArr;
|
||||
|
||||
-(void)refreshCollellction;
|
||||
|
||||
@end
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
//
|
||||
// ShopDetailViewGoodsViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/5/24.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ShopDetailViewGoodsViewCell.h"
|
||||
#import "ShopGoodsCollectionCell.h"
|
||||
#import "ShopGoodsListData.h"
|
||||
static NSString * const ShopGoodsCellId = @"ShopGoodsCollectionCell";
|
||||
|
||||
@implementation ShopDetailViewGoodsViewCell
|
||||
|
||||
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||||
{
|
||||
self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
|
||||
if (self) {
|
||||
|
||||
|
||||
[self creatCollection];
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void)creatCollection{
|
||||
|
||||
UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
|
||||
flowLayout.minimumLineSpacing = 1;
|
||||
flowLayout.minimumInteritemSpacing = .1;
|
||||
|
||||
CGFloat width = (kScreenSize.width-1)/2;
|
||||
CGFloat itemH = width *1.03;
|
||||
flowLayout.itemSize = CGSizeMake(width,itemH);
|
||||
//展示两行
|
||||
CGFloat HCELL= (itemH*1+1)*2;
|
||||
|
||||
_collectionView=[[UICollectionView alloc]initWithFrame:CGRectMake(0,0,kScreenSize.width, HCELL) collectionViewLayout:flowLayout];
|
||||
|
||||
_collectionView.delegate=self;
|
||||
_collectionView.dataSource=self;
|
||||
_collectionView.bounces=NO;
|
||||
_collectionView.scrollEnabled=NO;
|
||||
_collectionView.showsVerticalScrollIndicator=NO;
|
||||
_collectionView.backgroundColor = RGB(242, 242, 242);
|
||||
[self addSubview:_collectionView];
|
||||
|
||||
[self.collectionView registerClass:[ShopGoodsCollectionCell class] forCellWithReuseIdentifier:ShopGoodsCellId];
|
||||
UINib *cellNib=[UINib nibWithNibName:@"ShopGoodsCollectionCell" bundle:nil];
|
||||
[self.collectionView registerNib:cellNib forCellWithReuseIdentifier:ShopGoodsCellId];
|
||||
|
||||
}
|
||||
|
||||
-(void)refreshCollellction{
|
||||
|
||||
CGFloat width = (kScreenSize.width-1)/2;
|
||||
CGFloat itemH = width *1.03;
|
||||
if (_goodsdataArr.count>4) {
|
||||
|
||||
int total = (int)[_goodsdataArr count];
|
||||
int rowCount =total%2==0?total/2:total/2+1;
|
||||
|
||||
CGFloat HCELL= (itemH*1+1)*rowCount;
|
||||
|
||||
_collectionView.frame = CGRectMake(0,0,kScreenSize.width, HCELL);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#pragma mark <UICollectionViewDataSource>
|
||||
|
||||
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
|
||||
return _goodsdataArr.count;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
ShopGoodsCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ShopGoodsCellId forIndexPath:indexPath];
|
||||
ShopGoodsListData *data = _goodsdataArr[indexPath.row];;
|
||||
[cell loadCellData:data];
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
||||
CGFloat width = (kScreenSize.width-15*KWidth_Scale*2 - 10)/2;
|
||||
CGFloat itemH = width *1.03;
|
||||
CGSize itemSize = CGSizeMake(width,itemH);
|
||||
return itemSize;
|
||||
|
||||
}
|
||||
|
||||
//距离上下左右的间距
|
||||
-(UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
|
||||
{
|
||||
|
||||
return UIEdgeInsetsMake(5, 15*KWidth_Scale, 5, 15*KWidth_Scale);
|
||||
|
||||
}
|
||||
|
||||
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section
|
||||
{
|
||||
//设置最小的列间距
|
||||
|
||||
return 5.0f;
|
||||
|
||||
}
|
||||
|
||||
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section
|
||||
{
|
||||
//设置最小的行间距
|
||||
|
||||
return 1.0f;
|
||||
|
||||
}
|
||||
|
||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
if (_goodsdataArr.count==0) {
|
||||
return;
|
||||
}
|
||||
if (self.delegate) {
|
||||
ShopGoodsListData *data = _goodsdataArr[indexPath.row];
|
||||
[self.delegate tapTtemListAt:data.commodityVideo commdyId:data.commodityId];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// ShopGoodsCollectionCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/5/25.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "ShopGoodsListData.h"
|
||||
@interface ShopGoodsCollectionCell : UICollectionViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *videoImg;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *goodsName;
|
||||
|
||||
-(void)loadCellData:(ShopGoodsListData*)data;
|
||||
|
||||
@end
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// ShopGoodsCollectionCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/5/25.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ShopGoodsCollectionCell.h"
|
||||
#import "UIImageView+WebCache.h"
|
||||
@implementation ShopGoodsCollectionCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
-(void)loadCellData:(ShopGoodsListData*)data
|
||||
{
|
||||
|
||||
NSString*strUrl=[NSString stringWithFormat:@"%@%@/%@",kGetShopVideoImg,data.userId,data.commodityImg];
|
||||
|
||||
[self.videoImg sd_setImageWithURL:[NSURL URLWithString:strUrl] placeholderImage:[UIImage imageNamed:@"live_hold.png"]];
|
||||
self.goodsName.text = data.commodityName;
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" 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"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="ShopGoodsCollectionCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="185" height="190"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="185" height="190"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="TXS-vw-L1L">
|
||||
<rect key="frame" x="0.0" y="0.0" width="185" height="139"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="TXS-vw-L1L" secondAttribute="height" multiplier="185:139" id="pcS-cS-1Zx"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vVO-My-GTs">
|
||||
<rect key="frame" x="0.0" y="147" width="185" height="17"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="goods_video_start.png" translatesAutoresizingMaskIntoConstraints="NO" id="3mH-oD-yKV">
|
||||
<rect key="frame" x="83.5" y="59" width="18" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="JvC-UI-EzU"/>
|
||||
<constraint firstAttribute="width" constant="18" id="Mi7-hw-xR7"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="TXS-vw-L1L" secondAttribute="trailing" id="Fcd-Kr-mjH"/>
|
||||
<constraint firstItem="TXS-vw-L1L" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="HCq-Gg-u8r"/>
|
||||
<constraint firstItem="TXS-vw-L1L" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="UEP-nY-xyt"/>
|
||||
<constraint firstItem="3mH-oD-yKV" firstAttribute="centerX" secondItem="TXS-vw-L1L" secondAttribute="centerX" id="bXV-Gg-RUp"/>
|
||||
<constraint firstItem="vVO-My-GTs" firstAttribute="top" secondItem="TXS-vw-L1L" secondAttribute="bottom" constant="8" id="i6E-DA-naF"/>
|
||||
<constraint firstItem="3mH-oD-yKV" firstAttribute="centerY" secondItem="TXS-vw-L1L" secondAttribute="centerY" constant="-0.5" id="ih4-Jc-jjN"/>
|
||||
<constraint firstAttribute="trailing" secondItem="vVO-My-GTs" secondAttribute="trailing" id="pGc-fE-CYp"/>
|
||||
<constraint firstItem="vVO-My-GTs" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="xNu-G1-iMZ"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="185" height="213"/>
|
||||
<connections>
|
||||
<outlet property="goodsName" destination="vVO-My-GTs" id="tF9-Hz-V5R"/>
|
||||
<outlet property="videoImg" destination="TXS-vw-L1L" id="0zN-XT-hHw"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="24.5" y="30"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="goods_video_start.png" width="43" height="68"/>
|
||||
</resources>
|
||||
</document>
|
||||
Reference in New Issue
Block a user