Browse Source

1.添加设备设置请求接口。

master
wangwanlei 11 months ago
parent
commit
0b8c41ff3d

+ 9
- 0
app/src/main/java/com/xhly/manageapp/network/UriAdress.kt View File

@@ -46,4 +46,13 @@ object UriAdress {
46 46
      */
47 47
     const val ULOGIN_LOGIN="/ulogin/login"
48 48
 
49
+    /**
50
+     * 退出登录接口
51
+     */
52
+    const val ULOGIN_LOGIN_OUT="/ulogin/login_out"
53
+
54
+    /**
55
+     * 设备设置管理
56
+     */
57
+    const val DEVICESETDETAIL="/deviceSet/detail"
49 58
 }

+ 7
- 0
app/src/main/java/com/xhly/manageapp/network/strategy/StrategyService.kt View File

@@ -4,6 +4,7 @@ import com.xhly.corelib.network.bean.ResponseData
4 4
 import com.xhly.manageapp.bean.strategy.AppTimeManageBean
5 5
 import com.xhly.manageapp.bean.strategy.StrategyBean
6 6
 import com.xhly.manageapp.network.UriAdress
7
+import retrofit2.http.Body
7 8
 import retrofit2.http.POST
8 9
 
9 10
 interface StrategyService {
@@ -12,4 +13,10 @@ interface StrategyService {
12 13
 
13 14
     @POST(UriAdress.APP_LISTPAD)
14 15
     suspend fun postAppListPad():ResponseData<ArrayList<AppTimeManageBean>>
16
+
17
+    /**
18
+     * 设备设置管理
19
+     */
20
+    @POST(UriAdress.DEVICESETDETAIL)
21
+    suspend fun postDevicesetDetail(@Body map:HashMap<String,Any>):ResponseData<Any>
15 22
 }

+ 17
- 1
app/src/main/java/com/xhly/manageapp/ui/main/viewmodel/MainViewModel.kt View File

@@ -114,7 +114,7 @@ class MainViewModel : CommonBaseViewModel() {
114 114
             map["loginpwd"] = loginpwd
115 115
             val postLoginOut = loginService.postLoginOut(map)
116 116
             if (postLoginOut.code == 0) {
117
-                loginOut.value=true
117
+                loginOut.value = true
118 118
             } else {
119 119
                 if (postLoginOut.msg != null) {
120 120
                     netMessage.value = postLoginOut.msg
@@ -122,4 +122,20 @@ class MainViewModel : CommonBaseViewModel() {
122 122
             }
123 123
         }
124 124
     }
125
+
126
+    /**
127
+     * 获得设备设置管理
128
+     */
129
+    fun postDevicesetDetail(schoolid: String) {
130
+        launchUI {
131
+            val map = HashMap<String, Any>()
132
+            map["schoolid"] = schoolid
133
+            val result = strategyService.postDevicesetDetail(map)
134
+            if (result.code == 0) {
135
+
136
+            } else {
137
+                netMessage.value = result.msg
138
+            }
139
+        }
140
+    }
125 141
 }

Loading…
Cancel
Save