From 47f2f534c7c477036d06a2417af6390f2002f8d1 Mon Sep 17 00:00:00 2001 From: nineven Date: Sat, 11 Apr 2020 14:09:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=8B=E8=BD=BD=E6=9D=83?= =?UTF-8?q?=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_client/src/components/FirAppInfosBase.vue | 84 +++--- .../src/components/FirAppInfosbaseinfo.vue | 8 +- .../src/components/FirAppInfoscombo.vue | 40 ++- .../src/components/FirAppInfosdevices.vue | 89 +++++++ .../src/components/FirAppInfossecurity.vue | 246 ++++++++++++++++++ fir_client/src/components/FirDownload.vue | 71 +++-- fir_client/src/router/index.js | 12 + fir_download/src/components/FirDownload.vue | 114 ++++---- .../api/migrations/0021_auto_20200410_1141.py | 28 ++ fir_ser/api/migrations/0022_apps_isshow.py | 18 ++ .../migrations/0023_appreleaseinfo_udid.py | 18 ++ fir_ser/api/models.py | 4 +- fir_ser/api/utils/app/apputils.py | 3 +- fir_ser/api/utils/serializer.py | 77 +++++- fir_ser/api/utils/storage/caches.py | 26 +- fir_ser/api/views/apps.py | 2 + fir_ser/api/views/download.py | 18 +- fir_ser/api/views/uploads.py | 3 +- 18 files changed, 670 insertions(+), 191 deletions(-) create mode 100644 fir_client/src/components/FirAppInfosdevices.vue create mode 100644 fir_client/src/components/FirAppInfossecurity.vue create mode 100644 fir_ser/api/migrations/0021_auto_20200410_1141.py create mode 100644 fir_ser/api/migrations/0022_apps_isshow.py create mode 100644 fir_ser/api/migrations/0023_appreleaseinfo_udid.py diff --git a/fir_client/src/components/FirAppInfosBase.vue b/fir_client/src/components/FirAppInfosBase.vue index ac1ad3a..75b7614 100644 --- a/fir_client/src/components/FirAppInfosBase.vue +++ b/fir_client/src/components/FirAppInfosBase.vue @@ -2,7 +2,7 @@
@@ -57,10 +56,7 @@ -
- -
@@ -80,44 +76,43 @@ activity: { editing: false }, - slidvalue: [[5, 5], [5, 5]] - } }, methods: { + setfunactive(item,index){ + for (let key in this.$refs) { + if(key === item){ + this.$refs[key].classList.add('active'); + this.$store.dispatch('doappInfoIndex', [[index, index], [index, index]]); + }else { + this.$refs[key].classList.remove('active'); + } + } + }, appDownload() { this.$router.push({name: 'FirDownload', params: { short: this.appinfos.short }}) }, - combo() { - this.$router.push({name: 'FirAppInfoscombo'}); - this.$store.dispatch('doappInfoIndex', [[31, 31], [31, 31]]); - - this.$refs.combo.classList.add('active'); - this.$refs.baseinfo.classList.remove('active'); - - + defaulttimeline() { + this.setfunactive('timeline',5); + this.$router.push({name: 'FirAppInfostimeline'}); }, baseinfo() { - this.$refs.baseinfo.classList.add('active'); - this.$refs.combo.classList.remove('active'); - + this.setfunactive('baseinfo',18); this.$router.push({name: 'FirAppInfosbaseinfo'}); - this.$store.dispatch('doappInfoIndex', [[18, 18], [18, 18]]); + }, + security(){ + this.setfunactive('security',31); + this.$router.push({name: 'FirAppInfossecurity'}); }, - slidevents() { - // let index = this.$store.state.appInfoIndex[1]; - // this.$store.dispatch('doappInfoIndex',[index,index]); - // eslint-disable-next-line no-console - // console.log(index); + combo() { + this.setfunactive('combo',44); + this.$router.push({name: 'FirAppInfoscombo'}); }, - defaulttimeline() { - this.$refs.baseinfo.classList.remove('active'); - this.$refs.combo.classList.remove('active'); - this.$router.push({name: 'FirAppInfostimeline'}); - this.$store.dispatch('doappInfoIndex', [[5, 5], [5, 5]]); + devices(){ + this.setfunactive('devices',57); + this.$router.push({name: 'FirAppInfosdevices'}); }, - }, created() { }, filters: { @@ -132,21 +127,8 @@ }, }, computed: { - getBH: function () { - let sch = this.$refs.appinfomain.scrollHeight; - - if (sch === 0 || sch < window.innerHeight) { - sch = window.innerHeight; - - - } else { - sch += 130; - } - return sch; - } }, mounted() { - getappinfos(data => { if (data.code === 1000) { @@ -161,14 +143,12 @@ // eslint-disable-next-line no-console console.log("失败了"); } - }, { "app_id": this.$route.params.id }); if(this.$store.state.currentapp.master_release){ this.icon_url = this.$store.state.currentapp.master_release.icon_url } - // this.$store.dispatch('dosetAh',this.getBH); },watch:{ '$store.state.currentapp.master_release.icon_url':function () { this.icon_url = this.$store.state.currentapp.master_release.icon_url diff --git a/fir_client/src/components/FirAppInfosbaseinfo.vue b/fir_client/src/components/FirAppInfosbaseinfo.vue index 6bab81c..96b3e5b 100644 --- a/fir_client/src/components/FirAppInfosbaseinfo.vue +++ b/fir_client/src/components/FirAppInfosbaseinfo.vue @@ -186,22 +186,18 @@ const isLt2M = file.size / 1024 / 1024 < 2; if(file.type === 'image/jpeg' || file.type === 'image/png'|| file.type === 'image/jpg'){ if (isLt2M) { - // return true; - uploadimgs(data => { if (data.code === 1000) { - // eslint-disable-next-line no-console - console.log(data.data); let certinfo=data.data; this.uploadtostorage(file,certinfo); } },{'methods':false,'data':{'app_id':this.currentapp.app_id,'upload_key':file.name,'ftype':'app'}}); } else{ - this.$message.error('上传头像图片大小不能超过 2MB!'); + this.$message.error('上传应用图片大小不能超过 2MB!'); } }else { - this.$message.error('上传头像图片只能是 JPG/PNG/JPEG 格式!'); + this.$message.error('上传应用图片只能是 JPG/PNG/JPEG 格式!'); } return false; diff --git a/fir_client/src/components/FirAppInfoscombo.vue b/fir_client/src/components/FirAppInfoscombo.vue index 942584b..a9b3a1d 100644 --- a/fir_client/src/components/FirAppInfoscombo.vue +++ b/fir_client/src/components/FirAppInfoscombo.vue @@ -1,7 +1,7 @@