Browse Source

1.添加推送事件提交接口。

20241218TB223FC(测试jar包)
wangwanlei 9 months ago
parent
commit
20ee3365de

+ 1
- 0
app/src/main/java/com/xhly/manageapp/ManageApplication.kt View File

524
             if (Const.isDebug){
524
             if (Const.isDebug){
525
                 csdkManager?.setPackageEnabled("com.xhly.easystud", true)
525
                 csdkManager?.setPackageEnabled("com.xhly.easystud", true)
526
                 setUrlWhiteListEnable(false)
526
                 setUrlWhiteListEnable(false)
527
+                disableStatusBarPanel(false)
527
             }
528
             }
528
             csdkManager?.urlWhiteListRead()?.forEach {
529
             csdkManager?.urlWhiteListRead()?.forEach {
529
                 LogShow("白名单有"+it.toString())
530
                 LogShow("白名单有"+it.toString())

+ 36
- 0
app/src/main/java/com/xhly/manageapp/bean/log/LogPushBean.kt View File

1
+package com.xhly.manageapp.bean.log
2
+
3
+/**
4
+ * 处理推送事件后的回调
5
+ */
6
+class LogPushBean {
7
+    /** app只处理6,2,3,7
8
+     * 推送类型:1发送消息2解除限制3限制使用4更新策略5重启设备6恢复出厂7解除管控
9
+     */
10
+    var pushType = 0
11
+
12
+    /**
13
+     * 推送对象:1学生2班级
14
+     */
15
+    var pushObj = 1
16
+
17
+    /**
18
+     * 推送目标:班级ID(pushObj=2)
19
+     */
20
+    var pushObjid = 0L
21
+
22
+    /**
23
+     * :学生ids(pushObj=1)
24
+     */
25
+    var userids = longArrayOf()
26
+
27
+    /**
28
+     * 推送目标:学生名称/班级名称
29
+     */
30
+    var pushObjname = ""
31
+
32
+    /**
33
+     * 日志内容
34
+     */
35
+    var content = ""
36
+}

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

6
      */
6
      */
7
     const val LOGDOPERATEADD = "/logdoperate/add"
7
     const val LOGDOPERATEADD = "/logdoperate/add"
8
 
8
 
9
+    /**
10
+     * 设备推送事件接口
11
+     */
12
+   const val LOGPUSH_ADD="/logPush/add"
9
     /**
13
     /**
10
      *应用启动日志-添加
14
      *应用启动日志-添加
11
      */
15
      */

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

2
 
2
 
3
 import com.xhly.corelib.network.bean.ResponseData
3
 import com.xhly.corelib.network.bean.ResponseData
4
 import com.xhly.manageapp.bean.log.LogAppStartBean
4
 import com.xhly.manageapp.bean.log.LogAppStartBean
5
+import com.xhly.manageapp.bean.log.LogPushBean
5
 import com.xhly.manageapp.bean.log.LogdOperateBean
6
 import com.xhly.manageapp.bean.log.LogdOperateBean
6
 import com.xhly.manageapp.bean.log.PadInfoBean
7
 import com.xhly.manageapp.bean.log.PadInfoBean
7
 import com.xhly.manageapp.bean.log.PadLocationBean
8
 import com.xhly.manageapp.bean.log.PadLocationBean
35
      */
36
      */
36
     @POST(UriAdress.PADDETAILADD)
37
     @POST(UriAdress.PADDETAILADD)
37
     suspend fun postPadDetailAdd(@Body padInfoBean: PadInfoBean):ResponseData<Any?>
38
     suspend fun postPadDetailAdd(@Body padInfoBean: PadInfoBean):ResponseData<Any?>
39
+
40
+    /**
41
+     * 设备--推送事件接口
42
+     */
43
+    @POST(UriAdress.LOGPUSH_ADD)
44
+    suspend fun postLogPushAdd(@Body logPushBean: LogPushBean)
38
 }
45
 }

+ 1
- 1
app/src/main/java/com/xhly/manageapp/service/websocket/AppSocket.kt View File

70
         webData.mid = UUID.randomUUID().toString()
70
         webData.mid = UUID.randomUUID().toString()
71
         val currentTimeSeconds = System.currentTimeMillis() / 1000
71
         val currentTimeSeconds = System.currentTimeMillis() / 1000
72
         webData.timeunix = currentTimeSeconds
72
         webData.timeunix = currentTimeSeconds
73
-        webData.fid = "1"
73
+        webData.fid = ManageApplication.getDeviceInfo()
74
         val jsMD5 =
74
         val jsMD5 =
75
             MD5Utils.getJsMD5(webData.code.toString() + "_" + webData.mid + "_" + webData.timeunix.toString())
75
             MD5Utils.getJsMD5(webData.code.toString() + "_" + webData.mid + "_" + webData.timeunix.toString())
76
         webData.sign = MD5Utils.getJsMD5(jsMD5)
76
         webData.sign = MD5Utils.getJsMD5(jsMD5)

+ 15
- 2
app/src/main/java/com/xhly/manageapp/ui/login/activity/LoginActivity.kt View File

28
 import com.xhly.manageapp.bean.EventLog
28
 import com.xhly.manageapp.bean.EventLog
29
 import com.xhly.manageapp.bean.LoginBean
29
 import com.xhly.manageapp.bean.LoginBean
30
 import com.xhly.manageapp.bean.SocketMsgBean
30
 import com.xhly.manageapp.bean.SocketMsgBean
31
+import com.xhly.manageapp.bean.log.LogPushBean
31
 import com.xhly.manageapp.bean.log.LogdOperateBean
32
 import com.xhly.manageapp.bean.log.LogdOperateBean
32
 import com.xhly.manageapp.bean.strategy.StrategyBean
33
 import com.xhly.manageapp.bean.strategy.StrategyBean
33
 import com.xhly.manageapp.bean.user.UserBean
34
 import com.xhly.manageapp.bean.user.UserBean
152
         }
153
         }
153
         data.doEvent = EventLog.ACCOUNTLOGINEVENT
154
         data.doEvent = EventLog.ACCOUNTLOGINEVENT
154
         viewModel.eventLog(data)
155
         viewModel.eventLog(data)
155
-        Const.USERID=userBean.userid.toString()
156
+        Const.USERID=userBean.userid
156
         Const.USERNAME=userBean.username.toString()
157
         Const.USERNAME=userBean.username.toString()
157
         spUtils.saveJson(Const.USERINFO,userBean)
158
         spUtils.saveJson(Const.USERINFO,userBean)
158
         val parseClassToJson = GsonUtils.parseClassToJson(userBean)
159
         val parseClassToJson = GsonUtils.parseClassToJson(userBean)
213
             Const.CODE2002.toString() -> {
214
             Const.CODE2002.toString() -> {
214
                 spUtils.setParam(Const.DISABLEPAD, true)
215
                 spUtils.setParam(Const.DISABLEPAD, true)
215
                 useTimeStrategy()
216
                 useTimeStrategy()
217
+                postLogPush(3)
216
             }
218
             }
217
 
219
 
218
             Const.CODE2003.toString() -> {
220
             Const.CODE2003.toString() -> {
219
                 spUtils.setParam(Const.DISABLEPAD, false)
221
                 spUtils.setParam(Const.DISABLEPAD, false)
220
                 useTimeStrategy()
222
                 useTimeStrategy()
223
+                postLogPush(2)
221
             }
224
             }
222
 
225
 
223
             Const.CODE2004.toString() -> {
226
             Const.CODE2004.toString() -> {
229
             }
232
             }
230
 
233
 
231
             Const.CODE2006.toString() -> {
234
             Const.CODE2006.toString() -> {
235
+                postLogPush(6)
232
                 ManageApplication.launchFactoryReset()
236
                 ManageApplication.launchFactoryReset()
233
             }
237
             }
234
 
238
 
235
             Const.CODE2007.toString() -> {
239
             Const.CODE2007.toString() -> {
236
-
240
+                postLogPush(7)
237
             }
241
             }
238
 
242
 
239
             Const.SDINSTALL -> {
243
             Const.SDINSTALL -> {
299
 
303
 
300
     }
304
     }
301
 
305
 
306
+    private fun postLogPush(pushType:Int){
307
+        val pushBean=LogPushBean()
308
+        pushBean.pushType=pushType
309
+        pushBean.pushObjid=Const.SCHOOLID
310
+        pushBean.userids= longArrayOf(Const.USERID)
311
+        pushBean.pushObjname=Const.USERNAME
312
+        viewModel.postLogPushAdd(pushBean)
313
+    }
314
+
302
     private fun showNoticeDialog(msg: String) {
315
     private fun showNoticeDialog(msg: String) {
303
         CustomDialog.build()
316
         CustomDialog.build()
304
             .setCustomView(object : OnBindView<CustomDialog>(R.layout.layout_notice_dialog) {
317
             .setCustomView(object : OnBindView<CustomDialog>(R.layout.layout_notice_dialog) {

+ 4
- 33
app/src/main/java/com/xhly/manageapp/ui/login/viewmodel/LoginViewModel.kt View File

10
 import com.xhly.manageapp.bean.user.UserBean
10
 import com.xhly.manageapp.bean.user.UserBean
11
 import com.xhly.manageapp.network.log.LogService
11
 import com.xhly.manageapp.network.log.LogService
12
 import com.xhly.manageapp.ui.login.netservice.LoginService
12
 import com.xhly.manageapp.ui.login.netservice.LoginService
13
+import com.xhly.manageapp.viewmodel.BaseViewModel
14
+
15
+class LoginViewModel: BaseViewModel() {
13
 
16
 
14
-class LoginViewModel: CommonBaseViewModel() {
15
-    private var logService = RetrofitService.create<LogService>()
16
-    private var service=RetrofitService.create<LoginService>()
17
     private val loginResult=MutableLiveData<UserBean>()
17
     private val loginResult=MutableLiveData<UserBean>()
18
     val loginData:LiveData<UserBean> =loginResult
18
     val loginData:LiveData<UserBean> =loginResult
19
-    private val pwdResult = MutableLiveData<Boolean>()
20
-    val pwdResultData: LiveData<Boolean> = pwdResult
21
-    fun getTest(){
22
-        launchUI {
23
-            val test = service.getTest()
24
-            LogShow(test.toString()+"|||"+test.msg)
25
-        }
26
-    }
27
 
19
 
28
     fun login(loginBean: LoginBean){
20
     fun login(loginBean: LoginBean){
29
         launchUI {
21
         launchUI {
30
-            val postLogin = service.postLogin(loginBean)
22
+            val postLogin = loginService.postLogin(loginBean)
31
             if (postLogin.code==0){
23
             if (postLogin.code==0){
32
                 if (postLogin.obj!=null){
24
                 if (postLogin.obj!=null){
33
                     loginResult.value=postLogin.obj
25
                     loginResult.value=postLogin.obj
43
         }
35
         }
44
     }
36
     }
45
 
37
 
46
-    fun eventLog(operateBean: LogdOperateBean) {
47
-        launchUI {
48
-            logService.postLogdoperateAdd(operateBean)
49
-        }
50
-    }
51
-
52
-    /**
53
-     * 解除当前锁屏
54
-     */
55
-    fun postPwdDetail(code: String, sn: String) {
56
-        launchUI {
57
-            val map = HashMap<String, Any>()
58
-            map["sn"] = sn
59
-            val result = service.postPwdDetail(map)
60
-            if (result.code == 0) {
61
-                pwdResult.value = result.obj.toString().contains(code)
62
-            } else {
63
-                pwdResult.value = false
64
-            }
65
-        }
66
-    }
67
 }
38
 }

+ 16
- 2
app/src/main/java/com/xhly/manageapp/ui/main/activity/MainActivity.kt View File

46
 import com.xhly.manageapp.bean.EventLog
46
 import com.xhly.manageapp.bean.EventLog
47
 import com.xhly.manageapp.bean.SocketMsgBean
47
 import com.xhly.manageapp.bean.SocketMsgBean
48
 import com.xhly.manageapp.bean.UpdateBean
48
 import com.xhly.manageapp.bean.UpdateBean
49
+import com.xhly.manageapp.bean.log.LogPushBean
49
 import com.xhly.manageapp.bean.log.LogdOperateBean
50
 import com.xhly.manageapp.bean.log.LogdOperateBean
50
 import com.xhly.manageapp.bean.school.SchoolDeviceSetBean
51
 import com.xhly.manageapp.bean.school.SchoolDeviceSetBean
51
 import com.xhly.manageapp.bean.strategy.AppTimeManageBean
52
 import com.xhly.manageapp.bean.strategy.AppTimeManageBean
350
     override fun onResume() {
351
     override fun onResume() {
351
         super.onResume()
352
         super.onResume()
352
         userBean?.let {
353
         userBean?.let {
353
-            Const.USERID=it.userid.toString()
354
+            Const.USERID=it.userid
354
             Const.USERNAME=it.username.toString()
355
             Const.USERNAME=it.username.toString()
355
             viewModel.postDevicesetDetail(it.schoolid)
356
             viewModel.postDevicesetDetail(it.schoolid)
356
         }
357
         }
541
 
542
 
542
             Const.CODE2002.toString() -> {
543
             Const.CODE2002.toString() -> {
543
                 //杀掉其他app之保留自己
544
                 //杀掉其他app之保留自己
545
+                postLogPush(3)
544
                 val appList = AppUtils.GetAppList(this)
546
                 val appList = AppUtils.GetAppList(this)
545
                 StrategyUtils.clearMemory(this, appList)
547
                 StrategyUtils.clearMemory(this, appList)
546
                 spUtils.setParam(Const.DISABLEPAD, true)
548
                 spUtils.setParam(Const.DISABLEPAD, true)
549
             }
551
             }
550
 
552
 
551
             Const.CODE2003.toString() -> {
553
             Const.CODE2003.toString() -> {
554
+                postLogPush(2)
552
                 spUtils.setParam(Const.DISABLEPAD, false)
555
                 spUtils.setParam(Const.DISABLEPAD, false)
553
                 useTimeStrategy()
556
                 useTimeStrategy()
554
             }
557
             }
564
             }
567
             }
565
 
568
 
566
             Const.CODE2006.toString() -> {
569
             Const.CODE2006.toString() -> {
570
+                postLogPush(6)
567
                 ManageApplication.launchFactoryReset()
571
                 ManageApplication.launchFactoryReset()
568
             }
572
             }
569
 
573
 
570
             Const.CODE2007.toString() -> {
574
             Const.CODE2007.toString() -> {
575
+                postLogPush(7)
571
 
576
 
572
             }
577
             }
573
 
578
 
677
         }
682
         }
678
     }
683
     }
679
 
684
 
685
+    private fun postLogPush(pushType:Int){
686
+        val pushBean= LogPushBean()
687
+        pushBean.pushType=pushType
688
+        pushBean.pushObjid=Const.SCHOOLID
689
+        pushBean.userids= longArrayOf(Const.USERID)
690
+        pushBean.pushObjname=Const.USERNAME
691
+        viewModel.postLogPushAdd(pushBean)
692
+    }
693
+
680
     private fun updateAppRv() {
694
     private fun updateAppRv() {
681
         try {
695
         try {
682
             var schoolDeviceSetBean: SchoolDeviceSetBean? = null
696
             var schoolDeviceSetBean: SchoolDeviceSetBean? = null
805
         data.comm = "退出登录"
819
         data.comm = "退出登录"
806
         data.doEvent = EventLog.ACCOUNTQUITEVENT
820
         data.doEvent = EventLog.ACCOUNTQUITEVENT
807
         viewModel.eventLog(data)
821
         viewModel.eventLog(data)
808
-        Const.USERID="1"
822
+        Const.USERID=1L
809
         Const.USERNAME=""
823
         Const.USERNAME=""
810
         WorkManager.getInstance(this).cancelAllWork()
824
         WorkManager.getInstance(this).cancelAllWork()
811
         deleteSharedPreferences(SharedPreferencesUtils.SP_FILE_NAME)
825
         deleteSharedPreferences(SharedPreferencesUtils.SP_FILE_NAME)

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

17
 import com.xhly.manageapp.network.log.LogService
17
 import com.xhly.manageapp.network.log.LogService
18
 import com.xhly.manageapp.network.strategy.StrategyService
18
 import com.xhly.manageapp.network.strategy.StrategyService
19
 import com.xhly.manageapp.ui.login.netservice.LoginService
19
 import com.xhly.manageapp.ui.login.netservice.LoginService
20
+import com.xhly.manageapp.viewmodel.BaseViewModel
20
 
21
 
21
-class MainViewModel : CommonBaseViewModel() {
22
+class MainViewModel : BaseViewModel() {
22
     private val appService by lazy { RetrofitService.create<AppService>() }
23
     private val appService by lazy { RetrofitService.create<AppService>() }
23
-    private val loginService by lazy { RetrofitService.create<LoginService>() }
24
     private val strategyService by lazy { RetrofitService.create<StrategyService>() }
24
     private val strategyService by lazy { RetrofitService.create<StrategyService>() }
25
     private var logService = RetrofitService.create<LogService>()
25
     private var logService = RetrofitService.create<LogService>()
26
     private val listData = MutableLiveData<ArrayList<AppModel>>()
26
     private val listData = MutableLiveData<ArrayList<AppModel>>()
44
     val wallpaperData: LiveData<WallpaperBean> = wallpaper
44
     val wallpaperData: LiveData<WallpaperBean> = wallpaper
45
     private val netWhiteList = MutableLiveData<ArrayList<String>>()
45
     private val netWhiteList = MutableLiveData<ArrayList<String>>()
46
     val netWhiteListData: LiveData<ArrayList<String>> = netWhiteList
46
     val netWhiteListData: LiveData<ArrayList<String>> = netWhiteList
47
-    private val pwdResult = MutableLiveData<Boolean>()
48
-    val pwdResultData: LiveData<Boolean> = pwdResult
49
 
47
 
50
     fun getAppList() {
48
     fun getAppList() {
51
         launchUI {
49
         launchUI {
93
         }
91
         }
94
     }
92
     }
95
 
93
 
96
-    fun eventLog(operateBean: LogdOperateBean) {
97
-        launchUI {
98
-            logService.postLogdoperateAdd(operateBean)
99
-        }
100
-    }
101
 
94
 
102
     /**
95
     /**
103
      * 获得app时间使用策略
96
      * 获得app时间使用策略
202
             }
195
             }
203
         }
196
         }
204
     }
197
     }
205
-
206
-    /**
207
-     * 解除当前锁屏
208
-     */
209
-    fun postPwdDetail(code: String, sn: String) {
210
-        launchUI {
211
-            val map = HashMap<String, Any>()
212
-            map["sn"] = sn
213
-            val result = loginService.postPwdDetail(map)
214
-            if (result.code == 0) {
215
-                pwdResult.value = result.obj.toString().contains(code)
216
-            } else {
217
-                pwdResult.value = false
218
-            }
219
-        }
220
-    }
221
 }
198
 }

+ 51
- 0
app/src/main/java/com/xhly/manageapp/viewmodel/BaseViewModel.kt View File

1
+package com.xhly.manageapp.viewmodel
2
+
3
+import androidx.lifecycle.LiveData
4
+import androidx.lifecycle.MutableLiveData
5
+import com.xhly.corelib.base.viewmodel.CommonBaseViewModel
6
+import com.xhly.corelib.network.RetrofitService
7
+import com.xhly.manageapp.bean.log.LogPushBean
8
+import com.xhly.manageapp.bean.log.LogdOperateBean
9
+import com.xhly.manageapp.network.log.LogService
10
+import com.xhly.manageapp.ui.login.netservice.LoginService
11
+
12
+open class BaseViewModel : CommonBaseViewModel() {
13
+    protected val loginService: LoginService by lazy { RetrofitService.create<LoginService>() }
14
+    private val logService: LogService = RetrofitService.create<LogService>()
15
+    private val pwdResult = MutableLiveData<Boolean>()
16
+    val pwdResultData: LiveData<Boolean> = pwdResult
17
+
18
+    /**
19
+     * 解除当前锁屏
20
+     */
21
+    fun postPwdDetail(code: String, sn: String) {
22
+        launchUI {
23
+            val map = HashMap<String, Any>()
24
+            map["sn"] = sn
25
+            val result = loginService.postPwdDetail(map)
26
+            if (result.code == 0) {
27
+                pwdResult.value = result.obj.toString().contains(code)
28
+            } else {
29
+                pwdResult.value = false
30
+            }
31
+        }
32
+    }
33
+
34
+    /**
35
+     * 发送事件日志
36
+     */
37
+    fun eventLog(operateBean: LogdOperateBean) {
38
+        launchUI {
39
+            logService.postLogdoperateAdd(operateBean)
40
+        }
41
+    }
42
+
43
+    /**
44
+     * 发送事件推送日志
45
+     */
46
+    fun postLogPushAdd(logPushBean: LogPushBean) {
47
+        launchUI {
48
+            logService.postLogPushAdd(logPushBean)
49
+        }
50
+    }
51
+}

+ 29
- 14
corelib/src/main/java/com/xhly/corelib/Const.kt View File

3
 
3
 
4
 object Const {
4
 object Const {
5
     const val isDebug = true
5
     const val isDebug = true
6
+
6
     //用户id
7
     //用户id
7
-     var USERID = "1"
8
+    var USERID = 1L
9
+
8
     //用户姓名
10
     //用户姓名
9
     var USERNAME = ""
11
     var USERNAME = ""
10
 
12
 
13
+    //学校id
14
+    var SCHOOLID = 0L
15
+
16
+    //班级id
17
+    var CLASSID = 0L
18
+
11
     //接口地址
19
     //接口地址
12
     const val URL1: String = "https://mcapitest.xhkjedu.com/"
20
     const val URL1: String = "https://mcapitest.xhkjedu.com/"
13
 
21
 
32
     /**
40
     /**
33
      * 存储应用商店应用包名集合
41
      * 存储应用商店应用包名集合
34
      */
42
      */
35
-    const val APPSTOREKEY="APPSTOREKEY"
43
+    const val APPSTOREKEY = "APPSTOREKEY"
36
 
44
 
37
     //401退出登录
45
     //401退出登录
38
     const val LOGIN_OUT_401 = "LOGIN_OUT_401"
46
     const val LOGIN_OUT_401 = "LOGIN_OUT_401"
117
     const val USERINFO = "USERINFO"
125
     const val USERINFO = "USERINFO"
118
 
126
 
119
     //存储学校设置的设备设置
127
     //存储学校设置的设备设置
120
-    const val SCHOOLSETDEVICE="SCHOOLSETDEVICE"
128
+    const val SCHOOLSETDEVICE = "SCHOOLSETDEVICE"
121
 
129
 
122
     //记录设备策略名称
130
     //记录设备策略名称
123
     const val DEVICETYPE1 = "摄像头"
131
     const val DEVICETYPE1 = "摄像头"
135
     /**
143
     /**
136
      * 电话包名
144
      * 电话包名
137
      */
145
      */
138
-    const val ANDROIDPHONE="com.android.contacts"
146
+    const val ANDROIDPHONE = "com.android.contacts"
147
+
139
     /**
148
     /**
140
      * 短信包名
149
      * 短信包名
141
      */
150
      */
142
-    const val ANDROIDMMS="com.android.mms"
151
+    const val ANDROIDMMS = "com.android.mms"
152
+
143
     /**
153
     /**
144
      * 日历
154
      * 日历
145
      */
155
      */
146
-    const val ANDROIDCALENDAR="com.android.calendar"
156
+    const val ANDROIDCALENDAR = "com.android.calendar"
157
+
147
     /**
158
     /**
148
      * 录音机
159
      * 录音机
149
      */
160
      */
150
-    const val ANDROIDRECORDER="com.android.soundrecorder"
161
+    const val ANDROIDRECORDER = "com.android.soundrecorder"
162
+
151
     /**
163
     /**
152
      *时钟
164
      *时钟
153
      */
165
      */
154
-    const val ANDROIDDESKCLOCK="com.android.deskclock"
166
+    const val ANDROIDDESKCLOCK = "com.android.deskclock"
167
+
155
     /**
168
     /**
156
      * 联想相机相机
169
      * 联想相机相机
157
      */
170
      */
158
-    const val ANDROIDCAMERA="com.dtab.camera"
171
+    const val ANDROIDCAMERA = "com.dtab.camera"
172
+
159
     /**
173
     /**
160
      * 联想相册
174
      * 联想相册
161
      */
175
      */
162
-    const val ANDROIDGALLERY="com.android.gallery3d"
176
+    const val ANDROIDGALLERY = "com.android.gallery3d"
163
 
177
 
164
     /**
178
     /**
165
      *标记自定义的一键清理名称
179
      *标记自定义的一键清理名称
166
      */
180
      */
167
-    const val CUSTOMSPEEDAPP="CUSTOMSPEEDAPP"
181
+    const val CUSTOMSPEEDAPP = "CUSTOMSPEEDAPP"
168
 
182
 
169
     /**
183
     /**
170
      *标记自定义的清除缓存名称
184
      *标记自定义的清除缓存名称
171
      */
185
      */
172
-    const val CUSTOMCLEARAPP="CUSTOMCLEARAPP"
186
+    const val CUSTOMCLEARAPP = "CUSTOMCLEARAPP"
173
 
187
 
174
     /**
188
     /**
175
      *标记自定义的自动旋转名称
189
      *标记自定义的自动旋转名称
176
      */
190
      */
177
-    const val CUSTOMROTATIONAPP="CUSTOMROTATIONAPP"
191
+    const val CUSTOMROTATIONAPP = "CUSTOMROTATIONAPP"
192
+
178
     /**
193
     /**
179
      *标记自定义的修改密码
194
      *标记自定义的修改密码
180
      */
195
      */
181
-    const val CUSTOMCHANGEPSD="CUSTOMCHANGEPSD"
196
+    const val CUSTOMCHANGEPSD = "CUSTOMCHANGEPSD"
182
 }
197
 }

+ 1
- 1
corelib/src/main/java/com/xhly/corelib/network/ResponseInterceptor.kt View File

23
         return try {
23
         return try {
24
             val requestBuilder: Request.Builder = request.newBuilder()
24
             val requestBuilder: Request.Builder = request.newBuilder()
25
             //TODO 需要替换userid和机型
25
             //TODO 需要替换userid和机型
26
-            requestBuilder.header("XH-UserId",Const.USERID)
26
+            requestBuilder.header("XH-UserId",Const.USERID.toString())
27
             requestBuilder.header("XH-DeviceModel", Build.MODEL)
27
             requestBuilder.header("XH-DeviceModel", Build.MODEL)
28
             request = requestBuilder.build()
28
             request = requestBuilder.build()
29
             val originalResponse = chain.proceed(request)
29
             val originalResponse = chain.proceed(request)

Loading…
Cancel
Save