heyujie
2021-03-05 3613f5414bef610d8486c01eea3a795d62dabb16
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 = "";