中建365
parent
9d31c548f3
commit
8dfa64ec75
@ -0,0 +1,28 @@
|
|||||||
|
package com.zj365.dc.activity
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
|
import com.xty.base.act.BaseVmAct
|
||||||
|
import com.xty.base.vm.BaseVm
|
||||||
|
import com.xty.common.arouter.ARouterUrl
|
||||||
|
import com.zj365.dc.databinding.ActMessageDetailNewBinding
|
||||||
|
|
||||||
|
@Route(path = ARouterUrl.MESSAGE_DETAIL_NEW)
|
||||||
|
class MessageDetailNewAct: BaseVmAct<BaseVm>() {
|
||||||
|
val binding by lazy { ActMessageDetailNewBinding.inflate(layoutInflater) }
|
||||||
|
|
||||||
|
|
||||||
|
override fun liveObserver() {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setLayout() = binding.root
|
||||||
|
|
||||||
|
override fun initView() {
|
||||||
|
super.initView()
|
||||||
|
statusBar(binding.title.mView)
|
||||||
|
binding.title.mTvTitle.text= "消息详情"
|
||||||
|
binding.title.mIvBack.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/col_6f7">
|
||||||
|
<include layout="@layout/title_white_bar"
|
||||||
|
android:id="@+id/title"/>
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="@dimen/dp_2">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:paddingTop="@dimen/dp_27"
|
||||||
|
android:paddingLeft="@dimen/dp_17"
|
||||||
|
android:paddingRight="@dimen/dp_17"
|
||||||
|
android:paddingBottom="@dimen/dp_42">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_msg_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/sp_17"
|
||||||
|
android:textColor="@color/col_313"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="系统消息"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_msg_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/sp_13"
|
||||||
|
android:textColor="@color/col_c7c"
|
||||||
|
tools:text="2022-03-24 15:04"
|
||||||
|
android:layout_marginTop="@dimen/dp_9"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/col_c7c"
|
||||||
|
android:textSize="@dimen/sp_13"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:id="@+id/tv_msg_content"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
Binary file not shown.
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 52 KiB |
@ -0,0 +1,46 @@
|
|||||||
|
package com.zj365.health.vm
|
||||||
|
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import com.xty.base.vm.BaseVm
|
||||||
|
import com.xty.network.model.PayBean
|
||||||
|
import com.xty.network.model.PayGoodsBean
|
||||||
|
import com.xty.network.model.RespBody
|
||||||
|
import org.json.JSONObject
|
||||||
|
|
||||||
|
class SkinMeasurementVm: BaseVm() {
|
||||||
|
val payGoodsObservable by lazy { MutableLiveData<RespBody<PayGoodsBean>>() }
|
||||||
|
|
||||||
|
val payObservable by lazy { MutableLiveData<RespBody<PayBean>>() }
|
||||||
|
|
||||||
|
val haveOrder by lazy { MutableLiveData<RespBody<Boolean>>() }
|
||||||
|
|
||||||
|
|
||||||
|
fun getAIoods(){
|
||||||
|
startHttp {
|
||||||
|
apiInterface().getTongueGoods()
|
||||||
|
var response = apiInterface().getTongueGoods()
|
||||||
|
response.getCodeStatus(payGoodsObservable, nowData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取有无未完成订单
|
||||||
|
fun aiHasNoFinishOrder() {
|
||||||
|
startHttp {
|
||||||
|
var json = JSONObject()
|
||||||
|
var response =
|
||||||
|
apiInterface().tongueHasNoFinishOrder(retrofits.getRequestBody(json.toString()))
|
||||||
|
response.getCodeStatus(haveOrder, nowData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取支付信息
|
||||||
|
fun payTongueOrder(goodsId:String,isWeChatPay:Boolean){
|
||||||
|
startHttp {
|
||||||
|
var json = JSONObject()
|
||||||
|
json.put("goodsId",goodsId)
|
||||||
|
json.put("channelName", if (isWeChatPay) "WEIXIN_APP" else "ALIPAY_APP")
|
||||||
|
var response = apiInterface().payTongueOrder(retrofits.getRequestBody(json.toString()))
|
||||||
|
response.getCodeStatus(payObservable, nowData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
</LinearLayout>
|
Loading…
Reference in New Issue