Commit 97097e66 authored by 曹云霄's avatar 曹云霄

caoyunxiao

parent 5b2602fc
......@@ -11,15 +11,35 @@
#import "ClientdetailsViewController.h"
@interface ClientViewController ()<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate>
/**
* 客户数据源
*/
@property (nonatomic,strong) NSMutableArray *CustomerresultArray;
@end
@implementation ClientViewController
/**
* 初始化客户数据源
*/
- (NSMutableArray *)CustomerresultArray
{
if (_CustomerresultArray == nil) {
_CustomerresultArray = [NSMutableArray array];
}
return _CustomerresultArray;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self uiConfigAction];
[self getShoppersAssociatedCustomer];
}
......@@ -72,16 +92,58 @@
}
#pragma mark -获取导购关联客户
- (void)getShoppersAssociatedCustomer
{
[self CreateMBProgressHUDLoding];
ConsumerQueryCondition *condition = [[ConsumerQueryCondition alloc]init];
DataPage *page = [[DataPage alloc]init];
page.page = 0;
condition.page = page;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/consumer/query"] WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
ConsumerPageResult *Customerresult = [[ConsumerPageResult alloc]initWithDictionary:returnValue[@"data"] error:nil];
for (id objc in Customerresult.results) {
[self.CustomerresultArray addObject:objc];
}
[self.informationTableview reloadData];
}
else
{
[self ErrorMBProgressView:returnValue[@"message"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
}];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
InformationTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"information" forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row];
[cell.setCurrentCustomer addTarget:self action:@selector(SetCustomerButtonClick:) forControlEvents:UIControlEventTouchUpInside];
return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 20;
return self.CustomerresultArray.count;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
......@@ -99,8 +161,19 @@
}
#pragma mark -添加客户信息
#pragma mark -设置为当前客户
- (void)SetCustomerButtonClick:(UIButton *)sender
{
for (InformationTableViewCell *cell in self.informationTableview.visibleCells) {
cell.setCurrentCustomer.selected = NO;
}
sender.selected = YES;
}
#pragma mark -添加客户信息
- (IBAction)addCustomerInformationORExit:(UIButton *)sender {
if ([sender.currentTitle isEqualToString:@"退出当前客户"]) {
......@@ -152,7 +225,9 @@
[self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
[self SuccessMBProgressView:returnValue[@"message"]];
//保存客户ID
[Customermanager manager].customerID = returnValue[@"data"];
[self SuccessMBProgressView:returnValue[@"新增成功"]];
[self.addpersonInformationButton setTitle:@"退出当前客户" forState:UIControlStateNormal];
self.changePersonInformationButton.hidden = NO;
self.customerNameField.enabled = NO;
......
......@@ -46,8 +46,13 @@
/**
* 是否设置为当前客户
*/
@property (weak, nonatomic) IBOutlet UISwitch *selectedSwitch;
@property (weak, nonatomic) IBOutlet UIButton *setCurrentCustomer;
/**
* 数据源
*/
@property (nonatomic,strong) TOConsumerEntity *model;
@end
......@@ -15,6 +15,34 @@
// Initialization code
}
#pragma mark -赋值
- (void)setModel:(TOConsumerEntity *)model
{
_model = model;
[self.personHeader sd_setImageWithURL:[NSURL URLWithString:_model.picture] placeholderImage:ReplaceImage];
self.personName.text = _model.name;
self.personPhoneNumber.text = _model.mobile;
self.recentTime.text = [self stringFromDate:_model.lastVisitedTime];
self.Guideservices.text = _model.createName;
self.personLocation.text = _model.address;
}
#pragma mark -NSDate转NSStirng
- (NSString *)stringFromDate:(NSDate *)date{
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
NSString *destDateString = [dateFormatter stringFromDate:date];
return destDateString;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
......
......@@ -99,6 +99,10 @@
@property (weak, nonatomic) IBOutlet UIButton *amplificationButton;
/**
* 库存数量
*/
@property (nonatomic,assign) NSInteger inventory;
@end
......@@ -37,4 +37,26 @@
[self uiConfigAction];
}
@end
......@@ -167,7 +167,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="addButton" destination="SQd-9e-TXr" id="Ocr-ku-O5M"/>
<outlet property="addButton" destination="SQd-9e-TXr" id="Cb8-XL-EXr"/>
<outlet property="addGoodsShoppingbagsButton" destination="frs-v4-sgw" id="Ebb-vt-i2r"/>
<outlet property="amplificationButton" destination="JMO-LV-nJ6" id="kRL-St-xJa"/>
<outlet property="brandName" destination="Hf9-WK-7u5" id="Pv5-m9-PYV"/>
......@@ -179,7 +179,7 @@
<outlet property="inventoryLabe" destination="9XR-2D-r0I" id="kXz-Ds-LwG"/>
<outlet property="inventoryNumber" destination="zXN-Uh-XtZ" id="kD8-Pn-5bW"/>
<outlet property="nameLabe" destination="NlJ-8b-gcl" id="mN8-p6-bG7"/>
<outlet property="reduceButton" destination="rRp-ny-V8g" id="cTQ-SS-vYP"/>
<outlet property="reduceButton" destination="rRp-ny-V8g" id="SgI-QM-R3t"/>
<outlet property="serialNumber" destination="b7B-yI-JEC" id="mtZ-OL-KFQ"/>
<outlet property="topSlidingScrollView" destination="0ee-HS-ilS" id="48B-8i-N7n"/>
</connections>
......
......@@ -10,4 +10,91 @@
@interface ProductDetailsTableViewCell : UITableViewCell
/**
* 数据源
*/
@property (nonatomic,strong) TOGoodsEntity *datas;
/**
* 品牌
*/
@property (weak, nonatomic) IBOutlet UILabel *brandLabe;
/**
* 规格
*/
@property (weak, nonatomic) IBOutlet UILabel *specificationsLabe;
/**
* 材质
*/
@property (weak, nonatomic) IBOutlet UILabel *materialLabe;
/**
* 色温
*/
@property (weak, nonatomic) IBOutlet UILabel *temperatureLabe;
/**
* 光源类型
*/
@property (weak, nonatomic) IBOutlet UILabel *lightSourceTypelABE;
/**
* 系列
*/
@property (weak, nonatomic) IBOutlet UILabel *seriesLabe;
/**
* 风格
*/
@property (weak, nonatomic) IBOutlet UILabel *styleLabe;
/**
* 功率
*/
@property (weak, nonatomic) IBOutlet UILabel *powerLabe;
/**
* 功能
*/
@property (weak, nonatomic) IBOutlet UILabel *functionLabe;
/**
* 应用面积
*/
@property (weak, nonatomic) IBOutlet UILabel *applicationAreaLabe;
/**
* 尺寸
*/
@property (weak, nonatomic) IBOutlet UILabel *sizeLabe;
/**
* 空间
*/
@property (weak, nonatomic) IBOutlet UILabel *spaceLabe;
/**
* 安装方式
*/
@property (weak, nonatomic) IBOutlet UILabel *installationLabe;
/**
* 灯头数量
*/
@property (weak, nonatomic) IBOutlet UILabel *NumberlampHolderLabe;
@end
......@@ -15,6 +15,30 @@
// Initialization code
}
#pragma mark -赋值
- (void)setDatas:(TOGoodsEntity *)datas
{
_datas = datas;
self.specificationsLabe.text = _datas.spec;
self.materialLabe.text = _datas.material;
self.temperatureLabe.text = _datas.colorTemperature;
self.lightSourceTypelABE.text = _datas.lightSource;
self.seriesLabe.text = _datas.series;
self.styleLabe.text = _datas.goodsStyle;
self.powerLabe.text = _datas.power;
self.functionLabe.text = _datas.function;
self.applicationAreaLabe.text = _datas.area;
self.sizeLabe.text = _datas.size;
self.spaceLabe.text = _datas.space;
self.installationLabe.text = _datas.installMethod;
self.NumberlampHolderLabe.text = _datas.lightNumber;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
......
......@@ -19,6 +19,10 @@
/**
* 商品iD
*/
@property (nonatomic,copy) NSString *goodsID;
@end
......@@ -9,12 +9,17 @@
#import "ProductDetailsViewController.h"
#import "ProductDetailsTableViewCell.h"
#import "ProductDetailsHeaderView.h"
#import "goodsDetailsSectionview.h"
@interface ProductDetailsViewController ()<UITableViewDelegate,UITableViewDataSource>
@interface ProductDetailsViewController ()<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate>
@property (nonatomic,strong) ProductDetailsHeaderView *headerView;
/**
* 商品详情数据
*/
@property (nonatomic,strong )TOGoodsEntity *entity;
@end
@implementation ProductDetailsViewController
......@@ -23,6 +28,8 @@
[super viewDidLoad];
[self uiConfigAction];
[self getGoodsListDetails];
}
#pragma mark -UI
......@@ -34,11 +41,64 @@
}
#pragma mark -获取商品详情
- (void)getGoodsListDetails
{
[self CreateMBProgressHUDLoding];
NSString *url = [NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/goods/getGoods/",_goodsID];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:url WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
self.entity = [[TOGoodsEntity alloc]initWithDictionary:returnValue[@"data"] error:nil];
[self HeaderViewAssignment];
[self.productDetilsTableview reloadData];
}
else
{
[self ErrorMBProgressView:returnValue[@"message"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding];
NSLog(@"%@",error);
}];
}
#pragma mark -头部视图
- (void)CreateHeaderView
{
self.headerView = [[[NSBundle mainBundle] loadNibNamed:@"ProductDetailsHeaderView" owner:self options:nil] lastObject];
self.headerView.goodsNumber.delegate = self;
//增加,减少商品
[self.headerView.reduceButton addTarget:self action:@selector(reduceGoodsButtonClick:) forControlEvents:UIControlEventTouchUpInside];
[self.headerView.addButton addTarget:self action:@selector(reduceGoodsButtonClick:) forControlEvents:UIControlEventTouchUpInside];
self.productDetilsTableview.tableHeaderView = self.headerView;
//添加至购物车
[self.headerView.addGoodsShoppingbagsButton addTarget:self action:@selector(addGoodsShoppingbags) forControlEvents:UIControlEventTouchUpInside];
}
#pragma mark -header赋值
- (void)HeaderViewAssignment
{
self.headerView.inventoryNumber.text = [self.entity.inv stringValue];
self.headerView.serialNumber.text = self.entity.series;
self.headerView.nameLabe.text = self.entity.name;
self.headerView.brandName.text = self.entity.brandId;
self.headerView.dorpPriceLabe.text = [self.entity.tagPrice stringValue];
[self.headerView.goodsImageview sd_setImageWithURL:[NSURL URLWithString:self.entity.pictures] placeholderImage:ReplaceImage];
}
......@@ -47,6 +107,7 @@
ProductDetailsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"productDetailscell" forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.datas = self.entity;
return cell;
}
......@@ -66,7 +127,7 @@
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 2;
return 1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
......@@ -76,18 +137,128 @@
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *headerView = [[UIView alloc]initWithFrame:CGRectMake(0, 2, ScreenWidth, 46)];
headerView.backgroundColor = [UIColor grayColor];
UILabel *titleLabe = [[UILabel alloc]initWithFrame:CGRectMake(50, 15, 200, 20)];
titleLabe.textColor = [UIColor redColor];
titleLabe.font = [UIFont systemFontOfSize:12];
titleLabe.text = section?@"商品参数":@"图文详情";
[headerView addSubview:titleLabe];
return headerView;
goodsDetailsSectionview *sectionView = [[[NSBundle mainBundle] loadNibNamed:@"goodsDetailsSectionview" owner:self options:nil] firstObject];
sectionView.goodSectionLabe.text = section?@"图文详情":@"商品参数";
return sectionView;
}
#pragma mark -减少商品----增加商品
- (void)reduceGoodsButtonClick:(UIButton *)sender {
NSInteger goodsNumber = [self.headerView.goodsNumber.text integerValue];
switch (sender.tag) {
case 100://减少
{
if (goodsNumber <= 1) {
//不能小于1
[self ErrorMBProgressView:@"不能小于1"];
return;
}
goodsNumber --;
self.headerView.goodsNumber.text = [NSString stringWithFormat:@"%ld",goodsNumber];
}
break;
case 101://增加
{
if (goodsNumber >= [self.entity.number integerValue]) {
//不能大于库存
[self ErrorMBProgressView:@"超过库存"];
return;
}
goodsNumber ++;
self.headerView.goodsNumber.text = [NSString stringWithFormat:@"%ld",goodsNumber];
}
break;
default:
break;
}
}
#pragma mark -UITextFieldDelegate
- (void)textFieldDidEndEditing:(UITextField *)textField
{
NSLog(@"%@",textField.text);
NSString *inputString = textField.text;
if (![self isPureInt:inputString]) {
[self ErrorMBProgressView:@"输入格式错误"];
textField.text = @"1";
return;
}
if ([inputString integerValue] > [self.entity.number integerValue]) {
[self ErrorMBProgressView:@"超过库存数量"];
textField.text = [NSString stringWithFormat:@"%ld",[self.entity.number integerValue]];
return;
}
}
//
//@synthesize fid;
//@synthesize createName;
//@synthesize createBy;
//@synthesize createDate;
//@synthesize updateName;
//@synthesize updateBy;
//@synthesize updateDate;
//@synthesize sysOrgCode;
////@synthesize goodsId;
//@synthesize goodsCode;
//@synthesize goodsName;
//@synthesize goodsCover;
//@synthesize goodsSpec;
//@synthesize goodsBrand;
//@synthesize goodsSellerPrice;
//@synthesize goodsNum;
//@synthesize goodsPrice;
//@synthesize goodsTotalPrice;
//@synthesize consumerId;
#pragma mark -添加至购物车
- (void)addGoodsShoppingbags
{
TOShopcartEntity *shopCar = [[TOShopcartEntity alloc]init];
shopCar.goodsId = self.entity.fid;
shopCar.goodsCode = self.entity.code;
shopCar.goodsName = self.entity.name;
// shopCar.good
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/shopcart/save"] WithRequestType:0 WithParameter:shopCar WithReturnValueBlock:^(id returnValue) {
NSLog(@"%@",returnValue);
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
NSLog(@"%@",error);
}];
}
#pragma mark -判断是否为纯数字
- (BOOL)isPureInt:(NSString*)string{
NSScanner* scan = [NSScanner scannerWithString:string];
int val;
return[scan scanInt:&val] && [scan isAtEnd];
}
- (void)didReceiveMemoryWarning {
......
......@@ -335,6 +335,7 @@
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"StoryboardwithCYX" bundle:nil];
ProductDetailsViewController *productDetails = [storyboard instantiateViewControllerWithIdentifier:@"productdetails"];
productDetails.goodsID = [[self.datasArray.goodsEntity objectAtIndex_opple:indexPath.item] fid];
[self.navigationController pushViewController:productDetails animated:YES];
}
......@@ -503,7 +504,6 @@
condition.endprice = [NSNumber numberWithInteger:[[spacrArray objectAtIndex_opple:1] integerValue]];
}
__weak typeof (self) Weakself = self;
NSLog(@"%@",[condition toDictionary]);
[self getGoodsListdatas:condition returnResponse:^(GoodsResponse *response) {
......
//
// goodsDetailsSectionview.h
// Lighting
//
// Created by 曹云霄 on 16/5/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface goodsDetailsSectionview : UIView
/**
* 商品详情、图文详情
*/
@property (weak, nonatomic) IBOutlet UILabel *goodSectionLabe;
@end
//
// goodsDetailsSectionview.m
// Lighting
//
// Created by 曹云霄 on 16/5/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "goodsDetailsSectionview.h"
@implementation goodsDetailsSectionview
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="ira-j8-GfA" customClass="goodsDetailsSectionview">
<rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" id="Pjt-4d-qvd">
<rect key="frame" x="0.0" y="0.0" width="10" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.34901960780000002" green="0.67450980390000004" blue="0.86274509799999999" alpha="1" colorSpace="calibratedRGB"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="商品参数" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="UBR-XP-jce">
<rect key="frame" x="10" y="0.0" width="140" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.86666666670000003" green="0.86666666670000003" blue="0.86666666670000003" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.92549019610000005" green="0.92549019610000005" blue="0.92549019610000005" alpha="1" colorSpace="calibratedRGB"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="goodSectionLabe" destination="UBR-XP-jce" id="WxA-DZ-yfS"/>
</connections>
<point key="canvasLocation" x="204" y="501"/>
</view>
</objects>
</document>
......@@ -77,6 +77,9 @@
29BB27771CD9DFBA009A0813 /* ProductLibraryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BB27761CD9DFBA009A0813 /* ProductLibraryViewController.m */; };
29BB277D1CD9DFCB009A0813 /* CustomerManagementViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BB277C1CD9DFCB009A0813 /* CustomerManagementViewController.m */; };
29BB27801CD9DFD7009A0813 /* AboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BB277F1CD9DFD7009A0813 /* AboutViewController.m */; };
29BFBD871CE428B200C238FB /* Customermanager.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BFBD861CE428B200C238FB /* Customermanager.m */; };
29BFBD8F1CE44BA900C238FB /* goodsDetailsSectionview.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BFBD8E1CE44BA900C238FB /* goodsDetailsSectionview.m */; };
29BFBD911CE44BC200C238FB /* goodsDetailsSectionview.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29BFBD901CE44BC200C238FB /* goodsDetailsSectionview.xib */; };
29C584E91CDA249300C6F677 /* ProductCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C584E81CDA249200C6F677 /* ProductCollectionViewCell.m */; };
29C584ED1CDA429500C6F677 /* ProductDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C584EC1CDA429500C6F677 /* ProductDetailsViewController.m */; };
29E28CE81CE0B91B00812A55 /* HENLENSONG.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E28CE71CE0B91B00812A55 /* HENLENSONG.m */; };
......@@ -226,6 +229,11 @@
29BB277C1CD9DFCB009A0813 /* CustomerManagementViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomerManagementViewController.m; sourceTree = "<group>"; };
29BB277E1CD9DFD7009A0813 /* AboutViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutViewController.h; sourceTree = "<group>"; };
29BB277F1CD9DFD7009A0813 /* AboutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutViewController.m; sourceTree = "<group>"; };
29BFBD851CE428B200C238FB /* Customermanager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Customermanager.h; sourceTree = "<group>"; };
29BFBD861CE428B200C238FB /* Customermanager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Customermanager.m; sourceTree = "<group>"; };
29BFBD8D1CE44BA900C238FB /* goodsDetailsSectionview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = goodsDetailsSectionview.h; sourceTree = "<group>"; };
29BFBD8E1CE44BA900C238FB /* goodsDetailsSectionview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = goodsDetailsSectionview.m; sourceTree = "<group>"; };
29BFBD901CE44BC200C238FB /* goodsDetailsSectionview.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = goodsDetailsSectionview.xib; sourceTree = "<group>"; };
29C584E71CDA249200C6F677 /* ProductCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductCollectionViewCell.h; sourceTree = "<group>"; };
29C584E81CDA249200C6F677 /* ProductCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProductCollectionViewCell.m; sourceTree = "<group>"; };
29C584EB1CDA429500C6F677 /* ProductDetailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductDetailsViewController.h; sourceTree = "<group>"; };
......@@ -382,6 +390,7 @@
2928F7DE1CD085430036D761 /* Tools */ = {
isa = PBXGroup;
children = (
29BFBD841CE4288A00C238FB /* Customercenter */,
29F725F81CE17AE40072FE0E /* Shopperscenter */,
29E28CE51CE0B90600812A55 /* Regularexpressions */,
29EC33241CE06FD1005F0C13 /* Jastor */,
......@@ -782,6 +791,15 @@
name = AboutVC;
sourceTree = "<group>";
};
29BFBD841CE4288A00C238FB /* Customercenter */ = {
isa = PBXGroup;
children = (
29BFBD851CE428B200C238FB /* Customermanager.h */,
29BFBD861CE428B200C238FB /* Customermanager.m */,
);
name = Customercenter;
sourceTree = "<group>";
};
29C584E51CDA246900C6F677 /* controller */ = {
isa = PBXGroup;
children = (
......@@ -808,6 +826,9 @@
29360C2D1CDDC47E002A5D89 /* ScreeningView.h */,
29360C2E1CDDC47E002A5D89 /* ScreeningView.m */,
29360C301CDDC487002A5D89 /* ScreeningView.xib */,
29BFBD8D1CE44BA900C238FB /* goodsDetailsSectionview.h */,
29BFBD8E1CE44BA900C238FB /* goodsDetailsSectionview.m */,
29BFBD901CE44BC200C238FB /* goodsDetailsSectionview.xib */,
29834EBD1CDF21EF001A484F /* screeningFirstView */,
29834EBC1CDF21D8001A484F /* screeningSecondView */,
);
......@@ -1015,6 +1036,7 @@
29EAAE901CDC3E9700C4DBA2 /* BillingInfoView.xib in Resources */,
29706DB71CD082990003C412 /* LaunchScreen.storyboard in Resources */,
29698D621CE2C11500D72CE7 /* SettlementViewController.xib in Resources */,
29BFBD911CE44BC200C238FB /* goodsDetailsSectionview.xib in Resources */,
29807C621CD20C2A00F111B8 /* Images.xcassets in Resources */,
29834EB61CDF1EB6001A484F /* screeningSecondView.xib in Resources */,
299249461CDB51C800786B1E /* ModifyShippingAddressView.xib in Resources */,
......@@ -1090,6 +1112,7 @@
29F726041CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m in Sources */,
04A14A281CE0FC5600DAD5F3 /* RightSubView.m in Sources */,
29EC331F1CE02AFA005F0C13 /* PopoverViewController.m in Sources */,
29BFBD871CE428B200C238FB /* Customermanager.m in Sources */,
299C7F5A1CE21FA800E7D7CB /* AddressViewController.m in Sources */,
29BB276C1CD9DE74009A0813 /* FollowHeartViewController.m in Sources */,
2928F8381CD09E730036D761 /* CustomButton.m in Sources */,
......@@ -1112,6 +1135,7 @@
29EAAEA01CDC79DC00C4DBA2 /* CustomerOrderViewController.m in Sources */,
2928F8321CD09E320036D761 /* Toolview.m in Sources */,
2942F8A61CDD80C2005B377E /* authenticateView.m in Sources */,
29BFBD8F1CE44BA900C238FB /* goodsDetailsSectionview.m in Sources */,
29BB27681CD9D38E009A0813 /* AllpriceTableViewCell.m in Sources */,
29BB27771CD9DFBA009A0813 /* ProductLibraryViewController.m in Sources */,
29EAAEAA1CDC7FE800C4DBA2 /* AllCutomerTableViewCell.m in Sources */,
......
......@@ -10,4 +10,20 @@
@interface Customermanager : NSObject
/**
* 客户个人信息
*/
+ (Customermanager *)manager;
/**
* 客户iD
*/
@property (nonatomic,copy) NSString *customerID;
@end
......@@ -10,4 +10,33 @@
@implementation Customermanager
static Customermanager *manager = nil;
+ (Customermanager *)manager
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
manager = [[Customermanager alloc]init];
});
return manager;
}
+ (id)allocWithZone:(struct _NSZone *)zone
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
manager = [super allocWithZone:zone];
});
return manager;
}
@end
......@@ -25,6 +25,7 @@
#import "JSONModel.h"
#import "Shoppersmanager.h"
#import "UIImageView+WebCache.h"
#import "Customermanager.h"
// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
......@@ -60,7 +61,7 @@
/**
* 默认显示头像
*/
#define ReplaceImage [UIImage imageNamed:@"矢量智能对象"]]
#define ReplaceImage [UIImage imageNamed:@"矢量智能对象"]
/**
* AppDelegate代理
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment