From 04ae8cccc495efc325f8e620e209078f582b69a5 Mon Sep 17 00:00:00 2001 From: nineven Date: Wed, 13 Apr 2022 00:16:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BA=94=E7=94=A8=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=8E=88=E6=9D=83token,=20=E5=A2=9E=E5=8A=A0=E8=B6=85?= =?UTF-8?q?=E7=BA=A7=E7=AD=BE=E5=90=8D=E5=A4=9A=E9=87=8D=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=EF=BC=8C=E4=BC=98=E5=8C=96=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_client/src/components/FirDownload.vue | 33 +- fir_client/src/components/ShortDownload.vue | 33 +- .../components/apps/FirAppInfossecurity.vue | 358 ++++++++++++++---- .../components/apps/FirAppInfostimeline.vue | 32 +- fir_client/src/restful/download.js | 21 +- fir_client/src/restful/index.js | 17 +- .../api/migrations/0005_auto_20220412_1744.py | 41 ++ fir_ser/api/models.py | 20 +- fir_ser/api/urls.py | 3 +- fir_ser/api/utils/modelutils.py | 14 +- fir_ser/api/utils/serializer.py | 13 +- fir_ser/api/views/apps.py | 110 +++++- fir_ser/api/views/download.py | 3 +- fir_ser/api/views/notify.py | 9 + fir_ser/common/base/baseutils.py | 9 - fir_ser/common/core/exception.py | 10 + .../templates/xsign/app_sign_failed.html | 3 +- fir_ser/common/utils/download.py | 67 ++-- fir_ser/common/utils/token.py | 21 + fir_ser/xsign/utils/iossignapi.py | 14 +- fir_ser/xsign/utils/serializer.py | 5 - fir_ser/xsign/utils/supersignutils.py | 44 +-- fir_ser/xsign/views/download.py | 15 +- fir_ser/xsign/views/receiveudids.py | 123 ++++-- mailhtml/src/app_sign_failed.mjml.html | 2 +- 25 files changed, 762 insertions(+), 258 deletions(-) create mode 100644 fir_ser/api/migrations/0005_auto_20220412_1744.py diff --git a/fir_client/src/components/FirDownload.vue b/fir_client/src/components/FirDownload.vue index f3d534e..1ff404e 100644 --- a/fir_client/src/components/FirDownload.vue +++ b/fir_client/src/components/FirDownload.vue @@ -579,7 +579,8 @@ export default { } } }, { - "short": this.$route.params.short, + methods: 'GET', + short: this.$route.params.short, data: {"task_id": this.$route.query.task_id, "unique_key": unique_key} }) }, @@ -599,15 +600,27 @@ export default { window.location.href = this.mobileprovision; }, check_msg() { - if (this.$route.query.udid) { - if (this.$route.query.task_id) { - this.wrong = true; - this.msg = '签名处理中,请耐心等待'; - this.loop_check_task() - } else if (this.$route.query.msg) { - this.wrong = true; - this.show_err_msg(this.$route.query.msg); - } + if (this.$route.query.udid && this.$route.query.task_token) { + this.wrong = true; + this.msg = '签名处理中,请耐心等待'; + gettask(data => { + if (data.code === 1000) { + if (data.task_id) { + this.$route.query.task_id = data.task_id; + this.loop_check_task() + } else if (data.result) { + this.show_err_msg(data.result); + } else { + this.wrong = false; + } + } else { + this.show_err_msg(data.msg); + } + }, { + methods: 'POST', + short: this.$route.params.short, + data: {"task_token": this.$route.query.task_token} + }) } }, download() { diff --git a/fir_client/src/components/ShortDownload.vue b/fir_client/src/components/ShortDownload.vue index c3fb3f8..5e480d6 100644 --- a/fir_client/src/components/ShortDownload.vue +++ b/fir_client/src/components/ShortDownload.vue @@ -544,7 +544,8 @@ export default { } } }, { - "short": this.$route.params.short, + methods: 'GET', + short: this.$route.params.short, data: {"task_id": this.$route.query.task_id, "unique_key": unique_key} }) }, @@ -564,15 +565,27 @@ export default { window.location.href = this.mobileprovision; }, check_msg() { - if (this.$route.query.udid) { - if (this.$route.query.task_id) { - this.wrong = true; - this.msg = '签名处理中,请耐心等待'; - this.loop_check_task() - } else if (this.$route.query.msg) { - this.wrong = true; - this.show_err_msg(this.$route.query.msg); - } + if (this.$route.query.udid && this.$route.query.task_token) { + this.wrong = true; + this.msg = '签名处理中,请耐心等待'; + gettask(data => { + if (data.code === 1000) { + if (data.task_id) { + this.$route.query.task_id = data.task_id; + this.loop_check_task() + } else if (data.result) { + this.show_err_msg(data.result); + } else { + this.wrong = false; + } + } else { + this.show_err_msg(data.msg); + } + }, { + methods: 'POST', + short: this.$route.params.short, + data: {"task_token": this.$route.query.task_token} + }) } }, download() { diff --git a/fir_client/src/components/apps/FirAppInfossecurity.vue b/fir_client/src/components/apps/FirAppInfossecurity.vue index 2f7e870..ddce1a0 100644 --- a/fir_client/src/components/apps/FirAppInfossecurity.vue +++ b/fir_client/src/components/apps/FirAppInfossecurity.vue @@ -9,14 +9,169 @@ - - + + + + + + + 当存在指定授权码,授权码长度和生成数量被禁用 + + + + + 授权码长度为4-32之间 + + + + + 单次最多可生成1024个 + + + + + 0表示不限使用次数 + + + + + 取消 + 生成 + + + + + + + + 搜索 + + +
+ + 生成下载授权码 + + 清空所有授权码 + 清理无效授权码 + 清理选中授权码 + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + 关闭 + + +
+ + +
{{ passwordtip.msg }}
- 修改 + 查看配置下载授权码
- 设置密码之后,用户需要输入密码才可以下载该应用 + + 查看配置下载授权码 + 设置授权码之后,用户需要输入授权码才可以下载该应用 +
@@ -93,9 +253,10 @@ diff --git a/fir_client/src/components/apps/FirAppInfostimeline.vue b/fir_client/src/components/apps/FirAppInfostimeline.vue index 77fe0cf..2157cfe 100644 --- a/fir_client/src/components/apps/FirAppInfostimeline.vue +++ b/fir_client/src/components/apps/FirAppInfostimeline.vue @@ -103,7 +103,7 @@