Commit 077c6696b868147a86413b55bdee3047ab7a0210
1 parent
16b86181
报名成功通知
Showing
4 changed files
with
47 additions
and
26 deletions
config.gradle
moudle_pedometer/src/main/AndroidManifest.xml
| ... | ... | @@ -57,20 +57,18 @@ |
| 57 | 57 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.LineUpAgainActivity" /> |
| 58 | 58 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.SelfRecordActivity" /> |
| 59 | 59 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.TakePartActivity" /> |
| 60 | - <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RunLineActivity" /> | |
| 60 | + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RunLineActivity"/> | |
| 61 | 61 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.MyRecordActivity" /> |
| 62 | 62 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.ShareRecordActivity" /> |
| 63 | 63 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RaceRecordActivity" /> |
| 64 | 64 | <activity |
| 65 | - android:name="com.cnlive.moudle.pedometer.ui.activity.RegistrationInfoActivity" | |
| 66 | - android:process=":step" /> | |
| 65 | + android:name="com.cnlive.moudle.pedometer.ui.activity.RegistrationInfoActivity"/> | |
| 67 | 66 | |
| 68 | 67 | <service |
| 69 | 68 | android:name="com.cnlive.moudle.pedometer.service.StepService" |
| 70 | 69 | android:enabled="true" |
| 71 | 70 | android:exported="true" |
| 72 | 71 | android:priority="1000" |
| 73 | - android:process=":step" | |
| 74 | 72 | android:stopWithTask="false"> |
| 75 | 73 | <intent-filter> |
| 76 | 74 | |
| ... | ... | @@ -119,20 +117,16 @@ |
| 119 | 117 | |
| 120 | 118 | <activity |
| 121 | 119 | android:name="com.cnlive.moudle.pedometer.ui.activity.PedometerMainActivity" |
| 122 | - android:launchMode="singleTask" | |
| 123 | - android:process=":step" /> | |
| 120 | + android:launchMode="singleTask"/> | |
| 124 | 121 | <activity |
| 125 | 122 | android:name="com.cnlive.moudle.pedometer.ui.activity.RunningMapActivity" |
| 126 | - android:launchMode="singleTask" | |
| 127 | - android:process=":step" /> <!-- android:theme="@style/Theme.AppCompat.Light.NoActionBar" --> | |
| 123 | + android:launchMode="singleTask"/> <!-- android:theme="@style/Theme.AppCompat.Light.NoActionBar" --> | |
| 128 | 124 | <activity |
| 129 | 125 | android:name="com.cnlive.moudle.pedometer.ui.activity.RunRaceDetailActivity" |
| 130 | - android:launchMode="singleTask" | |
| 131 | - android:process=":step" /> | |
| 126 | + android:launchMode="singleTask"/> | |
| 132 | 127 | <activity |
| 133 | 128 | android:name="com.cnlive.moudle.pedometer.ui.activity.RunningFinishActivity" |
| 134 | - android:launchMode="singleTask" | |
| 135 | - android:process=":step" /> | |
| 129 | + android:launchMode="singleTask"/> | |
| 136 | 130 | <activity |
| 137 | 131 | android:name="com.cnlive.moudle.pedometer.ui.activity.UploadFailDetailActivity" |
| 138 | 132 | android:launchMode="singleTask" /> |
| ... | ... | @@ -156,7 +150,6 @@ |
| 156 | 150 | android:enabled="true" |
| 157 | 151 | android:exported="true" |
| 158 | 152 | android:priority="1000" |
| 159 | - android:process=":step" | |
| 160 | 153 | android:stopWithTask="false"> |
| 161 | 154 | <intent-filter> |
| 162 | 155 | |
| ... | ... | @@ -187,20 +180,15 @@ |
| 187 | 180 | </receiver> |
| 188 | 181 | |
| 189 | 182 | <activity |
| 190 | - android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollPedometerMainActivity" | |
| 191 | - android:process=":step" /> | |
| 183 | + android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollPedometerMainActivity"/> | |
| 192 | 184 | <activity |
| 193 | - android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunningFinishActivity" | |
| 194 | - android:process=":step" /> <!-- android:theme="@style/Theme.AppCompat.Light.NoActionBar" --> | |
| 185 | + android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunningFinishActivity"/> <!-- android:theme="@style/Theme.AppCompat.Light.NoActionBar" --> | |
| 195 | 186 | <activity |
| 196 | - android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunningMapActivity" | |
| 197 | - android:process=":step" /> | |
| 187 | + android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunningMapActivity"/> | |
| 198 | 188 | <activity |
| 199 | - android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunRaceDetailActivity" | |
| 200 | - android:process=":step" /> | |
| 189 | + android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunRaceDetailActivity"/> | |
| 201 | 190 | <activity |
| 202 | - android:name="com.cnlive.moudle.collectionTrace.ui.activity.StartCollectTraceActivity" | |
| 203 | - android:process=":step" /> | |
| 191 | + android:name="com.cnlive.moudle.collectionTrace.ui.activity.StartCollectTraceActivity"/> | |
| 204 | 192 | </application> |
| 205 | 193 | |
| 206 | 194 | </manifest> |
| 207 | 195 | \ No newline at end of file | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/RegistrationInfoPresenter.java
| ... | ... | @@ -29,8 +29,16 @@ public class RegistrationInfoPresenter extends MvpBasePresenter<RegistrationInfo |
| 29 | 29 | map.put("eventId", eventId); |
| 30 | 30 | map.put("sid", sid); |
| 31 | 31 | map.put("mobile", mobile); |
| 32 | - map.put("sex", ""); | |
| 33 | - map.put("birthday", ""); | |
| 32 | + if(sex.equals("女")){ | |
| 33 | + sex = "1"; | |
| 34 | + }else if (sex.equals("男")){ | |
| 35 | + sex = "0"; | |
| 36 | + } | |
| 37 | + map.put("sex", sex); | |
| 38 | + if(birthday.contains("年")) birthday = birthday.replace("年","-"); | |
| 39 | + if(birthday.contains("月")) birthday = birthday.replace("月","-"); | |
| 40 | + if(birthday.contains("日")) birthday = birthday.replace("日",""); | |
| 41 | + map.put("birthday", birthday); | |
| 34 | 42 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo>() { |
| 35 | 43 | @Override |
| 36 | 44 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo> dataCallback) { | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RunLineFragment.java
| ... | ... | @@ -10,9 +10,15 @@ import com.cnlive.libs.base.frame.fragment.MvpBindingFragment; |
| 10 | 10 | import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; |
| 11 | 11 | import com.cnlive.moudle.pedometer.frame.presenter.RunLinePresenter; |
| 12 | 12 | import com.cnlive.moudle.pedometer.frame.view.RunLineView; |
| 13 | +import com.cnlive.moudle.pedometer.model.Constant; | |
| 14 | +import com.cnlive.moudle.pedometer.model.MessageEvent; | |
| 13 | 15 | import com.example.moudle_pedometer.R; |
| 14 | 16 | import com.example.moudle_pedometer.databinding.FragmentRunLineBinding; |
| 15 | 17 | |
| 18 | +import org.greenrobot.eventbus.EventBus; | |
| 19 | +import org.greenrobot.eventbus.Subscribe; | |
| 20 | +import org.greenrobot.eventbus.ThreadMode; | |
| 21 | + | |
| 16 | 22 | |
| 17 | 23 | /** |
| 18 | 24 | * Created by hanyayun 019/06/03. |
| ... | ... | @@ -35,6 +41,7 @@ public class RunLineFragment extends MvpBindingFragment<RunLineView, RunLinePres |
| 35 | 41 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { |
| 36 | 42 | super.onViewCreated(view, savedInstanceState); |
| 37 | 43 | if(getMvpView() != null)getMvpView().initView(); |
| 44 | + EventBus.getDefault().register(this); | |
| 38 | 45 | getPresenter().setData(getActivity(),CommonInfo.getUserId(getActivity()),currentPage,pageSize); |
| 39 | 46 | |
| 40 | 47 | binding.refreshLayout.setOnRefreshListener(v ->{ |
| ... | ... | @@ -46,4 +53,22 @@ public class RunLineFragment extends MvpBindingFragment<RunLineView, RunLinePres |
| 46 | 53 | getPresenter().setData(getActivity(),CommonInfo.getUserId(getActivity()),currentPage,pageSize); |
| 47 | 54 | }); |
| 48 | 55 | } |
| 56 | + | |
| 57 | + @Override | |
| 58 | + public void onDestroy() { | |
| 59 | + super.onDestroy(); | |
| 60 | + if (EventBus.getDefault().isRegistered(this)) { | |
| 61 | + EventBus.getDefault().unregister(this); | |
| 62 | + } | |
| 63 | + } | |
| 64 | + | |
| 65 | + @Subscribe(threadMode = ThreadMode.MAIN) | |
| 66 | + public void Event(MessageEvent messageEvent) { | |
| 67 | + if (messageEvent.getMessageType() == Constant.REGISTRATION_SUCCESS) { | |
| 68 | + if (getMvpView() != null) { | |
| 69 | + currentPage = 1; | |
| 70 | + getPresenter().setData(getActivity(),CommonInfo.getUserId(getActivity()),currentPage,pageSize); | |
| 71 | + } | |
| 72 | + } | |
| 73 | + } | |
| 49 | 74 | } | ... | ... |