优化上传展示

dependabot/npm_and_yarn/fir_admin/dns-packet-1.3.4
nineven 4 years ago
parent 7c5b2b7270
commit af21dd2129
  1. 19
      fir_client/src/components/apps/FirApps.vue
  2. 4
      fir_ser/api/views/uploads.py

@ -66,7 +66,7 @@
<el-dialog <el-dialog
:title="getDelappTitle" :title="getDelappTitle"
:visible.sync="willDeleteApp" :visible.sync="willDeleteApp"
width="50%"> width="666px">
<span v-if="delapp.issupersign">该应用开启了超级签名执行删除操作将会删除相关开发者账户下的证书等数据可能会导致已经下载的APP闪退并且删除后不可恢复请谨慎操作</span> <span v-if="delapp.issupersign">该应用开启了超级签名执行删除操作将会删除相关开发者账户下的证书等数据可能会导致已经下载的APP闪退并且删除后不可恢复请谨慎操作</span>
<span v-else>删除后不可恢复请谨慎操作</span> <span v-else>删除后不可恢复请谨慎操作</span>
@ -83,7 +83,7 @@
:visible.sync="willuploadApp" :visible.sync="willuploadApp"
:destroy-on-close="true" :destroy-on-close="true"
:show-close="!uploading" :show-close="!uploading"
width="40%" width="666px"
:close-on-click-modal="false" :close-on-click-modal="false"
@closed="closeUpload"> @closed="closeUpload">
<div v-if="!uploading"> <div v-if="!uploading">
@ -135,7 +135,7 @@
<el-row :gutter="20" style="margin-top: 10px;"> <el-row :gutter="20" style="margin-top: 10px;">
<el-col :span="18"> <el-col :span="18">
<el-input v-model="short"> <el-input v-model="short">
<template slot="prepend">{{analyseappinfo.domain_name}}/</template> <template slot="prepend">{{analyseappinfo.short_domain_name}}/</template>
</el-input> </el-input>
</el-col> </el-col>
</el-row> </el-row>
@ -646,17 +646,10 @@
getuploadtoken(loading) { getuploadtoken(loading) {
analyseApps(data => { analyseApps(data => {
if (data.code === 1000) { if (data.code === 1000) {
this.analyseappinfo.short = data.data.short;
this.short = data.data.short; this.short = data.data.short;
this.analyseappinfo.domain_name = data.data.domain_name; for(let name of Object.keys(data.data)){
this.analyseappinfo.app_uuid = data.data.app_uuid; this.analyseappinfo[name] = data.data[name]
this.analyseappinfo.upload_token = data.data.upload_token; }
this.analyseappinfo.upload_key = data.data.upload_key;
this.analyseappinfo.png_key = data.data.png_key;
this.analyseappinfo.png_token = data.data.png_token;
this.analyseappinfo.storage = data.data.storage;
this.analyseappinfo.is_new = data.data.is_new;
this.analyseappinfo.binary_url = data.data.binary_url;
this.willuploadApp = true; this.willuploadApp = true;
} else { } else {
this.$message.error("上传token获取失败,请刷新重试") this.$message.error("上传token获取失败,请刷新重试")

@ -74,13 +74,15 @@ class AppAnalyseView(APIView):
upload_file_tmp_name("set", png_key, request.user.id) upload_file_tmp_name("set", png_key, request.user.id)
upload_file_tmp_name("set", upload_key, request.user.id) upload_file_tmp_name("set", upload_key, request.user.id)
res.data = {"app_uuid": app_uuid, "short": short, res.data = {"app_uuid": app_uuid, "short": short,
"domain_name": settings.SERVER_DOMAIN.get("FILE_UPLOAD_DOMAIN", None), "short_domain_name": get_redirect_server_domain(request, request.user),
"upload_token": upload_token, "upload_token": upload_token,
"upload_key": upload_key, "upload_key": upload_key,
"png_token": png_token, "png_token": png_token,
"png_key": png_key, "png_key": png_key,
"storage": storage_type, "storage": storage_type,
"is_new": is_new, "binary_url": binary_url} "is_new": is_new, "binary_url": binary_url}
if storage_type not in [1, 2]:
res.data['domain_name'] = settings.SERVER_DOMAIN.get("FILE_UPLOAD_DOMAIN", None)
else: else:
res.code = 1003 res.code = 1003

Loading…
Cancel
Save