浏览代码

1.添加判断首页任务提醒弹窗是否显示接口

王鹏鹏 2 年之前
父节点
当前提交
dd63937834

+ 0 - 11
baselib/src/main/java/com/yingyangfly/baselib/net/BaseResp.kt

@@ -23,10 +23,6 @@ open class BaseResp<T>(
         if (this.code == ResponseCode.SUCCESS) {
             if (data != null) {
                 func(data!!)
-            } else {
-                s {
-                    this.message
-                }
             }
         } else {
             n {
@@ -35,13 +31,6 @@ open class BaseResp<T>(
         }
     }
 
-    /**
-     * 网络请求成功
-     */
-    inline fun s(func: (message: String) -> Unit) {
-        func(message)
-    }
-
     /**
      * 网络数据请求失败
      */

+ 0 - 14
home/src/main/java/com/yingyangfly/home/activity/HomeViewModel.kt

@@ -63,18 +63,4 @@ class HomeViewModel : BaseViewModel() {
         success,
         fail
     )
-
-    /**
-     * 更改消息状态
-     */
-    fun updateReadMsg(
-        msgId: String,
-        fail: ((msg: String) -> Unit)? = null,
-        success: ((success: Unit) -> Unit)? = null,
-    ) = launchFlow(true) {
-        HOME_API.updateReadMsg(msgId)
-    }.runUI(
-        success,
-        fail
-    )
 }

+ 0 - 7
home/src/main/java/com/yingyangfly/home/net/HomeApiService.kt

@@ -5,7 +5,6 @@ import com.yingyangfly.home.entity.CountTrainBean
 import com.yingyangfly.home.entity.MyTaskBean
 import com.yingyangfly.home.entity.Record
 import retrofit2.http.POST
-import retrofit2.http.Query
 
 interface HomeApiService {
     /**
@@ -32,10 +31,4 @@ interface HomeApiService {
     @POST("app/warn/countMyMsg")
     suspend fun getCountMyMsg(): BaseResp<String>
 
-    /**
-     * 更改消息状态
-     */
-    @POST("app/warn/readMsg")
-    suspend fun updateReadMsg(@Query("msgId") msgId: String): BaseResp<Unit>
-
 }