Commit 32cbdbf8 authored by mengcuiguang2's avatar mengcuiguang2

修改登录协议样式,VR接口防止二次调用

parent 6090d3b9
......@@ -20,29 +20,6 @@ class FeaturedExperienceViewModel(application: Application):BaseViewModel(applic
val VrmapBean: MutableLiveData<VrmapBean> = MutableLiveData()
val VreperienceBean: MutableLiveData<VreperienceBean> = MutableLiveData()
fun vrPlaces(){//无参数传递
ApiModel.vrPlaces(lifecycleProvider).safeSubscribe(
object : HttpSubscribeImpl<BaseResponse<VrmapBean>>(
this@FeaturedExperienceViewModel,true){
override fun onBusinessSuccess(response: BaseResponse<VrmapBean>) {
VrmapBean.value=response.result
val a:MutableList<ScenicSpotBean> = ArrayList()
for (item in response.result.internal!!){
a.add(
ScenicSpotBean(name = item.name,url = item.url
,starRating = item.stars,images = item.img)
)
}
}
override fun onError(e: Throwable) {
KLog.e("vrPlaces","请求失败 : $e")
}
}
)
}
fun getChooseExperienceHeadData(){
val vo = HashMap<String, Any>()
vo["pageNum"] = 1
......
......@@ -51,7 +51,7 @@ class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel
//获取VR全景数据
viewModel.vrPlaces()
}
viewModel.vrPlaces()
// viewModel.vrPlaces()
}
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@mipmap/ic_vip_enable" android:state_checked="true" />
<item android:drawable="@mipmap/ic_vip_none" android:state_checked="false" />
<item android:drawable="@mipmap/ic_vip_none" />
</selector>
\ No newline at end of file
......@@ -65,8 +65,9 @@
android:padding="10dp">
<CheckBox
android:layout_marginRight="6dp"
android:id="@+id/cb_checked"
style="@style/MyCheckBox"
style="@style/CustomCheckboxTheme"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
......
......@@ -64,4 +64,7 @@
<item name="android:windowEnterAnimation">@anim/dialog_bottom_in</item>
<item name="android:windowExitAnimation">@anim/dialog_bottom_out</item>
</style>
<style name="CustomCheckboxTheme" parent="@android:style/Widget.CompoundButton.CheckBox">
<item name="android:button">@drawable/checkbox_style</item>
</style>
</resources>
\ 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