ZZJ
2022-02-11 d365829b14ca4256d39694b9cdcd43bad0ad8595
src/pages/ai/index/detail.vue
@@ -38,7 +38,7 @@
            <el-button
              size="mini"
              round
              v-if="!isActive && showInstallNotActive"
              v-if="!isActive && (!detailPrice || showInstallNotActive)"
              @click="downloadSdkInSide"
              >安装</el-button
            >
@@ -50,14 +50,14 @@
              clearable
              :autofocus="true"
              v-model="activeCode"
              v-if="!isActive && !showInstallNotActive"
              v-if="!isActive && !showInstallNotActive && detailPrice"
            >
            </el-input>
            <el-button
              size="mini"
              round
              class="act-btn"
              v-if="!isActive && !showInstallNotActive"
              v-if="!isActive && !showInstallNotActive && detailPrice"
              @click="actived"
              >激活</el-button
            >
@@ -69,14 +69,14 @@
            > -->
          </div>
        </div>
        <div class="back-btn" @click="goback">
        <!-- <div class="back-btn" @click="goback">
          <span class="icon iconfont">&#xe680;</span>
          <span class="back-text">返回</span>
        </div>
        </div> -->
      </div>
      <div class="text-area">
        <div class="text-line">
          <span class="icon iconfont" >&#xe710;</span>
          <span class="icon iconfont">&#xe710;</span>
          <span class="title">版本:</span>
          <span class="desc">{{ productDetail.productVersion }}</span>
        </div>
@@ -144,7 +144,7 @@
          class="rec-item"
          v-for="(item, index) in otherProducts"
          :key="index"
            @click="checkInWindow(item)"
          @click="checkInWindow(item)"
        >
          <div class="icon-img">
            <img
@@ -165,7 +165,6 @@
            <el-button
              size="small"
              type="primary"
              round
              @click="checkInWindow(item)"
              >查看</el-button
@@ -312,6 +311,7 @@
    detailProductID: {
      type: String,
    },
    detailPrice: {},
  },
  directives: {
    focus: {
@@ -325,15 +325,20 @@
    this.autoRefreshAppAndSdkState();
    this.getUnActivedList();
    this.getUnActivedAppList();
    this.showBackBtn();
    this.addBackListener();
  },
  beforeDestroy() {
    this.autoRefresh = false;
    this.hiddenBackBtn();
  },
  methods: {
    getDetail(id) {
      getAppDetail({ id: id || this.detailProductID })
        .then((res) => {
          if (res.success) {
            console.log("----------");
            console.log(res);
            this.productDetail = res.data.detail;
            this.otherProducts = res.data.randoms;
@@ -545,7 +550,7 @@
              if (res && res.success) {
                app.unloadLoading = false;
                // _this.getAllApps();
                this.$emit("flushApp")
                this.$emit("flushApp");
                window.parent.postMessage(
                  {
                    msg: "AppUpdate",
@@ -557,7 +562,7 @@
                  message: "卸载应用成功",
                  type: "success",
                });
                this.goback()
                this.goback();
              }
            })
            .catch((e) => {
@@ -766,9 +771,9 @@
                sdk.unloadLoading = false;
                this.$notify.success("卸载完成");
                // _this.getAllSdk();
                this.$emit("flushSdk")
                this.$emit("flushSdk");
                window.parent.postMessage({ msg: "AppUpdate" }, "*");
                this.goback()
                this.goback();
              }
            })
            .catch((e) => {
@@ -857,7 +862,7 @@
    inputBlur(item) {
      this.$set(item, "isEdit", false);
    },
     autoRefreshAppAndSdkState() {
    autoRefreshAppAndSdkState() {
      this.getAllApps();
      this.getAllSdk();
      if (!this.autoRefresh) {
@@ -871,6 +876,29 @@
          this.getAllSdk();
        }
      }, 1000);
    },
    showBackBtn() {
      window.parent.postMessage(
        {
          msg: "showBack",
        },
        "*"
      );
    },
    hiddenBackBtn() {
      window.parent.postMessage(
        {
          msg: "hiddenBack",
        },
        "*"
      );
    },
    addBackListener() {
      window.addEventListener("message", (e) => {
        if (e.data.msg === "返回应用中心") {
          this.goback();
        }
      });
    },
  },
};
@@ -1009,8 +1037,7 @@
        height: 25px;
        .icon {
          font-size: 14px;
           margin-right: 4px;
          margin-right: 4px;
        }
        .title {
          font-size: 12px;
@@ -1042,16 +1069,13 @@
        margin-bottom: 10px;
        .title {
          width: 80px;
          height: 20px;
          display: inline-block;
          line-height: 20px;
          padding: 0px 10px;
          letter-spacing: 0.5px;
          font-size: 12px;
          color: #828282;
          display: flex;
          align-items: center;
          justify-content: center;
          font-weight: bold;
          border: 1px solid;
          border: 1px solid #e0e0e0;
          box-sizing: border-box;
          border-radius: 22px;
@@ -1122,9 +1146,14 @@
          font-size: 14px;
          font-weight: bold;
          line-height: 28px;
          width: 116px;
          height: 28px;
          letter-spacing: 0.1px;
          color: #4f4f4f;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }
        .desc-2 {
          font-size: 12px;
@@ -1136,11 +1165,11 @@
        .el-button {
          padding: 3px 12px;
          border-radius: 22px;
            background-color: #f2f2f7 !important;
                border-color: #f2f2f7 !important;
                color: #4f4f4f;
                font-size: 12px;
                font-weight: bold;
          background-color: #f2f2f7 !important;
          border-color: #f2f2f7 !important;
          color: #4f4f4f;
          font-size: 12px;
          font-weight: bold;
        }
        // .el-button--primary:hover {
        //   background: #089fb3 !important;