hujingpei 4 éve
szülő
commit
6f00ca70d4
1 módosított fájl, 3 hozzáadás és 3 törlés
  1. 3 3
      apps/tenant/operation_help/views.py

+ 3 - 3
apps/tenant/operation_help/views.py

@@ -4,7 +4,7 @@ from utils.custom_modelviewset import CustomModelViewSet
 from rest_framework.decorators import action
 from rest_framework import generics
 
-
+from django.conf import settings
 from .models import OperationHelp,OperationHelpUpfile
 from utils.permission import isLogin
 from .serializer import OperationHelpSerializer
@@ -53,7 +53,7 @@ class OperationHelpViewSet(CustomModelViewSet):
         image = operation_help_img.file_path
         if image:
             data={
-                "src": image
+                "src": '%s%s' % (settings.SERVER_DOMAIN, image)
             }
             return response_ok(data)
         return response_error('上传失败,请重新上传!')
@@ -67,7 +67,7 @@ class OperationHelpViewSet(CustomModelViewSet):
         radio_path = operation_help_radio.file_path
         if radio_path:
             data = {
-                "src": radio_path
+                "src": '%s%s' % (settings.SERVER_DOMAIN, radio_path)
             }
             return response_ok(data)
         return response_error('上传失败,请重新上传!')