Commit ff04eb7e authored by 张释方's avatar 张释方

Merge branch 'dev_1.0.0' of http://gitlab.mints-id.com/android/android_street into branche_zsf

parents 6987aafa 6e6b01fb
......@@ -2,6 +2,7 @@ package com.mints.street.adapter
import android.content.Context
import android.graphics.Paint
import android.view.View
import com.alibaba.android.vlayout.LayoutHelper
import com.alibaba.android.vlayout.layout.GridLayoutHelper
import com.alibaba.android.vlayout.layout.LinearLayoutHelper
......@@ -54,6 +55,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ListBean>)
holder.binding.tvDays.text = "${databean.days}天"
holder.binding.tvOldprice.text = "原价¥${databean.oldPrice}"
holder.binding.tvPrice.text = "¥${databean.price}"
holder.binding.ivHot.visibility = if (databean.activityType == 0) View.GONE else View.VISIBLE
}
}
......
......@@ -23,7 +23,7 @@ interface MainApi {
* @return
*/
@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 {
* @return
*/
@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>>>
/**
* 登录
......
......@@ -52,9 +52,8 @@ class LoginActivity : BaseActivity<ActivityLoginBinding, LoginViewModel>(), View
return@setOnClickListener
}
if (!userManager.getMobile().isEmpty()) {
sendCodeThread()
}
ToastUtils.showLong("验证码已发送")
sendCodeThread()
mobile = mobile.replace(" ".toRegex(), "")
viewModel.sendMobileCode(mobile)
......
......@@ -33,7 +33,7 @@ class LoginViewModel(application: Application) : BaseViewModel(application) {
* @param mobile
*/
fun sendMobileCode(mobile: String) {
val vo = HashMap<String, String>()
val vo = HashMap<String, Any>()
vo["mobile"] = mobile
// vo["type"] = 1
......
......@@ -28,6 +28,7 @@ import com.mints.street.bean.PositioningBean
import com.mints.street.databinding.FragmentHomeBinding
import com.mints.street.manager.UmengManager
import com.mints.street.webview.MintsWebViewActivity
import com.mints.street.widget.ScrollLayout
import me.goldze.mvvmhabit.base.AppManager
import me.goldze.mvvmhabit.utils.KLog
import me.goldze.mvvmhabit.utils.RxUtils
......@@ -95,6 +96,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
private fun uploadDeviceInfo() {
UmengManager.initUm()
viewModel.comSaveTerminalInfo()
}
override fun initData() {
......@@ -115,6 +117,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
// 默认 天安门
val center = LatLng(it["latitude"] ?:39.915071, it["longitude"] ?:116.403907)
setNewMapStatus(center)
binding.scrollLayout.toggle(ScrollLayout.STATUS_CLOSE)
})
}
......
......@@ -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()
.execute(lifecycleProvider, MainApi.newInstance().sendMobileCode(map))
}
......
......@@ -35,6 +35,10 @@ class SplashActivity:BaseActivity<ActivitySplashBinding,SplashViewModel>() {
//是否强制跳转到主页面
private var mForceGoMain = false
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
override fun initContentView(savedInstanceState: Bundle?) = R.layout.activity_splash
override fun initVariableId() = BR.viewModel
......
......@@ -2,6 +2,7 @@ package com.mints.street.webview
import android.content.Intent
import android.os.Bundle
import android.view.ViewGroup
import android.webkit.WebSettings
import android.webkit.WebView
import android.webkit.WebViewClient
......@@ -65,4 +66,16 @@ class MintsWebViewActivity : BaseActivity<ActivityMintsWebViewBinding, MintsWebV
}
override fun onDestroy() {
super.onDestroy()
binding.webview?.let {
it.destroyDrawingCache()
val parent = it.parent as ViewGroup
parent?.removeView(it)
it.removeAllViews()
it.destroy()
}
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -3,6 +3,6 @@
<item >
<bitmap
android:src="@drawable/bg" />
android:src="@drawable/bg_splash" />
</item>
</layer-list>
......@@ -121,13 +121,6 @@
android:src="@mipmap/pay_unselect" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#979797" />
<LinearLayout
android:id="@+id/ly_alipay"
android:layout_width="match_parent"
......
......@@ -16,6 +16,12 @@
android:layout_height="match_parent"
app:srlAccentColor="@color/gray"
app:srlPrimaryColor="@color/white">
<com.scwang.smartrefresh.layout.header.ClassicsHeader
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srlTextFailed="释放立即刷新"
app:srlTextRefreshing="下拉可以刷新"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_view"
android:layout_width="match_parent"
......
......@@ -16,6 +16,12 @@
android:layout_height="match_parent"
app:srlAccentColor="@color/gray"
app:srlPrimaryColor="@color/white">
<com.scwang.smartrefresh.layout.header.ClassicsHeader
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srlTextFailed="释放立即刷新"
app:srlTextRefreshing="下拉可以刷新"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_view"
android:layout_width="wrap_content"
......
......@@ -8,33 +8,47 @@
type="com.mints.street.adapter.GridPaymentAdapter" />
</data>
<LinearLayout
<FrameLayout
android:id="@+id/bg"
android:layout_width="80dp"
android:layout_height="130dp"
android:gravity="center"
android:orientation="vertical">
android:layout_height="130dp">
<TextView
android:id="@+id/tv_days"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textStyle="bold" />
android:layout_gravity="center"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FF5722"
android:textSize="28dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_days"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FF5722"
android:textSize="28dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_oldprice"
<TextView
android:id="@+id/tv_oldprice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#25000000"
android:textSize="10dp" />
</LinearLayout>
<ImageView
android:id="@+id/iv_hot"
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#25000000"
android:textSize="10dp" />
</LinearLayout>
android:visibility="gone"
android:src="@mipmap/ic_vip_hot"
></ImageView>
</FrameLayout>
</layout>
\ No newline at end of file
......@@ -14,10 +14,6 @@ org.gradle.jvmargs=-Xmx2048m
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
isBuildModule=false
DEBUG_URL="http://test.mints-id.com/map-api/"
......@@ -30,8 +26,12 @@ RELEASE_STORE_PASSWORD=mints.street
RELEASE_STORE_FILE=mints_street.jks
#ShareSDK
RELEASE_SHARESDK_KEY=
RELEASE_SHARESDK_SECRET=
RELEASE_SHARESDK_KEY=m33e5da5ced828
RELEASE_SHARESDK_SECRET=08ce5b656e724e793787bd9f6d465ae8
#友盟
RELEASE_UMENG_KEY=60e80209a6f90557b7b19aa7
android.useAndroidX=true
android.enableJetifier=true
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment