Browse Source

generate_token_url 新增返回头像字段

chenshibin 4 years ago
parent
commit
fb5300f6ee
1 changed files with 8 additions and 0 deletions
  1. 8 0
      Controller/DeviceShare.py

+ 8 - 0
Controller/DeviceShare.py

@@ -85,10 +85,18 @@ class DeviceShareView(View):
                 share_user = userqs[0]['phone']
             else:
                 share_user = ''
+
+            userIconPath = userqs[0]['userIconPath']
+            if userIconPath:
+                if userIconPath.find('static/') != -1:
+                    userIconPath = userIconPath.replace('static/', '').replace('\\', '/')
+                    userIconUrl = SERVER_DOMAIN + 'account/getAvatar/' + userIconPath
+
             return response.json(0, {
                 'shareToken': share_token,
                 'deviceName': dvqs[0]['NickName'],
                 'shareUser': share_user,
+                'userIconPath': userIconPath
             })
 
         else: