//
//  DsJsInteractAPI.m
//  westkissMob
//
//  Created by 王猛 on 2022/10/17.
//

#import "DsJsInteractAPI.h"
#import <CTMediator/CTMediator.h>


@implementation DsJsInteractAPI

#pragma mark - **************** H5调用iOS ****************
///返回支付的状态
-(NSString *)noteAppPayStatus:(NSDictionary *)msgDic{
    if([MM_str(msgDic[@"payStatus"]) integerValue] == 1){//成功
        NSLog(@"%@", MM_str(msgDic[@"from"]));
    }else{
        NSLog(@"%@", MM_str(msgDic[@"from"]));
    }
    
    if(self.dsWebC.WebViewBlock){
        self.dsWebC.WebViewBlock([MM_str(msgDic[@"payStatus"]) integerValue],  msgDic);
        [self.dsWebC dismissViewControllerAnimated:YES completion:nil];
    }
    
    return @"";
}
/// 点击返回按钮
-(NSString *)payResultPageBack:(NSDictionary *)msgDic{
    [self.dsWebC dismissViewControllerAnimated:YES completion:nil];
    return @"";
}


///跳转商品详情
-(NSString *)goto_pushGoodsDetailsC:(NSDictionary *)msgIc{
    NSMutableDictionary *params = [NSMutableDictionary dictionary];
    
    UIViewController *loginC = [[CTMediator sharedInstance] performTarget:@"Goods" action:@"GoodsDetaileC" params:params shouldCacheTarget:NO];

    return @"";
}
///跳转商品分类列表
-(NSString *)goto_pushProductListVC:(NSDictionary *)msgIc{
  
    return @"";
}

///跳转登录，获取登录相关信息
-(NSString *)present_LoginC:(NSString *)msg callback:(JSCallback) completionHandler{
  
    return @"";
}

///分享相关内容
-(void )share_click:(NSString *) msg callback:(JSCallback) completionHandler{
}


-(NSString *)provide_title:(NSString *)msg{
    if(msg.length>0){
        self.dsWebC.title = msg;
    }
    return @"";
}

-(NSString *)gettoken:(NSString *)msg{
    return @"";
}

@end
