ZZJ
2022-06-10 68b96b56c3324b7458e7921bd1087357cb649318
应用中心激活
3个文件已修改
38 ■■■■■ 已修改文件
src/pages/ai/index/App.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/ai/index/detail.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/ai/index/App.vue
@@ -66,7 +66,7 @@
                  class="quick-item"
                  v-for="(item, index) in recomandUpdateList"
                  :key="index"
                  @click="checkDetail(item, 'inactive')"
                  @click="checkDetail(item, 'inactive', item.sdk_name)"
                >
                  <div class="icon-img">
                    <span class="icon iconfont" v-if="item.isUpgrade"
@@ -143,7 +143,7 @@
                  class="front-page-item"
                  v-for="(item, index) in tempList"
                  :key="index"
                  @click="checkDetail(item)"
                  @click="checkDetail(item, null, item.sdk_name)"
                  :class="{
                    disabled: activeName == '应用中心' && !item.canUpOrIns,
                  }"
@@ -173,7 +173,7 @@
                      type="primary"
                      class="other-btn"
                      round
                      @click="checkDetail(item)"
                      @click="checkDetail(item, null, item.sdk_name)"
                      v-if="activeName == '应用中心' && item.price > 0"
                      >激活</el-button
                    >
@@ -285,7 +285,7 @@
                  class="front-page-item item-dimmed"
                  v-for="(item, index) in tempDarkList"
                  :key="index"
                  @click="checkDetail(item, 'activeNotInstall')"
                  @click="checkDetail(item, 'activeNotInstall', item.sdk_name)"
                >
                  <div class="icon-img">
                    <img
@@ -363,6 +363,7 @@
            :detailProductID="detailProductID"
            :detailType="detailType"
            :detailPrice="detailPrice"
            :isSdk="isSdk"
            v-if="inDetail"
            @flushSdk="getAllSdk"
            @flushApp="getAllApps"
@@ -621,11 +622,11 @@
        this.tempDarkList = [];
      }
    },
    checkDetail(item, typ) {
    checkDetail(item, typ, sdkName) {
      /* if (!item.canUpOrIns && typ == "Appcenter") {
        return false;
      } */
      this.isSdk = Boolean(sdkName);
      this.inDetail = true;
      this.detailProductID = item.id;
      this.detailPrice = item.price;
src/pages/ai/index/detail.vue
@@ -311,6 +311,7 @@
      type: String,
    },
    detailPrice: {},
    isSdk: {},
  },
  directives: {
    focus: {
@@ -615,9 +616,9 @@
        });
        return;
      }
      if (this.actType == "sdk") {
      if (this.isSdk) {
        //激活算法
        actPageAlg(this.actId, this.activeCode)
        actPageAlg(this.detailProductID, this.activeCode)
          .then((res) => {
            if (res.data.isSuccess) {
              this.productDetailVisible = false;
@@ -634,11 +635,14 @@
            }
          })
          .catch((e) => {
            console.log(e);
            this.$notify({
              type: "error",
              message: e.msg,
            });
          });
      } else if (this.actType == "app") {
      } else {
        //激活应用
        actApp(this.actId, this.activeCode)
        actApp(this.detailProductID, this.activeCode)
          .then((res) => {
            if (res.data.isSuccess) {
              this.productDetailVisible = false;
@@ -655,7 +659,10 @@
            }
          })
          .catch((e) => {
            console.log(e);
            this.$notify({
              type: "error",
              message: e.msg,
            });
          });
      }
    },
vue.config.js
@@ -67,8 +67,8 @@
  // }
});
//const serverUrl = "http://192.168.20.189:7009"
const serverUrl = "http://192.168.20.116:7009";
const serverUrl = "http://192.168.20.189:7009";
//const serverUrl = "http://192.168.20.116:7009";
const iotdataServerUrl = "http://192.168.8.10:9000";
// const cir = require("circular-dependency-plugin");
@@ -118,7 +118,7 @@
      },
      "/data/api-v/app/findAllApp": {
        // target: '/',
        target: "http://localhost:8080/",
        target: "http://localhost:8081/",
        changeOrigin: true,
        pathRewrite: {
          "^/data/api-v/app/findAllApp": "apps.json",