Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4b6b477351
@ -23,7 +23,7 @@ ext {
|
|||||||
baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB",
|
baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB",
|
||||||
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
||||||
// true表示谷歌支付 false
|
// true表示谷歌支付 false
|
||||||
isGooglePlay : false,
|
isGooglePlay : true,
|
||||||
//是否上报异常日志
|
//是否上报异常日志
|
||||||
isUploadLog : false
|
isUploadLog : false
|
||||||
]
|
]
|
||||||
|
@ -110,7 +110,6 @@ public class LoginActivity extends AbsActivity {
|
|||||||
String channelCode = appData.getChannel();
|
String channelCode = appData.getChannel();
|
||||||
//获取自定义数据
|
//获取自定义数据
|
||||||
String bindData = appData.getData();
|
String bindData = appData.getData();
|
||||||
Toast.makeText(LoginActivity.this, "" + appData.toString(), Toast.LENGTH_LONG);
|
|
||||||
Log.d("OpenInstall", "getInstall : installData = " + appData.toString());
|
Log.d("OpenInstall", "getInstall : installData = " + appData.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -20,6 +20,7 @@ import android.widget.EditText;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@ -119,6 +120,8 @@ public class RegisterActivity extends AbsActivity {
|
|||||||
mBtnRegister = findViewById(R.id.btn_register);
|
mBtnRegister = findViewById(R.id.btn_register);
|
||||||
edit_invitecode_2 = (EditText) findViewById(R.id.edit_invitecode_2);
|
edit_invitecode_2 = (EditText) findViewById(R.id.edit_invitecode_2);
|
||||||
yqm_view = (LinearLayout) findViewById(R.id.yqm_view);
|
yqm_view = (LinearLayout) findViewById(R.id.yqm_view);
|
||||||
|
//获取设备唯一标识符
|
||||||
|
getUuidDevice();
|
||||||
getPromoCode();
|
getPromoCode();
|
||||||
|
|
||||||
mGetCode = WordUtil.getString(R.string.reg_get_code);
|
mGetCode = WordUtil.getString(R.string.reg_get_code);
|
||||||
@ -275,8 +278,7 @@ public class RegisterActivity extends AbsActivity {
|
|||||||
int i = v.getId();
|
int i = v.getId();
|
||||||
if (i == R.id.btn_code) {
|
if (i == R.id.btn_code) {
|
||||||
webview.setVisibility(View.VISIBLE);
|
webview.setVisibility(View.VISIBLE);
|
||||||
//获取设备唯一标识符
|
|
||||||
getUuidDevice();
|
|
||||||
} else if (i == R.id.btn_register) {
|
} else if (i == R.id.btn_register) {
|
||||||
register();
|
register();
|
||||||
} else if (i == R.id.btn_tip2) {
|
} else if (i == R.id.btn_tip2) {
|
||||||
@ -361,8 +363,13 @@ public class RegisterActivity extends AbsActivity {
|
|||||||
if (mDialog != null) {
|
if (mDialog != null) {
|
||||||
mDialog.show();
|
mDialog.show();
|
||||||
}
|
}
|
||||||
|
String ti = "";
|
||||||
MainHttpUtil.register(edit_invitecode_2.getText().toString().trim(), phoneNum, mPromoCode, mUuidDevice, mCountryCode, pwd, pwd2, code, new HttpCallback() {
|
if (edit_invitecode_2.getText().toString().trim().equals("此設備已註冊")){
|
||||||
|
ti = "";
|
||||||
|
}else{
|
||||||
|
ti = edit_invitecode_2.getText().toString().trim();
|
||||||
|
}
|
||||||
|
MainHttpUtil.register(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) {
|
||||||
@ -397,9 +404,24 @@ 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());
|
||||||
mPromoCode = data.getString("admin_id") + "";
|
|
||||||
if (!mPromoCode.equals("")) {
|
if (!mPromoCode.equals("")) {
|
||||||
yqm_view.setVisibility(View.GONE);
|
yqm_view.setVisibility(View.GONE);
|
||||||
|
}else if (CommonAppConfig.IS_GOOGLE_PLAY == true) {
|
||||||
|
yqm_view.setVisibility(View.VISIBLE);
|
||||||
|
MainHttpUtil.getDeviceLoginType(new HttpCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
if(code == 201){
|
||||||
|
edit_invitecode_2.setText("此設備已註冊");
|
||||||
|
edit_invitecode_2.setEnabled(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
//推广的码
|
||||||
|
mPromoCode = data.getString("admin_id") + "";
|
||||||
|
//用户的码
|
||||||
|
mPromoCode = data.getString("user_id") + "";
|
||||||
}
|
}
|
||||||
Log.d("OpenInstall", "appData.getData()1111= " + mPromoCode);
|
Log.d("OpenInstall", "appData.getData()1111= " + mPromoCode);
|
||||||
}
|
}
|
||||||
|
@ -703,6 +703,15 @@ public class MainHttpUtil {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获取设备号有没有注册过
|
||||||
|
*/
|
||||||
|
public static void getDeviceLoginType( HttpCallback callback) {
|
||||||
|
HttpClient.getInstance().get("Login.getDeviceLoginType", "Login.getDeviceLoginType")
|
||||||
|
.params("uuid_Device", DeviceUtils.getUniqueDeviceId())
|
||||||
|
.execute(callback);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user