Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_fiveworld
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_fiveworld
Commits
a28731b7
Commit
a28731b7
authored
Jul 21, 2021
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
f3ad3ad3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
17 deletions
+11
-17
MainApi.kt
app/src/main/java/com/mints/street/api/MainApi.kt
+2
-2
LoginActivity.kt
app/src/main/java/com/mints/street/login/LoginActivity.kt
+2
-3
LoginViewModel.kt
app/src/main/java/com/mints/street/login/LoginViewModel.kt
+1
-1
HomeFragment.kt
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
+1
-0
ApiModel.kt
app/src/main/java/com/mints/street/model/ApiModel.kt
+1
-1
activity_openvip.xml
app/src/main/res/layout/activity_openvip.xml
+0
-7
item_grid_payment_adpater.xml
app/src/main/res/layout/item_grid_payment_adpater.xml
+4
-3
No files found.
app/src/main/java/com/mints/street/api/MainApi.kt
View file @
a28731b7
...
@@ -23,7 +23,7 @@ interface MainApi {
...
@@ -23,7 +23,7 @@ interface MainApi {
* @return
* @return
*/
*/
@POST
(
"na/saveTerminalInfo"
)
@POST
(
"na/saveTerminalInfo"
)
fun
comSaveTerminalInfo
(
@Body
vo
:
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>
fun
comSaveTerminalInfo
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>
/**
/**
* 获取验证码
* 获取验证码
...
@@ -31,7 +31,7 @@ interface MainApi {
...
@@ -31,7 +31,7 @@ interface MainApi {
* @return
* @return
*/
*/
@POST
(
"api/sendMobileCode"
)
@POST
(
"api/sendMobileCode"
)
fun
sendMobileCode
(
@Body
vo
:
Map
<
String
,
String
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>
fun
sendMobileCode
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>
/**
/**
* 登录
* 登录
...
...
app/src/main/java/com/mints/street/login/LoginActivity.kt
View file @
a28731b7
...
@@ -47,9 +47,8 @@ class LoginActivity : BaseActivity<ActivityLoginBinding, LoginViewModel>(), View
...
@@ -47,9 +47,8 @@ class LoginActivity : BaseActivity<ActivityLoginBinding, LoginViewModel>(), View
return
@setOnClickListener
return
@setOnClickListener
}
}
if
(!
userManager
.
getMobile
().
isEmpty
())
{
ToastUtils
.
showLong
(
"验证码已发送"
)
sendCodeThread
()
sendCodeThread
()
}
mobile
=
mobile
.
replace
(
" "
.
toRegex
(),
""
)
mobile
=
mobile
.
replace
(
" "
.
toRegex
(),
""
)
viewModel
.
sendMobileCode
(
mobile
)
viewModel
.
sendMobileCode
(
mobile
)
...
...
app/src/main/java/com/mints/street/login/LoginViewModel.kt
View file @
a28731b7
...
@@ -33,7 +33,7 @@ class LoginViewModel(application: Application) : BaseViewModel(application) {
...
@@ -33,7 +33,7 @@ class LoginViewModel(application: Application) : BaseViewModel(application) {
* @param mobile
* @param mobile
*/
*/
fun
sendMobileCode
(
mobile
:
String
)
{
fun
sendMobileCode
(
mobile
:
String
)
{
val
vo
=
HashMap
<
String
,
String
>()
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"mobile"
]
=
mobile
vo
[
"mobile"
]
=
mobile
// vo["type"] = 1
// vo["type"] = 1
...
...
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
View file @
a28731b7
...
@@ -95,6 +95,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
...
@@ -95,6 +95,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
private
fun
uploadDeviceInfo
()
{
private
fun
uploadDeviceInfo
()
{
UmengManager
.
initUm
()
UmengManager
.
initUm
()
viewModel
.
comSaveTerminalInfo
()
}
}
override
fun
initData
()
{
override
fun
initData
()
{
...
...
app/src/main/java/com/mints/street/model/ApiModel.kt
View file @
a28731b7
...
@@ -24,7 +24,7 @@ object ApiModel {
...
@@ -24,7 +24,7 @@ object ApiModel {
/**
/**
* 发送验证码
* 发送验证码
*/
*/
fun
sendMobileCode
(
lifecycleProvider
:
LifecycleProvider
<
Any
>?,
map
:
Map
<
String
,
String
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>
{
fun
sendMobileCode
(
lifecycleProvider
:
LifecycleProvider
<
Any
>?,
map
:
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>
{
return
HttpManager
.
getInstance
()
return
HttpManager
.
getInstance
()
.
execute
(
lifecycleProvider
,
MainApi
.
newInstance
().
sendMobileCode
(
map
))
.
execute
(
lifecycleProvider
,
MainApi
.
newInstance
().
sendMobileCode
(
map
))
}
}
...
...
app/src/main/res/layout/activity_openvip.xml
View file @
a28731b7
...
@@ -121,13 +121,6 @@
...
@@ -121,13 +121,6 @@
android:src=
"@mipmap/pay_unselect"
/>
android:src=
"@mipmap/pay_unselect"
/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:background=
"#979797"
/>
<LinearLayout
<LinearLayout
android:id=
"@+id/ly_alipay"
android:id=
"@+id/ly_alipay"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/item_grid_payment_adpater.xml
View file @
a28731b7
...
@@ -14,9 +14,10 @@
...
@@ -14,9 +14,10 @@
android:layout_height=
"130dp"
>
android:layout_height=
"130dp"
>
<LinearLayout
<LinearLayout
android:layout_width=
"80dp"
android:layout_width=
"wrap_content"
android:layout_height=
"130dp"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_gravity=
"center"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<TextView
<TextView
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment