正在显示
19 个修改的文件
包含
500 行增加
和
38 行删除
.idea/codeStyles/Project.xml
已删除
100644 → 0
1 | -<component name="ProjectCodeStyleConfiguration"> | ||
2 | - <code_scheme name="Project" version="173"> | ||
3 | - <Objective-C-extensions> | ||
4 | - <file> | ||
5 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" /> | ||
6 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" /> | ||
7 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" /> | ||
8 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" /> | ||
9 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" /> | ||
10 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" /> | ||
11 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" /> | ||
12 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" /> | ||
13 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" /> | ||
14 | - </file> | ||
15 | - <class> | ||
16 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" /> | ||
17 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" /> | ||
18 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" /> | ||
19 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" /> | ||
20 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" /> | ||
21 | - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" /> | ||
22 | - </class> | ||
23 | - <extensions> | ||
24 | - <pair source="cpp" header="h" fileNamingConvention="NONE" /> | ||
25 | - <pair source="c" header="h" fileNamingConvention="NONE" /> | ||
26 | - </extensions> | ||
27 | - </Objective-C-extensions> | ||
28 | - </code_scheme> | ||
29 | -</component> |
.idea/encodings.xml
0 → 100644
@@ -29,6 +29,8 @@ | @@ -29,6 +29,8 @@ | ||
29 | </value> | 29 | </value> |
30 | </option> | 30 | </option> |
31 | </component> | 31 | </component> |
32 | +======= | ||
33 | +>>>>>>> liming | ||
32 | <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | 34 | <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK"> |
33 | <output url="file://$PROJECT_DIR$/build/classes" /> | 35 | <output url="file://$PROJECT_DIR$/build/classes" /> |
34 | </component> | 36 | </component> |
.idea/misc_BACKUP_1214.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project version="4"> | ||
3 | + <component name="NullableNotNullManager"> | ||
4 | + <option name="myDefaultNullable" value="android.support.annotation.Nullable" /> | ||
5 | + <option name="myDefaultNotNull" value="android.support.annotation.NonNull" /> | ||
6 | + <option name="myNullables"> | ||
7 | + <value> | ||
8 | + <list size="7"> | ||
9 | + <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" /> | ||
10 | + <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" /> | ||
11 | + <item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" /> | ||
12 | + <item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" /> | ||
13 | + <item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" /> | ||
14 | + <item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" /> | ||
15 | + <item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" /> | ||
16 | + </list> | ||
17 | + </value> | ||
18 | + </option> | ||
19 | + <option name="myNotNulls"> | ||
20 | + <value> | ||
21 | + <list size="6"> | ||
22 | + <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" /> | ||
23 | + <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" /> | ||
24 | + <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" /> | ||
25 | + <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" /> | ||
26 | + <item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" /> | ||
27 | + <item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" /> | ||
28 | + </list> | ||
29 | + </value> | ||
30 | + </option> | ||
31 | + </component> | ||
32 | +======= | ||
33 | +>>>>>>> liming | ||
34 | + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | ||
35 | + <output url="file://$PROJECT_DIR$/build/classes" /> | ||
36 | + </component> | ||
37 | + <component name="ProjectType"> | ||
38 | + <option name="id" value="Android" /> | ||
39 | + </component> | ||
40 | +</project> |
.idea/misc_BASE_1214.xml
0 → 100644
.idea/misc_LOCAL_1214.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project version="4"> | ||
3 | + <component name="NullableNotNullManager"> | ||
4 | + <option name="myDefaultNullable" value="android.support.annotation.Nullable" /> | ||
5 | + <option name="myDefaultNotNull" value="android.support.annotation.NonNull" /> | ||
6 | + <option name="myNullables"> | ||
7 | + <value> | ||
8 | + <list size="7"> | ||
9 | + <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" /> | ||
10 | + <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" /> | ||
11 | + <item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" /> | ||
12 | + <item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" /> | ||
13 | + <item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" /> | ||
14 | + <item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" /> | ||
15 | + <item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" /> | ||
16 | + </list> | ||
17 | + </value> | ||
18 | + </option> | ||
19 | + <option name="myNotNulls"> | ||
20 | + <value> | ||
21 | + <list size="6"> | ||
22 | + <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" /> | ||
23 | + <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" /> | ||
24 | + <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" /> | ||
25 | + <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" /> | ||
26 | + <item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" /> | ||
27 | + <item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" /> | ||
28 | + </list> | ||
29 | + </value> | ||
30 | + </option> | ||
31 | + </component> | ||
32 | + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | ||
33 | + <output url="file://$PROJECT_DIR$/build/classes" /> | ||
34 | + </component> | ||
35 | + <component name="ProjectType"> | ||
36 | + <option name="id" value="Android" /> | ||
37 | + </component> | ||
38 | +</project> |
.idea/misc_REMOTE_1214.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project version="4"> | ||
3 | + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | ||
4 | + <output url="file://$PROJECT_DIR$/build/classes" /> | ||
5 | + </component> | ||
6 | + <component name="ProjectType"> | ||
7 | + <option name="id" value="Android" /> | ||
8 | + </component> | ||
9 | +</project> |
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <project version="4"> | 2 | <project version="4"> |
3 | + <component name="GitSharedSettings"> | ||
4 | + <option name="FORCE_PUSH_PROHIBITED_PATTERNS"> | ||
5 | + <list> | ||
6 | + <option value="liming" /> | ||
7 | + </list> | ||
8 | + </option> | ||
9 | + </component> | ||
3 | <component name="VcsDirectoryMappings"> | 10 | <component name="VcsDirectoryMappings"> |
4 | <mapping directory="" vcs="Git" /> | 11 | <mapping directory="" vcs="Git" /> |
5 | </component> | 12 | </component> |
@@ -2,6 +2,7 @@ package com.hh.xuetubao; | @@ -2,6 +2,7 @@ package com.hh.xuetubao; | ||
2 | 2 | ||
3 | import com.hh.xuetubao.bean.AddressBean; | 3 | import com.hh.xuetubao.bean.AddressBean; |
4 | import com.hh.xuetubao.bean.AnswerBean; | 4 | import com.hh.xuetubao.bean.AnswerBean; |
5 | +import com.hh.xuetubao.bean.BdPhoneBean; | ||
5 | import com.hh.xuetubao.bean.CertListBean; | 6 | import com.hh.xuetubao.bean.CertListBean; |
6 | import com.hh.xuetubao.bean.ChapterLstBean; | 7 | import com.hh.xuetubao.bean.ChapterLstBean; |
7 | import com.hh.xuetubao.bean.CompanyBean; | 8 | import com.hh.xuetubao.bean.CompanyBean; |
@@ -25,6 +26,8 @@ import com.hh.xuetubao.bean.UserBean; | @@ -25,6 +26,8 @@ import com.hh.xuetubao.bean.UserBean; | ||
25 | 26 | ||
26 | import io.reactivex.Observable; | 27 | import io.reactivex.Observable; |
27 | import retrofit2.http.Body; | 28 | import retrofit2.http.Body; |
29 | +import retrofit2.http.Field; | ||
30 | +import retrofit2.http.FormUrlEncoded; | ||
28 | import retrofit2.http.GET; | 31 | import retrofit2.http.GET; |
29 | import retrofit2.http.POST; | 32 | import retrofit2.http.POST; |
30 | import retrofit2.http.Query; | 33 | import retrofit2.http.Query; |
@@ -147,6 +150,22 @@ public interface MyServer { | @@ -147,6 +150,22 @@ public interface MyServer { | ||
147 | Observable<UserBean> mobileLogin(@Query("mobileNumber") String mobileNumber, @Query("verCode") String verCode); | 150 | Observable<UserBean> mobileLogin(@Query("mobileNumber") String mobileNumber, @Query("verCode") String verCode); |
148 | 151 | ||
149 | /** | 152 | /** |
153 | +<<<<<<< HEAD | ||
154 | +======= | ||
155 | + * 微信绑定手机 | ||
156 | + * | ||
157 | + * @param OpenId | ||
158 | + * @param phone | ||
159 | + * @param verCode | ||
160 | + * @return | ||
161 | + */ | ||
162 | + @FormUrlEncoded | ||
163 | + @POST("SaveWxBinding") | ||
164 | + Observable<BdPhoneBean> bd_phone(@Field("wxOpenId") String OpenId, @Field("mobileNumber") String phone, @Field("verCode") String verCode); | ||
165 | + | ||
166 | + | ||
167 | + /** | ||
168 | +>>>>>>> liming | ||
150 | * 微信登录接口 | 169 | * 微信登录接口 |
151 | * | 170 | * |
152 | * @param wxOpenId 微信用户的OpenId | 171 | * @param wxOpenId 微信用户的OpenId |
1 | +package com.hh.xuetubao.activity.login; | ||
2 | + | ||
3 | +import android.os.Bundle; | ||
4 | +import android.os.CountDownTimer; | ||
5 | +import android.util.Log; | ||
6 | +import android.view.View; | ||
7 | +import android.widget.EditText; | ||
8 | +import android.widget.TextView; | ||
9 | +import android.widget.Toast; | ||
10 | + | ||
11 | +import com.hh.xuetubao.R; | ||
12 | +import com.hh.xuetubao.bean.UserBean; | ||
13 | +import com.hh.xuetubao.model.AccountModel; | ||
14 | +import com.hh.xuetubao.mvp.BaseMvpActivity; | ||
15 | +import com.hh.xuetubao.mvp.CommonPresenter; | ||
16 | +import com.hh.xuetubao.mvp.ICommonView; | ||
17 | + | ||
18 | +import java.util.regex.Matcher; | ||
19 | +import java.util.regex.Pattern; | ||
20 | + | ||
21 | +import butterknife.BindView; | ||
22 | +import butterknife.ButterKnife; | ||
23 | +import butterknife.OnClick; | ||
24 | + | ||
25 | +public class BdsjActivity extends BaseMvpActivity<CommonPresenter, AccountModel> implements ICommonView { | ||
26 | + | ||
27 | + @BindView(R.id.ed_phone) | ||
28 | + EditText edPhone; | ||
29 | + @BindView(R.id.ed_code) | ||
30 | + EditText edCode; | ||
31 | + @BindView(R.id.tv_yanzheng) | ||
32 | + TextView tvYanzheng; | ||
33 | + @BindView(R.id.bdsj_sure) | ||
34 | + TextView bdsjSure; | ||
35 | + @BindView(R.id.bdsj_fhdl) | ||
36 | + TextView bdsjFhdl; | ||
37 | + | ||
38 | + private CountDownTimer timer; | ||
39 | + private int time = 60; | ||
40 | + | ||
41 | + @Override | ||
42 | + public void initView() { | ||
43 | + | ||
44 | + } | ||
45 | + | ||
46 | + @Override | ||
47 | + public int initLayout() { | ||
48 | + return R.layout.activity_bdsj; | ||
49 | + } | ||
50 | + | ||
51 | + @Override | ||
52 | + public void initData() { | ||
53 | + | ||
54 | + } | ||
55 | + | ||
56 | + @Override | ||
57 | + public CommonPresenter getPresenter() { | ||
58 | + return new CommonPresenter(); | ||
59 | + } | ||
60 | + | ||
61 | + @Override | ||
62 | + public AccountModel getModel() { | ||
63 | + return new AccountModel(); | ||
64 | + } | ||
65 | + | ||
66 | + @Override | ||
67 | + public void getData(Object o, int api, int intent) { | ||
68 | + switch (intent) { | ||
69 | + case 1: // 验证码 | ||
70 | + UserBean bean = (UserBean) o; | ||
71 | + if (bean.getSuccess()) { | ||
72 | + Toast.makeText(this, "验证码发送成功", Toast.LENGTH_LONG).show(); | ||
73 | + | ||
74 | + timer = new CountDownTimer(60000, 1000) { | ||
75 | + @Override | ||
76 | + public void onTick(long millisUntilFinished) { | ||
77 | + time--; | ||
78 | + try { | ||
79 | + tvYanzheng.setText(String.valueOf(time) + "s"); | ||
80 | + tvYanzheng.setFocusable(false); | ||
81 | + } catch (Exception e) { | ||
82 | + Log.e("zhangtao", e.toString()); | ||
83 | + } | ||
84 | + } | ||
85 | + | ||
86 | + @Override | ||
87 | + public void onFinish() { | ||
88 | + tvYanzheng.setText("获取验证码"); | ||
89 | + tvYanzheng.setFocusable(true); | ||
90 | + time = 60; | ||
91 | + } | ||
92 | + }.start(); | ||
93 | + } else { | ||
94 | + Toast.makeText(this, "验证码发送失败", Toast.LENGTH_LONG).show(); | ||
95 | + } | ||
96 | + break; | ||
97 | + case 3: // 绑定 | ||
98 | + | ||
99 | + break; | ||
100 | + } | ||
101 | + } | ||
102 | + | ||
103 | + @Override | ||
104 | + public void onComplete(int api) { | ||
105 | + | ||
106 | + } | ||
107 | + | ||
108 | + @Override | ||
109 | + public void onError(Throwable e, int api) { | ||
110 | + | ||
111 | + } | ||
112 | + | ||
113 | + @Override | ||
114 | + protected void onCreate(Bundle savedInstanceState) { | ||
115 | + super.onCreate(savedInstanceState); | ||
116 | + ButterKnife.bind(this); | ||
117 | + } | ||
118 | + | ||
119 | + @OnClick({R.id.tv_yanzheng, R.id.bdsj_sure, R.id.bdsj_fhdl}) | ||
120 | + public void onViewClicked(View view) { | ||
121 | + switch (view.getId()) { | ||
122 | + case R.id.tv_yanzheng: // - > 验证码 | ||
123 | + if (isCellphone(edPhone.getText().toString())) | ||
124 | + mPresenter.getPresenter(1, 1, edPhone.getText().toString(), String.valueOf(1)); // 1 -> 微信或手机号码绑定时发送 | ||
125 | + else | ||
126 | + Toast.makeText(this, "请输入正确的手机号码", Toast.LENGTH_LONG).show(); | ||
127 | + break; | ||
128 | + case R.id.bdsj_sure: // - > 确定 | ||
129 | + if (isCellphone(edPhone.getText().toString())) { | ||
130 | + Toast.makeText(this, "请输入正确的手机号码", Toast.LENGTH_LONG).show(); | ||
131 | + return; | ||
132 | + } else if (edPhone.getText().length() > 0 && edCode.getText().length() > 0) { | ||
133 | + Toast.makeText(this, "手机号和验证码不可为空", Toast.LENGTH_LONG).show(); | ||
134 | + return; | ||
135 | + } else { | ||
136 | + mPresenter.getPresenter(1, 3, edPhone.getText().toString().trim(), edCode.getText().toString().trim()); // - > 绑定 | ||
137 | + } | ||
138 | + break; | ||
139 | + case R.id.bdsj_fhdl: // - > 返回登录 | ||
140 | + this.finish(); | ||
141 | + break; | ||
142 | + } | ||
143 | + } | ||
144 | + | ||
145 | + public static boolean isCellphone(String str) { | ||
146 | + Pattern pattern = Pattern.compile("^((13[0-9])|(14[5,7,9])|(15[^4])|(18[0-9])|(17[0,1,3,5,6,7,8]))\\d{8}$"); | ||
147 | + Matcher matcher = pattern.matcher(str); | ||
148 | + return matcher.matches(); | ||
149 | + } | ||
150 | + | ||
151 | +} |
@@ -4,6 +4,7 @@ import android.content.Intent; | @@ -4,6 +4,7 @@ import android.content.Intent; | ||
4 | import android.os.Bundle; | 4 | import android.os.Bundle; |
5 | import android.os.CountDownTimer; | 5 | import android.os.CountDownTimer; |
6 | import android.text.TextUtils; | 6 | import android.text.TextUtils; |
7 | +import android.util.Log; | ||
7 | import android.view.View; | 8 | import android.view.View; |
8 | import android.widget.EditText; | 9 | import android.widget.EditText; |
9 | import android.widget.ImageView; | 10 | import android.widget.ImageView; |
@@ -30,7 +31,6 @@ import butterknife.ButterKnife; | @@ -30,7 +31,6 @@ import butterknife.ButterKnife; | ||
30 | */ | 31 | */ |
31 | public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel> implements ICommonView, View.OnClickListener { | 32 | public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel> implements ICommonView, View.OnClickListener { |
32 | 33 | ||
33 | - | ||
34 | @BindView(R.id.login) | 34 | @BindView(R.id.login) |
35 | TextView login; | 35 | TextView login; |
36 | @BindView(R.id.ed_phone) | 36 | @BindView(R.id.ed_phone) |
@@ -96,6 +96,12 @@ public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel | @@ -96,6 +96,12 @@ public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel | ||
96 | tvYanzheng.setFocusable(false); | 96 | tvYanzheng.setFocusable(false); |
97 | tvYanzheng.setFocusableInTouchMode(false); | 97 | tvYanzheng.setFocusableInTouchMode(false); |
98 | tvYanzheng.setClickable(false); | 98 | tvYanzheng.setClickable(false); |
99 | + try { | ||
100 | + tvYanzheng.setText(String.valueOf(time) + "s"); | ||
101 | + tvYanzheng.setFocusable(false); | ||
102 | + } catch (Exception e) { | ||
103 | + Log.e("zhangtao", e.toString()); | ||
104 | + } | ||
99 | } | 105 | } |
100 | 106 | ||
101 | @Override | 107 | @Override |
@@ -104,6 +110,7 @@ public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel | @@ -104,6 +110,7 @@ public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel | ||
104 | tvYanzheng.setFocusable(true); | 110 | tvYanzheng.setFocusable(true); |
105 | tvYanzheng.setFocusableInTouchMode(true); | 111 | tvYanzheng.setFocusableInTouchMode(true); |
106 | tvYanzheng.setClickable(true); | 112 | tvYanzheng.setClickable(true); |
113 | + time = 60; | ||
107 | } | 114 | } |
108 | }.start(); | 115 | }.start(); |
109 | } else { | 116 | } else { |
@@ -120,6 +127,7 @@ public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel | @@ -120,6 +127,7 @@ public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel | ||
120 | this.finish(); | 127 | this.finish(); |
121 | } else { | 128 | } else { |
122 | Toast.makeText(this, bean.getErrorMsg(), Toast.LENGTH_LONG).show(); | 129 | Toast.makeText(this, bean.getErrorMsg(), Toast.LENGTH_LONG).show(); |
130 | + Toast.makeText(this, "登录失败", Toast.LENGTH_LONG).show(); | ||
123 | } | 131 | } |
124 | 132 | ||
125 | } | 133 | } |
@@ -151,8 +159,9 @@ public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel | @@ -151,8 +159,9 @@ public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel | ||
151 | else | 159 | else |
152 | Toast.makeText(this, "请输入正确的手机号码", Toast.LENGTH_LONG).show(); | 160 | Toast.makeText(this, "请输入正确的手机号码", Toast.LENGTH_LONG).show(); |
153 | break; | 161 | break; |
162 | + | ||
154 | case R.id.tv_yanzheng: | 163 | case R.id.tv_yanzheng: |
155 | - if (isCellphone(edPhone.getText().toString()) && !TextUtils.isEmpty(edPhone.getText().toString())) | 164 | + if (isCellphone(edPhone.getText().toString())) |
156 | mPresenter.getPresenter(1, 1, edPhone.getText().toString(), String.valueOf(0)); | 165 | mPresenter.getPresenter(1, 1, edPhone.getText().toString(), String.valueOf(0)); |
157 | else | 166 | else |
158 | Toast.makeText(this, "请输入正确的手机号码", Toast.LENGTH_LONG).show(); | 167 | Toast.makeText(this, "请输入正确的手机号码", Toast.LENGTH_LONG).show(); |
1 | +package com.hh.xuetubao.bean; | ||
2 | + | ||
3 | +public class BdPhoneBean { | ||
4 | + | ||
5 | + /** | ||
6 | + * IsSuccess : true | ||
7 | + * AccountOid : 16EA2C01-20E3-420D-AB4E-4E44F0539349 | ||
8 | + */ | ||
9 | + | ||
10 | + private boolean IsSuccess; | ||
11 | + private String AccountOid; | ||
12 | + | ||
13 | + public boolean isIsSuccess() { | ||
14 | + return IsSuccess; | ||
15 | + } | ||
16 | + | ||
17 | + public void setIsSuccess(boolean IsSuccess) { | ||
18 | + this.IsSuccess = IsSuccess; | ||
19 | + } | ||
20 | + | ||
21 | + public String getAccountOid() { | ||
22 | + return AccountOid; | ||
23 | + } | ||
24 | + | ||
25 | + public void setAccountOid(String AccountOid) { | ||
26 | + this.AccountOid = AccountOid; | ||
27 | + } | ||
28 | +} |
@@ -202,6 +202,10 @@ public class HomeFragment extends BaseMvpFragment<CommonPresenter, LearnModel> i | @@ -202,6 +202,10 @@ public class HomeFragment extends BaseMvpFragment<CommonPresenter, LearnModel> i | ||
202 | transaction.replace(R.id.frame, fragment); | 202 | transaction.replace(R.id.frame, fragment); |
203 | transaction.commit();*/ | 203 | transaction.commit();*/ |
204 | startActivity(new Intent(getActivity(),StudyActivity.class)); | 204 | startActivity(new Intent(getActivity(),StudyActivity.class)); |
205 | + CourseFragment fragment = new CourseFragment(); | ||
206 | + FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction(); | ||
207 | + transaction.replace(R.id.frame, fragment); | ||
208 | + transaction.commit(); | ||
205 | break; | 209 | break; |
206 | case R.id.tv_more_qiye: | 210 | case R.id.tv_more_qiye: |
207 | startActivity(new Intent(getActivity(), CompanyActivity.class)); | 211 | startActivity(new Intent(getActivity(), CompanyActivity.class)); |
@@ -27,6 +27,23 @@ public class AccountModel implements ICommonModel { | @@ -27,6 +27,23 @@ public class AccountModel implements ICommonModel { | ||
27 | 27 | ||
28 | } | 28 | } |
29 | 29 | ||
30 | + /* 获取验证码 */ | ||
31 | + private void sendValidateCode(final ICommonView commonView, final int api, final int intent, String... params) { | ||
32 | + if (api == 1 && intent == 1) | ||
33 | + mServers.sendValidateCode(params[0], Integer.valueOf(params[1])) | ||
34 | + .subscribeOn(Schedulers.io()) | ||
35 | + .observeOn(AndroidSchedulers.mainThread()) | ||
36 | + .subscribe(new BaseObsever() { | ||
37 | + @Override | ||
38 | + public void onNext(Object value) { | ||
39 | + super.onNext(value); | ||
40 | + commonView.getData(value, api, intent); | ||
41 | + } | ||
42 | + | ||
43 | + }); | ||
44 | + } | ||
45 | + | ||
46 | + /* 手机号登录 */ | ||
30 | private void mobileLogin(final ICommonView commonView, final int api, final int intent, String... params) { | 47 | private void mobileLogin(final ICommonView commonView, final int api, final int intent, String... params) { |
31 | if (api == 1 && intent == 2) | 48 | if (api == 1 && intent == 2) |
32 | mServers.mobileLogin(params[0], params[1]) | 49 | mServers.mobileLogin(params[0], params[1]) |
@@ -42,18 +59,20 @@ public class AccountModel implements ICommonModel { | @@ -42,18 +59,20 @@ public class AccountModel implements ICommonModel { | ||
42 | }); | 59 | }); |
43 | } | 60 | } |
44 | 61 | ||
45 | - private void sendValidateCode(final ICommonView commonView, final int api, final int intent, String... params) { | ||
46 | - if (api == 1 && intent == 1) | ||
47 | - mServers.sendValidateCode(params[0], Integer.valueOf(params[1])) | 62 | + private void bd_phone(final ICommonView commonView, final int api, final int tag, String... params) { |
63 | + if (api == 1 && tag == 2) { | ||
64 | + mServers.bd_phone(params[0], params[1], params[2]) | ||
48 | .subscribeOn(Schedulers.io()) | 65 | .subscribeOn(Schedulers.io()) |
49 | .observeOn(AndroidSchedulers.mainThread()) | 66 | .observeOn(AndroidSchedulers.mainThread()) |
50 | .subscribe(new BaseObsever() { | 67 | .subscribe(new BaseObsever() { |
51 | @Override | 68 | @Override |
52 | public void onNext(Object value) { | 69 | public void onNext(Object value) { |
53 | super.onNext(value); | 70 | super.onNext(value); |
54 | - commonView.getData(value, api, intent); | 71 | + commonView.getData(value, api, tag); |
55 | } | 72 | } |
56 | - | ||
57 | }); | 73 | }); |
74 | + } | ||
58 | } | 75 | } |
76 | + | ||
77 | + | ||
59 | } | 78 | } |
app/src/main/res/drawable/circle_grey_25.xml
0 → 100644
app/src/main/res/layout/activity_bdsj.xml
0 → 100644
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + android:layout_width="match_parent" | ||
4 | + android:layout_height="match_parent" | ||
5 | + android:gravity="center_horizontal" | ||
6 | + android:orientation="vertical"> | ||
7 | + | ||
8 | + <TextView | ||
9 | + android:id="@+id/tv_login" | ||
10 | + android:layout_width="wrap_content" | ||
11 | + android:layout_height="wrap_content" | ||
12 | + android:layout_centerHorizontal="true" | ||
13 | + android:layout_marginTop="@dimen/dp_60" | ||
14 | + android:text="绑定手机号" | ||
15 | + android:textColor="#232323" | ||
16 | + android:textSize="17sp" /> | ||
17 | + | ||
18 | + <ImageView | ||
19 | + android:id="@+id/img_phone" | ||
20 | + android:layout_width="@dimen/dp_18" | ||
21 | + android:layout_height="@dimen/dp_18" | ||
22 | + android:layout_below="@+id/tv_login" | ||
23 | + android:layout_marginLeft="@dimen/dp_25" | ||
24 | + android:layout_marginTop="@dimen/dp_50" | ||
25 | + android:src="@mipmap/login_phone" /> | ||
26 | + | ||
27 | + <TextView | ||
28 | + android:id="@+id/tv_phone" | ||
29 | + android:layout_width="wrap_content" | ||
30 | + android:layout_height="wrap_content" | ||
31 | + android:layout_alignBottom="@+id/img_phone" | ||
32 | + android:layout_marginLeft="@dimen/dp_5" | ||
33 | + android:layout_toRightOf="@+id/img_phone" | ||
34 | + android:text="手机号" | ||
35 | + android:textColor="#666666" | ||
36 | + android:textSize="12sp" /> | ||
37 | + | ||
38 | + <!--<View--> | ||
39 | + <!--android:layout_width="@dimen/dp_1"--> | ||
40 | + <!--android:layout_height="@dimen/dp_15"--> | ||
41 | + <!--android:background="@color/color_333333"--> | ||
42 | + <!--android:layout_toRightOf="@+id/tv_phone"--> | ||
43 | + <!--android:layout_alignTop="@+id/tv_phone"--> | ||
44 | + <!--android:layout_marginLeft="@dimen/dp_10"--> | ||
45 | + <!--/>--> | ||
46 | + | ||
47 | + <EditText | ||
48 | + android:id="@+id/ed_phone" | ||
49 | + android:layout_width="match_parent" | ||
50 | + android:layout_height="@dimen/dp_18" | ||
51 | + android:layout_alignBottom="@id/img_phone" | ||
52 | + android:layout_marginLeft="@dimen/dp_15" | ||
53 | + android:layout_toRightOf="@id/tv_phone" | ||
54 | + android:background="@null" | ||
55 | + android:hint="|请输入手机号" | ||
56 | + android:textColorHint="#C7C7C7" | ||
57 | + android:textSize="12sp" /> | ||
58 | + | ||
59 | + <View | ||
60 | + android:id="@+id/line2" | ||
61 | + android:layout_width="match_parent" | ||
62 | + android:layout_height="@dimen/dp_1" | ||
63 | + android:layout_below="@id/img_phone" | ||
64 | + android:layout_marginLeft="@dimen/dp_25" | ||
65 | + android:layout_marginTop="@dimen/dp_15" | ||
66 | + android:layout_marginRight="@dimen/dp_25" | ||
67 | + android:background="#333333" /> | ||
68 | + | ||
69 | + <ImageView | ||
70 | + android:id="@+id/img_message" | ||
71 | + android:layout_width="@dimen/dp_18" | ||
72 | + android:layout_height="@dimen/dp_18" | ||
73 | + android:layout_below="@id/line2" | ||
74 | + android:layout_marginLeft="@dimen/dp_25" | ||
75 | + android:layout_marginTop="@dimen/dp_35" | ||
76 | + android:src="@mipmap/login_message" /> | ||
77 | + | ||
78 | + <TextView | ||
79 | + android:id="@+id/tv_message" | ||
80 | + android:layout_width="wrap_content" | ||
81 | + android:layout_height="wrap_content" | ||
82 | + android:layout_alignBottom="@+id/img_message" | ||
83 | + android:layout_marginLeft="@dimen/dp_5" | ||
84 | + android:layout_toRightOf="@+id/img_phone" | ||
85 | + android:text="验证码" | ||
86 | + android:textColor="#666666" | ||
87 | + android:textSize="12sp" /> | ||
88 | + | ||
89 | + <EditText | ||
90 | + android:id="@+id/ed_code" | ||
91 | + android:layout_width="wrap_content" | ||
92 | + android:layout_height="@dimen/dp_18" | ||
93 | + android:layout_alignBottom="@id/img_message" | ||
94 | + android:layout_marginLeft="@dimen/dp_15" | ||
95 | + android:layout_toRightOf="@id/tv_message" | ||
96 | + android:background="@null" | ||
97 | + android:hint="请输入短信验证码" | ||
98 | + android:textColorHint="#C7C7C7" | ||
99 | + android:textSize="12sp" /> | ||
100 | + | ||
101 | + <TextView | ||
102 | + android:id="@+id/tv_yanzheng" | ||
103 | + android:layout_width="@dimen/dp_75" | ||
104 | + android:layout_height="@dimen/dp_25" | ||
105 | + android:layout_alignBottom="@id/img_message" | ||
106 | + android:layout_alignParentRight="true" | ||
107 | + android:layout_marginRight="@dimen/dp_25" | ||
108 | + android:background="@drawable/login_circle" | ||
109 | + android:gravity="center" | ||
110 | + android:text="获取验证码" | ||
111 | + android:textColor="#FFFFFF" | ||
112 | + android:textSize="11sp" /> | ||
113 | + | ||
114 | + <View | ||
115 | + android:id="@+id/ling2" | ||
116 | + android:layout_width="match_parent" | ||
117 | + android:layout_height="@dimen/dp_1" | ||
118 | + android:layout_below="@+id/tv_yanzheng" | ||
119 | + android:layout_marginLeft="@dimen/dp_25" | ||
120 | + android:layout_marginTop="@dimen/dp_10" | ||
121 | + android:layout_marginRight="@dimen/dp_25" | ||
122 | + android:background="#D5D5D5" /> | ||
123 | + | ||
124 | + <TextView | ||
125 | + android:id="@+id/bdsj_sure" | ||
126 | + android:layout_width="match_parent" | ||
127 | + android:layout_height="@dimen/dp_50" | ||
128 | + android:layout_below="@id/ling2" | ||
129 | + android:layout_marginLeft="@dimen/dp_25" | ||
130 | + android:layout_marginTop="@dimen/dp_240" | ||
131 | + android:layout_marginRight="@dimen/dp_25" | ||
132 | + android:background="@drawable/circle_orange" | ||
133 | + android:gravity="center" | ||
134 | + android:text="确定" | ||
135 | + android:textColor="#FFFFFF" | ||
136 | + android:textSize="16sp" /> | ||
137 | + | ||
138 | + <TextView | ||
139 | + android:id="@+id/bdsj_fhdl" | ||
140 | + android:layout_width="match_parent" | ||
141 | + android:layout_height="@dimen/dp_50" | ||
142 | + android:layout_below="@id/bdsj_sure" | ||
143 | + android:layout_marginLeft="@dimen/dp_25" | ||
144 | + android:layout_marginTop="@dimen/dp_10" | ||
145 | + android:layout_marginRight="@dimen/dp_25" | ||
146 | + android:background="@drawable/circle_grey_25" | ||
147 | + android:gravity="center" | ||
148 | + android:text="返回登录" | ||
149 | + android:textColor="@color/color_6666666" | ||
150 | + android:textSize="16sp" /> | ||
151 | + | ||
152 | +</RelativeLayout> |
@@ -71,7 +71,7 @@ | @@ -71,7 +71,7 @@ | ||
71 | android:layout_height="30dp" | 71 | android:layout_height="30dp" |
72 | android:layout_below="@+id/grid_hotLesson" | 72 | android:layout_below="@+id/grid_hotLesson" |
73 | android:layout_marginLeft="@dimen/dp_20" | 73 | android:layout_marginLeft="@dimen/dp_20" |
74 | - android:layout_marginTop="@dimen/dp_20" | 74 | + android:layout_marginTop="@dimen/dp_30" |
75 | android:layout_marginRight="@dimen/dp_20" | 75 | android:layout_marginRight="@dimen/dp_20" |
76 | android:background="@drawable/stroke_gray" | 76 | android:background="@drawable/stroke_gray" |
77 | android:gravity="center" | 77 | android:gravity="center" |
@@ -338,7 +338,7 @@ | @@ -338,7 +338,7 @@ | ||
338 | android:layout_height="@dimen/dp_50" | 338 | android:layout_height="@dimen/dp_50" |
339 | android:layout_below="@+id/rl_toudi" | 339 | android:layout_below="@+id/rl_toudi" |
340 | android:layout_marginLeft="@dimen/dp_20" | 340 | android:layout_marginLeft="@dimen/dp_20" |
341 | - android:layout_marginTop="@dimen/dp_30" | 341 | + android:layout_marginTop="@dimen/dp_60" |
342 | android:layout_marginRight="@dimen/dp_20" | 342 | android:layout_marginRight="@dimen/dp_20" |
343 | android:background="@drawable/circle_bigconners_orange"> | 343 | android:background="@drawable/circle_bigconners_orange"> |
344 | 344 |
@@ -20,4 +20,7 @@ | @@ -20,4 +20,7 @@ | ||
20 | <color name="color_575757">#575757</color> | 20 | <color name="color_575757">#575757</color> |
21 | <color name="color_333333">#333333</color> | 21 | <color name="color_333333">#333333</color> |
22 | <color name="color_e4e4e4">#E4E4E4</color> | 22 | <color name="color_e4e4e4">#E4E4E4</color> |
23 | + <color name="color_232323">#232323</color> | ||
24 | + <color name="color_6666666">#666666</color> | ||
25 | + <color name="color_dddddd">#dddddd</color> | ||
23 | </resources> | 26 | </resources> |
-
请 注册 或 登录 后发表评论