优化代码

pull/5/head
youngS 4 years ago
parent a2ceeccdef
commit d5ccb336a1
  1. 18
      fir_client/src/components/FirAppInfosBase.vue
  2. 6
      fir_client/src/components/FirAppInfosdevices.vue
  3. 11
      fir_client/src/components/FirAppInfossupersign.vue
  4. 7
      fir_client/src/components/FirApps.vue
  5. 4
      fir_client/src/components/FirHeader.vue
  6. 16
      fir_client/src/components/FirSuperSignBase.vue
  7. 5
      fir_ser/api/utils/serializer.py

@ -168,15 +168,15 @@
},
devices() {
this.setfunactive('devices', 57);
if (this.appinfos.issupersign) {
this.$router.push({
"name": 'FirSuperSignBase',
params: {act: "useddevices"},
query: {bundleid: this.appinfos.bundle_id}
})
} else {
this.$router.push({name: 'FirAppInfosdevices'});
}
// if (this.appinfos.issupersign) {
// this.$router.push({
// "name": 'FirSuperSignBase',
// params: {act: "useddevices"},
// query: {bundleid: this.appinfos.bundle_id}
// })
// } else {
this.$router.push({name: 'FirAppInfosdevices'});
// }
},
supersign() {
this.setfunactive('supersign', 70);

@ -2,7 +2,11 @@
<div style="margin-top: 20px;width: 90%;margin-left: 8%">
<h2>UDID列表及用户信息</h2>
<el-link type="primary" v-if="this.currentapp.issupersign" style="margin-bottom: 30px;font-size: x-large"
@click="$router.push({name:'FirSuperSignBase',params:{act:'useddevices'},query:{bundleid: currentapp.bundle_id}})">
该应用已经开启超级签请点击查看最新设备列表
</el-link>
<!-- <h2>UDID列表及用户信息</h2>-->
<el-table
:data="udidlists"
stripe

@ -29,16 +29,23 @@
v-if="currentapp.type === 1 && $store.state.userinfo.supersign_active ">
<el-tooltip content="本应用签名使用额度,超过该额度,新设备将无法安装本应用" placement="top">
<el-tooltip content="本应用签名使用额度,超过该额度,新设备将无法安装本应用。0代表不限额" placement="top">
<el-input-number v-model="currentapp.supersign_limit_number" :disabled="supersign_disable"
:placeholder="defualt_dtitle" :min="0"
style="width: 60%;margin-right: 10px" label="签名限额"></el-input-number>
style="width: 40%;margin-right: 10px" label="签名限额"></el-input-number>
</el-tooltip>
<el-button @click="saveappinfo({supersign_limit_number:currentapp.supersign_limit_number})"
:disabled="supersign_disable"
>保存
</el-button>
<el-tooltip content="点击查看使用详情" placement="top">
<el-link :underline="false" type="primary" style="margin-left: 20px"
@click="$router.push({name:'FirSuperSignBase',params:{act:'useddevices'},query:{bundleid: currentapp.bundle_id}})">
已经使用 <a style="color: #dd6161;font-size: larger">{{ currentapp.supersign_used_number }}</a>
个设备额度
</el-link>
</el-tooltip>
</el-form-item>

@ -71,7 +71,7 @@
<div class="grid-content bg-purple">
<el-row :gutter="20" style="margin-top: 10px;">
<el-col :span="18">
<el-input v-model="analyseappinfo.short">
<el-input v-model="short">
<template slot="prepend">{{analyseappinfo.domain_name}}/</template>
</el-input>
</el-col>
@ -418,7 +418,8 @@
name: "FirApps",
data() {
return {
analyseappinfo: {'appname': '', 'short': '', 'changelog': ''},
analyseappinfo: {},
short: '',
keysearch: '',
searchfromtype: '',
applists: [],
@ -445,6 +446,7 @@
if (this.uploadsuccess === 2) {
delete this.analyseappinfo.icon;
this.$message.success(file.name + '上传成功');
this.analyseappinfo.short = this.short;
analyseApps(data => {
if (data.code === 1000) {
let app_uuid = this.analyseappinfo.app_uuid;
@ -498,6 +500,7 @@
analyseApps(data => {
if (data.code === 1000) {
this.analyseappinfo.short = data.data.short;
this.short = data.data.short;
this.analyseappinfo.domain_name = data.data.domain_name;
this.analyseappinfo.app_uuid = data.data.app_uuid;
this.analyseappinfo.upload_token = data.data.upload_token;

@ -26,7 +26,9 @@
</el-breadcrumb-item>
<el-breadcrumb-item :to="{ name:'FirApps'}"><i class="el-icon-apple elbi"></i>
</el-breadcrumb-item>
<el-breadcrumb-item v-if="$store.state.currentapp.name">{{ $store.state.currentapp.name}}
<el-breadcrumb-item v-if="$store.state.currentapp.name"
:to="{name: 'FirAppInfostimeline', params: {id: $store.state.currentapp.app_id}}">
{{ $store.state.currentapp.name}}
</el-breadcrumb-item>
</el-breadcrumb>

@ -77,7 +77,7 @@
</span>
</el-dialog>
<!-- <div style="position:relative;">-->
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick" tab-position="top">
<el-tab-pane label="开发者账户" name="iosdeveloper">
<el-input
@ -429,6 +429,9 @@
</el-pagination>
</div>
</el-tabs>
<!-- <el-button class="goback" @click="$router.go(-1)">返回</el-button>-->
<!-- </div>-->
</el-main>
</template>
@ -612,6 +615,9 @@
// this.dialogaddDeveloperVisible=true;
} else if (tabname === "iosdeveloper") {
this.iosdeveloperFun({"methods": "GET", "data": data})
} else if (tabname === "goback") {
alert('goback')
this.$router.go(-1);
}
},
// eslint-disable-next-line no-unused-vars
@ -752,4 +758,12 @@
border-radius: 1%;
}
/*.goback {*/
/* display: block;*/
/* cursor: pointer;*/
/* position: absolute;*/
/* top: 0;*/
/* right: 0;*/
/*}*/
</style>

@ -47,6 +47,11 @@ class AppsSerializer(serializers.ModelSerializer):
sign_type_choice.append({'id': auth_t[0], 'name': auth_t[1]})
return sign_type_choice
supersign_used_number = serializers.SerializerMethodField()
def get_supersign_used_number(self, obj):
return models.APPSuperSignUsedInfo.objects.filter(app_id=obj).all().count()
master_release = serializers.SerializerMethodField()
def get_master_release(self, obj):

Loading…
Cancel
Save