diff --git a/.idea/misc.xml b/.idea/misc.xml index 5d19981..fbb6828 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -37,7 +37,7 @@ - + diff --git a/CZBaseDevTool/src/main/java/com/xinyi/czbasedevtool/base/utils/RegularUtil.java b/CZBaseDevTool/src/main/java/com/xinyi/czbasedevtool/base/utils/RegularUtil.java index efd0f31..8b74003 100644 --- a/CZBaseDevTool/src/main/java/com/xinyi/czbasedevtool/base/utils/RegularUtil.java +++ b/CZBaseDevTool/src/main/java/com/xinyi/czbasedevtool/base/utils/RegularUtil.java @@ -18,9 +18,9 @@ public static boolean isNumeric(String str){ } public static boolean isEmail(String email){ - return check(email,"/^(\\w)+(\\.\\w+)*@(\\w)+((\\.\\w+)+)$/"); + return check(email,"^([a-z0-9A-Z]+[-|_|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"); } - + public static boolean check(String input ,String reg){ Pattern pattern = Pattern.compile(reg); Matcher isNum = pattern.matcher(input); diff --git a/app/src/main/java/xinyi/com/czdevmodule/Fragment1.java b/app/src/main/java/xinyi/com/czdevmodule/Fragment1.java index b7dae39..16c0fe8 100644 --- a/app/src/main/java/xinyi/com/czdevmodule/Fragment1.java +++ b/app/src/main/java/xinyi/com/czdevmodule/Fragment1.java @@ -8,14 +8,13 @@ import com.xinyi.czbasedevtool.base.bean.BaseHttpResponseBean; import com.xinyi.czbasedevtool.base.main.DefaultBaseFragment; import com.xinyi.czbasedevtool.base.manager.DataCleanManager; -import com.xinyi.czbasedevtool.base.manager.net_about.RetrofitClient; +import com.xinyi.czbasedevtool.base.utils.RegularUtil; +import com.xinyi.czbasedevtool.base.utils.ToastUtil; import com.xinyi.czbasedevtool.base.view.ContentViewHolder; import com.xinyi.czbasedevtool.base.view.round.RoundTextView; import java.io.IOException; -import xinyi.com.czdevmodule.net_test.SimpleRequestService; -import xinyi.com.czdevmodule.net_test.retrofit.DegreeBean; import xinyi.com.czdevmodule.net_test.retrofit.UserBean; import xinyi.com.czdevmodule.net_test.retrofit.callback.IUserRegistCallBack; import xinyi.com.czdevmodule.net_test.retrofit.service.UserService; @@ -65,10 +64,7 @@ public void bindView(ContentViewHolder contentViewHolder) throws IOException { roundTextView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - String BASE_URL = "http://app.bestbeijing.top/"; - RetrofitClient.setHasToken(true); - RetrofitClient.setBaseUrl(BASE_URL); - requestData(v,100, SimpleRequestService.class,"getDegreeList",DegreeBean.class,new Object[]{"fdsaf"},true); + ToastUtil.shortT(mContext, "" + RegularUtil.isEmail("3149308479@qq.com")); } });