fix ios download

super_signature
nineven 5 years ago
parent d34f80f391
commit f308de1aeb
  1. 6
      fir_client/fir_client/src/components/FirDownload.vue
  2. 8
      fir_client/fir_client/src/restful/index.js
  3. 6
      fir_ser/api/views/download.py
  4. 6
      fir_ser/fir_ser/settings.py

@ -143,7 +143,7 @@
<script>
import QRCode from 'qrcodejs2'
import {getShortAppinfo,getdownloadurl} from '../restful'
import {getShortAppinfo,getdownloadurl,getplisturl} from '../restful'
export default {
name: "FirDownload",
@ -169,7 +169,9 @@
if(res.code === 1000){
if(this.currentappinfo.type === 1){
this.downloadurl="itms-services://?action=download-manifest&url="+res.data.download_url;
let download_url = res.data.download_url;
download_url = download_url.replace('http://localhost/download',getplisturl());
this.downloadurl="itms-services://?action=download-manifest&url="+encodeURIComponent(download_url);
}else{
if(this.agent !== ''){
this.downloadurl = res.data.download_url;

@ -12,9 +12,9 @@ Axios.defaults.httpsAgent = new https.Agent({
});
// Axios.defaults.baseURL='';
const USERSEVER = 'https://fly.dvcloud.xin/api/v1/fir/server';
// const USERSEVER = 'https://fly.dvcloud.xin/api/v1/fir/server';
// const USERSEVER = 'http://192.168.1.112:8000/api/v1/fir/server';
const USERSEVER = 'http://192.168.1.112:8000/api/v1/fir/server';
export function set_auth_token() {
@ -584,7 +584,9 @@ export function getapppicurl(app_id) {
export function getuploadurl() {
return USERSEVER + '/upload'
}
export function getplisturl() {
return USERSEVER + '/download'
}
/**分析应用并获取app上传token */

@ -10,7 +10,7 @@ from fir_ser import settings
from api.utils.TokenManager import DownloadToken
from api.utils.app.randomstrings import make_random_uuid
from api.utils.app.apputils import make_resigned
from api.utils.storage.storage import Storage
from api.utils.storage.storage import Storage,LocalStorage
import os
from api.utils.serializer import AppsSerializer
@ -121,7 +121,9 @@ class InstallView(APIView):
if isdownload :
download_url = storage.get_download_url(release_obj.release_id + apptype, 600)
else:
download_url = storage.get_download_url(release_obj.release_id + apptype,600,'plist')
local_storage = LocalStorage('localhost',False)
# print(local_storage.get_download_url(release_obj.release_id + apptype,600,'plist'))
download_url = local_storage.get_download_url(release_obj.release_id + apptype,600,'plist')
res.data={"download_url":download_url}
return Response(res.dict)

@ -177,10 +177,10 @@ THIRD_PART_CONFIG = {
'name': 'local',
'type': 0,
'auth': {
'domain_name': 'fly.dvcloud.xin', # 正式环境需要填写正式的访问域名
'domain_name': '127.0.0.1:8000', # 正式环境需要填写正式的访问域名
'is_https':False,
},
'active': True
'active': False
},
{
'name': 'aliyun',
@ -194,7 +194,7 @@ THIRD_PART_CONFIG = {
'is_https':True,
'domain_name':'ali.storage.dvcloud.xin'
},
'active': False
'active': True
},
{
'name': 'qiniuyun',

Loading…
Cancel
Save