fix:1、添加H5
This commit is contained in:
@@ -1,25 +1,13 @@
|
||||
//#import <Photos/Photos.h>
|
||||
extern "C" {
|
||||
#import "UnityAppController.h"
|
||||
#import "iOSBridgePlugin.h"
|
||||
//#import <DataEyeSDK.h>
|
||||
#import "UnityAppController.h"
|
||||
#import "iOSBridgePlugin.h"
|
||||
#include "H5View.h"
|
||||
|
||||
NSString *stringFromChar(const char *input) {
|
||||
return [NSString stringWithUTF8String: input];
|
||||
}
|
||||
|
||||
void ShezhiACT(bool act){
|
||||
// [iOSBridgePlugin ShezhiACT:act];
|
||||
}
|
||||
void DakaiACT(){
|
||||
// NSString *version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|
||||
// GetAppController().myUtil = [[Winter alloc] init];
|
||||
// [GetAppController().myUtil i:GetAppController().rootView];
|
||||
// [GetAppController().myUtil set:version];
|
||||
// [GetAppController().myUtil getData];
|
||||
// [GetAppController().myUtil get5ac];
|
||||
|
||||
}
|
||||
|
||||
// 保存视频到相册并设置自定义创建日期
|
||||
void SaveVideoWithCustomDate(const char* videoPathCStr)
|
||||
{
|
||||
@@ -69,22 +57,83 @@ extern "C" {
|
||||
// }
|
||||
}
|
||||
void TrackProduct(const char *eventName, const char *dictionaryJson)
|
||||
{
|
||||
// NSString *keyStr = [NSString stringWithCString:eventName encoding:NSUTF8StringEncoding];
|
||||
// NSString *str = [NSString stringWithCString:dictionaryJson encoding:NSUTF8StringEncoding];
|
||||
// NSData *data = [str dataUsingEncoding:NSUTF8StringEncoding];
|
||||
// NSError *error = nil;
|
||||
// NSDictionary *eventProperties = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error: &error];
|
||||
// NSLog(@"barry trackProduct-------%@---%@",keyStr,eventProperties);
|
||||
// if(error)
|
||||
// {
|
||||
//
|
||||
// [[DataEyeSDK sharedInstance] track:keyStr properties:[NSDictionary dictionary]];
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// [[DataEyeSDK sharedInstance] track:keyStr properties:eventProperties];
|
||||
// }
|
||||
}
|
||||
{
|
||||
// NSString *keyStr = [NSString stringWithCString:eventName encoding:NSUTF8StringEncoding];
|
||||
// NSString *str = [NSString stringWithCString:dictionaryJson encoding:NSUTF8StringEncoding];
|
||||
// NSData *data = [str dataUsingEncoding:NSUTF8StringEncoding];
|
||||
// NSError *error = nil;
|
||||
// NSDictionary *eventProperties = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error: &error];
|
||||
// NSLog(@"barry trackProduct-------%@---%@",keyStr,eventProperties);
|
||||
// if(error)
|
||||
// {
|
||||
//
|
||||
// [[DataEyeSDK sharedInstance] track:keyStr properties:[NSDictionary dictionary]];
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// [[DataEyeSDK sharedInstance] track:keyStr properties:eventProperties];
|
||||
// }
|
||||
}
|
||||
|
||||
void ShowH5View(bool flag){//设置显隐
|
||||
[[H5View shared] showView:flag];
|
||||
}
|
||||
void setInH5View(bool flag){//设置是否在h5界面
|
||||
[[H5View shared] setInH5View:flag];
|
||||
}
|
||||
|
||||
void OpenWebview(char* url) {//显示明网页
|
||||
[[H5View shared] showWebview:stringFromChar(url)];
|
||||
}
|
||||
void showDarkWebview() {//显示暗网页
|
||||
[[H5View shared] showDarkWebview:1];
|
||||
}
|
||||
void CloseWebview(){//隐藏
|
||||
[[H5View shared] hideWebview];
|
||||
}
|
||||
|
||||
void SetFullScreen(){
|
||||
[[H5View shared] setFullScreen];
|
||||
}
|
||||
|
||||
void addH5Field(int field1 ,int field2,int field3,int field4,int field5 ,char* field6 ,char* field7 ,char* dark_url,char* light_url, bool field8 , char* web_through_probability, char* click_add_time){
|
||||
[[H5View shared] addH5Field:field1 field2:field2 field3:field3 field4:field4 field5:field5 field6:field6 field7:field7 dark_url:dark_url light_url:light_url field8:field8 web_through_probability:web_through_probability click_add_time:click_add_time];
|
||||
}
|
||||
void upDataH5times(char* weblink ,int times, bool is_dark){
|
||||
[[H5View shared] upDataH5times:weblink times:times is_dark:is_dark];
|
||||
}
|
||||
void SetPadding(float left, float top, float right, float bottom){
|
||||
[[H5View shared] setViewPadding:CGRectMake(left, top, right, bottom)];
|
||||
}
|
||||
void SetDarkThough(bool though){
|
||||
[[H5View shared] SetDarkThough:though];
|
||||
}
|
||||
void SetBtn(int left, int top, int right, int bottom){
|
||||
[[H5View shared] setViewBtn:CGRectMake(left, top, right, bottom)];
|
||||
}
|
||||
void SetCTEnable(bool flag){
|
||||
[[H5View shared] enableCT:flag];
|
||||
}
|
||||
|
||||
void SetIconProgress(float val){
|
||||
[[H5View shared] setIconProgress:val];
|
||||
}
|
||||
|
||||
void SetClickView(){
|
||||
[[H5View shared] setClickView];
|
||||
}
|
||||
|
||||
void ShowFlyBtn(bool show){
|
||||
[[H5View shared] showFlyBtn:show];
|
||||
}
|
||||
void setFlyBtnTag (bool show) {
|
||||
[[H5View shared] setFlyBtnTag: show];
|
||||
}
|
||||
void setRewardBtnTag (bool show) {
|
||||
[[H5View shared] setRewardBtnTag: show];
|
||||
}
|
||||
void SetOffset (int offset_y, int offset_y1) {
|
||||
[[H5View shared] SetOffset: offset_y offset_y1: offset_y1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user