Commit b083d53a authored by linfeng's avatar linfeng

Merge branch 'master-price' of http://113.105.137.151:22280/lify/rvapp into master-video

parents 8b649cda 1c3bbf37
...@@ -8,8 +8,8 @@ android { ...@@ -8,8 +8,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
flavorDimensions "default" flavorDimensions "default"
versionCode 155 versionCode 154
versionName "1.5.5" versionName "1.5.4"
multiDexEnabled true multiDexEnabled true
......
...@@ -39,10 +39,10 @@ public class WakeUpActivity extends AppCompatActivity { ...@@ -39,10 +39,10 @@ public class WakeUpActivity extends AppCompatActivity {
if (info.contains("code")) if (info.contains("code"))
try { try {
JSONObject object = new JSONObject(info); JSONObject object = new JSONObject(info);
String inviteCode = object.optString("code"); // String inviteCode = object.optString("code");
if (!TextUtils.isEmpty(inviteCode)) { // if (!TextUtils.isEmpty(inviteCode)) {
AppCookie.save("code", inviteCode); // AppCookie.save("code", inviteCode);
} // }
String url = object.optString("url"); String url = object.optString("url");
LogUtil.d("唤醒传过来的url=" + url); LogUtil.d("唤醒传过来的url=" + url);
String title = URLDecoder.decode(object.optString("title"), "UTF-8"); String title = URLDecoder.decode(object.optString("title"), "UTF-8");
......
<resources> <resources>
<string name="app_name">滴房车(测试)</string> <string name="app_name">滴房车(测试)</string>
<string name="share_install_key">7ABKE7BEK62K22</string> <string name="share_install_key">A7BKEFH2KFFAHE</string>
<string name="share_install_scheme">pcbd5965</string> <string name="share_install_scheme">fbac5442</string>
</resources> </resources>
...@@ -5,6 +5,9 @@ import android.content.SharedPreferences; ...@@ -5,6 +5,9 @@ import android.content.SharedPreferences;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
/*********
* 缓存数据,账号级别的
*/
public class Cookie { public class Cookie {
private final static String COOKIE_FILE = "cookie"; private final static String COOKIE_FILE = "cookie";
......
...@@ -7,6 +7,7 @@ import android.graphics.Bitmap; ...@@ -7,6 +7,7 @@ import android.graphics.Bitmap;
import android.graphics.Canvas; import android.graphics.Canvas;
import android.graphics.Color; import android.graphics.Color;
import android.net.Uri; import android.net.Uri;
import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.widget.ScrollView; import android.widget.ScrollView;
import android.widget.Toast; import android.widget.Toast;
...@@ -24,6 +25,7 @@ public class ShareUtils { ...@@ -24,6 +25,7 @@ public class ShareUtils {
* @param url * @param url
*/ */
public static void copy(Context context, String url) { public static void copy(Context context, String url) {
if (TextUtils.isEmpty(url)) return;
ClipboardManager cm = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE); ClipboardManager cm = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
ClipData mClipData = ClipData.newRawUri("Label", Uri.parse(url)); ClipData mClipData = ClipData.newRawUri("Label", Uri.parse(url));
cm.setPrimaryClip(mClipData); cm.setPrimaryClip(mClipData);
......
...@@ -6,6 +6,7 @@ import android.os.Bundle; ...@@ -6,6 +6,7 @@ import android.os.Bundle;
import android.text.Editable; import android.text.Editable;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
import android.text.TextPaint; import android.text.TextPaint;
import android.text.TextUtils;
import android.text.method.HideReturnsTransformationMethod; import android.text.method.HideReturnsTransformationMethod;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.text.method.PasswordTransformationMethod; import android.text.method.PasswordTransformationMethod;
...@@ -23,6 +24,7 @@ import com.ruiwenliu.wrapper.base.presenter.CommonPresenter; ...@@ -23,6 +24,7 @@ import com.ruiwenliu.wrapper.base.presenter.CommonPresenter;
import com.ruiwenliu.wrapper.bean.BeanUserInfo; import com.ruiwenliu.wrapper.bean.BeanUserInfo;
import com.ruiwenliu.wrapper.util.listener.TextChangedListener; import com.ruiwenliu.wrapper.util.listener.TextChangedListener;
import com.ruiwenliu.wrapper.weight.TitleView; import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.AppCookie;
import com.rv.home.R; import com.rv.home.R;
import com.rv.home.R2; import com.rv.home.R2;
import com.rv.home.rv.module.ApiConfig; import com.rv.home.rv.module.ApiConfig;
...@@ -30,6 +32,7 @@ import com.rv.home.rv.module.basic.BaseLoginActivity; ...@@ -30,6 +32,7 @@ import com.rv.home.rv.module.basic.BaseLoginActivity;
import com.rv.home.rv.module.ui.login.bean.RegisteredBean; import com.rv.home.rv.module.ui.login.bean.RegisteredBean;
import com.umeng.socialize.bean.SHARE_MEDIA; import com.umeng.socialize.bean.SHARE_MEDIA;
import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import butterknife.BindView; import butterknife.BindView;
...@@ -47,10 +50,8 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -47,10 +50,8 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> {
EditText etPwd; EditText etPwd;
@BindView(R2.id.iv_clear_pwd) @BindView(R2.id.iv_clear_pwd)
ImageView ivClearPwd; ImageView ivClearPwd;
@BindView(R2.id.et_again_pwd) @BindView(R2.id.et_invite_code)
EditText etAgainPwd; EditText etInviteCode;
@BindView(R2.id.iv_clear_again_pwd)
ImageView ivClearAgainPwd;
@BindView(R2.id.cb_annotations) @BindView(R2.id.cb_annotations)
CheckBox cbAnnotations; CheckBox cbAnnotations;
@BindView(R2.id.tv_registered) @BindView(R2.id.tv_registered)
...@@ -90,7 +91,6 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -90,7 +91,6 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> {
super.initView(savedInstanceState, titleView, intent); super.initView(savedInstanceState, titleView, intent);
titleView.setTitle(mActivity.getString(R.string.rv_edit_pwd)); titleView.setTitle(mActivity.getString(R.string.rv_edit_pwd));
editListener(etPwd); editListener(etPwd);
editListener(etAgainPwd);
mOpenid = intent.getStringExtra("openid"); mOpenid = intent.getStringExtra("openid");
mHeadImg = intent.getStringExtra("headImg"); mHeadImg = intent.getStringExtra("headImg");
mName = intent.getStringExtra("name"); mName = intent.getStringExtra("name");
...@@ -98,6 +98,12 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -98,6 +98,12 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> {
mCode = intent.getStringExtra("code"); mCode = intent.getStringExtra("code");
mPhone = intent.getStringExtra("phone"); mPhone = intent.getStringExtra("phone");
mUnionid = intent.getStringExtra("uid"); mUnionid = intent.getStringExtra("uid");
String inviteCode = AppCookie.getStringValue("code");
if (!TextUtils.isEmpty(inviteCode)) {
etInviteCode.setText(inviteCode);
etInviteCode.setEnabled(false);
}
initData(); initData();
} }
...@@ -165,7 +171,6 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -165,7 +171,6 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> {
} }
@Override @Override
protected void loadData(Bundle savedInstanceState, Intent intent) { protected void loadData(Bundle savedInstanceState, Intent intent) {
...@@ -195,19 +200,10 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -195,19 +200,10 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> {
return etPwd.getText().toString().trim(); return etPwd.getText().toString().trim();
} }
; private String getInviteCode() {
return etInviteCode.getText().toString().trim();
/**
* 获得再次输入密码
*
* @return
*/
private String getAgainPwd() {
return etPwd.getText().toString().trim();
} }
;
/** /**
* 清除编辑数据 * 清除编辑数据
*/ */
...@@ -215,16 +211,12 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -215,16 +211,12 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> {
text.setText(""); text.setText("");
} }
@OnClick({R2.id.iv_clear_pwd, R2.id.iv_clear_again_pwd, R2.id.tv_agreement, R2.id.tv_registered}) @OnClick({R2.id.iv_clear_pwd, R2.id.tv_agreement, R2.id.tv_registered})
public void onViewClicked(View view) { public void onViewClicked(View view) {
if (view.getId() == R.id.iv_clear_pwd) { if (view.getId() == R.id.iv_clear_pwd) {
pwdShow = !pwdShow; pwdShow = !pwdShow;
ivClearPwd.setSelected(pwdShow); ivClearPwd.setSelected(pwdShow);
etPwd.setTransformationMethod(pwdShow ? HideReturnsTransformationMethod.getInstance() : PasswordTransformationMethod.getInstance()); etPwd.setTransformationMethod(pwdShow ? HideReturnsTransformationMethod.getInstance() : PasswordTransformationMethod.getInstance());
} else if (view.getId() == R.id.iv_clear_again_pwd) {
confirmShow = !confirmShow;
ivClearAgainPwd.setSelected(confirmShow);
etAgainPwd.setTransformationMethod(confirmShow ? HideReturnsTransformationMethod.getInstance() : PasswordTransformationMethod.getInstance());
} else if (view.getId() == R.id.tv_agreement) { } else if (view.getId() == R.id.tv_agreement) {
} else if (view.getId() == R.id.tv_registered) { } else if (view.getId() == R.id.tv_registered) {
...@@ -232,16 +224,42 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -232,16 +224,42 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> {
showToast(mActivity.getString(R.string.rv_pwd_length)); showToast(mActivity.getString(R.string.rv_pwd_length));
return; return;
} }
if (!getPwd().equals(getAgainPwd())) {
showToast(mActivity.getString(R.string.rv_pwd_same));
return;
}
if (cbAnnotations.isChecked() == false) { if (cbAnnotations.isChecked() == false) {
showToast(mActivity.getString(R.string.rv_confirm_agreement)); showToast(mActivity.getString(R.string.rv_confirm_agreement));
return; return;
} }
otherLoginBind(mPhone, mCode, getPwd(), mName, mHeadImg, mOpenid, 2, mIsQQ, mUnionid); loginBind(mPhone, mCode, getPwd(), mName, mHeadImg, mOpenid, 2, mIsQQ, mUnionid);
}
}
/**
* 第三方登录
*
* @param username
* @param mobilecode
* @param password
* @param nickname
* @param headimgurl
* @param openid
* @param type
*/
private void loginBind(String username, String mobilecode, String password, String nickname, String headimgurl, String openid, int type, int isQQ, String uid) {
Map<String, Object> map = new LinkedHashMap<>();
map.put("username", username);
map.put("mobilecode", mobilecode);
map.put("password", password);
map.put("nickname", nickname);
map.put("headimgurl", headimgurl);
map.put("openid", openid);
map.put("type", type);
map.put("isQQ", isQQ);
if (isQQ == 0) {
map.put("unionid", uid);
} }
map.put("code", getInviteCode());
mPresenter.postData(2, ApiConfig.HTTP_URL_OTHER_LOGIN_BIND, RegisteredBean.class, map, true);
} }
/** /**
...@@ -263,7 +281,7 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -263,7 +281,7 @@ public class ConfirmPwdActivity extends BaseLoginActivity<CommonPresenter> {
// ivClearAgainPwd.setVisibility(getAgainPwd().length() > 0 ? View.VISIBLE : View.GONE); // ivClearAgainPwd.setVisibility(getAgainPwd().length() > 0 ? View.VISIBLE : View.GONE);
// break; // break;
// } // }
if (etPwd.length() > 0 && etAgainPwd.length() > 0) { if (etPwd.length() > 0) {
tvRegistered.setEnabled(true); tvRegistered.setEnabled(true);
tvRegistered.setSelected(true); tvRegistered.setSelected(true);
} else { } else {
......
...@@ -21,7 +21,6 @@ import com.ruiwenliu.wrapper.util.listener.TextChangedListener; ...@@ -21,7 +21,6 @@ import com.ruiwenliu.wrapper.util.listener.TextChangedListener;
import com.ruiwenliu.wrapper.weight.TitleView; import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.AppCookie; import com.rv.component.utils.AppCookie;
import com.rv.component.utils.Cookie;
import com.rv.component.utils.IsAppInstall; import com.rv.component.utils.IsAppInstall;
import com.rv.component.utils.LogUtil; import com.rv.component.utils.LogUtil;
import com.rv.home.R; import com.rv.home.R;
...@@ -34,7 +33,6 @@ import com.ruiwenliu.wrapper.base.presenter.CommonPresenter; ...@@ -34,7 +33,6 @@ import com.ruiwenliu.wrapper.base.presenter.CommonPresenter;
import com.rv.home.rv.module.ui.login.bean.RegisteredBean; import com.rv.home.rv.module.ui.login.bean.RegisteredBean;
import com.rv.home.rv.module.ui.login.bean.SendCodeBean; import com.rv.home.rv.module.ui.login.bean.SendCodeBean;
import com.sh.sdk.shareinstall.ShareInstall; import com.sh.sdk.shareinstall.ShareInstall;
import com.sh.sdk.shareinstall.listener.AppGetInfoListener;
import com.umeng.socialize.bean.SHARE_MEDIA; import com.umeng.socialize.bean.SHARE_MEDIA;
import com.umeng.socialize.utils.SocializeUtils; import com.umeng.socialize.utils.SocializeUtils;
...@@ -97,22 +95,18 @@ public class LoginRvActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -97,22 +95,18 @@ public class LoginRvActivity extends BaseLoginActivity<CommonPresenter> {
jumptype = intent.getIntExtra("jumptype", 0); jumptype = intent.getIntExtra("jumptype", 0);
// etPhone.setText(""+mActivity.getPackageName()); // etPhone.setText(""+mActivity.getPackageName());
initRxbus(); initRxbus();
ShareInstall.getInstance().getInfo(getIntent(), new AppGetInfoListener() { ShareInstall.getInstance().getInfo(getIntent(), info -> {
@Override // 客户端获取到的参数是json字符串格式
public void onGetInfoFinish(String info) { LogUtil.d("ShareInstall", "info = " + info);
// 客户端获取到的参数是json字符串格式 JSONObject object = null;
LogUtil.d("ShareInstall", "info = " + info); try {
// info ="{\"from\":\"singlemessage\",\"code\":\"qRj5igja_P0101\"}"; object = new JSONObject(info);
if (info.contains("code")) String inviteCode = object.optString("code");
try { if (!TextUtils.isEmpty(inviteCode)) {
JSONObject object = new JSONObject(info); AppCookie.save("code", inviteCode);
String inviteCode = object.optString("code"); }
if (!TextUtils.isEmpty(inviteCode)) { } catch (JSONException e) {
AppCookie.save( "code", inviteCode); e.printStackTrace();
}
} catch (JSONException e) {
e.printStackTrace();
}
} }
}); });
} }
...@@ -226,7 +220,7 @@ public class LoginRvActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -226,7 +220,7 @@ public class LoginRvActivity extends BaseLoginActivity<CommonPresenter> {
Map<String, Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
map.put("username", getPhone()); map.put("username", getPhone());
map.put("type", 4); map.put("type", 4);
map.put("code", AppCookie.getStringValue( "code")); map.put("code", AppCookie.getStringValue("code"));
mPresenter.postData(0, ApiConfig.HTTP_URL_SEND_CODE, SendCodeBean.class, map, true); mPresenter.postData(0, ApiConfig.HTTP_URL_SEND_CODE, SendCodeBean.class, map, true);
} }
......
...@@ -60,10 +60,8 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -60,10 +60,8 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
EditText etPwd; EditText etPwd;
@BindView(R2.id.iv_clear_pwd) @BindView(R2.id.iv_clear_pwd)
ImageView ivClearPwd; ImageView ivClearPwd;
@BindView(R2.id.et_again_pwd) @BindView(R2.id.et_invite_code)
EditText etAgainPwd; EditText etInviteCode;
@BindView(R2.id.iv_clear_again_pwd)
ImageView ivClearAgainPwd;
@BindView(R2.id.cb_annotations) @BindView(R2.id.cb_annotations)
CheckBox cbAnnotations; CheckBox cbAnnotations;
@BindView(R2.id.tv_registered) @BindView(R2.id.tv_registered)
...@@ -102,10 +100,19 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -102,10 +100,19 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
tvRegistered.setText(mActivity.getString(mType == 0 ? R.string.rv_registered : R.string.rv_reset_pwd)); tvRegistered.setText(mActivity.getString(mType == 0 ? R.string.rv_registered : R.string.rv_reset_pwd));
cbAnnotations.setVisibility(mType == 0 ? View.VISIBLE : View.GONE); cbAnnotations.setVisibility(mType == 0 ? View.VISIBLE : View.GONE);
tvAgreement.setVisibility(mType == 0 ? View.VISIBLE : View.GONE); tvAgreement.setVisibility(mType == 0 ? View.VISIBLE : View.GONE);
((View) etInviteCode.getParent()).setVisibility(mType == 0 ? View.VISIBLE : View.GONE);
if (mType == 0) {
String inviteCode = AppCookie.getStringValue("code");
if (!TextUtils.isEmpty(inviteCode)) {
etInviteCode.setText(inviteCode);
etInviteCode.setEnabled(false);
}
}
editListener(etPhone); editListener(etPhone);
editListener(etPhoneCode); editListener(etPhoneCode);
editListener(etPwd); editListener(etPwd);
editListener(etAgainPwd); editListener(etInviteCode);
initData(); initData();
} }
...@@ -191,7 +198,7 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -191,7 +198,7 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
} }
} }
@OnClick({R2.id.iv_clear_phone, R2.id.iv_clear_code, R2.id.tv_get_code, R2.id.iv_clear_pwd, R2.id.iv_clear_again_pwd, R2.id.tv_agreement, R2.id.tv_registered}) @OnClick({R2.id.iv_clear_phone, R2.id.iv_clear_code, R2.id.tv_get_code, R2.id.iv_clear_pwd, R2.id.tv_agreement, R2.id.tv_registered})
public void onViewClicked(View view) { public void onViewClicked(View view) {
if (view.getId() == R.id.iv_clear_phone) { if (view.getId() == R.id.iv_clear_phone) {
clearEditData(etPhone); clearEditData(etPhone);
...@@ -218,11 +225,12 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -218,11 +225,12 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
ivClearPwd.setSelected(confirmShow); ivClearPwd.setSelected(confirmShow);
etPwd.setTransformationMethod(confirmShow ? HideReturnsTransformationMethod.getInstance() : PasswordTransformationMethod.getInstance()); etPwd.setTransformationMethod(confirmShow ? HideReturnsTransformationMethod.getInstance() : PasswordTransformationMethod.getInstance());
} else if (view.getId() == R.id.iv_clear_again_pwd) {
confirmShow = !confirmShow;
ivClearAgainPwd.setSelected(confirmShow);
etAgainPwd.setTransformationMethod(confirmShow ? HideReturnsTransformationMethod.getInstance() : PasswordTransformationMethod.getInstance());
} }
// else if (view.getId() == R.id.iv_clear_again_pwd) {
// confirmShow = !confirmShow;
// ivClearAgainPwd.setSelected(confirmShow);
// etAgainPwd.setTransformationMethod(confirmShow ? HideReturnsTransformationMethod.getInstance() : PasswordTransformationMethod.getInstance());
// }
// else if (view.getId() == R.id.tv_agreement) { // else if (view.getId() == R.id.tv_agreement) {
// ARouter.getInstance().build(Constance.ACTIVITY_URL_WEBVIEW) // ARouter.getInstance().build(Constance.ACTIVITY_URL_WEBVIEW)
// .withString("title", "用户协议") // .withString("title", "用户协议")
...@@ -235,10 +243,10 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -235,10 +243,10 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
showToast(mActivity.getString(R.string.rv_pwd_length)); showToast(mActivity.getString(R.string.rv_pwd_length));
return; return;
} }
if (!getPwd().equals(getAgainPwd())) { // if (!getPwd().equals(getAgainPwd())) {
showToast(mActivity.getString(R.string.rv_pwd_same)); // showToast(mActivity.getString(R.string.rv_pwd_same));
return; // return;
} // }
if (mType == 1) { if (mType == 1) {
resetPwd(); resetPwd();
...@@ -284,7 +292,7 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -284,7 +292,7 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
map.put("username", getPhone()); map.put("username", getPhone());
map.put("mobilecode", getCode()); map.put("mobilecode", getCode());
map.put("password", getPwd()); map.put("password", getPwd());
map.put("code", AppCookie.getStringValue("code")); map.put("code", getInviteCode());
mPresenter.postData(RvFrameConfig.AUTH_POST, 1, ApiConfig.HTTP_URL_USER_REGISTER, RegisteredBean.class, map, headMap, true); mPresenter.postData(RvFrameConfig.AUTH_POST, 1, ApiConfig.HTTP_URL_USER_REGISTER, RegisteredBean.class, map, headMap, true);
} }
...@@ -334,8 +342,8 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -334,8 +342,8 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
* *
* @return * @return
*/ */
private String getAgainPwd() { private String getInviteCode() {
return etAgainPwd.getText().toString().trim(); return etInviteCode.getText().toString().trim();
} }
; ;
...@@ -362,9 +370,9 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -362,9 +370,9 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
} else if (editText.getId() == R.id.et_phone_code) { } else if (editText.getId() == R.id.et_phone_code) {
ivClearCode.setVisibility(getCode().length() > 0 ? View.VISIBLE : View.GONE); ivClearCode.setVisibility(getCode().length() > 0 ? View.VISIBLE : View.GONE);
} else if (editText.getId() == R.id.et_pwd) { } else if (editText.getId() == R.id.et_pwd) {
ivClearPwd.setVisibility(getPwd().length() > 0 ? View.VISIBLE : View.GONE); // ivClearPwd.setVisibility(getPwd().length() > 0 ? View.VISIBLE : View.GONE);
} else if (editText.getId() == R.id.et_again_pwd) { } else if (editText.getId() == R.id.et_invite_code) {
ivClearAgainPwd.setVisibility(getAgainPwd().length() > 0 ? View.VISIBLE : View.GONE); // ivClearAgainPwd.setVisibility(getAgainPwd().length() > 0 ? View.VISIBLE : View.GONE);
} }
// switch (editText.getId()) { // switch (editText.getId()) {
// case R.id.et_phone: // case R.id.et_phone:
...@@ -380,7 +388,7 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> { ...@@ -380,7 +388,7 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
// ivClearAgainPwd.setVisibility(getAgainPwd().length() > 0 ? View.VISIBLE : View.GONE); // ivClearAgainPwd.setVisibility(getAgainPwd().length() > 0 ? View.VISIBLE : View.GONE);
// break; // break;
// } // }
if (etPhone.length() > 0 && etPhoneCode.length() > 0 && etPwd.length() > 0 && etAgainPwd.length() > 0) { if (etPhone.length() > 0 && etPhoneCode.length() > 0 && etPwd.length() > 0) {
tvRegistered.setEnabled(true); tvRegistered.setEnabled(true);
tvRegistered.setSelected(true); tvRegistered.setSelected(true);
} else { } else {
......
...@@ -722,7 +722,8 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> { ...@@ -722,7 +722,8 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
tvActivityDay.setText(String.format("%1$s%2$s", dataBean.getDayNum(), mActivity.getString(R.string.rv_days))); tvActivityDay.setText(String.format("%1$s%2$s", dataBean.getDayNum(), mActivity.getString(R.string.rv_days)));
tvGetCarAddress.setText(dataBean.getStartAddr()); tvGetCarAddress.setText(dataBean.getStartAddr());
tvOutCarAddress.setText(dataBean.getEndAddr()); tvOutCarAddress.setText(dataBean.getEndAddr());
tvDayPrice.setText(String.format("¥%1$s%2$s", mCarBean.getVehicleModel().getPrice(), "/天起"));
tvDayPrice.setText(String.format("¥%1$s%2$s", mCarBean.getVehicleModel().getSum(), "/天起"));
// String spStringCode = UtilsManager.getInstance(OkGoUtil.application).getSPStringCode(SPConstance.USER_JSON, SPConstance.USER_JSON_USERINFO); // String spStringCode = UtilsManager.getInstance(OkGoUtil.application).getSPStringCode(SPConstance.USER_JSON, SPConstance.USER_JSON_USERINFO);
// if (!TextUtil.isEmpty(spStringCode)) { // if (!TextUtil.isEmpty(spStringCode)) {
......
...@@ -24,6 +24,7 @@ import com.ruiwenliu.wrapper.weight.webview.SafeWebView; ...@@ -24,6 +24,7 @@ import com.ruiwenliu.wrapper.weight.webview.SafeWebView;
import com.rv.home.R; import com.rv.home.R;
import com.rv.home.R2; import com.rv.home.R2;
import com.rv.home.rv.module.ApiConfig; import com.rv.home.rv.module.ApiConfig;
import com.yuyife.okgo.OkGoUtil;
import butterknife.BindView; import butterknife.BindView;
...@@ -59,7 +60,7 @@ public class ChargeDetailsActivity extends BaseStatusActivity<PickerPresenter> { ...@@ -59,7 +60,7 @@ public class ChargeDetailsActivity extends BaseStatusActivity<PickerPresenter> {
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) { protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
titleView.setTitle(mActivity.getString(R.string.rv_charge_details)); titleView.setTitle(mActivity.getString(R.string.rv_charge_details));
no = intent.getStringExtra("no"); no = intent.getStringExtra("no");
webUrl = ApiConfig.HTTP_URL_CAR_TYPE_COSTDETAIL; webUrl = ApiConfig.HTTP_URL_CAR_TYPE_COSTDETAIL + "?orderId=" + no;
initWeb(); initWeb();
} }
...@@ -128,6 +129,12 @@ public class ChargeDetailsActivity extends BaseStatusActivity<PickerPresenter> { ...@@ -128,6 +129,12 @@ public class ChargeDetailsActivity extends BaseStatusActivity<PickerPresenter> {
} }
public class AndroidJs { public class AndroidJs {
@JavascriptInterface
public String getToken() {
return OkGoUtil.getToken();
}
@JavascriptInterface @JavascriptInterface
public void onClickWeb(int type) { public void onClickWeb(int type) {
if (type == 1) { if (type == 1) {
...@@ -189,5 +196,4 @@ public class ChargeDetailsActivity extends BaseStatusActivity<PickerPresenter> { ...@@ -189,5 +196,4 @@ public class ChargeDetailsActivity extends BaseStatusActivity<PickerPresenter> {
mWebView.destroy();// 生命周期销毁 mWebView.destroy();// 生命周期销毁
} }
} }
...@@ -5,12 +5,13 @@ ...@@ -5,12 +5,13 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
tools:context=".rv.module.ui.login.BingPhoneActivity"> tools:context=".rv.module.ui.login.BingPhoneActivity">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50" android:layout_height="@dimen/size_50"
android:layout_marginLeft="@dimen/size_30" android:layout_marginLeft="@dimen/size_20"
android:layout_marginRight="@dimen/size_30" android:layout_marginTop="@dimen/size_30"
android:layout_marginTop="@dimen/size_50" android:layout_marginRight="@dimen/size_20"
android:background="@drawable/shape_rv_input" android:background="@drawable/shape_rv_input"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
...@@ -19,80 +20,108 @@ ...@@ -19,80 +20,108 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/size_15" android:layout_marginLeft="@dimen/dp_10"
android:text="*"
android:textColor="@color/colorAuxiliaryRed"
android:textSize="@dimen/text_14"
android:visibility="visible" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="手机号"
android:textColor="@color/text_Main" android:textColor="@color/text_Main"
android:text="@string/rv_phone_type"
android:textSize="@dimen/text_16" /> android:textSize="@dimen/text_16" />
<View
android:layout_width="@dimen/size_half"
android:layout_height="@dimen/size_30"
android:layout_marginLeft="@dimen/size_8"
android:background="@color/colorMain" />
<EditText <EditText
android:id="@+id/et_phone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@null"
android:layout_marginLeft="@dimen/size_15" android:layout_marginLeft="@dimen/size_15"
android:layout_weight="1"
android:background="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:hint="@string/rv_phone_hint" android:hint="@string/rv_phone_hint"
android:inputType="phone"
android:maxLength="11" android:maxLength="11"
android:id="@+id/et_phone"
android:layout_weight="1"
android:maxLines="1" android:maxLines="1"
android:textColorHint="@color/colorGray" android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" /> android:textSize="@dimen/text_16" />
<ImageView <ImageView
android:id="@+id/iv_clear_phone"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:id="@+id/iv_clear_phone"
android:visibility="gone"
android:padding="@dimen/size_15" android:padding="@dimen/size_15"
android:src="@drawable/comment_publisher_clear" android:src="@drawable/comment_publisher_clear"
/> android:visibility="gone" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50" android:layout_height="@dimen/size_50"
android:layout_marginLeft="@dimen/size_30" android:layout_marginLeft="@dimen/size_20"
android:layout_marginRight="@dimen/size_30" android:layout_marginTop="13dp"
android:layout_marginTop="@dimen/size_30" android:layout_marginRight="@dimen/size_20"
android:background="@drawable/shape_rv_input" android:background="@drawable/shape_rv_input"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_10"
android:text="*"
android:textColor="@color/colorAuxiliaryRed"
android:textSize="@dimen/text_14"
android:visibility="visible" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="验证码"
android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" />
<EditText <EditText
android:id="@+id/et_phone_code"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@null"
android:layout_marginLeft="@dimen/size_15" android:layout_marginLeft="@dimen/size_15"
android:layout_weight="1"
android:background="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:hint="@string/rv_phone_code" android:hint="@string/rv_phone_code"
android:maxLength="6"
android:id="@+id/et_phone_code"
android:inputType="number" android:inputType="number"
android:layout_weight="1" android:maxLength="6"
android:maxLines="1" android:maxLines="1"
android:textColorHint="@color/colorGray" android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" /> android:textSize="@dimen/text_16" />
<ImageView <ImageView
android:id="@+id/iv_clear_code"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:id="@+id/iv_clear_code"
android:padding="@dimen/size_15" android:padding="@dimen/size_15"
android:visibility="gone"
android:src="@drawable/comment_publisher_clear" android:src="@drawable/comment_publisher_clear"
/> android:visibility="gone" />
<View <View
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_width="@dimen/size_half" android:layout_width="@dimen/size_half"
android:layout_height="@dimen/size_30" android:layout_height="wrap_content"
android:layout_marginRight="@dimen/size_8" android:background="@color/textGray" />
android:background="@color/colorMain" />
<TextView <TextView
android:layout_width="@dimen/size_100" android:layout_marginLeft="@dimen/dp_10"
android:layout_height="match_parent" android:layout_marginRight="@dimen/dp_10"
android:id="@+id/tv_get_code" android:id="@+id/tv_get_code"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:gravity="center" android:gravity="center"
...@@ -102,18 +131,17 @@ ...@@ -102,18 +131,17 @@
</LinearLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/tv_bind"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:layout_marginLeft="@dimen/size_30" android:layout_marginLeft="@dimen/size_30"
android:layout_marginTop="27dp"
android:layout_marginRight="@dimen/size_30" android:layout_marginRight="@dimen/size_30"
android:layout_height="@dimen/size_50"
android:textColor="@color/colorWrite"
android:text="@string/rv_bind"
android:textSize="@dimen/size_16"
android:id="@+id/tv_bind"
android:gravity="center"
android:enabled="false"
android:background="@drawable/selector_rv_button" android:background="@drawable/selector_rv_button"
android:layout_marginTop="@dimen/size_40" android:enabled="false"
/> android:gravity="center"
android:text="@string/rv_bind"
android:textColor="@color/colorWrite"
android:textSize="@dimen/size_16" />
</LinearLayout> </LinearLayout>
...@@ -9,18 +9,36 @@ ...@@ -9,18 +9,36 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50" android:layout_height="@dimen/size_50"
android:layout_marginLeft="@dimen/size_30" android:layout_marginLeft="@dimen/size_20"
android:layout_marginTop="@dimen/size_20" android:layout_marginTop="@dimen/size_30"
android:layout_marginRight="@dimen/size_30" android:layout_marginRight="@dimen/size_20"
android:background="@drawable/shape_rv_input" android:background="@drawable/shape_rv_input"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_10"
android:text="*"
android:textColor="@color/colorAuxiliaryRed"
android:textSize="@dimen/text_14"
android:visibility="visible" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="密码 "
android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" />
<EditText <EditText
android:id="@+id/et_pwd" android:id="@+id/et_pwd"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_15" android:layout_marginLeft="13dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@null" android:background="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
...@@ -33,9 +51,12 @@ ...@@ -33,9 +51,12 @@
<ImageView <ImageView
android:id="@+id/iv_clear_pwd" android:id="@+id/iv_clear_pwd"
android:layout_width="wrap_content" android:layout_width="41dp"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:padding="@dimen/size_15" android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_10"
android:paddingRight="@dimen/size_18"
android:paddingBottom="@dimen/dp_10"
android:src="@drawable/selector_rv_pwd" /> android:src="@drawable/selector_rv_pwd" />
</LinearLayout> </LinearLayout>
...@@ -43,43 +64,54 @@ ...@@ -43,43 +64,54 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50" android:layout_height="@dimen/size_50"
android:layout_marginLeft="@dimen/size_30" android:layout_marginLeft="@dimen/size_20"
android:layout_marginTop="@dimen/size_20" android:layout_marginTop="13dp"
android:layout_marginRight="@dimen/size_30" android:layout_marginRight="@dimen/size_20"
android:background="@drawable/shape_rv_input" android:background="@drawable/shape_rv_input"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_10"
android:text="*"
android:textColor="@color/colorAuxiliaryRed"
android:textSize="@dimen/text_14"
android:visibility="invisible" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="邀请码"
android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" />
<EditText <EditText
android:id="@+id/et_again_pwd" android:digits="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
android:id="@+id/et_invite_code"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_15" android:layout_marginLeft="13dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@null" android:background="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:hint="@string/rv_pwd_again_hint" android:hint="请输入邀请码(选填)"
android:inputType="textPassword"
android:maxLength="16" android:maxLength="16"
android:maxLines="1" android:maxLines="1"
android:textColorHint="@color/colorGray" android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" /> android:textSize="@dimen/text_16" />
<ImageView
android:id="@+id/iv_clear_again_pwd"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="@dimen/size_15"
android:src="@drawable/selector_rv_pwd" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_20"
android:layout_marginTop="13dp"
android:layout_marginRight="@dimen/size_20"
android:gravity="center_vertical" android:gravity="center_vertical"
android:layout_marginLeft="@dimen/size_30"
android:layout_marginTop="@dimen/size_15"
android:layout_marginRight="@dimen/size_30"
android:orientation="horizontal"> android:orientation="horizontal">
<CheckBox <CheckBox
...@@ -104,7 +136,7 @@ ...@@ -104,7 +136,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50" android:layout_height="@dimen/size_50"
android:layout_marginLeft="@dimen/size_30" android:layout_marginLeft="@dimen/size_30"
android:layout_marginTop="@dimen/size_40" android:layout_marginTop="27dp"
android:layout_marginRight="@dimen/size_30" android:layout_marginRight="@dimen/size_30"
android:background="@drawable/selector_rv_button" android:background="@drawable/selector_rv_button"
android:enabled="false" android:enabled="false"
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50" android:layout_height="@dimen/size_50"
android:layout_marginLeft="@dimen/size_30" android:layout_marginLeft="@dimen/size_20"
android:layout_marginTop="@dimen/size_50" android:layout_marginTop="@dimen/size_50"
android:layout_marginRight="@dimen/size_30" android:layout_marginRight="@dimen/size_20"
android:background="@drawable/shape_rv_input" android:background="@drawable/shape_rv_input"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
...@@ -20,22 +20,25 @@ ...@@ -20,22 +20,25 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/size_15" android:layout_marginLeft="@dimen/dp_10"
android:text="@string/rv_phone_type" android:text="*"
android:textColor="@color/colorAuxiliaryRed"
android:textSize="@dimen/text_14"
android:visibility="visible" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="手机号"
android:textColor="@color/text_Main" android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" /> android:textSize="@dimen/text_16" />
<View
android:layout_width="@dimen/size_half"
android:layout_height="@dimen/size_30"
android:layout_marginLeft="@dimen/size_8"
android:background="@color/colorMain" />
<EditText <EditText
android:id="@+id/et_phone" android:id="@+id/et_phone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_15" android:layout_marginLeft="13dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@null" android:background="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
...@@ -58,18 +61,36 @@ ...@@ -58,18 +61,36 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50" android:layout_height="@dimen/size_50"
android:layout_marginLeft="@dimen/size_30" android:layout_marginLeft="@dimen/size_20"
android:layout_marginTop="@dimen/size_20" android:layout_marginTop="@dimen/size_20"
android:layout_marginRight="@dimen/size_30" android:layout_marginRight="@dimen/size_20"
android:background="@drawable/shape_rv_input" android:background="@drawable/shape_rv_input"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_10"
android:text="*"
android:textColor="@color/colorAuxiliaryRed"
android:textSize="@dimen/text_14"
android:visibility="visible" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="验证码"
android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" />
<EditText <EditText
android:id="@+id/et_phone_code" android:id="@+id/et_phone_code"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_15" android:layout_marginLeft="13dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@null" android:background="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
...@@ -89,14 +110,17 @@ ...@@ -89,14 +110,17 @@
android:visibility="gone" /> android:visibility="gone" />
<View <View
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_width="@dimen/size_half" android:layout_width="@dimen/size_half"
android:layout_height="@dimen/size_30" android:layout_height="wrap_content"
android:layout_marginRight="@dimen/size_8" android:background="@color/textGray" />
android:background="@color/colorMain" />
<TextView <TextView
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:id="@+id/tv_get_code" android:id="@+id/tv_get_code"
android:layout_width="@dimen/size_100" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:gravity="center" android:gravity="center"
...@@ -109,18 +133,36 @@ ...@@ -109,18 +133,36 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50" android:layout_height="@dimen/size_50"
android:layout_marginLeft="@dimen/size_30" android:layout_marginLeft="@dimen/size_20"
android:layout_marginTop="@dimen/size_20" android:layout_marginTop="@dimen/size_20"
android:layout_marginRight="@dimen/size_30" android:layout_marginRight="@dimen/size_20"
android:background="@drawable/shape_rv_input" android:background="@drawable/shape_rv_input"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_10"
android:text="*"
android:textColor="@color/colorAuxiliaryRed"
android:textSize="@dimen/text_14"
android:visibility="visible" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="密码 "
android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" />
<EditText <EditText
android:id="@+id/et_pwd" android:id="@+id/et_pwd"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_15" android:layout_marginLeft="13dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@null" android:background="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
...@@ -133,9 +175,12 @@ ...@@ -133,9 +175,12 @@
<ImageView <ImageView
android:id="@+id/iv_clear_pwd" android:id="@+id/iv_clear_pwd"
android:layout_width="wrap_content" android:layout_width="33dp"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:padding="@dimen/size_15" android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_10"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_10"
android:src="@drawable/selector_rv_pwd" /> android:src="@drawable/selector_rv_pwd" />
</LinearLayout> </LinearLayout>
...@@ -143,44 +188,57 @@ ...@@ -143,44 +188,57 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50" android:layout_height="@dimen/size_50"
android:layout_marginLeft="@dimen/size_30" android:layout_marginLeft="@dimen/size_20"
android:layout_marginTop="@dimen/size_20" android:layout_marginTop="@dimen/size_20"
android:layout_marginRight="@dimen/size_30" android:layout_marginRight="@dimen/size_20"
android:background="@drawable/shape_rv_input" android:background="@drawable/shape_rv_input"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_10"
android:text="*"
android:textColor="@color/colorAuxiliaryRed"
android:textSize="@dimen/text_14"
android:visibility="invisible" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="邀请码"
android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" />
<EditText <EditText
android:id="@+id/et_again_pwd" android:digits="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
android:id="@+id/et_invite_code"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_15" android:layout_marginLeft="13dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@null" android:background="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:hint="@string/rv_pwd_again_hint" android:hint="请输入邀请码(非必填)"
android:inputType="textPassword"
android:maxLength="16" android:maxLength="16"
android:maxLines="1" android:maxLines="1"
android:textColorHint="@color/colorGray" android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" /> android:textSize="@dimen/text_16" />
<ImageView
android:id="@+id/iv_clear_again_pwd"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="@dimen/size_15"
android:src="@drawable/selector_rv_pwd" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:layout_marginLeft="@dimen/size_20"
android:layout_marginLeft="@dimen/size_30"
android:layout_marginTop="@dimen/size_15" android:layout_marginTop="@dimen/size_15"
android:layout_marginRight="@dimen/size_30" android:layout_marginRight="@dimen/size_20"
android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<CheckBox <CheckBox
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<string name="take_photo">拍照</string> <string name="take_photo">拍照</string>
<string name="album">手机相册</string> <string name="album">手机相册</string>
<string name="rv_phone_login">手机登录</string> <string name="rv_phone_login">手机登录</string>
<string name="rv_phone_hint">请输入手机号</string> <string name="rv_phone_hint">请输入11数字的手机号码</string>
<string name="rv_phone_code">请输入验证码</string> <string name="rv_phone_code">请输入短信验证码</string>
<string name="rv_phone_type">+86</string> <string name="rv_phone_type">+86</string>
<string name="rv_get_code">获取验证码</string> <string name="rv_get_code">获取验证码</string>
<string name="rv_login">登录</string> <string name="rv_login">登录</string>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<string name="rv_login_rest">重新获取</string> <string name="rv_login_rest">重新获取</string>
<string name="rv_login_authorization_failure">第三方登录失败</string> <string name="rv_login_authorization_failure">第三方登录失败</string>
<string name="rv_login_success">登录成功</string> <string name="rv_login_success">登录成功</string>
<string name="rv_pwd_hint">请输入密码,至少8位数字或字母</string> <string name="rv_pwd_hint">至少8位数字或字母</string>
<string name="rv_pwd_again_hint">请再次输入密码</string> <string name="rv_pwd_again_hint">请再次输入密码</string>
<string name="rv_registered">注册</string> <string name="rv_registered">注册</string>
<string name="rv_registered_annotations">注册即表示同意滴房车</string> <string name="rv_registered_annotations">注册即表示同意滴房车</string>
......
...@@ -42,7 +42,7 @@ public class ReceiptManager { ...@@ -42,7 +42,7 @@ public class ReceiptManager {
} }
ReceiptObj obj = mReceiptMap.get(packetId); // 接收到message先从map中去除对应键值的消息 ReceiptObj obj = mReceiptMap.get(packetId); // 接收到message先从map中去除对应键值的消息
if (obj == null || obj.msg == null) {// 没有取出表示没有该消息 if (obj == null || obj.msg == null) { // 没有取出表示没有该消息
return; return;
} }
...@@ -81,7 +81,7 @@ public class ReceiptManager { ...@@ -81,7 +81,7 @@ public class ReceiptManager {
obj.msg = xmppMessage; obj.msg = xmppMessage;
obj.sendType = sendType; obj.sendType = sendType;
obj.Read_msg_pid = content; obj.Read_msg_pid = content;
mReceiptMap.put(xmppMessage.getPackId(), obj);// 记录一条新发送出去的消息(还没有接收到回执) mReceiptMap.put(xmppMessage.getPackId(), obj); // 记录一条新发送出去的消息(还没有接收到回执)
android.os.Message handlerMsg = mReceiptMapHandler.obtainMessage(RECEIPT_NO); // 默认先标记没有接收到回执 android.os.Message handlerMsg = mReceiptMapHandler.obtainMessage(RECEIPT_NO); // 默认先标记没有接收到回执
handlerMsg.obj = xmppMessage.getPackId(); handlerMsg.obj = xmppMessage.getPackId();
......
...@@ -8,7 +8,6 @@ import android.support.annotation.Nullable; ...@@ -8,7 +8,6 @@ import android.support.annotation.Nullable;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.android.arouter.launcher.ARouter;
...@@ -38,7 +37,6 @@ import com.rv.member.presenter.MemberPresenter; ...@@ -38,7 +37,6 @@ import com.rv.member.presenter.MemberPresenter;
import com.rv.component.utils.RvCache; import com.rv.component.utils.RvCache;
import com.rv.component.utils.CacheEnum; import com.rv.component.utils.CacheEnum;
import com.rv.member.view.MemberCompareView; import com.rv.member.view.MemberCompareView;
import com.rv.member.view.MemberItemView;
import com.rv.member.view.MemberTopView; import com.rv.member.view.MemberTopView;
import com.rv.tourism.bean.BeanTourOrderAliPay; import com.rv.tourism.bean.BeanTourOrderAliPay;
import com.tencent.mm.opensdk.openapi.IWXAPI; import com.tencent.mm.opensdk.openapi.IWXAPI;
......
...@@ -10,6 +10,7 @@ import android.text.Spanned; ...@@ -10,6 +10,7 @@ import android.text.Spanned;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.style.TextAppearanceSpan; import android.text.style.TextAppearanceSpan;
import android.view.View; import android.view.View;
import android.widget.Button;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
...@@ -20,8 +21,10 @@ import com.ruiwenliu.wrapper.base.BaseBean; ...@@ -20,8 +21,10 @@ import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseStatusActivity; import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.util.glide.GlideManager; import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.ruiwenliu.wrapper.weight.TitleView; import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.AppCookie;
import com.rv.component.utils.Cookie; import com.rv.component.utils.Cookie;
import com.rv.component.utils.DisplayUtil; import com.rv.component.utils.DisplayUtil;
import com.rv.component.utils.ShareUtils;
import com.rv.home.rv.module.ApiConfig; import com.rv.home.rv.module.ApiConfig;
import com.rv.share.bean.PersonShareBean; import com.rv.share.bean.PersonShareBean;
import com.rv.share.presenter.SharePresenter; import com.rv.share.presenter.SharePresenter;
...@@ -55,6 +58,10 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> { ...@@ -55,6 +58,10 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
TextView tvParentPhone; TextView tvParentPhone;
@BindView(R2.id.tv_ruler) @BindView(R2.id.tv_ruler)
TextView tvRuler; TextView tvRuler;
@BindView(R2.id.tv_share_code)
TextView tvShareCode;
@BindView(R2.id.btn_code_copy)
Button btnCodeCopy;
@BindView(R2.id.tv_more_detail) @BindView(R2.id.tv_more_detail)
TextView tvMoreDetail; TextView tvMoreDetail;
...@@ -116,6 +123,13 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> { ...@@ -116,6 +123,13 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
@Override @Override
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) { protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
titleView.setTitle("推广有奖"); titleView.setTitle("推广有奖");
String userCode = Cookie.getStringValue(this,SPConstance.USER_JSON_CODE);
if (TextUtils.isEmpty(userCode)) {
((View) (tvShareCode.getParent().getParent())).setVisibility(View.GONE);
} else {
((View) (tvShareCode.getParent().getParent())).setVisibility(View.VISIBLE);
tvShareCode.setText(userCode);
}
} }
private void getPersonShareInfo() { private void getPersonShareInfo() {
...@@ -127,7 +141,7 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> { ...@@ -127,7 +141,7 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
} }
@OnClick({R2.id.tv_weixin, R2.id.tv_weixin_circle, R2.id.tv_bill, R2.id.tv_more, R2.id.tv_more_detail, R2.id.ll_activation, R2.id.ll_comein, R2.id.ll_invite, R2.id.tv_ruler}) @OnClick({R2.id.tv_weixin, R2.id.tv_weixin_circle, R2.id.tv_bill, R2.id.tv_more, R2.id.tv_more_detail, R2.id.ll_activation, R2.id.ll_comein, R2.id.ll_invite, R2.id.tv_ruler, R2.id.btn_code_copy})
public void onViewClicked(View view) { public void onViewClicked(View view) {
int id = view.getId(); int id = view.getId();
if (TextUtils.isEmpty(shareUrl)) { if (TextUtils.isEmpty(shareUrl)) {
...@@ -153,6 +167,8 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> { ...@@ -153,6 +167,8 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
} else if (id == R.id.tv_ruler) { } else if (id == R.id.tv_ruler) {
String url = RvFrameConfig.HOST_H5_DETAIL + "/h5/appHtml/view/promotionAward.html"; String url = RvFrameConfig.HOST_H5_DETAIL + "/h5/appHtml/view/promotionAward.html";
startActivity(WebViewActivity.getIntent(this, url, "推广有奖规则")); startActivity(WebViewActivity.getIntent(this, url, "推广有奖规则"));
} else if (id == R.id.btn_code_copy) {
ShareUtils.copy(getApplicationContext(), tvShareCode.getText().toString().trim());
} }
} }
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="30dp" />
<solid android:color="@color/white" />
<stroke
android:width="1px"
android:color="@color/gray_FFB74B" />
</shape>
\ No newline at end of file
...@@ -46,7 +46,60 @@ ...@@ -46,7 +46,60 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_10" android:layout_marginLeft="@dimen/size_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="@dimen/size_10"
android:layout_marginBottom="@dimen/dp_10"
app:cardCornerRadius="5dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/size_16"
android:layout_marginBottom="@dimen/size_16"
android:text="我的邀请码"
android:textColor="@color/textMain"
android:textSize="@dimen/sp_16" />
<TextView
android:id="@+id/tv_share_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@id/btn_code_copy"
android:text="TJKLLDS"
android:textColor="@color/textGray"
android:textSize="@dimen/sp_14" />
<Button
android:id="@+id/btn_code_copy"
android:layout_width="53dp"
android:layout_height="23dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@drawable/share_bg_button_copy"
android:gravity="center"
android:text="复制"
android:textColor="@color/gray_FFB74B"
android:textSize="@dimen/sp_12"
style="?android:attr/borderlessButtonStyle"/>
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_10"
android:layout_marginRight="@dimen/size_10" android:layout_marginRight="@dimen/size_10"
android:layout_marginBottom="@dimen/size_10" android:layout_marginBottom="@dimen/size_10"
android:background="@color/white" android:background="@color/white"
...@@ -216,8 +269,7 @@ ...@@ -216,8 +269,7 @@
android:id="@+id/tv_person_inval" android:id="@+id/tv_person_inval"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center" />
/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
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