ソースを参照

1.在请求学校设置前先请求应用数据

20241218TB223FC(测试jar包)
wangwanlei 11ヶ月前
コミット
adc6010455

+ 2
- 2
app/src/main/java/com/xhly/manageapp/ui/main/activity/MainActivity.kt ファイルの表示

645
         viewModel.postWallpaperPad()
645
         viewModel.postWallpaperPad()
646
         viewModel.updateStrategy()
646
         viewModel.updateStrategy()
647
         viewModel.uploadAppStrategy()
647
         viewModel.uploadAppStrategy()
648
-        viewModel.getAppList()
648
+       /* viewModel.getAppList()*/
649
         viewModel.postAppNetWhiteList()
649
         viewModel.postAppNetWhiteList()
650
         useTimeStrategy()
650
         useTimeStrategy()
651
         updatePadInfo()
651
         updatePadInfo()
1109
                     }
1109
                     }
1110
                 }
1110
                 }
1111
             } catch (e: Exception) {
1111
             } catch (e: Exception) {
1112
-                LogShow("商店应用为空")
1112
+                LogShow("商店应用为空"+e.toString())
1113
             }
1113
             }
1114
             dataList.clear()
1114
             dataList.clear()
1115
             var appList = AppUtils.GetAppList(this)
1115
             var appList = AppUtils.GetAppList(this)

+ 18
- 0
app/src/main/java/com/xhly/manageapp/ui/main/viewmodel/MainViewModel.kt ファイルの表示

168
      */
168
      */
169
     fun postDevicesetDetail(schoolid: Long) {
169
     fun postDevicesetDetail(schoolid: Long) {
170
         launchUI {
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
             val map = HashMap<String, Any>()
189
             val map = HashMap<String, Any>()
172
             map["schoolid"] = schoolid
190
             map["schoolid"] = schoolid
173
             val result = strategyService.postDevicesetDetail(map)
191
             val result = strategyService.postDevicesetDetail(map)

読み込み中…
キャンセル
保存