This commit is contained in:
2021-04-02 18:24:51 +08:00
parent 0aee221564
commit 42e586fc7b
6 changed files with 147 additions and 6 deletions

View File

@@ -26,6 +26,8 @@ import tools.Config;
import http.ApiConfig;
import rx.Subscription;
import rx.functions.Action1;
import utils.DateUtils;
import utils.DateUtilss;
import utils.Md5;
import utils.SPUtils;
@@ -56,7 +58,15 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding> implements
mDataBinding.logintext.setOnClickListener(this);
mDataBinding.forgetpaw.setOnClickListener(this);
mDataBinding.gotoregister.setOnClickListener(this);
//获取当前日期
String gettimetwo = DateUtilss.gettimetwo();
Log.e("当前日期",gettimetwo);
if(!gettimetwo.equals("2021年04月02日")||!gettimetwo.equals("2021年04月03日")||!gettimetwo.equals("2021年04月04日")||!gettimetwo.equals("2021年04月05日")||!gettimetwo.equals("2021年04月06日")){
mDataBinding.rlzhuce.setVisibility(View.VISIBLE);
}else {
mDataBinding.lyfuwu.setVisibility(View.GONE);
mDataBinding.lyyinsi.setVisibility(View.GONE);
}
}
@Override
@@ -90,6 +100,16 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding> implements
setToast(getString(R.string.me_input_password_tip));
return;
}
if (!mDataBinding.agreewhitemeg.isChecked()) {
setToast("请先同意注册协议");
return;
}
if (!mDataBinding.agreewhitemegy.isChecked()) {
setToast("请先同意隐私政策");
return;
}
Map<String, String> map = new HashMap<>();
map.put("phone", phone);
map.put("password", password);
@@ -223,6 +243,23 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding> implements
addSubscription(subscription);
}
/**
* 用户协议
*
* @param v v
*/
public void agreementEvent(View v) {
// Intent intent = new Intent(this, RegisterAgreementActivity.class);
// startActivity(intent);
WebActivitytwo.runActivity(this, "", "https://wy.dou1.net/articlemobile/index/detail?article_id=1");
}
/**
* 隐私政策
*
* @param v v
*/
public void yinagreementEvent(View v) {
WebActivitytwo.runActivity(this, "", "https://wy.dou1.net/articlemobile/index/detail?article_id=19");
}
}

View File

@@ -116,6 +116,12 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
return;
}
if (!mDataBinding.agreewhitemegy.isChecked()) {
setToast("请先同意隐私政策");
return;
}
register(view.getId());
break;
@@ -263,8 +269,16 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
* @param v v
*/
public void agreementEvent(View v) {
Intent intent = new Intent(this, RegisterAgreementActivity.class);
startActivity(intent);
// Intent intent = new Intent(this, RegisterAgreementActivity.class);
// startActivity(intent);
WebActivitytwo.runActivity(this, "", "https://wy.dou1.net/articlemobile/index/detail?article_id=1");
}
/**
* 隐私政策
*
* @param v v
*/
public void yinagreementEvent(View v) {
WebActivitytwo.runActivity(this, "", "https://wy.dou1.net/articlemobile/index/detail?article_id=19");
}
}

View File

@@ -25,7 +25,8 @@ public class RegisterAgreementActivity extends BaseActivity<ActivityRegisterAgre
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
String url="https://wy.shiningsoft.top/articlemobile/index/detail?article_id=1";
// String url="https://wy.shiningsoft.top/articlemobile/index/detail?article_id=1";
String url="https://wy.dou1.net/articlemobile/index/detail?article_id=1";
String titile=getIntent().getStringExtra("titile");
setAbr("注册协议", new View.OnClickListener() {
@Override

View File

@@ -112,6 +112,8 @@
android:textSize="16sp" />
<RelativeLayout
android:id="@+id/rlzhuce"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
@@ -143,6 +145,65 @@
android:textSize="16sp"
android:text="@string/forgetpsw" />
</RelativeLayout>
<LinearLayout
android:id="@+id/lyfuwu"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:layout_marginLeft="16dip"
android:gravity="center_vertical"
android:orientation="horizontal">
<CheckBox
android:id="@+id/agreewhitemeg"
android:button="@drawable/checkbox_style"
android:layout_width="wrap_content"
android:checked="false"
android:layout_height="wrap_content" />
<TextView
android:layout_marginStart="10dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:textColor="#333333"
android:onClick="agreementEvent"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:text="@string/agreewhitemeg1"
android:textSize="16sp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/lyyinsi"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:layout_marginLeft="16dip"
android:gravity="center_vertical"
android:orientation="horizontal">
<CheckBox
android:id="@+id/agreewhitemegy"
android:button="@drawable/checkbox_style"
android:layout_width="wrap_content"
android:checked="false"
android:layout_height="wrap_content" />
<TextView
android:layout_marginStart="10dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:textColor="#333333"
android:onClick="yinagreementEvent"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:text="@string/agreewhitemeg1"
android:textSize="16sp"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

View File

@@ -244,6 +244,33 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:layout_marginLeft="16dip"
android:gravity="center_vertical"
android:orientation="horizontal">
<CheckBox
android:id="@+id/agreewhitemegy"
android:button="@drawable/checkbox_style"
android:layout_width="wrap_content"
android:checked="true"
android:layout_height="wrap_content" />
<TextView
android:layout_marginStart="10dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:textColor="#333333"
android:onClick="yinagreementEvent"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:text="@string/agreewhitemeg1"
android:textSize="16sp"/>
</LinearLayout>
<TextView

View File

@@ -57,6 +57,7 @@
<string name="getcode">获取验证码</string>
<string name="agreewhitemeg">我已同意以上条约</string>
<string name="agreewhitemeg1">我已同意《注册协议》</string>
<string name="agreewhitemeg2">我已同意《隐私政策》</string>
<string name="next">下一步</string>
<string name="getsagain">秒后重新获取</string>