注册、第三方登录,新增推广码字段 agent_code
This commit is contained in:
parent
6ab70b4fcb
commit
094000ce57
@ -58,6 +58,7 @@ import com.facebook.login.LoginResult;
|
|||||||
import com.fm.openinstall.OpenInstall;
|
import com.fm.openinstall.OpenInstall;
|
||||||
import com.fm.openinstall.listener.AppInstallAdapter;
|
import com.fm.openinstall.listener.AppInstallAdapter;
|
||||||
import com.fm.openinstall.model.AppData;
|
import com.fm.openinstall.model.AppData;
|
||||||
|
import com.google.gson.Gson;
|
||||||
import com.linecorp.linesdk.Scope;
|
import com.linecorp.linesdk.Scope;
|
||||||
import com.linecorp.linesdk.auth.LineAuthenticationParams;
|
import com.linecorp.linesdk.auth.LineAuthenticationParams;
|
||||||
import com.linecorp.linesdk.auth.LineLoginApi;
|
import com.linecorp.linesdk.auth.LineLoginApi;
|
||||||
@ -126,7 +127,7 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
private LinearLayout btn_google, googleLayout,btn_phone;
|
private LinearLayout btn_google, googleLayout,btn_phone;
|
||||||
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 = "", UserID = "";//推广码
|
public String mPromoCode = "", UserID = "",agent_code = "";//推广码
|
||||||
|
|
||||||
private String mUuidDevice = "";//手机唯一标识符
|
private String mUuidDevice = "";//手机唯一标识符
|
||||||
private static boolean mFirstLogin;//是否是第一次登录
|
private static boolean mFirstLogin;//是否是第一次登录
|
||||||
@ -650,6 +651,7 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
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") + "";
|
UserID = data.getString("user_id") + "";
|
||||||
|
agent_code = data.getString("agent_code"+"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -683,7 +685,7 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2 || CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
if (CommonAppConfig.IS_GOOGLE_PLAY == 1 || CommonAppConfig.IS_GOOGLE_PLAY == 2 || CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
||||||
mPromoCode = "";
|
mPromoCode = "";
|
||||||
}
|
}
|
||||||
MainHttpUtil.loginByThird(UserID, data.getOpenID(), mPromoCode, mUuidDevice, data.getNickName(), data.getAvatar(), data.getType(), new HttpCallback() {
|
MainHttpUtil.loginByThird(UserID, agent_code,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);
|
||||||
@ -696,7 +698,6 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
private void onLoginSuccess(int code, String msg, String[] info) {
|
private void onLoginSuccess(int code, String msg, String[] info) {
|
||||||
Log.e("他", code + "code" + info.toString());
|
Log.e("他", code + "code" + info.toString());
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
|
|
||||||
JSONObject obj = JSON.parseObject(info[0]);
|
JSONObject obj = JSON.parseObject(info[0]);
|
||||||
String uid = obj.getString("id");
|
String uid = obj.getString("id");
|
||||||
String token = obj.getString("token");
|
String token = obj.getString("token");
|
||||||
|
@ -86,6 +86,7 @@ public class RegisterActivity extends AbsActivity {
|
|||||||
private boolean mShowInvite;
|
private boolean mShowInvite;
|
||||||
private String mPromoCode = "";//推广码
|
private String mPromoCode = "";//推广码
|
||||||
private String UserID = "";//用户推广码
|
private String UserID = "";//用户推广码
|
||||||
|
private String agent_code ="";//代理推广码
|
||||||
private String mUuidDevice = "";//手机唯一标识符
|
private String mUuidDevice = "";//手机唯一标识符
|
||||||
private int mPhoneMinLength = 5;//输入手机号的最小位数
|
private int mPhoneMinLength = 5;//输入手机号的最小位数
|
||||||
private TextView mTvCountryCode;
|
private TextView mTvCountryCode;
|
||||||
@ -371,7 +372,7 @@ public class RegisterActivity extends AbsActivity {
|
|||||||
} else {
|
} else {
|
||||||
ti = edit_invitecode_2.getText().toString().trim();
|
ti = edit_invitecode_2.getText().toString().trim();
|
||||||
}
|
}
|
||||||
MainHttpUtil.register(UserID, ti, phoneNum, mPromoCode, mUuidDevice, mCountryCode, pwd, pwd2, code, new HttpCallback() {
|
MainHttpUtil.register(UserID,agent_code, 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) {
|
||||||
@ -423,6 +424,9 @@ public class RegisterActivity extends AbsActivity {
|
|||||||
mPromoCode = data.getString("admin_id") + "";
|
mPromoCode = data.getString("admin_id") + "";
|
||||||
//用户的码
|
//用户的码
|
||||||
UserID = data.getString("user_id") + "";
|
UserID = data.getString("user_id") + "";
|
||||||
|
|
||||||
|
agent_code = data.getString("agent_code") + "";
|
||||||
|
|
||||||
}
|
}
|
||||||
Log.d("OpenInstall", UserID + "appData.getData()1111= " + mPromoCode);
|
Log.d("OpenInstall", UserID + "appData.getData()1111= " + mPromoCode);
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ public class MainHttpUtil {
|
|||||||
* 第三方登录---增加参数:推广码,手机唯一标识
|
* 第三方登录---增加参数:推广码,手机唯一标识
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static void loginByThird(String UserID, String openid, String promoCode, String uuidDevice, String nicename, String avatar, String type, HttpCallback callback) {
|
public static void loginByThird(String UserID,String agent_code, 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);
|
||||||
String appSource = "3";
|
String appSource = "3";
|
||||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||||
@ -98,6 +98,7 @@ public class MainHttpUtil {
|
|||||||
.params("app_source", appSource)
|
.params("app_source", appSource)
|
||||||
.params("admin_id", promoCode)
|
.params("admin_id", promoCode)
|
||||||
.params("uuid_Device", uuidDevice)
|
.params("uuid_Device", uuidDevice)
|
||||||
|
.params("agent_code",agent_code)
|
||||||
.params("nicename", nicename)
|
.params("nicename", nicename)
|
||||||
.params("avatar", avatar)
|
.params("avatar", avatar)
|
||||||
.params("type", type)
|
.params("type", type)
|
||||||
@ -341,6 +342,7 @@ public class MainHttpUtil {
|
|||||||
public static void getSettingList(HttpCallback callback) {
|
public static void getSettingList(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("huoqugexingshezhiliebiao", MainHttpConsts.GET_SETTING_LIST)
|
HttpClient.getInstance().get("huoqugexingshezhiliebiao", MainHttpConsts.GET_SETTING_LIST)
|
||||||
.params("version", VersionUtil.getVersion())
|
.params("version", VersionUtil.getVersion())
|
||||||
|
.params("package_name","poyo")
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -588,7 +590,7 @@ public class MainHttpUtil {
|
|||||||
/**
|
/**
|
||||||
* 手机注册接口---增加参数:推广码,手机唯一标识,国家代码
|
* 手机注册接口---增加参数:推广码,手机唯一标识,国家代码
|
||||||
*/
|
*/
|
||||||
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) {
|
public static void register(String UserID, String agent_code,String invitecode, String user_login, String promo_code, String uuidDevice, int countryCode, String pass, String pass2, String code, HttpCallback callback) {
|
||||||
String appSource = "3";
|
String appSource = "3";
|
||||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||||
appSource = "1";
|
appSource = "1";
|
||||||
@ -602,6 +604,7 @@ public class MainHttpUtil {
|
|||||||
.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("user_id", UserID)
|
||||||
|
.params("agent_code",agent_code)
|
||||||
//增加参数:手机唯一标识
|
//增加参数:手机唯一标识
|
||||||
.params("uuid_Device", uuidDevice)
|
.params("uuid_Device", uuidDevice)
|
||||||
//增加国家代码
|
//增加国家代码
|
||||||
|
Loading…
Reference in New Issue
Block a user