|
|
|
@ -14,8 +14,8 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div v-else> |
|
|
|
|
<!-- <span class="pattern left"><img src="../assets/download_pattern_left.png"></span>--> |
|
|
|
|
<!-- <span class="pattern right"><img src="../assets/download_pattern_right.png"></span>--> |
|
|
|
|
<!-- <span class="pattern left"><img src="../assets/download_pattern_left.png"></span>--> |
|
|
|
|
<!-- <span class="pattern right"><img src="../assets/download_pattern_right.png"></span>--> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="out-container container" v-if="wxeasytypeflag"> |
|
|
|
@ -32,12 +32,15 @@ |
|
|
|
|
<span id="qrcode" class="qrcode"> |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<p v-if="currentappinfo.issupersign" class="scan-tips wrapper icon-warp" >超级签</p> |
|
|
|
|
<p v-else class="scan-tips wrapper icon-warp" >{{ mcurrentappinfo.release_type|getiOStype }}</p> |
|
|
|
|
<p v-if="currentappinfo.issupersign" class="scan-tips wrapper icon-warp">超级签</p> |
|
|
|
|
<p v-else class="scan-tips wrapper icon-warp">{{ mcurrentappinfo.release_type|getiOStype |
|
|
|
|
}}</p> |
|
|
|
|
<h1 class="name wrapper"> |
|
|
|
|
<span class="icon-warp" style="margin-left:0px"> |
|
|
|
|
<i v-if="currentappinfo.type === 0 && agent !== ''" class="iconfont icon-android2"/> |
|
|
|
|
<i v-if="currentappinfo.type === 1 && agent !== ''" class="iconfont icon-ios"/> |
|
|
|
|
<i v-if="currentappinfo.type === 0 && agent !== ''" |
|
|
|
|
class="iconfont icon-android2"/> |
|
|
|
|
<i v-if="currentappinfo.type === 1 && agent !== ''" |
|
|
|
|
class="iconfont icon-ios"/> |
|
|
|
|
|
|
|
|
|
{{ currentappinfo.name }} |
|
|
|
|
</span> |
|
|
|
@ -47,7 +50,8 @@ |
|
|
|
|
class="text-black">{{ full_url }}</span></p> |
|
|
|
|
|
|
|
|
|
<div class="release-info"> |
|
|
|
|
<p>{{ mcurrentappinfo.app_version }}(Build {{ mcurrentappinfo.build_version }})- {{ mcurrentappinfo.binary_size }}</p> |
|
|
|
|
<p>{{ mcurrentappinfo.app_version }}(Build {{ mcurrentappinfo.build_version }})- {{ |
|
|
|
|
mcurrentappinfo.binary_size }}</p> |
|
|
|
|
<p>更新于:{{ mcurrentappinfo.created_time |formatTime}}</p> |
|
|
|
|
<p class="version" v-if="mcurrentappinfo.changelog && agent === ''"> |
|
|
|
|
更新日志:{{ mcurrentappinfo.changelog }} |
|
|
|
@ -56,18 +60,22 @@ |
|
|
|
|
|
|
|
|
|
<div id="actions" class="actions" v-if="agent !==''"> |
|
|
|
|
|
|
|
|
|
<button type="info" round v-if="agent === 'wxandroid' || agent === 'wxapple'">不支持在微信内下载 |
|
|
|
|
<button type="info" round v-if="agent === 'wxandroid' || agent === 'wxapple'"> |
|
|
|
|
不支持在微信内下载 |
|
|
|
|
</button> |
|
|
|
|
|
|
|
|
|
<button type="button" v-else-if="wrong">{{ msg }}</button> |
|
|
|
|
<div v-else > |
|
|
|
|
<button v-if="isdownload" disabled="" class="loading" style="min-width: 42px; width: 42px; padding: 21px 0; border-top-color: transparent; border-left-color: transparent;"> </button> |
|
|
|
|
<div v-else> |
|
|
|
|
<button v-if="isdownload" disabled="" class="loading" |
|
|
|
|
style="min-width: 42px; width: 42px; padding: 21px 0; border-top-color: transparent; border-left-color: transparent;"> |
|
|
|
|
|
|
|
|
|
</button> |
|
|
|
|
<div v-else> |
|
|
|
|
<div v-if="currentappinfo.need_password" style="margin:0 auto; width:166px"> |
|
|
|
|
<input class="passwd" placeholder="请输入密码" v-model="password" /> |
|
|
|
|
<input class="passwd" placeholder="请输入密码" v-model="password"/> |
|
|
|
|
</div> |
|
|
|
|
<br/> |
|
|
|
|
<button @click="download" > |
|
|
|
|
<button @click="download"> |
|
|
|
|
<a icon="el-icon-loadings" type="primary" :underline="false"> 下载安装 </a> |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
@ -159,7 +167,7 @@ |
|
|
|
|
<script> |
|
|
|
|
import QRCode from 'qrcodejs2' |
|
|
|
|
|
|
|
|
|
import {getShortAppinfo,getdownloadurl} from '../restful/download' |
|
|
|
|
import {getShortAppinfo, getdownloadurl} from '../restful/download' |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
name: "FirDownload", |
|
|
|
@ -169,53 +177,53 @@ |
|
|
|
|
iscomboappinfo: {}, |
|
|
|
|
mcurrentappinfo: {}, |
|
|
|
|
miscomboappinfo: {}, |
|
|
|
|
tmpinfo:{}, |
|
|
|
|
full_url:"", |
|
|
|
|
tmpinfo: {}, |
|
|
|
|
full_url: "", |
|
|
|
|
agent: '', |
|
|
|
|
wrong: false, |
|
|
|
|
msg: '', |
|
|
|
|
password:'', |
|
|
|
|
dchoice:false, |
|
|
|
|
downloadurl:"", |
|
|
|
|
isdownload:false, |
|
|
|
|
iserror:false, |
|
|
|
|
password: '', |
|
|
|
|
dchoice: false, |
|
|
|
|
downloadurl: "", |
|
|
|
|
isdownload: false, |
|
|
|
|
iserror: false, |
|
|
|
|
udid: "", |
|
|
|
|
wxeasytypeflag: false, |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, methods: { |
|
|
|
|
download() { |
|
|
|
|
if( this.currentappinfo.app_id) { |
|
|
|
|
if (this.currentappinfo.app_id) { |
|
|
|
|
this.isdownload = true; |
|
|
|
|
getdownloadurl(res => { |
|
|
|
|
if(res.code === 1000){ |
|
|
|
|
if(res.data.download_url === ""){ |
|
|
|
|
window.location.href=this.full_url; |
|
|
|
|
if (res.code === 1000) { |
|
|
|
|
if (res.data.download_url === "") { |
|
|
|
|
window.location.href = this.full_url; |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if(this.currentappinfo.type === 1){ |
|
|
|
|
if(this.currentappinfo.issupersign){ |
|
|
|
|
if(this.$route.query.udid && this.udid === this.$route.query.udid){ |
|
|
|
|
if(this.agent !== ''){ |
|
|
|
|
if (this.currentappinfo.type === 1) { |
|
|
|
|
if (this.currentappinfo.issupersign) { |
|
|
|
|
if (this.$route.query.udid && this.udid === this.$route.query.udid) { |
|
|
|
|
if (this.agent !== '') { |
|
|
|
|
let download_url = res.data.download_url; |
|
|
|
|
this.downloadurl="itms-services://?action=download-manifest&url="+encodeURIComponent(download_url); |
|
|
|
|
this.downloadurl = "itms-services://?action=download-manifest&url=" + encodeURIComponent(download_url); |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
if(this.agent !== ''){ |
|
|
|
|
} else { |
|
|
|
|
if (this.agent !== '') { |
|
|
|
|
this.downloadurl = res.data.download_url; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
let download_url = res.data.download_url; |
|
|
|
|
this.downloadurl="itms-services://?action=download-manifest&url="+encodeURIComponent(download_url); |
|
|
|
|
this.downloadurl = "itms-services://?action=download-manifest&url=" + encodeURIComponent(download_url); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
if(this.agent !== ''){ |
|
|
|
|
} else { |
|
|
|
|
if (this.agent !== '') { |
|
|
|
|
this.downloadurl = res.data.download_url; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
window.location.href=this.downloadurl; |
|
|
|
|
window.location.href = this.downloadurl; |
|
|
|
|
} else { |
|
|
|
|
this.isdownload = false; |
|
|
|
|
alert("密码错误,或者下载链接失效") |
|
|
|
@ -226,13 +234,13 @@ |
|
|
|
|
'short': this.currentappinfo.short, |
|
|
|
|
'release_id': this.mcurrentappinfo.release_id, |
|
|
|
|
'password': this.password, |
|
|
|
|
'udid':this.udid, |
|
|
|
|
'udid': this.udid, |
|
|
|
|
}, |
|
|
|
|
'app_id': this.currentappinfo.app_id |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
qrcode(){ |
|
|
|
|
qrcode() { |
|
|
|
|
let qrcode = document.getElementById("qrcode"); |
|
|
|
|
if (qrcode) { |
|
|
|
|
new QRCode(qrcode, { |
|
|
|
@ -242,79 +250,90 @@ |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
auto_redircet_url(domain_name) { |
|
|
|
|
if (domain_name) { |
|
|
|
|
let nurl = location.href.split("//")[1].split("/"); |
|
|
|
|
const user_hostname = domain_name.split("//"); |
|
|
|
|
if (nurl[0] === user_hostname[1]) { |
|
|
|
|
return true; |
|
|
|
|
} else { |
|
|
|
|
nurl[0] = user_hostname[1]; |
|
|
|
|
window.location.href = user_hostname[0] + "//" + nurl.join("/"); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getDownloadTokenFun() { |
|
|
|
|
let params={ "short": this.$route.params.short,"time":new Date().getTime() }; |
|
|
|
|
if(this.$route.query.release_id){ |
|
|
|
|
params["release_id"]=this.$route.query.release_id |
|
|
|
|
let params = {"short": this.$route.params.short, "time": new Date().getTime()}; |
|
|
|
|
if (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"]="" |
|
|
|
|
if (this.$route.query.udid) { |
|
|
|
|
params["udid"] = this.$route.query.udid |
|
|
|
|
} else { |
|
|
|
|
params["udid"] = "" |
|
|
|
|
} |
|
|
|
|
getShortAppinfo(data => { |
|
|
|
|
if (data.code === 1000) { |
|
|
|
|
if (!this.auto_redircet_url(data.domain_name)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.udid = data.udid; |
|
|
|
|
if(!data.data.master_release.release_id){ |
|
|
|
|
// this.$message({ |
|
|
|
|
// message:"该 release 版本不存在,请检查", |
|
|
|
|
// type: 'error', |
|
|
|
|
// duration:0 |
|
|
|
|
// }); |
|
|
|
|
if (!data.data.master_release.release_id) { |
|
|
|
|
this.iserror = true; |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(this.agent === "android" || this.agent === "wxandroid"){ |
|
|
|
|
if (this.agent === "android" || this.agent === "wxandroid") { |
|
|
|
|
// 请求的数据iOS |
|
|
|
|
if(data.data.type === 1){ |
|
|
|
|
if(data.data.has_combo){ |
|
|
|
|
if(!params.release_id){ |
|
|
|
|
if (data.data.type === 1) { |
|
|
|
|
if (data.data.has_combo) { |
|
|
|
|
if (!params.release_id) { |
|
|
|
|
this.currentappinfo = data.data.has_combo; |
|
|
|
|
this.mcurrentappinfo = data.data.has_combo.master_release; |
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
this.wrong = true; |
|
|
|
|
this.msg = '该 release 版本只能在苹果设备使用'; |
|
|
|
|
} |
|
|
|
|
this.iscomboappinfo = data.data; |
|
|
|
|
this.miscomboappinfo = data.data.master_release; |
|
|
|
|
|
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
this.wrong = true; |
|
|
|
|
this.msg = '苹果应用不支持安卓设备'; |
|
|
|
|
this.dchoice=true; |
|
|
|
|
this.dchoice = true; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
this.dchoice=true; |
|
|
|
|
} else { |
|
|
|
|
this.dchoice = true; |
|
|
|
|
} |
|
|
|
|
}else if(this.agent === "apple"|| this.agent === "wxapple"){ |
|
|
|
|
if(data.data.type === 0){ |
|
|
|
|
if(data.data.has_combo){ |
|
|
|
|
if(!params.release_id){ |
|
|
|
|
} else if (this.agent === "apple" || this.agent === "wxapple") { |
|
|
|
|
if (data.data.type === 0) { |
|
|
|
|
if (data.data.has_combo) { |
|
|
|
|
if (!params.release_id) { |
|
|
|
|
this.currentappinfo = data.data.has_combo; |
|
|
|
|
this.mcurrentappinfo = data.data.has_combo.master_release; |
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
this.wrong = true; |
|
|
|
|
this.msg = '该 release 版本只能在安卓设备使用'; |
|
|
|
|
} |
|
|
|
|
this.iscomboappinfo = data.data; |
|
|
|
|
this.miscomboappinfo = data.data.master_release; |
|
|
|
|
|
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
this.wrong = true; |
|
|
|
|
this.msg = '安卓应用不支持苹果设备'; |
|
|
|
|
this.dchoice=true; |
|
|
|
|
this.dchoice = true; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
this.dchoice=true; |
|
|
|
|
} else { |
|
|
|
|
this.dchoice = true; |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
this.dchoice=true; |
|
|
|
|
} else { |
|
|
|
|
this.dchoice = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(this.dchoice){ |
|
|
|
|
if (this.dchoice) { |
|
|
|
|
this.currentappinfo = data.data; |
|
|
|
|
this.mcurrentappinfo = data.data.master_release; |
|
|
|
|
if (this.currentappinfo.has_combo) { |
|
|
|
@ -323,8 +342,8 @@ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(this.agent !== ''){ |
|
|
|
|
this.miscomboappinfo={}; |
|
|
|
|
if (this.agent !== '') { |
|
|
|
|
this.miscomboappinfo = {}; |
|
|
|
|
this.iscomboappinfo = {}; |
|
|
|
|
} |
|
|
|
|
if (this.currentappinfo.wxeasytype) { |
|
|
|
@ -346,8 +365,7 @@ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
} else { |
|
|
|
|
this.iserror = true; |
|
|
|
|
} |
|
|
|
|
}, params) |
|
|
|
@ -403,8 +421,8 @@ |
|
|
|
|
this.getDownloadTokenFun(); |
|
|
|
|
this.full_url = location.href; |
|
|
|
|
this.qrcode(); |
|
|
|
|
},filters:{ |
|
|
|
|
formatName:function (name){ |
|
|
|
|
}, filters: { |
|
|
|
|
formatName: function (name) { |
|
|
|
|
if (name) { |
|
|
|
|
return name.replace("麻将", "").replace("斗地主", "").replace("棋牌", "") |
|
|
|
|
} |
|
|
|
@ -413,15 +431,15 @@ |
|
|
|
|
let ftype = ''; |
|
|
|
|
if (type === 1) { |
|
|
|
|
ftype = '内测版' |
|
|
|
|
} else if(type === 2) { |
|
|
|
|
} else if (type === 2) { |
|
|
|
|
ftype = '企业版' |
|
|
|
|
} |
|
|
|
|
return ftype |
|
|
|
|
}, |
|
|
|
|
formatTime:function (stime) { |
|
|
|
|
if(stime){ |
|
|
|
|
formatTime: function (stime) { |
|
|
|
|
if (stime) { |
|
|
|
|
stime = stime.split(".")[0].split("T"); |
|
|
|
|
return stime[0]+" "+stime[1] |
|
|
|
|
return stime[0] + " " + stime[1] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -958,7 +976,8 @@ |
|
|
|
|
border-radius: 40px; |
|
|
|
|
font-size: 14px; |
|
|
|
|
} |
|
|
|
|
.main > header .actions button a{ |
|
|
|
|
|
|
|
|
|
.main > header .actions button a { |
|
|
|
|
color: #fff |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1414,7 +1433,6 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.app_bottom_fixed img { |
|
|
|
|
width: 100%; |
|
|
|
|
max-height: 80px |
|
|
|
|