From 8feeb41fd6516361c9eb36bdeddd443ea9d822cb Mon Sep 17 00:00:00 2001 From: hanbaoshan <hanbaoshan@aiotlink.com> Date: 星期四, 17 九月 2020 09:33:15 +0800 Subject: [PATCH] 应用中心算法激活后续逻辑完善 --- src/pages/ai/index/App.vue | 38 ++++++++++++++++++++++++-------------- 1 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/pages/ai/index/App.vue b/src/pages/ai/index/App.vue index 8b3a565..0998f8e 100644 --- a/src/pages/ai/index/App.vue +++ b/src/pages/ai/index/App.vue @@ -540,6 +540,19 @@ actSdk (id) { this.actSdkId = id; this.actDrawerShow = true; + this.actStep = 0; + this.activeCode = ''; + this.activedSdk = this.newActInfo() + }, + newActInfo(){ + return { + activateCode: '', + productName: '', + setting: '', + expireTime: '', + licence: '', + devIds: '' + } }, getUnActivedList () { getUnActivedSdk().then(res => { @@ -554,21 +567,18 @@ return percentage === 100 ? '瀹夎鎴愬姛' : `${percentage}%`; }, actived () { - //this.activeCode - this.actStep++ + let _this = this; actPageAlg(this.actSdkId, this.activeCode).then(res => { - if (res.code == 200) { - // this.activedSdk: { - // activateCode:'', - // productName:'', - // setting:'', - // expireTime:'', - // licence:'', - // devIds:'' - // }, - debugger - this.activedSdk = res.data.successMsg - this.actStep++ + if (res.data.isSuccess) { + _this.activedSdk = res.data.successMsg; + _this.actStep++; + _this.getUnActivedList(); + _this.findAllSdk(); + }else{ + _this.$notify({ + type:'error', + message:res.data.failMsg.failMsg + }); } }).catch(e => { console.log(e) -- Gitblit v1.8.0