Explorar el Código

fix: 调整解绑设备时的设备id的参数类型为string

liujia hace 1 mes
padre
commit
1d98dbc
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      src/api/admin/index.ts
  2. 1 1
      src/views/device/list/index.vue

+ 1 - 1
src/api/admin/index.ts

@@ -44,6 +44,6 @@ export const getBindUserInfo = (params: {
  * 解绑用户
  * @param devId 设备id
  */
-export const unbindUser = (params: { devId: number }): Promise<ResponseData<object>> => {
+export const unbindUser = (params: { devId: string }): Promise<ResponseData<object>> => {
   return request.post('/admin-deal/unbind', params)
 }

+ 1 - 1
src/views/device/list/index.vue

@@ -340,7 +340,7 @@ const unbindDeviceHandler = async (device: Device) => {
 const confirmUnbindDevice = async (devId: string) => {
   console.log('确认解绑设备')
   try {
-    await adminAPI.unbindUser({ devId: Number(devId) })
+    await adminAPI.unbindUser({ devId: devId })
     unbindOpen.value = false
   } catch (err) {
     console.log('解绑设备失败', err)