From 03f66df7b9f6f6861a64c3e8f53065624d1b4e9c Mon Sep 17 00:00:00 2001
From: MMXX
Date: Thu, 30 Dec 2021 14:36:36 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=EF=BC=8C?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E4=B8=AA=E5=BC=80=E5=8F=91=E8=80=85?=
=?UTF-8?q?=EF=BC=8C=E4=B8=8B=E8=BD=BD=E4=B8=8D=E6=98=AF=E6=9C=80=E6=96=B0?=
=?UTF-8?q?=E7=AD=BE=E5=90=8D=E5=8C=85=E9=97=AE=E9=A2=98=EF=BC=8C=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E6=89=B9=E9=87=8F=E4=BF=AE=E6=94=B9=E5=BC=80=E5=8F=91?=
=?UTF-8?q?=E8=80=85=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/base/AppleDeveloperBindApp.vue | 1 +
.../src/components/user/FirSuperSignBase.vue | 133 ++++++++++++++----
fir_ser/api/utils/app/supersignutils.py | 4 +-
fir_ser/api/utils/crontab/ctasks.py | 24 ++--
fir_ser/api/utils/serializer.py | 21 ++-
fir_ser/api/utils/storage/caches.py | 17 ++-
fir_ser/api/utils/utils.py | 6 +-
fir_ser/api/views/supersign.py | 26 +++-
fir_ser/common/base/baseutils.py | 7 +-
fir_ser/fir_ser/settings.py | 1 +
10 files changed, 177 insertions(+), 63 deletions(-)
diff --git a/fir_client/src/components/base/AppleDeveloperBindApp.vue b/fir_client/src/components/base/AppleDeveloperBindApp.vue
index 34c2573..7fe518d 100644
--- a/fir_client/src/components/base/AppleDeveloperBindApp.vue
+++ b/fir_client/src/components/base/AppleDeveloperBindApp.vue
@@ -41,6 +41,7 @@
该应用已经消耗 {{ option.app_used_number }} 个设备数
描述: {{ option.description }}
+ 账户状态: {{ option.status_display }}
diff --git a/fir_client/src/components/user/FirSuperSignBase.vue b/fir_client/src/components/user/FirSuperSignBase.vue
index 945a4be..82f0237 100644
--- a/fir_client/src/components/user/FirSuperSignBase.vue
+++ b/fir_client/src/components/user/FirSuperSignBase.vue
@@ -203,6 +203,31 @@
+
+
+
+
+
+
+ 确定
+ 取消
+
+
受影响的开发者ID
+
+ 账户ID:{{ isid.issuer_id }}
+ 当前状态:{{ format_status(isid.status) }}
+
+
+
+
+
-
-
-
-
-
-
- 搜索
-
-
+
+
+
+
+
+
+
+ 搜索
+
+
+ 账户状态检测
+
+
+ 批量设置账户状态
+
+
-
-
-
+ style="width: 100%"
+ @selection-change="handleSelectionChange">
+
+
开发证书不可用,请在编辑中导入或手动创建发布证书
请先激活开发者账户
- {{ format_status(scope.row) }}
+ {{ format_status(scope.row.status) }}
- {{ format_status(scope.row) }}
+ {{ format_status(scope.row.status) }}
- {{ format_status(scope.row) }}
+ {{ format_status(scope.row.status) }}
@@ -585,6 +619,7 @@
开发者ID: {{ scope.row.developer_id }}
开发者备注: {{ scope.row.developer_description }}
+ 开发者状态: {{ scope.row.developer_status }}
{{ scope.row.developer_id }}
@@ -664,6 +699,7 @@
开发者ID: {{ scope.row.developer_id }}
开发者备注: {{ scope.row.developer_description }}
+ 开发者状态: {{ scope.row.developer_status }}
{{ scope.row.developer_id }}
@@ -771,6 +807,7 @@
开发者ID: {{ scope.row.issuer_id }}
开发者备注: {{ scope.row.developer_description }}
+ 开发者状态: {{ scope.row.developer_status }}
{{ scope.row.issuer_id }}
@@ -1071,7 +1108,10 @@ export default {
appletoapp_title: '',
status_choices: [],
read_only_mode: 'off',
- developer_status_choice: []
+ developer_status_choice: [],
+ multipleSelection: [],
+ setdeveloperstatusVisible: false,
+ change_developer_status: ''
}
}, watch: {
'dialogaddDeveloperVisible': function () {
@@ -1081,14 +1121,34 @@ export default {
}
},
methods: {
+ setdeveloperstatusFun() {
+ if (this.multipleSelection && this.multipleSelection.length > 0) {
+ this.setdeveloperstatusVisible = true
+ } else {
+ this.$message.warning("开发者账户未选择")
+ }
+ },
+ setdeveloperstatus() {
+ if (this.change_developer_status === '') {
+ this.$message.warning("账户状态未选择")
+ } else {
+ this.iosdeveloperFun({
+ "methods": "PUT",
+ "data": {"issuer_ids": this.getIssuerIds(), "act": 'setstatus', "status": this.change_developer_status}
+ });
+ }
+ },
+ handleSelectionChange(val) {
+ this.multipleSelection = val;
+ },
sort_method_usable_number(a, b) {
return this.formatter_usable_number(a) - this.formatter_usable_number(b)
},
formatter_usable_number(row) {
return row.usable_number - row.developer_used_number > 0 ? row.usable_number - row.developer_used_number : 0
},
- format_status(row) {
- return format_choices(row.status, this.status_choices)
+ format_status(status) {
+ return format_choices(status, this.status_choices)
},
downloadipa(info) {
this.loading = true;
@@ -1303,6 +1363,21 @@ export default {
activedeveloperFun(developer, act) {
this.iosdeveloperFun({"methods": "PUT", "data": {"issuer_id": developer.issuer_id, "act": act}});
},
+ activemanydeveloperFun() {
+ let issuer_ids = this.getIssuerIds()
+ if (issuer_ids.length === 0) {
+ this.$message.warning("开发者账户未选择")
+ } else {
+ this.iosdeveloperFun({"methods": "PUT", "data": {"issuer_ids": issuer_ids, "act": 'checkauth'}});
+ }
+ },
+ getIssuerIds() {
+ let issuer_ids = []
+ for (let i = 0; i < this.multipleSelection.length; i++) {
+ issuer_ids.push(this.multipleSelection[i]['issuer_id'])
+ }
+ return issuer_ids
+ },
canceledit() {
this.dialogaddDeveloperVisible = false;
this.editdeveloperinfo = {auth_type: 0, usable_number: 100, app_limit_number: 100};
@@ -1461,7 +1536,13 @@ export default {
}
}
}
-
+ if (params.methods === 'PUT') {
+ this.$message.success("操作成功");
+ }
+ if (params.data.act === 'setstatus') {
+ this.setdeveloperstatusVisible = false
+ this.change_developer_status = ''
+ }
if (this.dialogaddDeveloperVisible) {
this.canceledit();
this.$message.success("操作成功");
@@ -1632,7 +1713,7 @@ export default {