diff --git a/fir_admin/src/views/appinfos/list.vue b/fir_admin/src/views/appinfos/list.vue
index e2d099d..146816f 100644
--- a/fir_admin/src/views/appinfos/list.vue
+++ b/fir_admin/src/views/appinfos/list.vue
@@ -189,6 +189,7 @@ export default {
}
},
created() {
+ this.listQuery.user_id = this.$route.params && this.$route.params.user_id
this.fetchData()
},
methods: {
diff --git a/fir_admin/src/views/storage/list.vue b/fir_admin/src/views/storage/list.vue
index a56c59c..c5e88bb 100644
--- a/fir_admin/src/views/storage/list.vue
+++ b/fir_admin/src/views/storage/list.vue
@@ -167,7 +167,6 @@ export default {
access_key: undefined,
storage_type: undefined,
domain_name: undefined,
- user_id: undefined,
used_id: undefined
},
sortOptions,
@@ -175,6 +174,7 @@ export default {
}
},
created() {
+ this.listQuery.user_id = this.$route.params && this.$route.params.user_id
this.fetchData()
}, mounted() {
if (this.$route.query.user_id) {
diff --git a/fir_admin/src/views/supersign/developer/list.vue b/fir_admin/src/views/supersign/developer/list.vue
index 84116b3..0420bc3 100644
--- a/fir_admin/src/views/supersign/developer/list.vue
+++ b/fir_admin/src/views/supersign/developer/list.vue
@@ -59,7 +59,9 @@
- {{ scope.row.use_number }}
+
+ {{ scope.row.use_number }}
+
diff --git a/fir_admin/src/views/supersign/devices/list.vue b/fir_admin/src/views/supersign/devices/list.vue
index 1e524aa..7a5b70a 100644
--- a/fir_admin/src/views/supersign/devices/list.vue
+++ b/fir_admin/src/views/supersign/devices/list.vue
@@ -170,6 +170,8 @@ export default {
}
},
created() {
+ this.listQuery.issuer_id = this.$route.params && this.$route.params.issuer_id
+ this.listQuery.user_id = this.$route.params && this.$route.params.user_id
this.fetchData()
},
methods: {
@@ -178,6 +180,7 @@ export default {
this.fetchData()
},
fetchData() {
+ console.log(this.listQuery)
this.listLoading = true
getDevicesInfo(this.listQuery).then(response => {
this.list = response.data
diff --git a/fir_admin/src/views/userinfos/list.vue b/fir_admin/src/views/userinfos/list.vue
index 64027c0..600bb42 100644
--- a/fir_admin/src/views/userinfos/list.vue
+++ b/fir_admin/src/views/userinfos/list.vue
@@ -60,6 +60,13 @@
{{ scope.row.download_times }}
+
+
+
+ {{ scope.row.app_count }}
+
+
+
{{ scope.row.is_active }}
@@ -68,13 +75,19 @@
- {{ scope.row.storage_active }}
+
+ {{ scope.row.storage_active }}
+
+ {{ scope.row.storage_active }}
- {{ scope.row.supersign_active }}
+
+ {{ scope.row.supersign_active }}
+
+ {{ scope.row.supersign_active }}
diff --git a/fir_client/src/components/user/FirSuperSignBase.vue b/fir_client/src/components/user/FirSuperSignBase.vue
index cc3b6bc..02117d4 100644
--- a/fir_client/src/components/user/FirSuperSignBase.vue
+++ b/fir_client/src/components/user/FirSuperSignBase.vue
@@ -489,7 +489,7 @@
},
canceledit() {
this.dialogaddDeveloperVisible = false;
- this.editdeveloperinfo = {auth_type: 0,usable_number:100};
+ this.editdeveloperinfo = {auth_type: 0, usable_number: 100};
this.isedit = false;
this.placeholder = ""
},
diff --git a/fir_client/src/components/user/FirUserProfileCertification.vue b/fir_client/src/components/user/FirUserProfileCertification.vue
index d17ed55..8e2c3ac 100644
--- a/fir_client/src/components/user/FirUserProfileCertification.vue
+++ b/fir_client/src/components/user/FirUserProfileCertification.vue
@@ -269,13 +269,17 @@
return false;
}
}
+ delete this.form['email'];
this.get_user_certification({methods: 'POST', data: this.form})
},
get_user_certification(params) {
user_certification(res => {
if (res.code === 1000) {
if (params.methods === 'POST') {
- this.$message.success("信息提交成功,正在审核中")
+ this.$message.success("信息提交成功,正在审核中");
+ this.cert_edit_flag = false;
+ this.certification_status = 0;
+ this.get_user_certification({methods: 'GET', data: {act: 'usercert'}});
}
if (res.data.usercert) {
this.certification = res.data.usercert;
@@ -302,28 +306,30 @@
"authcode": this.form.authcode,
"cptch_key": this.cptch.cptch_key,
};
- if (!this.form.authcode) {
- this.$message.error("图片验证码输入有误");
- return;
- }
- let cptch_flag = this.form.authcode.length === this.cptch.length;
- if (this.cptch.cptch_key === '' || !this.cptch.cptch_key) {
- cptch_flag = true
- }
- if (cptch_flag) {
- let checkp = checkphone(this.form.mobile);
- if (!checkp) {
- this.$message.error("手机号输入有误");
+ if (this.cptch.cptch_image) {
+ if (!this.form.authcode) {
+ this.$message.error("图片验证码输入有误");
+ return;
+ }
+ let cptch_flag = this.form.authcode.length === this.cptch.length;
+ if (this.cptch.cptch_key === '' || !this.cptch.cptch_key) {
+ cptch_flag = true
+ }
+ if (!cptch_flag) {
+ this.$message.error("图片验证码输入有误");
return
}
+ }
- } else {
- this.$message.error("图片验证码输入有误");
+ let checkp = checkphone(this.form.mobile);
+ if (!checkp) {
+ this.$message.error("手机号输入有误");
return
}
+
let params = {'act': act, 'target': target, 'ext': picode, 'user_id': target, 'ftype': 'certification'};
- this.form.email = this.form.mobile;
if (this.cptch.geetest) {
+ this.form.email = this.form.mobile;
geetest(this, params, (n_params) => {
this.get_phone_code(n_params);
})
diff --git a/fir_ser/admin/urls.py b/fir_ser/admin/urls.py
index f519113..5a1698d 100644
--- a/fir_ser/admin/urls.py
+++ b/fir_ser/admin/urls.py
@@ -19,7 +19,7 @@ from admin.views.user import UserInfoView, UserCertificationInfoView
from admin.views.app import AppInfoView, AppReleaseInfoView
from admin.views.storage import StorageInfoView, StorageChangeView
from admin.views.order import OrderPayView, OrderInfoView
-from admin.views.supersign import DeveloperInfoView,DevicesInfoView
+from admin.views.supersign import DeveloperInfoView, DevicesInfoView
urlpatterns = [
# path("",include(router.urls)),
diff --git a/fir_ser/admin/views/storage.py b/fir_ser/admin/views/storage.py
index 9d8a229..c6fdab8 100644
--- a/fir_ser/admin/views/storage.py
+++ b/fir_ser/admin/views/storage.py
@@ -49,8 +49,9 @@ class StorageInfoView(APIView):
view=self)
serializer = AdminStorageSerializer(page_serializer, many=True)
res.data = serializer.data
- res.storage_selection = format_storage_selection(serializer.data, serializer.data[0].get('storage_choices'))
res.total = obj_list.count()
+ if res.total:
+ res.storage_selection = format_storage_selection(serializer.data, serializer.data[0].get('storage_choices'))
return Response(res.dict)
def put(self, request):
diff --git a/fir_ser/api/utils/serializer.py b/fir_ser/api/utils/serializer.py
index ff69076..5390ea1 100644
--- a/fir_ser/api/utils/serializer.py
+++ b/fir_ser/api/utils/serializer.py
@@ -92,7 +92,7 @@ class AdminUserInfoSerializer(UserInfoSerializer):
read_only_fields = ["id", "head_img", "free_download_times", "last_login",
"is_superuser", "last_name", "is_staff", "uid", "storage_active", "supersign_active",
"date_joined", "download_times", "all_download_times", "storage", "groups",
- "user_permissions", "certification_id"]
+ "user_permissions", "certification_id", " app_count"]
gender_choices = serializers.SerializerMethodField()
@@ -119,6 +119,11 @@ class AdminUserInfoSerializer(UserInfoSerializer):
def get_certification_id(self, obj):
return models.UserCertificationInfo.objects.filter(user_id=obj).values('id').first()
+ app_count = serializers.SerializerMethodField()
+
+ def get_app_count(self, obj):
+ return models.Apps.objects.filter(user_id=obj).count()
+
def update(self, instance, validated_data):
return super(AdminUserInfoSerializer, self).update(instance, validated_data)
@@ -407,17 +412,19 @@ class DeveloperSerializer(serializers.ModelSerializer):
def get_developer_used_other_number(self, obj):
return get_developer_udided(obj)[0]
-class AdminDeveloperSerializer(DeveloperSerializer):
+
+class AdminDeveloperSerializer(DeveloperSerializer):
class Meta:
model = models.AppIOSDeveloperInfo
# depth = 1
- exclude = [ "p8key",]
+ exclude = ["p8key", ]
auth_type_choices = serializers.SerializerMethodField()
def get_auth_type_choices(self, obj):
return get_choices_dict(obj.auth_type_choices)
+
class SuperSignUsedSerializer(serializers.ModelSerializer):
class Meta:
model = models.APPSuperSignUsedInfo
@@ -448,7 +455,8 @@ class SuperSignUsedSerializer(serializers.ModelSerializer):
class AdminSuperSignUsedSerializer(SuperSignUsedSerializer):
class Meta:
model = models.APPSuperSignUsedInfo
- fields = ["created_time", "device_udid", "device_name", "developer_id", "bundle_id", "bundle_name","app_id","id","user_id","short","developer_pk"]
+ fields = ["created_time", "device_udid", "device_name", "developer_id", "bundle_id", "bundle_name", "app_id",
+ "id", "user_id", "short", "developer_pk"]
app_id = serializers.SerializerMethodField()
@@ -470,6 +478,7 @@ class AdminSuperSignUsedSerializer(SuperSignUsedSerializer):
def get_developer_pk(self, obj):
return obj.developerid.pk
+
class DeviceUDIDSerializer(serializers.ModelSerializer):
class Meta:
model = models.AppUDID
diff --git a/fir_ser/api/views/login.py b/fir_ser/api/views/login.py
index 50deba3..f92d344 100644
--- a/fir_ser/api/views/login.py
+++ b/fir_ser/api/views/login.py
@@ -642,11 +642,18 @@ class CertificationView(APIView):
if CHANGER.get('change_type').get('sms'):
is_valid, target = is_valid_sender_code('sms', data.get("auth_token", None), data.get("auth_key", None))
if is_valid and str(target) == str(data.get("mobile")):
- if login_auth_failed("get", data.get("mobile")):
+ if login_auth_failed("get", str(data.get("mobile"))):
del data["auth_key"]
del data["auth_token"]
- UserCertificationInfo.objects.update_or_create(user_id=request.user, status=0, defaults=data)
- return self.get(request)
+ data['status'] = 0
+
+ if CertificationInfo.objects.filter(user_id=request.user).count() == 3:
+ UserCertificationInfo.objects.update_or_create(defaults=data, user_id=request.user)
+ return self.get(request)
+ else:
+ res.code = 1009
+ res.msg = "请上传照片"
+ return Response(res.dict)
else:
res.code = 1006
logger.error("username:%s failed too try , locked" % (request.user,))
@@ -655,7 +662,13 @@ class CertificationView(APIView):
res.code = 1001
res.msg = "短信验证码有误"
else:
- UserCertificationInfo.objects.update_or_create(user_id=request.user, status=0, defaults=data)
+ data['status'] = 0
+ if CertificationInfo.objects.filter(user_id=request.user).count() == 3:
+ UserCertificationInfo.objects.update_or_create(defaults=data, user_id=request.user)
+ else:
+ res.code = 1009
+ res.msg = "请上传照片"
+ return Response(res.dict)
return self.get(request)
except Exception as e:
logger.error("%s UserCertificationInfo save %s failed Exception: %s" % (request.user, data, e))