fix some bugs

super_signature v5.0.1
nineven 5 years ago
parent b9a646f521
commit bd213e2c0b
  1. 17
      fir_client/src/components/FirDownload.vue
  2. 21
      fir_download/src/components/FirDownload.vue
  3. 3
      fir_ser/api/utils/app/supersignutils.py
  4. 2
      fir_ser/api/views/download.py

@ -181,14 +181,19 @@
return return
} }
if(this.currentappinfo.type === 1){ if(this.currentappinfo.type === 1){
if(this.currentappinfo.issupersign && this.udid !== this.$route.query.udid){ if(this.currentappinfo.issupersign){
if(this.$route.query.udid && this.udid === this.$route.query.udid){
if(this.agent !== ''){ if(this.agent !== ''){
this.downloadurl=res.data.download_url; let download_url = res.data.download_url;
// this.downloadurl = 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;
}
} }
}else { }else {
let download_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); this.downloadurl="itms-services://?action=download-manifest&url="+encodeURIComponent(download_url);
} }
}else{ }else{
@ -233,10 +238,12 @@
} }
if(this.$route.query.udid){ if(this.$route.query.udid){
params["udid"]=this.$route.query.udid params["udid"]=this.$route.query.udid
}else {
params["udid"]=""
} }
getShortAppinfo(data => { getShortAppinfo(data => {
this.udid = data.udid;
if (data.code === 1000) { if (data.code === 1000) {
this.udid = data.udid;
if(!data.data.master_release.release_id){ if(!data.data.master_release.release_id){
this.$message({ this.$message({
message:"该 release 版本不存在,请检查", message:"该 release 版本不存在,请检查",

@ -175,19 +175,24 @@
}, methods: { }, methods: {
download() { download() {
if( this.currentappinfo.app_id) { if( this.currentappinfo.app_id) {
this.isdownload = true; this.isdownload = true;
getdownloadurl(res => { getdownloadurl(res => {
if (res.code === 1000) { if(res.code === 1000){
if(res.data.download_url === ""){ if(res.data.download_url === ""){
window.location.href=this.full_url; window.location.href=this.full_url;
return return
} }
if(this.currentappinfo.type === 1){ if(this.currentappinfo.type === 1){
if(this.currentappinfo.issupersign && this.udid !== this.$route.query.udid){ if(this.currentappinfo.issupersign){
if(this.$route.query.udid && this.udid === this.$route.query.udid){
if(this.agent !== ''){ if(this.agent !== ''){
this.download_url = res.data.download_url; let download_url = res.data.download_url;
this.downloadurl="itms-services://?action=download-manifest&url="+encodeURIComponent(download_url);
}
}else {
if(this.agent !== ''){
this.downloadurl = res.data.download_url;
}
} }
}else { }else {
let download_url = res.data.download_url; let download_url = res.data.download_url;
@ -228,8 +233,14 @@
if(this.$route.query.release_id){ if(this.$route.query.release_id){
params["release_id"]=this.$route.query.release_id params["release_id"]=this.$route.query.release_id
} }
if(this.$route.query.udid){
params["udid"]=this.$route.query.udid
}else {
params["udid"]=""
}
getShortAppinfo(data => { getShortAppinfo(data => {
if (data.code === 1000) { if (data.code === 1000) {
this.udid = data.udid;
if(!data.data.master_release.release_id){ if(!data.data.master_release.release_id){
// this.$message({ // this.$message({
// message:" release ,", // message:" release ,",

@ -30,8 +30,7 @@ def udid_bytes_to_dict(xml_stream):
def make_udid_mobileconfig(udid_url, PayloadOrganization, PayloadUUID=uuid.uuid1(), PayloadDescription='本文件仅用来获取设备ID', def make_udid_mobileconfig(udid_url, PayloadOrganization, PayloadUUID=uuid.uuid1(), PayloadDescription='本文件仅用来获取设备ID',
PayloadDisplayName='查询设备UDID'): PayloadDisplayName='查询设备UDID'):
# <!--参考:https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/iPhoneOTAConfiguration/ConfigurationProfileExamples/ConfigurationProfileExamples.html--> # <!--参考:https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/iPhoneOTAConfiguration/ConfigurationProfileExamples/ConfigurationProfileExamples.html-->
mobileconfig = ''' mobileconfig = '''<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>

@ -155,7 +155,7 @@ class InstallView(APIView):
download_url = get_download_url_by_cache(app_obj,release_id + apptype,600,isdownload,udid=udid) download_url = get_download_url_by_cache(app_obj,release_id + apptype,600,isdownload,udid=udid)
res.data={"download_url":download_url} res.data={"download_url":download_url}
if download_url != "" and udid is None: if download_url != "" and (udid is None or udid == ""):
set_app_download_by_cache(app_id) set_app_download_by_cache(app_id)
return Response(res.dict) return Response(res.dict)
else: else:

Loading…
Cancel
Save