heyujie
2021-03-10 b6d6d4c374b21dd2f289eb5430bb8eddca2902a7
默认应用不展示卸载按钮,前进后退到默认应用也要相应改变
1个文件已修改
54 ■■■■■ 已修改文件
src/pages/ai/index/App.vue 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/ai/index/App.vue
@@ -247,16 +247,16 @@
                                  最新版本:{{ item.remoteVersion }}
                                </div>
                              </div>
                                  <!-- v-if="!item.isDefault" -->
                              <div
                                class="info-onmask"
                                @click="checkDetail(item,'active')"
                                  v-if="!item.isDefault"
                              >
                                查看详情
                              </div>
                              <div class="mask-btn">
                                <el-button
                                  v-if="!item.isDefault"
                                  v-show="!item.isDefault"
                                  @click="unLoad(item)"
                                  type="primary"
                                  size="small"
@@ -948,7 +948,7 @@
                  <el-button size="small" type="warning"  v-if="needToUpgradeInWin||productDetail.isUpgrade" @click="upgradeSDKinWin" >{{
                    isUpgrading ? "升级中.." : "升级"
                  }}</el-button>
                  <el-button size="small" type="primary" v-if="isActive" @click="unloadSDKinWin">卸载</el-button>
                  <el-button size="small" type="primary" v-if="isActive&&!isDefaultApp" @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&&isActive" @click="openApp">打开</el-button>
                </div>
@@ -1195,10 +1195,10 @@
      installAppPackage: null,
      installSdkPackage: null,
      isActive:true,
      isDefaultApp:false,
      installPercentage: 0,
      unActivedSDKList: [],
      unActivedAppList: [],
      // dialogTitle: "",
      isSDKDialog:true,
      //actSdkId: '',
      actType: "",
@@ -1283,15 +1283,14 @@
        this.showInputCode = false
         this.isActive =true
      }
      this.checkIsDefOrNot(item.id)
        this.needToUpgradeInWin = item.isUpgrade?true:false
      this.resetStack()
      // this.productDetail = item;
      if (item.sdk_type===undefined) {
       this.isSDKDialog=false
      }else{
       this.isSDKDialog=true
      }
      // debugger
      this.productDetailVisible = true;
      let _this = this;
      getAppDetail({ id: item.id }).then((res) => {
@@ -1312,8 +1311,8 @@
    },
    checkInWindow(item){
      this.backStack.push([this.productDetail, this.otherProducts])
      // debugger
      this.backDisable = false
      this.checkIsDefOrNot(item.id)
      let _this = this;
      getAppDetail({ id: item.id }).then((res) => {
@@ -1334,17 +1333,23 @@
        _this.otherProducts = res.data.randoms;
      });
    },
    checkIsDefOrNot(id){
      if (id.length>10) {
        this.isDefaultApp=false
      }else {
        this.isDefaultApp=true
      }
    },
    backwards(){
      if (this.backStack.length ==0) {
        this.backDisable = true
      // forwardDisable:false,
      return
      }
   this.forwardStack.push([this.productDetail,this.otherProducts])
   let item = this.backStack.pop()
   this.productDetail =  item[0]
   this.checkIsDefOrNot(this.productDetail.productBaseId)
   this.otherProducts = item[1]
  this.forwardDisable=false
 if (this.backStack.length ==0) {
@@ -1517,7 +1522,6 @@
    actSdkOrApp(item, type = "sdk") {
      this.checkDetail(item, 'inactive')
      this.actType = type;
      // debugger
      this.actId = item.id;
      // this.actDrawerShow = true;
      this.actStep = 0;
@@ -1643,7 +1647,7 @@
        });
    },
    openApp(){
      let message = 'toOpenApp?'+this.productDetail.productBaseId;
      let message = 'toOpenApp?' + this.productDetail.productBaseId;
      window.parent.postMessage({
        msg: message
      }, "*")
@@ -1810,7 +1814,6 @@
      this.sdkUpgreading = true;
    },
    inputBlur(item) {
      // console.log(item, '修改名称')
      this.$set(item, "isEdit", false);
    },
    handleTabClick() {},
@@ -1909,8 +1912,6 @@
    }
        button{
          // margin-right: 6px;
          // background-color: #ecf5ff;
          font-size: 18px;
        line-height: 12px;  
        }
@@ -1937,15 +1938,10 @@
            width: 443px;
          height: 277px;
            // background: aquamarine;
          }
          img{
                max-width: 90%;
                     margin-top: 28px;
          }
          }
        }
@@ -1953,7 +1949,6 @@
          float: left;
          width: 43%;
          margin: 0 0.5%;
          // background-color: lightgoldenrodyellow;
          height: 330px;
          background-color: rgba(253, 253, 253, 1);
          position: relative;
@@ -2020,10 +2015,8 @@
              font-size: 16px;
              margin-left: 24px;
              // height: 30px;
              border-bottom: 3px solid #3d68e1;
              width: fit-content;
              // margin-bottom: 8px;
                 height: 26px;
            margin-bottom: 8px;
@@ -2055,13 +2048,11 @@
          margin: 0 0.5%;
          border-radius: 2px;
          float: left;
          // background-color: lightblue;
          .part-title {
            display: block;
            line-height: 35px;
            font-size: 16px;
            margin-left: 24px;
            // height: 30px;
            border-bottom: 3px solid #3d68e1;
            width: fit-content;
               margin-bottom: 10px;
@@ -2088,7 +2079,6 @@
          float: left;
          background-color: rgba(253, 253, 253, 1);
          width: 49%;
          // background-color: lightgoldenrodyellow;
          margin: 0 0.5%;
          border-radius: 2px;
@@ -2097,7 +2087,6 @@
            line-height: 35px;
            font-size: 16px;
            margin-left: 24px;
            // height: 30px;
            border-bottom: 3px solid #3d68e1;
            width: fit-content;
            margin-bottom: 5px;
@@ -2113,7 +2102,6 @@
              height: 165px;
              width: 130px;
              float: left;
              // text-align: center;
              border-radius: 10px;
              box-shadow: 0px 5px 14px rgba(0, 0, 0, 0.0666666666666667);
              position: relative;
@@ -2123,21 +2111,13 @@
                margin: 8px;
              }
              .icon {
                // width: 100%;
                // height: 68px;
                // width: 68px;
                // position: absolute;
                // margin: 0 auto;
                margin: 0 auto;
                // top: 21%;
                // left: 26%;
                img {
                  // display: block;
                  max-width: 60px;
                  max-height: 60px;
                      position: absolute;
    top: 20%;
    left: 26%;
                top: 20%;
                left: 26%;
                }
                .icon-name {
                 text-align: center;