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