diff --git a/fir_client/src/components/base/AppleDeveloperBindApp.vue b/fir_client/src/components/base/AppleDeveloperBindApp.vue index 1f06da7..a445317 100644 --- a/fir_client/src/components/base/AppleDeveloperBindApp.vue +++ b/fir_client/src/components/base/AppleDeveloperBindApp.vue @@ -4,6 +4,7 @@
{ - if (data.code === 1000) { - this.app_developer_lists = data.data; - } - this.loadingfun.close() - } - , - {"methods": 'GET', "data": {app_id: this.app_id, issuer_id: this.issuer_id, size: 1000}}) - }, getBindInfo(params) { + this.loadings = true if (this.issuer_id) { params.issuer_id = this.issuer_id } @@ -212,18 +200,21 @@ export default { } developerBindAppFun(data => { if (data.code === 1000) { - if (params.act === 'apps') { + if (params.act === 'apps' || params.act === 'developer') { this.app_developer_lists = data.data + if (params.act === 'developer') { + this.app_developer_lists.sort(sort_compare('developer_used_number')) + } this.get_choice_data_from_key(this.choices_data) } else { this.choices_data_list = data.data; this.choices_data = this.format_data(data.data) this.get_choice_data_from_key(this.choices_data) - this.$message.success("数据获取成功") } } else { this.$message.error("数据获取失败" + data.msg) } + this.loadings = false }, {methods: 'GET', data: params}) }, format_data(data) { diff --git a/fir_client/src/components/user/FirSuperSignBase.vue b/fir_client/src/components/user/FirSuperSignBase.vue index 7b86689..0020622 100644 --- a/fir_client/src/components/user/FirSuperSignBase.vue +++ b/fir_client/src/components/user/FirSuperSignBase.vue @@ -75,7 +75,8 @@ type="danger" @click="cleandevices">清理签名数据 - 同步设备信息 + 同步设备信息 value1) { + return -1; + } else { + return 0; + } + } +} + diff --git a/fir_ser/api/views/supersign.py b/fir_ser/api/views/supersign.py index c203c24..db23ad7 100644 --- a/fir_ser/api/views/supersign.py +++ b/fir_ser/api/views/supersign.py @@ -38,14 +38,10 @@ class DeveloperView(APIView): permission_classes = [SuperSignPermission, ] def get(self, request): - res = BaseResponse() - issuer_id = request.query_params.get("issuer_id", '') - app_id = request.query_params.get("app_id", '') developer_choice = request.query_params.get("developer_choice", None) developer_obj = AppIOSDeveloperInfo.objects.filter(user_id=request.user) - if developer_choice and developer_choice in ['private', 'public']: if developer_choice == 'public': developer_obj = developer_obj.exclude(appledevelopertoappuse__developerid__isnull=False) @@ -60,7 +56,7 @@ class DeveloperView(APIView): app_page_serializer = page_obj.paginate_queryset(queryset=developer_obj.order_by("-updated_time"), request=request, view=self) - developer_serializer = DeveloperSerializer(app_page_serializer, many=True, context={'app_id': app_id}) + developer_serializer = DeveloperSerializer(app_page_serializer, many=True) res.data = developer_serializer.data res.count = developer_obj.count() @@ -433,14 +429,14 @@ class DeviceUsedRankInfoView(APIView): def get(self, request): res = BaseResponse() page_obj = PageNumber() - appnamesearch = request.query_params.get("appnamesearch") + search_key = request.query_params.get("appnamesearch") start_time = request.query_params.get("start_time") end_time = request.query_params.get("end_time") app_used_sign_objs = APPSuperSignUsedInfo.objects.filter(user_id=request.user) - if appnamesearch: + if search_key: app_used_sign_objs = app_used_sign_objs.filter( - Q(app_id__name=appnamesearch) | Q(app_id__bundle_id=appnamesearch) | Q( - developerid__issuer_id=appnamesearch)) + Q(app_id__name=search_key) | Q(app_id__bundle_id=search_key) | Q( + developerid__issuer_id=search_key)) if end_time and start_time: try: start_time = datetime.date.fromtimestamp(int(start_time) / 1000) @@ -480,6 +476,9 @@ class AppleDeveloperBindAppsView(APIView): apps_obj_list = Apps.objects.filter(user_id=request.user, type=1).all() app_serializer = AppleDeveloperToAppUseAppsSerializer(apps_obj_list, many=True, context={'issuer_id': issuer_id}) + elif act == 'developer': + developer_obj = AppIOSDeveloperInfo.objects.filter(user_id=request.user).all() + app_serializer = DeveloperSerializer(developer_obj, many=True, context={'app_id': app_id}) else: apple_to_app_obj = AppleDeveloperToAppUse.objects.filter(app_id__user_id=request.user) if issuer_id: