增加苹果包 企业签显示企业名称

pull/5/head
youngS 4 years ago
parent ab5034d898
commit 68c7de7374
  1. 2
      fir_client/src/components/FirAppInfosbaseinfo.vue
  2. 6
      fir_client/src/components/FirAppInfosdevices.vue
  3. 1
      fir_client/src/components/FirAppInfostimeline.vue
  4. 23
      fir_client/src/components/FirApps.vue
  5. 1
      fir_client/src/main.js
  6. 1
      fir_client/src/utils/index.js
  7. 2
      fir_ser/api/models.py
  8. 1
      fir_ser/api/utils/app/apputils.py
  9. 4
      fir_ser/api/utils/app/supersignutils.py
  10. 12
      fir_ser/api/utils/serializer.py
  11. 5
      fir_ser/api/views/uploads.py

@ -25,7 +25,7 @@
<el-form-item label="短链接">
<el-input v-model="currentapp.short" maxlength="16" show-word-limit type="text">
<template slot="prepend">Http://</template>
<template slot="prepend">{{ currentapp.preview_url }}/</template>
</el-input>
</el-form-item>

@ -6,7 +6,7 @@
@click="$router.push({name:'FirSuperSignBase',params:{act:'useddevices'},query:{bundleid: currentapp.bundle_id}})">
该应用已经开启超级签请点击查看最新设备列表
</el-link>
<!-- <h2>UDID列表及用户信息</h2>-->
<h2>UDID列表及用户信息 - {{ udidlists.length }}个设备</h2>
<el-table
:data="udidlists"
stripe
@ -44,7 +44,9 @@
this.$store.dispatch('doappInfoIndex', [[57, 57], [57, 57]]);
if (!this.currentapp.app_id) {
this.currentapp = this.$store.state.currentapp;
this.udidlists = this.currentapp.master_release.udid;
if (this.currentapp.master_release) {
this.udidlists = this.currentapp.master_release.udid;
}
}
},
watch: {

@ -28,6 +28,7 @@
</small> &nbsp;&nbsp;·&nbsp;&nbsp;
<small>{{app.release_type|getiOStype}}</small>
<small v-if="app.distribution_name" style="margin-left: 5px">&nbsp;&nbsp;·&nbsp;{{app.distribution_name}}</small>
</div>
<p>{{app.changelog}}</p>

@ -42,7 +42,12 @@
<el-row :gutter="20" style="margin-top: 8px;">
<el-col :span="18">
{{ analyseappinfo.version}} (Build {{ analyseappinfo.buildversion}}) {{
analyseappinfo.release_type_id|getiOStype}}
analyseappinfo|getiOStype}}
<el-link :underline="false"
v-if="analyseappinfo.udid && analyseappinfo.udid.length > 0"
@click="showUDID(analyseappinfo)">- {{ analyseappinfo.udid.length
}} UDID
</el-link>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: 18px;">
@ -441,6 +446,16 @@
loadingobj: null
}
}, methods: {
showUDID(appinfo) {
let udidstr = '';
for (let i = 0; i < appinfo.udid.length; i++) {
udidstr = udidstr + "<p>" + appinfo.udid[i] + "</p>"
}
this.$alert(udidstr, appinfo.appname + ' UDID', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true,
});
},
updateappinfo(file) {
this.uploadsuccess += 1;
if (this.uploadsuccess === 2) {
@ -750,11 +765,11 @@
},
},
filters: {
getiOStype: function (type) {
getiOStype: function (appinfo) {
let ftype = '';
if (type === 1) {
if (appinfo.release_type_id === 1) {
ftype = '内测版'
} else if (type === 2) {
} else if (appinfo.release_type_id === 2) {
ftype = '企业版'
}
return ftype

@ -150,6 +150,7 @@ Vue.prototype.$notify = Notification;
Vue.prototype.$loading = Loading.service;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$alert = MessageBox.alert;
// Vue.use(ElementUI);
Vue.use(Vuex);

@ -58,6 +58,7 @@ export function getappinfo(file, successcallback, errcallback) {
analyseappinfo.release_type_id = 1;
analyseappinfo.udid = result.mobileProvision.ProvisionedDevices;
} else {
analyseappinfo.distribution_name = result.mobileProvision.Name + ": " + result.mobileProvision.TeamName;
analyseappinfo.release_type = 'Inhouse';
analyseappinfo.release_type_id = 2;
analyseappinfo.udid = [];

@ -147,7 +147,7 @@ class AppReleaseInfo(models.Model):
icon_url = models.CharField(max_length=128, blank=True, verbose_name="图标url")
changelog = models.TextField('更新日志', blank=True, null=True, default=None, )
udid = models.TextField('ios内测版 udid', blank=True, null=True, default='', )
distribution_name = models.CharField(max_length=128, null=True, blank=True, default='', verbose_name="企业签名")
created_time = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")
class Meta:

@ -161,6 +161,7 @@ def SaveAppInfos(app_file_name, user_obj, appinfo, bundle_id, app_img, short, si
"is_master": True,
"changelog": appinfo.get("changelog", ''),
"udid": appinfo.get("udid", ''),
"distribution_name": appinfo.get("distribution_name", ''),
}
try:
AppReleaseInfo.objects.create(**release_data)

@ -10,10 +10,10 @@ from api.utils.app.iossignapi import AppDeveloperApi, ResignApp, AppDeveloperApi
from api.models import APPSuperSignUsedInfo, AppUDID, AppIOSDeveloperInfo, AppReleaseInfo, Apps, APPToDeveloper, \
UDIDsyncDeveloper, DeveloperAppID, DeveloperDevicesID
from api.utils.app.randomstrings import make_app_uuid, make_from_user_uuid
from api.utils.serializer import get_developer_udided
from api.utils.storage.caches import del_cache_response_by_short, send_msg_over_limit
from api.utils.utils import file_format_path, delete_app_to_dev_and_file, delete_app_profile_file, \
send_ios_developer_active_status, get_profile_full_path, delete_local_files, download_files_form_oss
send_ios_developer_active_status, get_profile_full_path, delete_local_files, download_files_form_oss, \
get_developer_udided
from api.utils.storage.storage import Storage
from django.core.cache import cache

@ -2,6 +2,7 @@ from rest_framework import serializers
from api import models
from api.utils.app.apputils import bytes2human
from api.utils.TokenManager import DownloadToken
from api.utils.app.supersignutils import get_redirect_server_domain
from api.utils.storage.storage import Storage
from api.utils.utils import get_developer_udided
import os, json, logging
@ -42,14 +43,7 @@ class AppsSerializer(serializers.ModelSerializer):
preview_url = serializers.SerializerMethodField()
def get_preview_url(self, obj):
preview_url = ''
if obj.domain_name:
preview_url = obj.domain_name
elif obj.user_id.domain_name:
preview_url = obj.user_id.domain_name
if preview_url:
return "http://%s" % preview_url
return ''
return get_redirect_server_domain(None, obj.user_id, obj.domain_name)
sign_type_choice = serializers.SerializerMethodField()
@ -172,7 +166,7 @@ class AppReleaseSerializer(serializers.ModelSerializer):
fields = ["app_version", "icon_url", "build_version",
"release_type", "minimum_os_version",
"created_time", "binary_size", "release_id", "size", "type", "editing", "master_color", "changelog",
"is_master", 'download_token', 'binary_url', 'udid']
"is_master", 'download_token', 'binary_url', 'udid', 'distribution_name']
download_token = serializers.SerializerMethodField()
size = serializers.SerializerMethodField()

@ -16,7 +16,7 @@ from api.utils.app.randomstrings import make_from_user_uuid
from rest_framework.response import Response
from fir_ser import settings
from api.utils.TokenManager import DownloadToken
from api.utils.app.supersignutils import resign_by_app_obj
from api.utils.app.supersignutils import resign_by_app_obj, get_redirect_server_domain
import os, json, logging
logger = logging.getLogger(__file__)
@ -74,7 +74,7 @@ class AppAnalyseView(APIView):
upload_file_tmp_name("set", png_key, request.user.id)
upload_file_tmp_name("set", upload_key, request.user.id)
res.data = {"app_uuid": app_uuid, "short": short,
"domain_name": settings.SERVER_DOMAIN.get("FILE_UPLOAD_DOMAIN", None),
"domain_name": get_redirect_server_domain(request, request.user, None),
"upload_token": upload_token,
"upload_key": upload_key,
"png_token": png_token,
@ -102,6 +102,7 @@ class AppAnalyseView(APIView):
"miniOSversion": data.get("miniosversion"),
"changelog": data.get("changelog", ''),
"udid": data.get("udid", ''),
"distribution_name": data.get("distribution_name", ''),
}
try:

Loading…
Cancel
Save