Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a86cf97d74
@ -23,7 +23,7 @@ ext {
|
||||
baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB",
|
||||
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
||||
// true表示谷歌支付 false
|
||||
isGooglePlay : true,
|
||||
isGooglePlay : false,
|
||||
//是否上报异常日志
|
||||
isUploadLog : false
|
||||
]
|
||||
|
@ -117,7 +117,8 @@ public class EntryActivity extends AppCompatActivity {
|
||||
private LinearLayout btn_google;
|
||||
public static Activity activity;
|
||||
private static String mLoginType = Constants.MOB_PHONE;//登录方式
|
||||
public String mPromoCode = "";//推广码
|
||||
public String mPromoCode = "",UserID="";//推广码
|
||||
|
||||
private String mUuidDevice = "";//手机唯一标识符
|
||||
private static boolean mFirstLogin;//是否是第一次登录
|
||||
private static boolean mShowInvite;//显示邀请码弹窗
|
||||
@ -561,8 +562,13 @@ public class EntryActivity extends AppCompatActivity {
|
||||
Log.d("OpenInstall", "appData.getData()= " + appData.getData());
|
||||
//获取自定义数据
|
||||
if (appData.getData() != null && !appData.getData().equals("")) {
|
||||
JSONObject data = JSON.parseObject(appData.getData());
|
||||
mPromoCode = data.getString("admin_id") + "";
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == true) {
|
||||
|
||||
}else {
|
||||
JSONObject data = JSON.parseObject(appData.getData());
|
||||
mPromoCode = data.getString("admin_id") + "";
|
||||
UserID = data.getString("user_id") + "";
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -595,7 +601,7 @@ public class EntryActivity extends AppCompatActivity {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == true) {
|
||||
mPromoCode = "";
|
||||
}
|
||||
MainHttpUtil.loginByThird(data.getOpenID(), mPromoCode, mUuidDevice, data.getNickName(), data.getAvatar(), data.getType(), new HttpCallback() {
|
||||
MainHttpUtil.loginByThird(UserID,data.getOpenID(), mPromoCode, mUuidDevice, data.getNickName(), data.getAvatar(), data.getType(), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
onLoginSuccess(code, msg, info);
|
||||
|
@ -332,19 +332,19 @@ public class LoginActivity extends AbsActivity {
|
||||
this.finish();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 三方登录
|
||||
*/
|
||||
private void loginBuyThird(LoginData data) {
|
||||
mLoginType = data.getType();
|
||||
MainHttpUtil.loginByThird(data.getOpenID(), mPromoCode, mUuidDevice, data.getNickName(), data.getAvatar(), data.getType(), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
onLoginSuccess(code, msg, info);
|
||||
}
|
||||
});
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * 三方登录
|
||||
// */
|
||||
// private void loginBuyThird(LoginData data) {
|
||||
// mLoginType = data.getType();
|
||||
// MainHttpUtil.loginByThird(data.getOpenID(), mPromoCode, mUuidDevice, data.getNickName(), data.getAvatar(), data.getType(), new HttpCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
// onLoginSuccess(code, msg, info);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
//从网页获取推广码
|
||||
private void getPromoCode() {
|
||||
|
@ -86,6 +86,7 @@ public class RegisterActivity extends AbsActivity {
|
||||
private boolean mFirstLogin;//是否是第一次登录
|
||||
private boolean mShowInvite;
|
||||
private String mPromoCode = "";//推广码
|
||||
private String UserID = "";//用户推广码
|
||||
private String mUuidDevice = "";//手机唯一标识符
|
||||
private int mPhoneMinLength = 5;//输入手机号的最小位数
|
||||
private TextView mTvCountryCode;
|
||||
@ -370,7 +371,7 @@ public class RegisterActivity extends AbsActivity {
|
||||
}else{
|
||||
ti = edit_invitecode_2.getText().toString().trim();
|
||||
}
|
||||
MainHttpUtil.register(ti, phoneNum, mPromoCode, mUuidDevice, mCountryCode, pwd, pwd2, code, new HttpCallback() {
|
||||
MainHttpUtil.register(UserID,ti, phoneNum, mPromoCode, mUuidDevice, mCountryCode, pwd, pwd2, code, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
@ -405,9 +406,7 @@ public class RegisterActivity extends AbsActivity {
|
||||
//获取自定义数据
|
||||
if (appData.getData() != null && !appData.getData().equals("")) {
|
||||
JSONObject data = JSON.parseObject(appData.getData());
|
||||
if (!mPromoCode.equals("")) {
|
||||
yqm_view.setVisibility(View.GONE);
|
||||
}else if (CommonAppConfig.IS_GOOGLE_PLAY == true) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == true) {
|
||||
yqm_view.setVisibility(View.VISIBLE);
|
||||
MainHttpUtil.getDeviceLoginType(new HttpCallback() {
|
||||
@Override
|
||||
@ -419,12 +418,13 @@ public class RegisterActivity extends AbsActivity {
|
||||
}
|
||||
});
|
||||
}else{
|
||||
//推广的码
|
||||
yqm_view.setVisibility(View.GONE);
|
||||
//推广的码
|
||||
mPromoCode = data.getString("admin_id") + "";
|
||||
//用户的码
|
||||
mPromoCode = data.getString("user_id") + "";
|
||||
UserID = data.getString("user_id") + "";
|
||||
}
|
||||
Log.d("OpenInstall", "appData.getData()1111= " + mPromoCode);
|
||||
Log.d("OpenInstall", UserID+"appData.getData()1111= " + mPromoCode);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -77,7 +77,7 @@ public class MainHttpUtil {
|
||||
* 第三方登录---增加参数:推广码,手机唯一标识
|
||||
*/
|
||||
|
||||
public static void loginByThird(String openid, String promoCode, String uuidDevice, String nicename, String avatar, String type, HttpCallback callback) {
|
||||
public static void loginByThird(String UserID,String openid, String promoCode, String uuidDevice, String nicename, String avatar, String type, HttpCallback callback) {
|
||||
String sign = MD5Util.getMD5("openid=" + openid + "&" + SALT);
|
||||
HttpClient.getInstance().get("Login.userLoginByThird", MainHttpConsts.LOGIN_BY_THIRD)
|
||||
.params("openid", openid)
|
||||
@ -87,6 +87,7 @@ public class MainHttpUtil {
|
||||
.params("nicename", nicename)
|
||||
.params("avatar", avatar)
|
||||
.params("type", type)
|
||||
.params("user_id", UserID)
|
||||
.params("source", DEVICE)
|
||||
.params("sign", sign)
|
||||
.params("lastlogindevice", "Android")
|
||||
@ -551,13 +552,14 @@ public class MainHttpUtil {
|
||||
/**
|
||||
* 手机注册接口---增加参数:推广码,手机唯一标识,国家代码
|
||||
*/
|
||||
public static void register(String invitecode, String user_login, String promo_code, String uuidDevice, int countryCode, String pass, String pass2, String code, HttpCallback callback) {
|
||||
public static void register(String UserID,String invitecode, String user_login, String promo_code, String uuidDevice, int countryCode, String pass, String pass2, String code, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Login.userReg", MainHttpConsts.REGISTER)
|
||||
.params("user_login", user_login)
|
||||
.params("app_source", CommonAppConfig.IS_GOOGLE_PLAY==true?"1":"3")
|
||||
//增加参数:推广码
|
||||
.params("user_activation_key", promo_code)
|
||||
.params("admin_id", promo_code)
|
||||
.params("user_id", UserID)
|
||||
//增加参数:手机唯一标识
|
||||
.params("uuid_Device", uuidDevice)
|
||||
//增加国家代码
|
||||
|
Loading…
Reference in New Issue
Block a user