Commit c5965b3d by lee

u

parent 81145eba
......@@ -9,7 +9,7 @@
#import "AppDelegate+Deeplink.h"
#import <JLRoutes/JLRoutes.h>
#import "AppDelegate.h"
#import "KWMProductDetailVC.h"
#import "KWMNewProductVC.h"
#import "KWMSelectedGoodsVC.h"
#import "KWMBlogDetailVC.h"
#import "KWMNewProductVC.h"
......@@ -34,7 +34,7 @@
[routes addRoute:@"/products/:id" handler:^BOOL(NSDictionary<NSString *,id> * _Nonnull parameters) {
NSLog(@"product id %@",parameters[@"id"]);
KWMNewProductVC *vc = [KWMNewProductVC getNewInstance];
// KWMProductDetailVC *productDetailVC = (KWMProductDetailVC*)[KWMBaseVC findControllerBy:[KWMProductDetailVC kwmTag] fromStoryboard:@"New"];
// KWMNewProductVC *productDetailVC = [KWMNewProductVC getNewInstance];
// productDetailVC.product = brandCell.leftProduct;
vc.handle = parameters[@"id"];
// NSLog(@"%@",[AppDelegate mainViewController].selectedViewController);
......
......@@ -15,8 +15,15 @@
@implementation UIViewController (HTTP)
- (void)openURLWithString:(NSString *)URLString {
UIApplication *application = [UIApplication sharedApplication];
NSURL *url = [[NSURL alloc] initWithString:[URLString stringByReplacingOccurrencesOfRegex:@"^https?" withString:@"cemarose"]];
NSString *parten=@"[^%\\da-zA-Z:/.?&=]+";
NSRegularExpression *reg=[NSRegularExpression regularExpressionWithPattern:parten options:0 error:nil];
NSArray *matchs=[reg matchesInString:URLString options:0 range:NSMakeRange(0, [URLString length])];
NSString *encodeURL=[NSString stringWithString:URLString];
for (long i=matchs.count-1; i>=0; --i) {
NSTextCheckingResult *tcr=matchs[i];
encodeURL=[encodeURL stringByReplacingCharactersInRange:tcr.range withString:[[encodeURL substringWithRange:tcr.range] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
}
NSURL *url = [[NSURL alloc] initWithString:[encodeURL stringByReplacingOccurrencesOfRegex:@"^https?" withString:@"cemarose"]];
if ([JLRoutes canRouteURL:url]) {
[JLRoutes routeURL:url];
// }else if ([application respondsToSelector:@selector(openURL:options:completionHandler:)]) {
......
......@@ -9,7 +9,7 @@
#import "KWMBrandCaramelVC.h"
#import "KWMBrandCaramelCell.h"
#import "KWMBarandSelectView.h"
#import "KWMProductDetailVC.h"
#import "KWMNewProductVC.h"
#import "KWMShopCartVC.h"
#import "KWMShopCartData.h"
#import "UIImageView+WebCache.h"
......@@ -232,14 +232,14 @@ static NSString *idStr = @"KWMBrandCaramelCell";
//点击左边商品回调
- (void)kwm_onClickLeftIamge:(KWMBrandCaramelCell *)brandCell{
KWMProductDetailVC *productDetailVC = (KWMProductDetailVC*)[KWMBaseVC findControllerBy:[KWMProductDetailVC kwmTag] fromStoryboard:@"New"];
KWMNewProductVC *productDetailVC = [KWMNewProductVC getNewInstance];
productDetailVC.product = brandCell.leftProduct;
[self.navigationController pushViewController:productDetailVC animated:YES];
}
//点击右边商品回调
- (void)kwm_onClickRightIamge:(KWMBrandCaramelCell *)brandCell{
KWMProductDetailVC *productDetailVC = (KWMProductDetailVC*)[KWMBaseVC findControllerBy:[KWMProductDetailVC kwmTag] fromStoryboard:@"New"];
KWMNewProductVC *productDetailVC = [KWMNewProductVC getNewInstance];
productDetailVC.product = brandCell.rightProduct;
[self.navigationController pushViewController:productDetailVC animated:YES];
}
......
......@@ -7,7 +7,7 @@
//
#import "KWMCategoryVC.h"
#import "KWMProductDetailVC.h"
#import "KWMNewProductVC.h"
#import "KWMShopCartVC.h"
#import "KWMNewProductVC.h"
#import "KWMSearchFeedbackVC.h"
......
......@@ -21,7 +21,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view
self.title = @"正文";
if(!self.title) self.title = @"正文";
self.automaticallyAdjustsScrollViewInsets = NO;
if (!self.handle) {
[self initData];
......
......@@ -154,7 +154,7 @@ typedef enum{
#pragma mark - KWMMenuDelegate
-(void)kwm_onClickHotMenu{
[self openURLWithString:@"https://cemarose.myshopify.com/collections/new?title=%E6%9C%80%E6%96%B0%E5%8D%95%E5%93%81"];
[self openURLWithString:@"https://cemarose.myshopify.com/collections/new?title=最新单品"];
}
-(void)kwm_onClickNewMenu{
......@@ -173,12 +173,12 @@ typedef enum{
-(void)kwm_onClickDeliveryMenu{
NSLog(@"deliverymenu");
[self openURLWithString:@"https://www.cemarose.com/pages/service-description/"];
[self openURLWithString:@"https://www.cemarose.com/pages/service-description/?title=服务说明"];
}
#pragma mark - KWMRecommendDelegate
-(void)kwm_gotoRecommendPage{
[self openURLWithString:@"https://cemarose.myshopify.com/collections/hot-sell-app"];
[self openURLWithString:@"https://cemarose.myshopify.com/collections/hot-sell-app?title=主推单品"];
}
#pragma mark - KWMRecommendDelegate KWMClothingSetsDelegate KWMHotSalesDelegate
......
......@@ -6,7 +6,7 @@
//// Copyright © 2017年 kollway. All rights reserved.
////
//
//#import "KWMProductDetailVC.h"
//#import "KWMNewProductVC.h"
//#import "KWMProductDetailView.h"
//#import "KWMBottomView.h"
//#import "KWMUserModel.h"
......
......@@ -9,7 +9,7 @@
#import "KWMSearchFeedbackVC.h"
#import "KWMBrandCaramelCell.h"
#import "KWMSearchFeedBackView.h"
#import "KWMProductDetailVC.h"
#import "KWMNewProductVC.h"
@interface KWMSearchFeedbackVC ()<UITableViewDelegate,UITableViewDataSource,KWMSearchFeedBackViewDelegate,KWMBrandCaramelCellDelegate>
@property (nonatomic) KWMSearchFeedBackView *vSearchFB;
......@@ -90,14 +90,14 @@ static NSString *idStr = @"KWMBrandCaramelCell";
#pragma mark -- KWMBrandCaramelCellDelegate
//点击左边商品回调
- (void)kwm_onClickLeftIamge:(KWMBrandCaramelCell *)brandCell{
KWMProductDetailVC *productDetailVC = (KWMProductDetailVC*)[KWMBaseVC findControllerBy:[KWMProductDetailVC kwmTag] fromStoryboard:@"New"];
KWMNewProductVC *productDetailVC = [KWMNewProductVC getNewInstance];
productDetailVC.productId = brandCell.leftDataProduct.id;
[self.navigationController pushViewController:productDetailVC animated:YES];
}
//点击右边商品回调
- (void)kwm_onClickRightIamge:(KWMBrandCaramelCell *)brandCell{
KWMProductDetailVC *productDetailVC = (KWMProductDetailVC*)[KWMBaseVC findControllerBy:[KWMProductDetailVC kwmTag] fromStoryboard:@"New"];
KWMNewProductVC *productDetailVC = [KWMNewProductVC getNewInstance];
productDetailVC.productId = brandCell.rightDataProduct.id;
[self.navigationController pushViewController:productDetailVC animated:YES];
}
......
......@@ -7,7 +7,7 @@
//
#import "KWMSelectedGoodsVC.h"
#import "KWMProductDetailVC.h"
#import "KWMNewProductVC.h"
#import "KWMBeforePayVC.h"
#import "KWMMineTitleView.h"
#import "MJRefresh.h"
......@@ -168,14 +168,14 @@ static NSString *idStr = @"KWMBrandCaramelCell";
//点击左边商品回调
- (void)kwm_onClickLeftIamge:(KWMBrandCaramelCell *)brandCell{
KWMProductDetailVC *productDetailVC = (KWMProductDetailVC*)[KWMBaseVC findControllerBy:[KWMProductDetailVC kwmTag] fromStoryboard:@"New"];
KWMNewProductVC *productDetailVC = [KWMNewProductVC getNewInstance];
productDetailVC.product = brandCell.leftProduct;
[self.navigationController pushViewController:productDetailVC animated:YES];
}
//点击右边商品回调
- (void)kwm_onClickRightIamge:(KWMBrandCaramelCell *)brandCell{
KWMProductDetailVC *productDetailVC = (KWMProductDetailVC*)[KWMBaseVC findControllerBy:[KWMProductDetailVC kwmTag] fromStoryboard:@"New"];
KWMNewProductVC *productDetailVC = [KWMNewProductVC getNewInstance];
productDetailVC.product = brandCell.rightProduct;
[self.navigationController pushViewController:productDetailVC animated:YES];
}
......
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