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