Przeglądaj źródła

1.【IOS端】分享时,未安装微信/未安装QQ时,点击微信/朋友圈,QQ时,不产生分享记录

huangxiaodong 1 rok temu
rodzic
commit
444f2a1923

+ 24 - 0
创维盒子/双子星云手机/Class/Set/previewFile/view/editShareView.m

@@ -10,6 +10,15 @@
 #import "customShareManageTool.h"
 #import "shareBySecretView.h"
 
+//微信分享头文件
+#import "WXApi.h"
+#import "WXApiObject.h"
+
+//QQ分享头文件
+#import <TencentOpenAPI/TencentOAuth.h>
+#import <TencentOpenAPI/QQApiInterface.h>
+#import <TencentOpenAPI/QQApiInterfaceObject.h>
+
 @interface editShareView ()
 @property(nonatomic,strong) UIButton*day7Button;
 @property(nonatomic,strong) UIButton*dayForeverButton;
@@ -244,6 +253,21 @@
         [self removeFromSuperview];
     }
     else{
+        if(tag == 11){
+            if(![QQApiInterface isSupportShareToQQ])
+            {
+                [[iToast makeText:@"未安装QQ,请先安装QQ"] show];
+                return;
+            }
+        }
+        else if (tag == 10 || tag == 12){
+            if(![WXApi isWXAppInstalled])
+            {
+                [[iToast makeText:@"未安装微信,请先安装微信"] show];
+                return;
+            }
+        }
+        
         //请求服务器处理分享数据
         [self addShareDataBy:tag];
     }