diff --git a/fir_client/src/assets/wx_pay.jpg b/fir_client/src/assets/wx_pay.jpg deleted file mode 100644 index 52f437e..0000000 Binary files a/fir_client/src/assets/wx_pay.jpg and /dev/null differ diff --git a/fir_client/src/components/apps/FirAppInfostimeline.vue b/fir_client/src/components/apps/FirAppInfostimeline.vue index 5cee9e8..b9f00a9 100644 --- a/fir_client/src/components/apps/FirAppInfostimeline.vue +++ b/fir_client/src/components/apps/FirAppInfostimeline.vue @@ -1,7 +1,5 @@ @@ -117,9 +113,16 @@ editing: {'changelog': false, 'binary_url': false} }, updatas: {}, + query: {'page': 1, size: 10}, + has_next: false, } }, methods: { + set_query_page() { + if (this.has_next) { + this.query.page += 1; + } + }, downloadPackage(app) { getdownloadurl(res => { if (res.code === 1000) { @@ -151,17 +154,24 @@ window.open(p_url, 'target', ''); }, - getapptimelineFun() { + getapptimelineFun(act = '') { const loading = this.$loading({ lock: true, text: '加载中', spinner: 'el-icon-loading', // background: 'rgba(0, 0, 0, 0.7)' }); + if (act === 'more') { + this.set_query_page(); + } else { + this.release_apps = []; + this.query = {'page': 1, size: 10}; + } releaseapputils(data => { if (data.code === 1000) { - this.release_apps = data.data.release_apps; this.currentapp = data.data.currentapp; + this.has_next = data.data.has_next; + this.release_apps = this.release_apps.concat(data.data.release_apps); } else if (data.code === 1003) { loading.close(); this.$router.push({name: 'FirApps'}); @@ -171,6 +181,10 @@ "methods": "GET", "app_id": this.$route.params.id, "release_id": "timeline", + "data": { + "page": this.query.page, + "size": this.query.size + } }) }, del_release_app(app) { @@ -313,7 +327,6 @@ position: relative; padding-left: 80px; color: #9b9b9b; - } .directive-view-release > i { @@ -460,4 +473,14 @@ width: 500px } + .time-line-more { + background: #F6F6F6; + border: 1px solid; + position: relative; + z-index: 99; + width: 160px; + padding: 10px 0; + border-radius: 40px; + margin-top: 10px; + } diff --git a/fir_client/src/restful/download.js b/fir_client/src/restful/download.js index 5cbe935..e070969 100644 --- a/fir_client/src/restful/download.js +++ b/fir_client/src/restful/download.js @@ -1,4 +1,5 @@ import Axios from 'axios' + Axios.defaults.withCredentials = true; const DOMAIN = window.g.baseUrl; diff --git a/fir_client/vue.config.js b/fir_client/vue.config.js index 7839f67..94b8a81 100644 --- a/fir_client/vue.config.js +++ b/fir_client/vue.config.js @@ -96,21 +96,9 @@ module.exports = { '@': resolve('src') } }, - plugins: [compress,new UglifyJsPlugin({ - uglifyOptions: { - output: { - comments: false, // 去掉注释 - }, - warnings: false, - compress: { - drop_console: true, - drop_debugger: true, - pure_funcs: ['console.log']//移除console - } - } - })] }, chainWebpack: config => { + if (page==='analyz') { config .plugin('webpack-bundle-analyzer') @@ -131,6 +119,21 @@ module.exports = { }) } + if(IS_PROD){ + config.plugins=[compress,new UglifyJsPlugin({ + uglifyOptions: { + output: { + comments: false, // 去掉注释 + }, + warnings: false, + compress: { + drop_console: true, + drop_debugger: true, + pure_funcs: ['console.log']//移除console + } + } + })] + } // config.plugins.delete('preload'); diff --git a/fir_ser/api/migrations/0045_auto_20210423_1645.py b/fir_ser/api/migrations/0045_auto_20210423_1645.py index 87a71d9..f9ddaa7 100644 --- a/fir_ser/api/migrations/0045_auto_20210423_1645.py +++ b/fir_ser/api/migrations/0045_auto_20210423_1645.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ('api', '0044_auto_20210422_1002'), ] diff --git a/fir_ser/api/migrations/0046_auto_20210423_1650.py b/fir_ser/api/migrations/0046_auto_20210423_1650.py index 03ee1c1..64689fe 100644 --- a/fir_ser/api/migrations/0046_auto_20210423_1650.py +++ b/fir_ser/api/migrations/0046_auto_20210423_1650.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ('api', '0045_auto_20210423_1645'), ] diff --git a/fir_ser/api/views/apps.py b/fir_ser/api/views/apps.py index a7306f6..6b1c32a 100644 --- a/fir_ser/api/views/apps.py +++ b/fir_ser/api/views/apps.py @@ -24,11 +24,14 @@ from api.base_views import app_delete logger = logging.getLogger(__name__) -def get_release_apps(res, app_serializer, apps_obj, storage): - res.data["currentapp"] = app_serializer.data +def get_release_apps(request, res, app_serializer, apps_obj, storage): + page_obj = AppsPageNumber() app_release_obj = AppReleaseInfo.objects.filter(app_id=apps_obj).all().order_by("-created_time") - app_release_serializer = AppReleaseSerializer(app_release_obj, many=True, + app_release_page_serializer = page_obj.paginate_queryset(queryset=app_release_obj, request=request) + app_release_serializer = AppReleaseSerializer(app_release_page_serializer, many=True, context={"storage": storage}) + res.data['has_next'] = page_obj.page.has_next() + res.data["currentapp"] = app_serializer.data res.data["release_apps"] = app_release_serializer.data return res @@ -273,7 +276,7 @@ class AppReleaseinfoView(APIView): if apps_obj: storage = Storage(request.user) app_serializer = AppsSerializer(apps_obj, context={"storage": storage}) - res = get_release_apps(res, app_serializer, apps_obj, storage) + res = get_release_apps(request, res, app_serializer, apps_obj, storage) else: res.msg = "未找到该应用" res.code = 1003 @@ -297,34 +300,35 @@ class AppReleaseinfoView(APIView): apprelease_count = AppReleaseInfo.objects.filter(app_id=apps_obj).values("release_id").count() appreleaseobj = AppReleaseInfo.objects.filter(app_id=apps_obj, release_id=act).first() - if not appreleaseobj.is_master: - logger.info("delete app release %s" % (appreleaseobj)) - storage.delete_file(appreleaseobj.release_id, appreleaseobj.release_type) - delete_local_files(appreleaseobj.release_id, appreleaseobj.release_type) - storage.delete_file(appreleaseobj.icon_url) - - appreleaseobj.delete() - elif appreleaseobj.is_master and apprelease_count < 2: - logger.info("delete app master release %s and clean app %s " % (appreleaseobj, apps_obj)) - count = APPToDeveloper.objects.filter(app_id=apps_obj).count() - if apps_obj.issupersign or count > 0: - logger.info("app_id:%s is supersign ,delete this app need clean IOS developer" % (app_id)) - IosUtils.clean_app_by_user_obj(apps_obj, request.user) - - storage.delete_file(appreleaseobj.release_id, appreleaseobj.release_type) - delete_local_files(appreleaseobj.release_id, appreleaseobj.release_type) - storage.delete_file(appreleaseobj.icon_url) - del_cache_by_delete_app(apps_obj.app_id) - - appreleaseobj.delete() - delete_app_screenshots_files(storage, apps_obj) - has_combo = apps_obj.has_combo - if has_combo: - apps_obj.has_combo.has_combo = None - apps_obj.delete() - else: - pass - del_cache_response_by_short(apps_obj.app_id) + if appreleaseobj: + if not appreleaseobj.is_master: + logger.info("delete app release %s" % (appreleaseobj)) + storage.delete_file(appreleaseobj.release_id, appreleaseobj.release_type) + delete_local_files(appreleaseobj.release_id, appreleaseobj.release_type) + storage.delete_file(appreleaseobj.icon_url) + + appreleaseobj.delete() + elif appreleaseobj.is_master and apprelease_count < 2: + logger.info("delete app master release %s and clean app %s " % (appreleaseobj, apps_obj)) + count = APPToDeveloper.objects.filter(app_id=apps_obj).count() + if apps_obj.issupersign or count > 0: + logger.info("app_id:%s is supersign ,delete this app need clean IOS developer" % (app_id)) + IosUtils.clean_app_by_user_obj(apps_obj, request.user) + + storage.delete_file(appreleaseobj.release_id, appreleaseobj.release_type) + delete_local_files(appreleaseobj.release_id, appreleaseobj.release_type) + storage.delete_file(appreleaseobj.icon_url) + del_cache_by_delete_app(apps_obj.app_id) + + appreleaseobj.delete() + delete_app_screenshots_files(storage, apps_obj) + has_combo = apps_obj.has_combo + if has_combo: + apps_obj.has_combo.has_combo = None + apps_obj.delete() + else: + pass + del_cache_response_by_short(apps_obj.app_id) return Response(res.dict) @@ -362,6 +366,6 @@ class AppReleaseinfoView(APIView): del_cache_response_by_short(apps_obj.app_id) app_serializer = AppsSerializer(apps_obj) - res = get_release_apps(res, app_serializer, apps_obj, Storage(request.user)) + res = get_release_apps(request, res, app_serializer, apps_obj, Storage(request.user)) return Response(res.dict) diff --git a/fir_ser/api/views/login.py b/fir_ser/api/views/login.py index 50ad323..54b3c68 100644 --- a/fir_ser/api/views/login.py +++ b/fir_ser/api/views/login.py @@ -665,6 +665,7 @@ class CertificationView(APIView): class ChangeInfoView(APIView): authentication_classes = [ExpiringTokenAuthentication, ] + def get(self, request): response = BaseResponse() response.data = {} diff --git a/fir_ser/fir_ser/settings.py b/fir_ser/fir_ser/settings.py index c945d3f..2366056 100644 --- a/fir_ser/fir_ser/settings.py +++ b/fir_ser/fir_ser/settings.py @@ -306,9 +306,9 @@ THIRD_PART_CONFIG = { 'name': 'jiguang', 'type': 2, 'auth': { - 'app_key': 'd039807b5f13386e0b303b91', - 'master_secret': '11dbb341abc02888ba277d3a', - 'sign_id': '10823', + 'app_key': '93e1a9f71db4f044de4db34a', + 'master_secret': '5f996ee39c7eb52906510cc2', + 'sign_id': '18138', 'template_code': { 'login': '1', 'change': '1',