From 6e3d8234a4b1bae86b3c896468e20ea9f13c7fb7 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期三, 24 三月 2021 11:46:44 +0800 Subject: [PATCH] 朔黄视频播放进度条 --- src/pages/ai/index/App.vue | 115 +++++++++++++++++++++++++++++++-------------------------- 1 files changed, 62 insertions(+), 53 deletions(-) diff --git a/src/pages/ai/index/App.vue b/src/pages/ai/index/App.vue index 4dcf33d..679fc32 100644 --- a/src/pages/ai/index/App.vue +++ b/src/pages/ai/index/App.vue @@ -70,7 +70,7 @@ > <el-button v-if="item.isUpgrade" - @click="donwload(item)" + @click="donwload(item,0)" type="warning" size="small" class="bot-btn" @@ -133,7 +133,7 @@ </div> <div class="mask-btn"> <el-button - @click="donwload(item)" + @click="donwload(item,1)" type="primary" class="bot-btn" >瀹夎</el-button @@ -512,7 +512,7 @@ </el-tab-pane> <el-tab-pane name="update"> <span slot="label"> - <el-badge class="update-badge" :value="updateNum" + <el-badge class="update-badge" :value="updateNum" :hidden="updateNum==0" >鏇存柊</el-badge > </span> @@ -574,7 +574,7 @@ > <el-button v-if="item.isUpgrade" - @click="donwload(item)" + @click="donwload(item,0)" type="warning" size="small" class="bot-btn" @@ -1149,7 +1149,7 @@ batchUpdate(type) { if (type == "sdk") { this.hasNewVersionSdk.forEach((sdk) => { - this.donwload(sdk); + this.donwload(sdk,0); }); } else { this.hasNewVersionApp.forEach((app) => { @@ -1426,6 +1426,7 @@ cancelActivate(){ this.showInputCode= false + this.activeCode = "" }, newActInfo() { return { @@ -1453,51 +1454,56 @@ }, actived() { let _this = this; + if (this.activeCode.trim()=="") { + this.$notify({ + type: "error", + message: "婵�娲荤爜涓嶈兘涓虹┖", + }); + return + } + if (this.actType == "sdk") { + //婵�娲荤畻娉� + actPageAlg(this.actId, this.activeCode) + .then((res) => { + if (res.data.isSuccess) { + this.productDetailVisible = false + _this.activedSdkOrApp = res.data.successMsg; this.showActivateSuccess=true - - // if (this.actType == "sdk") { - // //婵�娲荤畻娉� - // actPageAlg(this.actId, this.activeCode) - // .then((res) => { - // if (res.data.isSuccess) { - // this.productDetailVisible = false - // _this.activedSdkOrApp = res.data.successMsg; - // this.showActivateSuccess=true - // _this.actStep++; - // _this.getUnActivedList(); - // _this.getAllSdk(); - // } else { - // _this.$notify({ - // type: "error", - // message: res.data.failMsg.failMsg, - // }); - // } - // }) - // .catch((e) => { - // console.log(e); - // }); - // } else if (this.actType == "app") { - // //婵�娲诲簲鐢� - // actApp(this.actId, this.activeCode) - // .then((res) => { - // if (res.data.isSuccess) { - // this.productDetailVisible = false - // _this.activedSdkOrApp = res.data.successMsg; - // this.showActivateSuccess=true - // _this.actStep++; - // _this.getUnActivedAppList(); - // _this.getAllApps(); - // } else { - // _this.$notify({ - // type: "error", - // message: res.data.failMsg.failMsg, - // }); - // } - // }) - // .catch((e) => { - // console.log(e); - // }); - // } + _this.actStep++; + _this.getUnActivedList(); + _this.getAllSdk(); + } else { + _this.$notify({ + type: "error", + message: res.data.failMsg.failMsg, + }); + } + }) + .catch((e) => { + console.log(e); + }); + } else if (this.actType == "app") { + //婵�娲诲簲鐢� + actApp(this.actId, this.activeCode) + .then((res) => { + if (res.data.isSuccess) { + this.productDetailVisible = false + _this.activedSdkOrApp = res.data.successMsg; + this.showActivateSuccess=true + _this.actStep++; + _this.getUnActivedAppList(); + _this.getAllApps(); + } else { + _this.$notify({ + type: "error", + message: res.data.failMsg.failMsg, + }); + } + }) + .catch((e) => { + console.log(e); + }); + } }, getCodeDetail() {}, checkMyAlgorith() { @@ -1709,7 +1715,7 @@ // 寮�鍚嚜鍔ㄥ埛鏂� this.sdkUpgreading = true; }, - donwload(item) { + donwload(item,typ) { item.upgradeLoading = true; this.downloadItem = item.id; @@ -1720,7 +1726,7 @@ this.downloadItem = ""; this.$notify({ type: "success", - message: "绠楁硶瀹夎鎴愬姛" + message: typ==1? "绠楁硶瀹夎鎴愬姛":"绠楁硶鍗囩骇鎴愬姛" }); }) .catch((err) => { @@ -1920,8 +1926,9 @@ margin-bottom: 10px; .el-input{ float: left; - width: 64%; - margin-bottom: 8px; + width: 63%; + margin-bottom: 8px; + margin-right: 10px; } el-button{ float: left; @@ -1991,6 +1998,8 @@ background-color: rgba(242, 242, 242, 1.3); margin: 5px 12px 0 12px; font-size: 12px; + line-height: 18px; + } margin-bottom: 12px; } -- Gitblit v1.8.0