Merge branch 'master' of https://gitee.com/renjianbo0118/HouseProperty
This commit is contained in:
@@ -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,18 @@ 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.GONE);
|
||||
mDataBinding.lyfuwu.setVisibility(View.VISIBLE);
|
||||
mDataBinding.lyyinsi.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
mDataBinding.rlzhuce.setVisibility(View.GONE);
|
||||
mDataBinding.lyfuwu.setVisibility(View.VISIBLE);
|
||||
mDataBinding.lyyinsi.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,6 +103,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 +246,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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -120,6 +120,12 @@ public class Main4Fragment extends BaseFragment<FragmentMain4Binding> implements
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
mDataBinding.ll5.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
WebActivitytwo.runActivity(getActivity(), "", "https://wy.dou1.net/articlemobile/index/detail?article_id=19");
|
||||
}
|
||||
});
|
||||
//mDataBinding.myRecyView;
|
||||
mDataBinding.userImage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
105
app/src/main/java/com/sl/house_property/WebActivitytwo.java
Normal file
105
app/src/main/java/com/sl/house_property/WebActivitytwo.java
Normal file
@@ -0,0 +1,105 @@
|
||||
package com.sl.house_property;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class WebActivitytwo extends AppCompatActivity implements View.OnClickListener {
|
||||
public final static String URL = "url";
|
||||
public final static String TITLE = "title";
|
||||
private WebView webView;
|
||||
private ProgressBar pb;
|
||||
private RelativeLayout mLayTopLeftTv;
|
||||
private TextView mLayTopTitle;
|
||||
private TextView mRight;
|
||||
private ImageView mIvCode;
|
||||
private ProgressBar mPb;
|
||||
private WebView mWebView;
|
||||
|
||||
public static void runActivity(Context context, String title, String url) {
|
||||
Intent intent = new Intent(context, WebActivitytwo.class);
|
||||
intent.putExtra(URL, url);
|
||||
intent.putExtra(TITLE, title);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_webtwo);
|
||||
String url = getIntent().getStringExtra(URL);
|
||||
String title = getIntent().getStringExtra(TITLE);
|
||||
|
||||
initView();
|
||||
pb.setMax(100);
|
||||
|
||||
WebSettings webSettings = webView.getSettings();
|
||||
webSettings.setDomStorageEnabled(true);//主要是这句
|
||||
webSettings.setJavaScriptEnabled(true);//启用js
|
||||
webSettings.setBlockNetworkImage(false);//解决图片不显示
|
||||
webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
|
||||
webSettings.setLoadsImagesAutomatically(true);
|
||||
webSettings.setAppCacheEnabled(true);
|
||||
webSettings.setCacheMode(WebSettings.LOAD_DEFAULT);
|
||||
// webView.getSettings().setJavaScriptEnabled(true);
|
||||
webSettings.setSupportZoom(true);
|
||||
webSettings.setBuiltInZoomControls(true);
|
||||
webView.setWebChromeClient(new WebChromeClient() {
|
||||
@Override
|
||||
public void onProgressChanged(WebView view, int newProgress) {
|
||||
pb.setProgress(newProgress);
|
||||
if (newProgress >= 100) {
|
||||
pb.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
webView.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
webView.loadUrl(url);
|
||||
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
webView = (WebView) findViewById(R.id.webView);
|
||||
webView.setOnClickListener(this);
|
||||
pb = (ProgressBar) findViewById(R.id.pb);
|
||||
mLayTopLeftTv = (RelativeLayout) findViewById(R.id.layTop_left_tv);
|
||||
mLayTopLeftTv.setOnClickListener(this);
|
||||
mLayTopTitle = (TextView) findViewById(R.id.layTop_title);
|
||||
mRight = (TextView) findViewById(R.id.right);
|
||||
mIvCode = (ImageView) findViewById(R.id.iv_code);
|
||||
mPb = (ProgressBar) findViewById(R.id.pb);
|
||||
mWebView = (WebView) findViewById(R.id.webView);
|
||||
mLayTopTitle.setText("智慧豆豆");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
default:
|
||||
break;
|
||||
case R.id.webView:
|
||||
break;
|
||||
case R.id.layTop_left_tv:
|
||||
finish();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@ public class HeaderAndFooterAdapter extends BaseQuickAdapter<CommentBeanData, Ba
|
||||
TextView et_coneten = (TextView) helper.getView(R.id.et_coneten);
|
||||
TextView et_coneten02 = (TextView) helper.getView(R.id.et_coneten02);
|
||||
TextView tv_delete = (TextView) helper.getView(R.id.tv_delete);
|
||||
et_coneten.setText("房屋号:"+item.getComment());
|
||||
et_coneten.setText("房屋号:"+item.getComment()+" 密码:"+item.getPwd());
|
||||
et_coneten02.setText("有效期:"+item.getType());
|
||||
tv_delete.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
||||
@@ -57,6 +57,7 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
|
||||
private List<CommentBeanData> statuses;
|
||||
private RecyclerView mRecyclerView;
|
||||
private HeaderAndFooterAdapter headerAndFooterAdapter;
|
||||
private String address;
|
||||
|
||||
@Override
|
||||
protected int getLayoutResId() {
|
||||
@@ -90,9 +91,9 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
|
||||
map.put("class", "GetMyAddress");
|
||||
getGankList(ApiConfig.BASE_URL, map, "", 0);
|
||||
user_home_id= getIntent().getStringExtra("id");
|
||||
// String address = getIntent().getStringExtra("address");
|
||||
|
||||
address = getIntent().getStringExtra("address");
|
||||
|
||||
mDataBinding.tvAddress.setText(address);
|
||||
mRecyclerView = (RecyclerView) findViewById(R.id.rv_list);
|
||||
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
List<CommentBeanData> commentBeanDatas1 = commentDao.queryInByCustom("isdelete","0");
|
||||
@@ -155,6 +156,7 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
|
||||
user_home_id = list.get(position).getUser_home_id();
|
||||
if (list.size() > 0) {
|
||||
mDataBinding.tvAddress.setText(list.get(position).getAddress());
|
||||
address=list.get(position).getAddress();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -227,9 +229,9 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
|
||||
}.getType();
|
||||
list = new Gson().fromJson(jsonArray.toString(), type);
|
||||
if (list != null && !list.isEmpty()) {
|
||||
mDataBinding.tvAddress.setText(list.get(0).getAddress());
|
||||
fangchan=list.get(0).getAddress();
|
||||
user_home_id = list.get(0).getUser_home_id();
|
||||
// mDataBinding.tvAddress.setText(list.get(0).getAddress());
|
||||
// fangchan=list.get(0).getAddress();
|
||||
// user_home_id = list.get(0).getUser_home_id();
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
@@ -353,7 +355,7 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
|
||||
}else {
|
||||
CommentBeanData commentBeanData = new CommentBeanData();
|
||||
commentBeanData.setId(new Random().nextInt(10000)+"");
|
||||
commentBeanData.setComment(fangchan);
|
||||
commentBeanData.setComment(address);
|
||||
|
||||
switch (timeday){
|
||||
case 1:
|
||||
@@ -394,7 +396,7 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
|
||||
|
||||
ShareCodeDialog shareCodeDialog = new ShareCodeDialog(ShareCodeActivity.this);
|
||||
shareCodeDialog.setCode(code);
|
||||
shareCodeDialog.setPwd(pwd,time,fangchan);
|
||||
shareCodeDialog.setPwd(pwd,time,address);
|
||||
new XPopup.Builder(ShareCodeActivity.this).asCustom(shareCodeDialog).show();
|
||||
|
||||
} catch (JSONException e) {
|
||||
|
||||
Reference in New Issue
Block a user