From 0521f0c6a06f1143afbd83062e3c983441bbe711 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Wed, 23 Sep 2020 12:01:15 +0800 Subject: [PATCH] fix some bugs --- fir_client/src/components/FirAppInfosBase.vue | 5 +- .../src/components/FirAppInfossecurity.vue | 25 +++----- .../src/components/FirUserProfileInfo.vue | 20 +++++- fir_client/src/utils/index.js | 63 ++++++++++++++++--- fir_ser/api/utils/storage/aliyunApi.py | 13 ++-- fir_ser/api/views/apps.py | 2 +- fir_ser/api/views/login.py | 19 ++++-- fir_ser/api/views/storage.py | 2 +- 8 files changed, 109 insertions(+), 40 deletions(-) diff --git a/fir_client/src/components/FirAppInfosBase.vue b/fir_client/src/components/FirAppInfosBase.vue index 18f0d8b..11859df 100644 --- a/fir_client/src/components/FirAppInfosBase.vue +++ b/fir_client/src/components/FirAppInfosBase.vue @@ -160,7 +160,10 @@ }, watch: { '$store.state.currentapp.master_release.icon_url': function () { this.icon_url = this.$store.state.currentapp.master_release.icon_url - } + }, + '$store.state.currentapp': function () { + this.appinfos = this.$store.state.currentapp; + }, } } diff --git a/fir_client/src/components/FirAppInfossecurity.vue b/fir_client/src/components/FirAppInfossecurity.vue index 24e6034..98c9da6 100644 --- a/fir_client/src/components/FirAppInfossecurity.vue +++ b/fir_client/src/components/FirAppInfossecurity.vue @@ -125,6 +125,13 @@ } }, methods: { + set_default_flag() { + this.passwordflag = false; + this.showdownloadflag = false; + this.showsupersignflag = false; + this.wxeasytypeflag = false; + this.wxredirectflag = false; + }, clean_app() { this.saveappinfo({"clean": true}); this.currentapp.count = 0; @@ -135,13 +142,7 @@ this.$message.success('数据更新成功'); } else { this.$message.error('操作失败,' + data.msg); - - this.currentapp = deepCopy(this.orgcurrentapp); - this.passwordflag = false; - this.showdownloadflag = false; - this.showsupersignflag = false; - this.setbuttondefault(this.currentapp); - + this.$store.dispatch('doucurrentapp', this.orgcurrentapp); } }, { "methods": "PUT", @@ -357,17 +358,11 @@ } }, - appinit() { - this.currentapp = this.$store.state.currentapp; - this.passwordflag = false; - this.showdownloadflag = false; - this.showsupersignflag = false; - this.wxeasytypeflag = false; - this.wxredirectflag = false; + this.set_default_flag(); this.setbuttondefault(this.currentapp); - this.orgcurrentapp = deepCopy(this.currentapp) + this.orgcurrentapp = deepCopy(this.currentapp); } }, mounted() { diff --git a/fir_client/src/components/FirUserProfileInfo.vue b/fir_client/src/components/FirUserProfileInfo.vue index b79cf7d..b303dc9 100644 --- a/fir_client/src/components/FirUserProfileInfo.vue +++ b/fir_client/src/components/FirUserProfileInfo.vue @@ -89,6 +89,7 @@