diff --git a/fir_client/src/utils/index.js b/fir_client/src/utils/index.js index 776ec09..7668ab5 100644 --- a/fir_client/src/utils/index.js +++ b/fir_client/src/utils/index.js @@ -1,6 +1,6 @@ //滚动条在Y轴上的滚动距离 export function getScrollTop(){ - var scrollTop = 0, bodyScrollTop = 0, documentScrollTop = 0; + let scrollTop = 0, bodyScrollTop = 0, documentScrollTop = 0; if(document.body){ bodyScrollTop = document.body.scrollTop; } @@ -8,14 +8,15 @@ export function getScrollTop(){ documentScrollTop = document.documentElement.scrollTop; } scrollTop = (bodyScrollTop - documentScrollTop > 0) ? bodyScrollTop : documentScrollTop; - return Math.ceil(scrollTop); + // return Math.ceil(scrollTop); + return scrollTop; } //文档的总高度 export function getScrollHeight(){ - var scrollHeight = 0, bodyScrollHeight = 0, documentScrollHeight = 0; + let scrollHeight = 0, bodyScrollHeight = 0, documentScrollHeight = 0; if(document.body){ bodyScrollHeight = document.body.scrollHeight; } @@ -30,7 +31,7 @@ export function getScrollHeight(){ //浏览器视口的高度 export function getWindowHeight(){ - var windowHeight = 0; + let windowHeight = 0; if(document.compatMode === "CSS1Compat"){ windowHeight = document.documentElement.clientHeight; }else{ diff --git a/fir_ser/api/views/download.py b/fir_ser/api/views/download.py index b58ddee..5c9bc5d 100644 --- a/fir_ser/api/views/download.py +++ b/fir_ser/api/views/download.py @@ -66,6 +66,8 @@ class DownloadView(APIView): name = apprelease_obj.app_id.name ios_plist_bytes = make_resigned(bin_url,img_url,bundle_id,bundle_version,name) response = FileResponse(ios_plist_bytes) + response['content_type'] = "text/xml" + else: @@ -74,7 +76,7 @@ class DownloadView(APIView): file_path = os.path.join(settings.MEDIA_ROOT,"apps","%s"%(release_id+"."+app_type)) response = FileResponse(open(file_path, 'rb')) - response['content_type'] = "application/octet-stream" + response['content_type'] = "application/octet-stream" response['Content-Disposition'] = 'attachment; filename=' + os.path.basename(file_path) return response except Exception: