|
|
@@ -38,19 +38,19 @@ import static com.sheep.jiuyan.samllsheep.utils.ClassFileHelper.DIR;
|
|
|
public class AdHelper {
|
|
|
|
|
|
// 返回true 为apk下载
|
|
|
- public static boolean goAdLink(Context activity, SheepAd advertising) {
|
|
|
+ public static boolean goAdLink(Context context, SheepAd advertising) {
|
|
|
if (TextUtils.isEmpty(SpUtils.getToken(SheepApp.getInstance()))) {
|
|
|
- Jump2View.getInstance().goLoginView(activity, null);
|
|
|
- if (activity instanceof SplashAct) {
|
|
|
- ((Activity) activity).finish();
|
|
|
+ Jump2View.getInstance().goLoginView(context, null);
|
|
|
+ if (context instanceof SplashAct) {
|
|
|
+ ((Activity) context).finish();
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
if (advertising.getJump_type() == 1) {
|
|
|
if (advertising.getJump_form() == 1) {
|
|
|
- Jump2View.getInstance().goWeb(activity, advertising.getJump_url(), advertising.getName());
|
|
|
+ Jump2View.getInstance().goWeb(context, advertising.getJump_url(), advertising.getName());
|
|
|
} else {
|
|
|
- Jump2View.getInstance().goWeb(activity, advertising.getJump_url());
|
|
|
+ Jump2View.getInstance().goWeb(context, advertising.getJump_url());
|
|
|
}
|
|
|
AdHelper.stat(advertising.getAd_id(), 2);
|
|
|
return false;
|
|
|
@@ -61,12 +61,12 @@ public class AdHelper {
|
|
|
Jump2View.getInstance().startDownloadService(advertising.getJump_url(), filePath);
|
|
|
G.showToast("开始下载...");
|
|
|
} else {
|
|
|
- Jump2View.getInstance().goWeb(activity, advertising.getJump_url());
|
|
|
+ Jump2View.getInstance().goWeb(context, advertising.getJump_url());
|
|
|
}
|
|
|
AdHelper.stat(advertising.getAd_id(), 3);
|
|
|
return advertising.getJump_form() == 1;
|
|
|
}
|
|
|
- CommonUtil.getInstance().clickAd(activity, advertising.getAd_id(), advertising.getLink_type(), advertising.getLink_id());
|
|
|
+ CommonUtil.getInstance().clickAd(context, advertising.getAd_id(), advertising.getLink_type(), advertising.getLink_id());
|
|
|
return false;
|
|
|
}
|
|
|
|