From 3613f5414bef610d8486c01eea3a795d62dabb16 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期五, 05 三月 2021 13:55:01 +0800 Subject: [PATCH] 跨aap打开新app --- src/pages/ai/index/App.vue | 37 ++++++++++++++++++++----------------- 1 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/pages/ai/index/App.vue b/src/pages/ai/index/App.vue index 3d93010..de7310d 100644 --- a/src/pages/ai/index/App.vue +++ b/src/pages/ai/index/App.vue @@ -920,7 +920,7 @@ >{{showNameById(id)}}</span> --> <el-tag type="info" size="small" color="#fff" v-if="!isSDKDialog">搴旂敤</el-tag> <el-tag type="info" size="small" color="#fff" v-if="isSDKDialog">绠楁硶</el-tag> - <el-tag type="info" size="small" color="#fff" >杞欢</el-tag> + <el-tag type="info" size="small" color="#fff" v-if="!isSDKDialog">杞欢</el-tag> </div> <div class="btns"> <el-button size="small" type="warning" v-if="needToUpgradeInWin" @click="upgradeSDKinWin" >{{ @@ -928,7 +928,7 @@ }}</el-button> <el-button size="small" type="primary" v-if="isActive" @click="unloadSDKinWin">鍗歌浇</el-button> <el-button size="small" type="primary" v-if="!isActive" @click="showInputCode=!showInputCode">涓嬭浇婵�娲�</el-button> - <el-button size="small" type="success" v-if="!isSDKDialog" @click="openAPP(productDetail.productBaseId)">鎵撳紑</el-button> + <el-button size="small" type="success" v-if="!isSDKDialog" @click="openApp">鎵撳紑</el-button> </div> </div> @@ -1284,7 +1284,7 @@ }, checkInWindow(item){ - this.backStack.push(this.productDetail) + this.backStack.push([this.productDetail,this.otherProducts]) // debugger this.backDisable = false this.curCheckTarget = item; @@ -1292,10 +1292,9 @@ let _this = this; getAppDetail({ id: item.id }).then((res) => { _this.productDetail = res.data.detail; - // debugger this.actId = _this.productDetail.productBaseId let flag=false - const allNeedToNew = [...this.hasNewVersionSdk,...hasNewVersionApp] + const allNeedToNew = [...this.hasNewVersionSdk,...this.hasNewVersionApp] for (let i = 0; i < allNeedToNew.length; i++) { const item = allNeedToNew[i]; if (item.id == _this.productDetail.productBaseId) { @@ -1313,10 +1312,11 @@ // forwardDisable:false, return } - console.log(this.backStack); - this.forwardStack.push(this.productDetail) - this.productDetail = this.backStack.pop() + this.forwardStack.push([this.productDetail,this.otherProducts]) + let item = this.backStack.pop() + this.productDetail = item[0] + this.otherProducts = item[1] this.forwardDisable=false if (this.backStack.length ==0) { this.backDisable = true @@ -1328,11 +1328,13 @@ this.forwardDisable=true return } - console.log(this.backStack); - this.backStack.push(this.productDetail) + this.backStack.push([this.productDetail,this.otherProducts]) this.backDisable=false - this.productDetail=this.forwardStack.pop() + let item = this.forwardStack.pop() + + this.productDetail = item[0] + this.otherProducts = item[1] if (this.forwardStack.length==0) { this.forwardDisable=true } @@ -1365,7 +1367,6 @@ } }) .catch((e) => { - console.log(e); this.isInstall = false; this.$message({ type: "error", @@ -1373,10 +1374,7 @@ }); }); }, - openAPP(id){ - debugger - bus.$emit('open-app',id) - }, + downloadApp(app, action) { if (action == "upgrade") { app.upgradeLoading = true; @@ -1613,7 +1611,12 @@ }); }); }, - + openApp(){ + let message = 'toOpenApp?'+this.productDetail.productBaseId; + window.parent.postMessage({ + msg: message + }, "*") + }, onFileAdded(f) { this.patchUpdateStatus = ""; -- Gitblit v1.8.0