|
@@ -168,6 +168,24 @@ class MainViewModel : BaseViewModel() {
|
168
|
168
|
*/
|
169
|
169
|
fun postDevicesetDetail(schoolid: Long) {
|
170
|
170
|
launchUI {
|
|
171
|
+ val postListApp = appService.postListApp(ListAppBean())
|
|
172
|
+ if (postListApp.code == 0) {
|
|
173
|
+ if (postListApp.obj != null && postListApp.obj.isNotEmpty()) {
|
|
174
|
+ listData.value = postListApp.obj
|
|
175
|
+ } else {
|
|
176
|
+ listData.value = arrayListOf()
|
|
177
|
+ }
|
|
178
|
+ } else {
|
|
179
|
+ if (!postListApp.msg.isNullOrEmpty()) {
|
|
180
|
+ netMessage.value = postListApp.msg
|
|
181
|
+ }
|
|
182
|
+ }
|
|
183
|
+ //获得必装应用
|
|
184
|
+ val result1 = appService.postForceApp()
|
|
185
|
+ if (result1.code == 0 && result1.obj != null && result1.obj.isNotEmpty()) {
|
|
186
|
+ forceData.value = result1.obj
|
|
187
|
+ }
|
|
188
|
+
|
171
|
189
|
val map = HashMap<String, Any>()
|
172
|
190
|
map["schoolid"] = schoolid
|
173
|
191
|
val result = strategyService.postDevicesetDetail(map)
|