|
@@ -67,7 +67,8 @@ class EquipmentManagerV3(View):
|
|
|
View_Password = self.decode_pwd(View_Password)
|
|
|
Type = request_dict.get('Type', None)
|
|
|
ChannelIndex = request_dict.get('ChannelIndex', None)
|
|
|
-
|
|
|
+ isCheckMainUser = request_dict.get('isCheckMainUser', None)
|
|
|
+ isMainUserExists = False
|
|
|
if all([UID, NickName, View_Account, Type, ChannelIndex]):
|
|
|
tko = TokenObject(token)
|
|
|
response.lang = tko.lang
|
|
@@ -89,8 +90,9 @@ class EquipmentManagerV3(View):
|
|
|
return response.json(10, 'illegal uid: {uid}'.format(uid=UID))
|
|
|
is_bind = Device_Info.objects.filter(UID=UID, isShare=False).values('userID__userID')
|
|
|
# 判断是否有已绑定用户
|
|
|
- if is_bind:
|
|
|
- return response.json(15, is_bind[0].get('userID__userID'))
|
|
|
+ if is_bind and isCheckMainUser == 1:
|
|
|
+ isMainUserExists = True
|
|
|
+
|
|
|
|
|
|
userName = Device_User.objects.get(userID=userID).username
|
|
|
main_exist = Device_Info.objects.filter(UID=UID)
|
|
@@ -154,6 +156,9 @@ class EquipmentManagerV3(View):
|
|
|
values('bucket__content', 'status', 'channel', 'endTime', 'uid')
|
|
|
res = dvql[0]
|
|
|
res['vod'] = list(ubqs)
|
|
|
+
|
|
|
+ if isMainUserExists:
|
|
|
+ res['isMainUserExists'] = 1
|
|
|
return response.json(0, res)
|
|
|
|
|
|
else:
|