Commit 77063e1c authored by Sandy's avatar Sandy

更新模型等

parent f4ff7823
......@@ -2994,7 +2994,7 @@
baseConfigurationReference = AAF51B5D53AE9938C03065C3 /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = Aland/PrefixHeader.pch;
......
......@@ -6,7 +6,7 @@
//
#import "CommotityListModel.h"
#import "NSString+Category.h"
NSString *const kCommotityListModelUuid = @"uuid";
NSString *const kCommotityListModelCategory = @"category";
......@@ -26,7 +26,6 @@ NSString *const kCommotityListModelInv = @"inv";
NSString *const kCommotityListModelName = @"name";
NSString *const kCommotityListModelScore = @"score";
@interface CommotityListModel ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
......@@ -53,45 +52,43 @@ NSString *const kCommotityListModelScore = @"score";
@synthesize name = _name;
@synthesize score = _score;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
{
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict {
return [[self alloc] initWithDictionary:dict];
}
- (instancetype)initWithDictionary:(NSDictionary *)dict
{
- (instancetype)initWithDictionary:(NSDictionary *)dict {
self = [super init];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if(self && [dict isKindOfClass:[NSDictionary class]]) {
self.uuid = [self objectOrNilForKey:kCommotityListModelUuid fromDictionary:dict];
self.category = [CommotityListCategory modelObjectWithDictionary:[dict objectForKey:kCommotityListModelCategory]];
self.salesVolume = [[self objectOrNilForKey:kCommotityListModelSalesVolume fromDictionary:dict] doubleValue];
self.visited = [[self objectOrNilForKey:kCommotityListModelVisited fromDictionary:dict] doubleValue];
self.brand = [CommotityListBrand modelObjectWithDictionary:[dict objectForKey:kCommotityListModelBrand]];
self.engName = [self objectOrNilForKey:kCommotityListModelEngName fromDictionary:dict];
self.pictures = [self objectOrNilForKey:kCommotityListModelPictures fromDictionary:dict];
self.price = [[self objectOrNilForKey:kCommotityListModelPrice fromDictionary:dict] doubleValue];
self.originalPrice = [[self objectOrNilForKey:kCommotityListModelOriginalPrice fromDictionary:dict] doubleValue];
self.specName = [self objectOrNilForKey:kCommotityListModelSpecName fromDictionary:dict];
self.favorited = [[self objectOrNilForKey:kCommotityListModelFavorited fromDictionary:dict] doubleValue];
self.cover = [self objectOrNilForKey:kCommotityListModelCover fromDictionary:dict];
self.commission = [[self objectOrNilForKey:kCommotityListModelCommission fromDictionary:dict] doubleValue];
self.tranferType = [self objectOrNilForKey:kCommotityListModelTranferType fromDictionary:dict];
self.inv = [[self objectOrNilForKey:kCommotityListModelInv fromDictionary:dict] doubleValue];
self.name = [self objectOrNilForKey:kCommotityListModelName fromDictionary:dict];
self.score = [[self objectOrNilForKey:kCommotityListModelScore fromDictionary:dict] doubleValue];
if (self && [dict isKindOfClass:[NSDictionary class]]) {
self.uuid = [self objectOrNilForKey:kCommotityListModelUuid fromDictionary:dict];
self.category = [CommotityListCategory modelObjectWithDictionary:[dict objectForKey:kCommotityListModelCategory]];
self.salesVolume = [[self objectOrNilForKey:kCommotityListModelSalesVolume fromDictionary:dict] doubleValue];
self.visited = [[self objectOrNilForKey:kCommotityListModelVisited fromDictionary:dict] doubleValue];
self.brand = [CommotityListBrand modelObjectWithDictionary:[dict objectForKey:kCommotityListModelBrand]];
self.engName = [self objectOrNilForKey:kCommotityListModelEngName fromDictionary:dict];
self.pictures = [self objectOrNilForKey:kCommotityListModelPictures fromDictionary:dict];
self.price = [[self objectOrNilForKey:kCommotityListModelPrice fromDictionary:dict] doubleValue];
self.originalPrice = [[self objectOrNilForKey:kCommotityListModelOriginalPrice fromDictionary:dict] doubleValue];
self.specName = [self objectOrNilForKey:kCommotityListModelSpecName fromDictionary:dict];
self.favorited = [[self objectOrNilForKey:kCommotityListModelFavorited fromDictionary:dict] doubleValue];
self.cover = [self objectOrNilForKey:kCommotityListModelCover fromDictionary:dict];
self.commission = [[self objectOrNilForKey:kCommotityListModelCommission fromDictionary:dict] doubleValue];
self.tranferType = [self objectOrNilForKey:kCommotityListModelTranferType fromDictionary:dict];
self.inv = [[self objectOrNilForKey:kCommotityListModelInv fromDictionary:dict] doubleValue];
self.name = [self objectOrNilForKey:kCommotityListModelName fromDictionary:dict];
self.score = [[self objectOrNilForKey:kCommotityListModelScore fromDictionary:dict] doubleValue];
}
if ([self.cover isHasChinese]) {
self.cover = [self.cover stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
- (NSDictionary *)dictionaryRepresentation {
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:self.uuid forKey:kCommotityListModelUuid];
[mutableDict setValue:[self.category dictionaryRepresentation] forKey:kCommotityListModelCategory];
......@@ -114,23 +111,19 @@ NSString *const kCommotityListModelScore = @"score";
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
- (NSString *)description
{
- (NSString *)description {
return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}
#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
{
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict {
id object = [dict objectForKey:aKey];
return [object isEqual:[NSNull null]] ? nil : object;
}
#pragma mark - NSCoding Methods
- (id)initWithCoder:(NSCoder *)aDecoder
{
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super init];
self.uuid = [aDecoder decodeObjectForKey:kCommotityListModelUuid];
......@@ -153,8 +146,7 @@ NSString *const kCommotityListModelScore = @"score";
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
- (void)encodeWithCoder:(NSCoder *)aCoder {
[aCoder encodeObject:_uuid forKey:kCommotityListModelUuid];
[aCoder encodeObject:_category forKey:kCommotityListModelCategory];
......@@ -175,10 +167,9 @@ NSString *const kCommotityListModelScore = @"score";
[aCoder encodeDouble:_score forKey:kCommotityListModelScore];
}
- (id)copyWithZone:(NSZone *)zone
{
- (id)copyWithZone:(NSZone *)zone {
CommotityListModel *copy = [[CommotityListModel alloc] init];
if (copy) {
copy.uuid = [self.uuid copyWithZone:zone];
......@@ -199,9 +190,8 @@ NSString *const kCommotityListModelScore = @"score";
copy.name = [self.name copyWithZone:zone];
copy.score = self.score;
}
return copy;
}
@end
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<objects>
......@@ -12,7 +12,7 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="130"/>
<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="129"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="129.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="commodityManagementImage" translatesAutoresizingMaskIntoConstraints="NO" id="f2b-xv-2mY">
......
......@@ -16,7 +16,7 @@
@end
@implementation OrderDetailTopView
- (void)awakeFromNib {
self.viewExpress.userInteractionEnabled = YES;
}
- (void)updateByOrderType {
......@@ -62,13 +62,13 @@
}];
}
- (IBAction)tapGoLogistics:(id)sender {
self.tapBlcok();
}
- (void)getLogistics {
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
self.tapBlcok();
}
- (IBAction)actionCall:(id)sender {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@", self.labelPhoneNumber.text]]];
......
......@@ -143,16 +143,27 @@
<constraint firstAttribute="height" constant="1" id="GY3-mx-DLT"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="spD-FF-Z8i">
<rect key="frame" x="0.0" y="0.0" width="320" height="57"/>
<connections>
<action selector="tapGoLogistics:" destination="-1" eventType="touchUpInside" id="Sde-FJ-pWX"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<gestureRecognizers/>
<constraints>
<constraint firstAttribute="trailing" secondItem="spD-FF-Z8i" secondAttribute="trailing" id="1uI-Dz-USw"/>
<constraint firstItem="CPN-ej-33q" firstAttribute="leading" secondItem="9bs-ar-XXb" secondAttribute="leading" constant="8" id="FwH-Ac-q0O"/>
<constraint firstAttribute="bottom" secondItem="qgd-cT-Y2S" secondAttribute="bottom" constant="30" id="G2a-P7-ZXe"/>
<constraint firstAttribute="bottom" secondItem="KAE-q5-yVI" secondAttribute="bottom" constant="1" id="Inb-Dq-E8r"/>
<constraint firstAttribute="trailing" secondItem="qgd-cT-Y2S" secondAttribute="trailing" constant="43" id="Mih-Bb-w1w"/>
<constraint firstAttribute="trailing" secondItem="CPN-ej-33q" secondAttribute="trailing" constant="8" id="OgA-J2-wKm"/>
<constraint firstItem="spD-FF-Z8i" firstAttribute="top" secondItem="9bs-ar-XXb" secondAttribute="top" id="Uan-bv-PgG"/>
<constraint firstItem="CPN-ej-33q" firstAttribute="top" secondItem="spD-FF-Z8i" secondAttribute="bottom" id="Vpw-gt-taw"/>
<constraint firstItem="KAE-q5-yVI" firstAttribute="leading" secondItem="qgd-cT-Y2S" secondAttribute="leading" id="XzQ-kl-eZr"/>
<constraint firstItem="qgd-cT-Y2S" firstAttribute="top" secondItem="9bs-ar-XXb" secondAttribute="top" constant="8" id="abQ-5X-Zqz"/>
<constraint firstItem="spD-FF-Z8i" firstAttribute="leading" secondItem="9bs-ar-XXb" secondAttribute="leading" id="afU-9d-Ks0"/>
<constraint firstItem="KAE-q5-yVI" firstAttribute="top" secondItem="qgd-cT-Y2S" secondAttribute="bottom" constant="8" id="dyt-fZ-XDs"/>
<constraint firstAttribute="height" constant="70" id="hCW-5v-Qgf"/>
<constraint firstAttribute="bottom" secondItem="CPN-ej-33q" secondAttribute="bottom" id="qrP-cj-lCB"/>
......
......@@ -24,7 +24,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"物流详情";
self.logisticsNumber.text = [NSString stringWithFormat:@"运单号:%@",self.shipTrackingNumber];
self.logisticsNumber.text = [NSString stringWithFormat:@"运单号:%@", SAFE_STRING(self.shipTrackingNumber)];
self.tableView.estimatedRowHeight = 50;
self.tableView.rowHeight = UITableViewAutomaticDimension;
}
......
......@@ -45,7 +45,7 @@
info = @"支付失败";
}
UIAlertController *alert = [UIAlertController alertControllerWithTitle:info message:@"订单可在订单管理中查看" preferredStyle:UIAlertControllerStyleAlert];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:info message:nil preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *toOrders = [UIAlertAction actionWithTitle:@"查看订单" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
for (id vc in weakSelf.navigationController.viewControllers) {
if ([vc isKindOfClass:[OrderViewController class]]) {
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AboutViewController">
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ChangePasswordViewController">
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="FeedBackViewController">
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MyAcountViewController">
......@@ -181,10 +181,10 @@
<constraint firstItem="ood-f0-M59" firstAttribute="top" secondItem="BED-54-Ug2" secondAttribute="top" constant="20" id="qOW-w6-jxc"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WQc-WT-07y">
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="WQc-WT-07y">
<rect key="frame" x="126" y="1" width="123" height="96"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="可提现(元)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RM0-K2-Byh">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="可提现(元)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RM0-K2-Byh">
<rect key="frame" x="19" y="20" width="85" height="22"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
......@@ -253,10 +253,10 @@
<constraint firstItem="W2X-n7-lfz" firstAttribute="top" secondItem="oQD-Zl-iyP" secondAttribute="bottom" constant="10" id="vfh-DB-4Q1"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qp9-8T-7dh">
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Qp9-8T-7dh">
<rect key="frame" x="126" y="98" width="123" height="96"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="团队收入(元)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rgG-EF-dXc">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="团队收入(元)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rgG-EF-dXc">
<rect key="frame" x="10" y="20" width="103" height="22"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
......
......@@ -8,7 +8,7 @@
#import "JavenGoods.h"
#import "JavenCategory.h"
#import "JavenBrand.h"
#import "NSString+Category.h"
NSString *const kJavenGoodsUuid = @"uuid";
NSString *const kJavenGoodsCategory = @"category";
......@@ -87,6 +87,9 @@ NSString *const kJavenGoodsScore = @"score";
self.score = [[self objectOrNilForKey:kJavenGoodsScore fromDictionary:dict] doubleValue];
}
if ([self.cover isHasChinese]) {
self.cover = [self.cover stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
}
return self;
......
......@@ -6,10 +6,10 @@
// Copyright © 2016年 Z. All rights reserved.
//
#import "ShareInstance.h"
#import "CommotityListBrand.h"
#import "CoverShadowView.h"
#import "ShareContentView.h"
#import "CommotityListBrand.h"
#import "ShareInstance.h"
#define kWindow [UIApplication sharedApplication].keyWindow
@interface ShareInstance ()
@property (nonatomic, strong) CoverShadowView *cover;
......@@ -17,22 +17,20 @@
@end
@implementation ShareInstance
+ (ShareInstance *)shareInstace
{
+ (ShareInstance *)shareInstace {
static ShareInstance *instance;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [[ShareInstance alloc] init];
});
return instance;
}
- (void)showWithTitle:(NSString *)title content:(NSString *)content url:(NSString *)url image:(UIImage *)image
{
- (void)showWithTitle:(NSString *)title content:(NSString *)content url:(NSString *)url image:(UIImage *)image {
[self.cover show];
WS(weakSelf)
self.cover.tapAction = ^{
[weakSelf hide];
......@@ -40,26 +38,22 @@
self.shareContentView.clickBlock = ^{
[weakSelf hide];
};
self.shareContentView.title = title;
self.shareContentView.content = content;
self.shareContentView.url = url;
self.shareContentView.image = image;
[MyTools animateFromBottomDuration:0.5 view:self.shareContentView viewHeight:140];
}
- (void)hide
{
- (void)hide {
[self.cover hide];
[UIView animateWithDuration:0.3 animations:^{
self.shareContentView.frame = CGRectMake(0, kHeight, kWidth, 140);
}];
}
- (CoverShadowView *)cover
{
- (CoverShadowView *)cover {
if (!_cover) {
_cover = [[CoverShadowView alloc] initOnTopWithHeight:kHeight];
[kWindow addSubview:_cover];
......@@ -67,19 +61,16 @@
return _cover;
}
- (ShareContentView *)shareContentView
{
- (ShareContentView *)shareContentView {
if (!_shareContentView) {
_shareContentView = [ShareContentView viewWithNibName:@"ShareContentView"];
_shareContentView.frame = CGRectMake(0, kHeight, kWidth, 140);
[kWindow addSubview:_shareContentView];
}
return _shareContentView;
}
/**
* 分享店铺
*
......@@ -89,55 +80,49 @@
* @param image 图片
* @param imageUrl 图片链接(现在暂时没有用处,可用于判断用户是否上传头像)
*/
- (void)shareShopWithTitle:(NSString *)title shopDescription:(NSString *)shopDescription url:(NSString *)url image:(UIImage *)image imageUrl:(NSString *)imageUrl
{
- (void)shareShopWithTitle:(NSString *)title shopDescription:(NSString *)shopDescription url:(NSString *)url image:(UIImage *)image imageUrl:(NSString *)imageUrl {
if (!title || title.length == 0) {
[MBProgressHUD Javen_showError:@"请填写店铺名!" onView:kWindow delay:0.7 complete:nil];
}else if(!shopDescription || shopDescription.length == 0){
} else if (!shopDescription || shopDescription.length == 0) {
[MBProgressHUD Javen_showError:@"请填写店铺简介!" onView:kWindow delay:0.7 complete:nil];
}
// else if (!imageUrl || imageUrl.length < 5) {
// [MBProgressHUD Javen_showError:@"请上传店铺头像!" onView:kWindow delay:0.7 complete:nil];
// }
else{
// else if (!imageUrl || imageUrl.length < 5) {
// [MBProgressHUD Javen_showError:@"请上传店铺头像!" onView:kWindow delay:0.7 complete:nil];
// }
else {
[self showWithTitle:title content:shopDescription url:url image:image];
}
}
/** 邀请合伙人 */
- (void)invitePartner
{
- (void)invitePartner {
NSString *urlStr = [NSString stringWithFormat:@"%@ShopUser/gpregister/invitationCode/%@.html", [UserInfo shareInstance].appConfig.webShopBaseUrl, [UserInfo shareInstance].reseller.invitationCode];
[self showWithTitle:@"欢迎加入新营养部落,一起共创健康未来。" content:@"在新营养部落开店,享受自由健康生活,免费游览欧洲北美。" url:urlStr image:[UIImage appIcon]];
}
/** 分享商品 */
- (void)shareGoodsWithGoodsModel:(CommotityListModel *)model image:(UIImage *)image
{
- (void)shareGoodsWithGoodsModel:(CommotityListModel *)model image:(UIImage *)image {
[MBProgressHUD showHUDAddedTo:kWindow animated:YES];
[[HTTPCilent shareCilent] GET:[NSString stringWithFormat:@"goods/brand/get/%@", model.brand.uuid] parameters:nil success:^(NSURLSessionDataTask *task, id responseObject) {
[MBProgressHUD hideHUDForView:kWindow];
if (kIsResponseSuccess(responseObject)) {
NSString *description = responseObject[@"goodsBrand"][@"description"];
NSString *url = [NSString stringWithFormat:@"%@Wap/detail/shop_id/%@/id/%@/hastbar/0/.html", [UserInfo shareInstance].appConfig.webShopBaseUrl, [UserInfo shareInstance].reseller.shop.uuid, model.uuid];
if (description && description.length > 0 && model.name.length > 0)
{
if (description && description.length > 0 && model.name.length > 0) {
[self showWithTitle:model.name content:description url:url image:image];
}else
{
} else {
[MBProgressHUD Javen_showError:@"该商品暂不支持分享" onView:kWindow delay:0.5 complete:nil];
}
}
} failure:^(NSURLSessionDataTask *task, NSError *error) {
}];
}
failure:^(NSURLSessionDataTask *task, NSError *error){
}];
}
@end
......@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.4</string>
<string>1.1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
......@@ -50,7 +50,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>0</string>
<string>1</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>wechat</string>
......
......@@ -10,9 +10,9 @@
#define UrlHeader_h
#import <Foundation/Foundation.h>
static NSString *const REST_BASE_URL = @"http://139.196.173.244:8080/aland-server/rest"; //正式环境
//static NSString *const REST_BASE_URL = @"http://139.196.173.244:8080/aland-server/rest"; //正式环境
//static NSString *const REST_BASE_URL = @"http://139.196.195.30:9090/aland-server/rest"; //测试环境
static NSString *const REST_BASE_URL = @"http://139.196.195.30:9090/aland-server/rest"; //测试环境
static NSString *const kDomain = @"0001"; //组织代码
......
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