Commit fed258b5 authored by mengcuiguang's avatar mengcuiguang

1.1.3发版

parent fb4ea988
...@@ -11,8 +11,8 @@ android { ...@@ -11,8 +11,8 @@ android {
applicationId "com.mints.highgold" applicationId "com.mints.highgold"
minSdkVersion rootProject.ext.androidMinSdkVersion minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 13 versionCode 14
versionName "1.1.2" versionName "1.1.3"
flavorDimensions "default" flavorDimensions "default"
// dex突破65535的限制 // dex突破65535的限制
......
...@@ -268,4 +268,6 @@ public interface Constant { ...@@ -268,4 +268,6 @@ public interface Constant {
String EVENT_TYPE_TWO = "2"; String EVENT_TYPE_TWO = "2";
String EVENT_TYPE_THREE = "3"; String EVENT_TYPE_THREE = "3";
String EVENT_TYPE_FOUR = "4"; String EVENT_TYPE_FOUR = "4";
String FRIENDS_SHOWPAGEFLAG = "FRIENDS_SHOWPAGEFLAG";
} }
\ No newline at end of file
package com.mints.highgold.ui.activitys; package com.mints.highgold.ui.activitys;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.content.ContextCompat; import android.support.v4.content.ContextCompat;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
...@@ -47,15 +48,16 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi ...@@ -47,15 +48,16 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
@Bind(R.id.tv_friendsnew_share) @Bind(R.id.tv_friendsnew_share)
TextView tvFriendsnewShare; TextView tvFriendsnewShare;
public static final String share_title = "【1元提现】帮我点一下,各得71元,我都提现100多了。"; public static final String share_title = "【赚钱啦】邀请好友得100元高额奖励!快点来赚钱吧!";
public static final String share_text = "每天十分钟,赚到14000,当天即可提现。"; public static final String share_text = "每邀请一个徒弟完成任务,就可赚到100元,徒弟越多奖励越多。";
private Drawable drawable; private Drawable drawable;
private String shareUrl;
private InsertScreenAdManager insertScreenAd; private InsertScreenAdManager insertScreenAd;
private int showPageFlag = 0;//0-默认邀请好友, 1-新邀请好友
@Override @Override
protected int getContentViewLayoutID() { protected int getContentViewLayoutID() {
return R.layout.activity_friends_new; return R.layout.activity_friends_new;
...@@ -64,16 +66,18 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi ...@@ -64,16 +66,18 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
@Override @Override
protected void initViewsAndEvents() { protected void initViewsAndEvents() {
tvActivityTitle.setText("邀好友,赚金币"); tvActivityTitle.setText("邀好友,赚金币");
tvFriendsnewShare.setText(new SpanUtils().append("分享到微信群,成功率提升") tvFriendsnewShare.setText(new SpanUtils().append("分享到微信群,成功率提升")
.append("300%").setForegroundColor(getResources().getColor(R.color.red)) .append("300%").setForegroundColor(getResources().getColor(R.color.red))
.create()); .create());
drawable = ContextCompat.getDrawable(getContext(), R.mipmap.ic_launcher); drawable = ContextCompat.getDrawable(getContext(), R.mipmap.ic_launcher);
shareUrl = BuildConfig.MainIp + "login.html?ruid=" + UserManager.getInstance().getUserID() + "&channel=android_share";
getFriendsUrl(); if (showPageFlag == 0) {
getFriendsUrl();
} else {
String url = BuildConfig.MainIp + "share/rewardRule.html";
blFriendsnewWebview.loadUrl(url);
}
insertScreenAd = new InsertScreenAdManager(FriendsNewActivity.this); insertScreenAd = new InsertScreenAdManager(FriendsNewActivity.this);
if (UserManager.getInstance().getAdShowFlag()) { if (UserManager.getInstance().getAdShowFlag()) {
...@@ -86,6 +90,14 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi ...@@ -86,6 +90,14 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
return false; return false;
} }
@Override
protected void getBundleExtras(Bundle extras) {
super.getBundleExtras(extras);
showPageFlag = extras.getInt(Constant.FRIENDS_SHOWPAGEFLAG, 0);
}
@Override @Override
protected void onDestroy() { protected void onDestroy() {
super.onDestroy(); super.onDestroy();
...@@ -100,6 +112,7 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi ...@@ -100,6 +112,7 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
} }
if (insertScreenAd != null) { if (insertScreenAd != null) {
insertScreenAd.setNextShowInteractionAd();
insertScreenAd.ondestory(); insertScreenAd.ondestory();
} }
} }
...@@ -118,9 +131,13 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi ...@@ -118,9 +131,13 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
finish(); finish();
break; break;
case R.id.share_weixin: case R.id.share_weixin:
Wechat.ShareParams wechat_sp = new Wechat.ShareParams(); Wechat.ShareParams wechat_sp = new Wechat.ShareParams();
wechat_sp.setShareType(Platform.SHARE_IMAGE); wechat_sp.setShareType(Platform.SHARE_WEBPAGE);
wechat_sp.setImageData(ImageUtil.drawableToBitmap(ContextCompat.getDrawable(getContext(), R.mipmap.bg_friendsnew_wechat))); wechat_sp.setTitle(share_title);
wechat_sp.setText(share_text);
wechat_sp.setImageData(ImageUtil.drawableToBitmap(drawable));
wechat_sp.setUrl(BuildConfig.MainIp + "share/shareFriend.html?ruid=" + UserManager.getInstance().getUserID() + "&channel=android_share_wechat");
Platform wechat = ShareSDK.getPlatform(Wechat.NAME); Platform wechat = ShareSDK.getPlatform(Wechat.NAME);
if (wechat.isClientValid()) { if (wechat.isClientValid()) {
wechat.setPlatformActionListener(FriendsNewActivity.this); // 设置分享事件回调 wechat.setPlatformActionListener(FriendsNewActivity.this); // 设置分享事件回调
...@@ -132,8 +149,11 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi ...@@ -132,8 +149,11 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
break; break;
case R.id.share_friends: case R.id.share_friends:
WechatMoments.ShareParams wechat_f_sp = new WechatMoments.ShareParams(); WechatMoments.ShareParams wechat_f_sp = new WechatMoments.ShareParams();
wechat_f_sp.setShareType(Platform.SHARE_IMAGE); wechat_f_sp.setShareType(Platform.SHARE_WEBPAGE);
wechat_f_sp.setImageData(ImageUtil.drawableToBitmap(ContextCompat.getDrawable(getContext(), R.mipmap.bg_friendsnew_friends))); wechat_f_sp.setTitle(share_title);
wechat_f_sp.setText(share_text);
wechat_f_sp.setUrl(BuildConfig.MainIp + "share/shareFriend.html?ruid=" + UserManager.getInstance().getUserID() + "&channel=android_share_friends");
wechat_f_sp.setImageData(ImageUtil.drawableToBitmap(drawable));
Platform wechat_f = ShareSDK.getPlatform(WechatMoments.NAME); Platform wechat_f = ShareSDK.getPlatform(WechatMoments.NAME);
if (wechat_f.isClientValid()) { if (wechat_f.isClientValid()) {
wechat_f.setPlatformActionListener(FriendsNewActivity.this); // 设置分享事件回调 wechat_f.setPlatformActionListener(FriendsNewActivity.this); // 设置分享事件回调
...@@ -149,10 +169,10 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi ...@@ -149,10 +169,10 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
// sp.setImageUrl("https://mints-gs.oss-cn-beijing.aliyuncs.com/pkg/mints_share/%E5%88%86%E4%BA%AB%E9%A1%B5%E5%A4%87%E4%BB%BD-QQ.png"); // sp.setImageUrl("https://mints-gs.oss-cn-beijing.aliyuncs.com/pkg/mints_share/%E5%88%86%E4%BA%AB%E9%A1%B5%E5%A4%87%E4%BB%BD-QQ.png");
// sp.setShareType(Platform.SHARE_IMAGE); // sp.setShareType(Platform.SHARE_IMAGE);
sp.setTitle(share_title); sp.setTitle(share_title);
sp.setTitleUrl(shareUrl); // 标题的超链接 sp.setTitleUrl(BuildConfig.MainIp + "share/shareFriend.html?ruid=" + UserManager.getInstance().getUserID() + "&channel=android_share_qq"); // 标题的超链接
sp.setText(share_text); sp.setText(share_text);
sp.setSite(getString(R.string.app_name)); sp.setSite(getString(R.string.app_name));
sp.setSiteUrl(shareUrl); sp.setSiteUrl(BuildConfig.MainIp + "share/shareFriend.html?ruid=" + UserManager.getInstance().getUserID() + "&channel=android_share_qq");
Platform qq = ShareSDK.getPlatform(QQ.NAME); Platform qq = ShareSDK.getPlatform(QQ.NAME);
if (qq.isClientValid()) { if (qq.isClientValid()) {
qq.setPlatformActionListener(FriendsNewActivity.this); // 设置分享事件回调 qq.setPlatformActionListener(FriendsNewActivity.this); // 设置分享事件回调
......
...@@ -302,7 +302,9 @@ public class MyFragment extends BaseFragment ...@@ -302,7 +302,9 @@ public class MyFragment extends BaseFragment
// readyGo(YilanVedioActivity.class); // readyGo(YilanVedioActivity.class);
break; break;
case Constant.HOT_ACTIVITY_YQHY: case Constant.HOT_ACTIVITY_YQHY:
readyGo(FriendsNewActivity.class); Bundle bundle = new Bundle();
bundle.putInt(Constant.FRIENDS_SHOWPAGEFLAG, 1);
readyGo(FriendsNewActivity.class, bundle);
break; break;
default: default:
showToast("该热门活动暂未开放"); showToast("该热门活动暂未开放");
...@@ -328,7 +330,7 @@ public class MyFragment extends BaseFragment ...@@ -328,7 +330,7 @@ public class MyFragment extends BaseFragment
String code = data.getIdcode(); String code = data.getIdcode();
if (!TextUtils.isEmpty(code)) { if (!TextUtils.isEmpty(code)) {
tvMyInvitecode.setText("邀请码:" + code); tvMyInvitecode.setText("ID:" + code);
} }
userConfig = data; userConfig = data;
...@@ -476,6 +478,9 @@ public class MyFragment extends BaseFragment ...@@ -476,6 +478,9 @@ public class MyFragment extends BaseFragment
if (TextUtils.equals(id, "rotationrcNews")) { if (TextUtils.equals(id, "rotationrcNews")) {
// 新闻资讯 兼容h5 iframe // 新闻资讯 兼容h5 iframe
readyGo(NewsWebviewActivity.class, bundle); readyGo(NewsWebviewActivity.class, bundle);
} else if (TextUtils.equals(id, "rotationcrFriend")) {
bundle.putInt(Constant.FRIENDS_SHOWPAGEFLAG, 1);
readyGo(FriendsNewActivity.class, bundle);
} else { } else {
readyGo(WebActivity.class, bundle); readyGo(WebActivity.class, bundle);
} }
......
...@@ -623,7 +623,9 @@ public class VersusFragment extends BaseFragment ...@@ -623,7 +623,9 @@ public class VersusFragment extends BaseFragment
break; break;
case R.id.ll_versus_friends://邀请好友 case R.id.ll_versus_friends://邀请好友
case R.id.tv_versus_friends: case R.id.tv_versus_friends:
readyGo(FriendsNewActivity.class); bundle = new Bundle();
bundle.putInt(Constant.FRIENDS_SHOWPAGEFLAG, 1);
readyGo(FriendsNewActivity.class,bundle);
break; break;
case R.id.ll_versus_drinkday://每日喝水达标 case R.id.ll_versus_drinkday://每日喝水达标
case R.id.tv_versus_drinkday: case R.id.tv_versus_drinkday:
...@@ -996,26 +998,26 @@ public class VersusFragment extends BaseFragment ...@@ -996,26 +998,26 @@ public class VersusFragment extends BaseFragment
viewVersusExchange.setVisibility(View.GONE); viewVersusExchange.setVisibility(View.GONE);
} }
//填写邀请码 Complete 0-未完成 1-完成 2-领取 // //填写邀请码 Complete 0-未完成 1-完成 2-领取
int challengeIdcodeComplete = data.getChallenge_idcode_complete(); // int challengeIdcodeComplete = data.getChallenge_idcode_complete();
if (challengeIdcodeComplete == 0) { // if (challengeIdcodeComplete == 0) {
llVersusCode.setVisibility(View.VISIBLE); // llVersusCode.setVisibility(View.VISIBLE);
viewVersusCode.setVisibility(View.VISIBLE); // viewVersusCode.setVisibility(View.VISIBLE);
tvVersusCodeGold.setText("+" + data.getChallenge_idcode_coin()); // tvVersusCodeGold.setText("+" + data.getChallenge_idcode_coin());
tvVersusCode.setText("去完成"); // tvVersusCode.setText("去完成");
tvVersusCode.setBackground(getResources().getDrawable(R.drawable.shape_main_water)); // tvVersusCode.setBackground(getResources().getDrawable(R.drawable.shape_main_water));
//
} else if (challengeIdcodeComplete == 1) { // } else if (challengeIdcodeComplete == 1) {
llVersusCode.setVisibility(View.VISIBLE); // llVersusCode.setVisibility(View.VISIBLE);
viewVersusCode.setVisibility(View.VISIBLE); // viewVersusCode.setVisibility(View.VISIBLE);
tvVersusCodeGold.setText("+" + data.getChallenge_idcode_coin()); // tvVersusCodeGold.setText("+" + data.getChallenge_idcode_coin());
tvVersusCode.setText("立即领取"); // tvVersusCode.setText("立即领取");
tvVersusCode.setBackground(getResources().getDrawable(R.drawable.shape_tv_gold)); // tvVersusCode.setBackground(getResources().getDrawable(R.drawable.shape_tv_gold));
//
} else { // } else {
llVersusCode.setVisibility(View.GONE); // llVersusCode.setVisibility(View.GONE);
viewVersusCode.setVisibility(View.GONE); // viewVersusCode.setVisibility(View.GONE);
} // }
//绑定微信号 Complete 0-未完成 1-完成 2-领取 //绑定微信号 Complete 0-未完成 1-完成 2-领取
......
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