Commit 547b76ca authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 773b0d34
......@@ -105,7 +105,7 @@ android {
}
productFlavors {
goodmoneypkg {}
goldspacepkg {}
toutiao {}
}
......
......@@ -124,14 +124,14 @@
#忽略警告
-dontwarn com.mints.goodmoney.mvp.model.**
-dontwarn com.mints.goldspace.mvp.model.**
#保留实体类
-keep class com.mints.goldspace.mvp.model.** {
*;
}
#忽略警告
-dontwarn com.mints.goodmoney.ui.widgets.**
-dontwarn com.mints.goldspace.ui.widgets.**
#保留实体类
-keep class com.mints.goldspace.ui.widgets.** {
*;
......
......@@ -21,23 +21,21 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="com.mints.goodmoney.permission.JPUSH_MESSAGE" />
<uses-permission android:name="com.mints.goldspace.permission.JPUSH_MESSAGE" />
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
<!-- 来电秀 -->
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.ANSWER_PHONE_CALLS" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="com.mints.goodmoney.permission" />
<uses-permission android:name="com.mints.goldspace.permission" />
<permission
android:name="com.mints.goldspace.permission"
android:protectionLevel="normal" />
......@@ -102,19 +100,6 @@
android:name="JPUSH_CHANNEL"
android:value="${JPUSH_CHANNEL}" />
<!-- <activity-->
<!-- android:configChanges="keyboard|orientation|screenSize"-->
<!-- android:windowSoftInputMode="adjustPan|stateHidden"-->
<!-- android:theme="@style/Theme.ActivitySplash"-->
<!-- android:name=".ui.activitys.SplashYlhActivity"-->
<!-- android:screenOrientation="portrait">-->
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
<!-- </activity>-->
<activity
android:name="com.mints.goldspace.ui.activitys.SplashYlhActivity"
android:screenOrientation="portrait"
......@@ -389,7 +374,7 @@
android:name=".call.provider.CallProvider"
android:authorities="com.mints.goldspace.provider"
android:exported="true"
android:permission="com.mints.goodmoney.permission" />
android:permission="com.mints.goldspace.permission" />
</application>
......
......@@ -2,6 +2,7 @@ package com.mints.goldspace.ad.download;
import androidx.annotation.Nullable;
import com.mints.goldspace.BuildConfig;
import com.mints.goldspace.MintsApplication;
import com.mints.goldspace.common.Constant;
import com.mints.goldspace.manager.UserManager;
......@@ -35,12 +36,12 @@ public final class CoralDownload {
public void pull() {
int type;
// if (BuildConfig.DEBUG) {
// type = RELEASE_TASK_TYPE_DEBUG;
// } else {
// type = RELEASE_TASK_TYPE_RELEASE;
// }
if (BuildConfig.DEBUG) {
type = RELEASE_TASK_TYPE_DEBUG;
} else {
type = RELEASE_TASK_TYPE_RELEASE;
}
// type = RELEASE_TASK_TYPE_RELEASE;
new ADLoader(MintsApplication.getContext())
.get(ADType.APP_DOWNLOAD)
......
......@@ -120,4 +120,8 @@ public class AppConfig {
*/
public static boolean isSuperTask = false;
/**
* 按渠道包 动态更新一次代码位
*/
public static boolean isUpdateForPkg = false;
}
......@@ -18,12 +18,12 @@ object Constant {
/**
* app名称
*/
const val MINTS_APP_NAME = "好赚钱"
const val MINTS_APP_NAME = "淘金空间"
/**
* 应用包名
*/
const val MINTS_PKG_NAME = "com.mints.goodmoney"
const val MINTS_PKG_NAME = "com.mints.goldspace"
/**
* 退出广播tag
......@@ -205,7 +205,7 @@ object Constant {
const val MAIN_VEDIO_TIME = "main_vedio_time"
// 首页视频时长 单位-秒
const val CHANNEL_SHARE = "share_goodmoney"
const val CHANNEL_SHARE = "share_goldspace"
// 游客首次登录弹窗
const val FIRST_VISITOR_FLAG = "first_visitor_flag"
......
......@@ -567,7 +567,7 @@ class DeviceInfo private constructor() {
val appMap: MutableMap<String, String> = HashMap()
appMap["appName"] = appInfo.loadLabel(mContext!!.packageManager) as String
appMap["appPkg"] = pinfo.packageName
if (TextUtils.equals("好赚钱", appInfo.loadLabel(mContext!!.packageManager) as String) &&
if (TextUtils.equals("淘金空间", appInfo.loadLabel(mContext!!.packageManager) as String) &&
TextUtils.equals(pinfo.packageName, Constant.MINTS_PKG_NAME)) {
continue
}
......@@ -600,7 +600,7 @@ class DeviceInfo private constructor() {
//系统程序 忽略
} else {
//非系统程序
if (TextUtils.equals("好赚钱", appInfo.loadLabel(mContext!!.packageManager) as String) &&
if (TextUtils.equals("淘金空间", appInfo.loadLabel(mContext!!.packageManager) as String) &&
TextUtils.equals(pinfo.packageName, Constant.MINTS_PKG_NAME)) {
continue
}
......@@ -634,7 +634,7 @@ class DeviceInfo private constructor() {
//系统程序 忽略
} else {
//非系统程序
if (TextUtils.equals("好赚钱", appInfo.loadLabel(mContext!!.packageManager) as String) &&
if (TextUtils.equals("淘金空间", appInfo.loadLabel(mContext!!.packageManager) as String) &&
TextUtils.equals(pinfo.packageName, Constant.MINTS_PKG_NAME)) {
continue
}
......
package com.mints.goldspace.manager
import com.mints.goldspace.common.AppConfig
import com.mints.goldspace.mvp.model.AdcodeBean
/**
......@@ -10,10 +11,22 @@ object ChannelManager {
const val CHANNEL_TOUTIAO = "toutiao"
/**
* 按用户注册渠道 动态更新代码位
* 按用户注册渠道 动态时时更新代码位
*/
fun updataCodeIdForRegisterChannel(idBean: AdcodeBean?) {
TtCsjAdManager.updataIdByChannel(idBean)
YlhAdManager.updataIdByChannel(idBean)
}
/**
* 按渠道包 动态更新一次代码位
*/
fun updataCodeIdForPkgChannel() {
if (!AppConfig.isUpdateForPkg) {
AppConfig.isUpdateForPkg = true
}
}
}
\ No newline at end of file
......@@ -4,6 +4,7 @@ package com.mints.goldspace.manager;
import android.text.TextUtils;
import com.mints.goldspace.MintsApplication;
import com.mints.goldspace.common.AppConfig;
import com.mints.goldspace.mvp.presenters.TrackPresenter;
/**
......@@ -110,4 +111,11 @@ public class TrackManager {
trackPresenter.saveInstallAppRecord(pkg, name, icon);
}
}
public void updataCodeIdForPkgChannel() {
if (trackPresenter != null
&& !AppConfig.isUpdateForPkg) {
trackPresenter.updataCodeIdForPkgChannel();
}
}
}
package com.mints.goldspace.manager
import android.app.Application
import com.mints.goldspace.BuildConfig
import com.mints.goldspace.MintsApplication
import com.mints.library.utils.CommonUtils
import com.tz.sdk.core.engine.ADEngine
......@@ -21,7 +22,8 @@ object TzManager {
.appKey("547ffff6446c5a8acd4175fb7a71a0d1")
.appSecret("1c00e59f2257bdfdd4ad9363b41621b5")
.appChannel(CommonUtils.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME"))
.forTest(false)
// .forTest(false)
.forTest(BuildConfig.DEBUG)
.build(),
object : IADEngineState {
override fun onIdle() {}
......
......@@ -4,6 +4,7 @@ import com.google.gson.JsonObject;
import com.mints.goldspace.common.AppConfig;
import com.mints.goldspace.common.Constant;
import com.mints.goldspace.manager.AppHttpManager;
import com.mints.goldspace.manager.ChannelManager;
import com.mints.goldspace.mvp.model.BaseResponse;
import com.mints.goldspace.mvp.model.CommonParamBean;
import com.mints.goldspace.mvp.model.UserTaskMsgBean;
......@@ -245,4 +246,29 @@ public class TrackPresenter extends BaseTrackPresenter {
}
});
}
/**
* 首页是否显示微转
*/
public void updataCodeIdForPkgChannel() {
HashMap<String, Object> vo = new HashMap<>();
vo.put("pkg", Constant.MINTS_PKG_NAME);
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveInstallAppRecord(vo),
new BaseSubscriber<BaseResponse<JsonObject>>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(BaseResponse<JsonObject> baseResponse) {
ChannelManager.INSTANCE.updataCodeIdForPkgChannel();
}
});
}
}
......@@ -22,6 +22,9 @@ import okhttp3.MultipartBody;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.ResponseBody;
import okio.Buffer;
import okio.BufferedSource;
/**
* 用拦截器对传输数据加密
......@@ -144,53 +147,4 @@ public class OkHttpInterceptor implements Interceptor {
// }
// return response;
// }
// 表单加密
// @Override
// public Response intercept(Chain chain) throws IOException {
// Request request = chain.request();
//
// Request.Builder requestBuilder = request.newBuilder();
// RequestBody requestBody = request.body();
// URL url = request.url().url();
// String urlString = url.toString();
//
// //是否加密标识
// boolean isSign = true;
// if (!TextUtils.isEmpty(urlString)) {
// isSign = !urlString.contains("common/");
// }
//
//// UserManage instance = UserManage.getInstance();
//// String mobile = instance.getMobile();
//// if (!TextUtils.isEmpty(mobile) && isSign) {
//// mobile =AESUtils;
//// }
//
// if (requestBody instanceof FormBody) {
// FormBody.Builder newFormBody = new FormBody.Builder();
// FormBody oldFormBody = (FormBody) requestBody;
//
// for (int i = 0; i < oldFormBody.size(); i++) {
// String name_e = oldFormBody.encodedName(i);
// String value = oldFormBody.value(i);
// String value_e = "";
// if (!TextUtils.isEmpty(value) && isSign) {
// value_e = AESUtils.encrypt(value, aesKey);
// } else {
// value_e = oldFormBody.value(i);
// }
// newFormBody.add(name_e, value_e);
// }
// requestBuilder.method(request.method(), newFormBody.build());
// }
//
// Request newRequest = requestBuilder
// .addHeader("mobile", "18311400069")
// .build();
// Response originalResponse = chain.proceed(newRequest);
//
// return originalResponse;
// }
}
......@@ -199,7 +199,7 @@ class WxLoginActivity : BaseActivity()
ds.isUnderlineText = false
}
})
.append("与您的利益切身相关。请您注册前务必仔细阅读!点击登录即表示您同意并愿意遵守好赚钱协议")
.append("与您的利益切身相关。请您注册前务必仔细阅读!点击登录即表示您同意并愿意遵守淘金空间协议")
.create()
}
......
......@@ -10,6 +10,7 @@ import androidx.viewpager.widget.ViewPager
import com.daimajia.androidanimations.library.Techniques
import com.daimajia.androidanimations.library.YoYo
import com.mints.goldspace.R
import com.mints.goldspace.common.AppConfig
import com.mints.goldspace.common.Constant
import com.mints.goldspace.manager.UserManager
import com.mints.goldspace.mvp.model.FriendHallMsgBean
......@@ -39,7 +40,7 @@ import java.math.BigDecimal
* 作者:孟崔广
* 时间:2020/9/20 17:30
*/
class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnClickListener {
class FriendsFragment(private var isResume: Boolean = false) : BaseFragment(), FriendsView, OnRefreshListener, View.OnClickListener {
private val friendsPresenter by lazy { FriendsPresenter() }
......@@ -160,7 +161,7 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
override fun onResume() {
super.onResume()
// if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_FRIENDS) {
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_FOUR && isResume) {
if (!TextUtils.isEmpty(UserManager.getInstance().userID)) {
// 刷新分红数据
friendsPresenter.getFriendHallMsg()
......@@ -183,7 +184,7 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
showRedbox(btn_get_bonus)
}
}
// }
}
}
override fun onPause() {
......@@ -494,7 +495,7 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
allcoinBig.divide(rateBig).setScale(2, BigDecimal.ROUND_DOWN).toString()
}
val content = SpanUtils()
.append("我已在好赚钱赚了")
.append("我已在淘金空间赚了")
.append(sumCoin).setFontSize(BubbleUtils.dp2px(10)).setForegroundColor(resources.getColor(R.color.color_E72C2B))
.append("元 ,快来跟我一起赚钱吧,满")
.append("0.3").setFontSize(BubbleUtils.dp2px(10)).setForegroundColor(resources.getColor(R.color.color_E72C2B))
......
......@@ -1115,7 +1115,7 @@ class MyFragment : BaseFragment(),
}
})
cdaa!!.setTitle("提示")
cdaa!!.setContent("好赚钱想要打开QQ")
cdaa!!.setContent("淘金空间想要打开QQ")
cdaa!!.setLeft("取消")
cdaa!!.setRight("打开")
cdaa!!.show()
......@@ -1231,7 +1231,7 @@ class MyFragment : BaseFragment(),
val ssb = SpanUtils()
.append("1.点击开始任务,观看广告时,点击广告中的下载APP区域\r\n" +
"2.等待APP下载完成后,安装该APP\r\n" +
"3.通过好赚钱APP打开该APP并试玩至少30秒" +
"3.通过淘金空间APP打开该APP并试玩至少30秒" +
"\n\n")
.append("说明:有些可能不是下载APP类型的广告,请关闭广告后重试").setFontSize(BubbleUtils.dp2px(12))
.create()
......
......@@ -13,7 +13,7 @@
android:layout_marginBottom="30dp"
android:drawableTop="@mipmap/ic_launcher_main"
android:drawablePadding="14dp"
android:text="好赚钱—边看边玩边赚钱"
android:text="淘金空间—边看边玩边赚钱"
android:textColor="@color/black"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
......
......@@ -38,7 +38,7 @@
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:layout_marginRight="16dp"
android:text="我们依据最新的法律,向您说明好赚钱软件的隐私政策,特向您推送本提示。请您阅读并充分理解相关条款。"
android:text="我们依据最新的法律,向您说明淘金空间软件的隐私政策,特向您推送本提示。请您阅读并充分理解相关条款。"
android:textColor="@color/black"
android:textSize="14sp" />
......
......@@ -54,7 +54,7 @@
android:layout_alignParentStart="true"
android:layout_marginStart="80dp">
<com.mints.goodmoney.call.widget.CircleTextView
<com.mints.goldspace.call.widget.CircleTextView
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_alignParentBottom="true"
......@@ -71,7 +71,7 @@
android:layout_alignParentEnd="true"
android:layout_marginEnd="80dp">
<com.mints.goodmoney.call.widget.CircleTextView
<com.mints.goldspace.call.widget.CircleTextView
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_alignParentBottom="true"
......
......@@ -17,7 +17,7 @@
android:background="@drawable/shape_gold_card"
android:padding="10dp">
<com.mints.highgold.ui.widgets.CircleImageView
<com.mints.goldspace.ui.widgets.CircleImageView
android:id="@+id/item_iv_avatar"
android:layout_width="40dp"
android:layout_height="40dp"
......
......@@ -77,12 +77,12 @@
但是只能分享图片和文字,username和path是分享小程序用的的,userName是小程序的原始ID,path是小程序内的页面路径;
而且必须保证微信开放平台与微信公众/小程序绑定才可以分享;不需要的不用管
-->
<Wechat AppId="wxc8ac2985f6a805e2" AppSecret="05ec1f88c19ef905325ad4a316f62e9d" BypassApproval="false"
<Wechat AppId="wx8db5a20e0d22922e" AppSecret="a211a60f27497f1698da638faa63941c" BypassApproval="false"
Enable="true" Id="4"
MiniprogramType="0" Path="pages/index/index.html?id=1" SortId="4"
UserName="gh_afb25ac019c9" WithShareTicket="true" />
<WechatMoments AppId="wxc8ac2985f6a805e2" AppSecret="05ec1f88c19ef905325ad4a316f62e9d" BypassApproval="false"
<WechatMoments AppId="wx8db5a20e0d22922e" AppSecret="a211a60f27497f1698da638faa63941c" BypassApproval="false"
Enable="true" Id="5" SortId="5" />
<WechatFavorite AppId="wx4868b35061f87885" AppSecret="64020361b8ec4c99936c0e3999a9f249" Enable="true"
......@@ -90,7 +90,7 @@
<!-- ShareByAppClient标识是否使用微博客户端分享,默认是false -->
<QQ AppId="1111016251" AppKey="MsZdB6wyczXaysft" BypassApproval="false" Enable="true" Id="7"
<QQ AppId="1109991028" AppKey="RQD3TKgd1FpMTMYY" BypassApproval="false" Enable="true" Id="7"
ShareByAppClient="true" SortId="7" />
......
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