From 1a783e0a2068b1a99efb7a078f4a615f68dec18f Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期一, 18 七月 2022 16:15:35 +0800
Subject: [PATCH] add desc

---
 src/views/hashrate/AlgManage/index.vue |   43 +++++++++++++++++++++++++++++--------------
 1 files changed, 29 insertions(+), 14 deletions(-)

diff --git a/src/views/hashrate/AlgManage/index.vue b/src/views/hashrate/AlgManage/index.vue
index 9082156..3053435 100644
--- a/src/views/hashrate/AlgManage/index.vue
+++ b/src/views/hashrate/AlgManage/index.vue
@@ -20,7 +20,7 @@
       <div class="label freeLabel">
         鍏嶈垂绠楁硶 <span class="des">浠庢澶勬嫋鎷界畻娉曞浘鏍囧畨瑁呭埌璁惧</span>
       </div>
-      <div class="freeList">
+      <div class="freeList scroll">
         <div
           class="algCard"
           v-for="(item, index) in freeAlg"
@@ -75,7 +75,7 @@
           >
             <img src="/images/hashrate/绠楁硶绠$悊绌洪〉闈�.png" alt="" />
             <div class="des">
-              鏆傛湭瀹夎绠楁硶锛屼粠宸︿晶绠楁硶涓績鎷栧埌绠楁硶鍒版澶勶紝鍗冲彲瀹夎
+              鏆傛湭瀹夎绠楁硶锛屼粠宸︿晶绠楁硶涓績绠楁硶鍒版澶勶紝鍗冲彲瀹夎
             </div>
           </div>
         </div>
@@ -168,7 +168,12 @@
             console.log(item);
           }
 
-          item.logoUrl = "/httpImage/" + item.logoUrl;
+          if (
+            item.logoUrl.indexOf("http://apps.smartai.com/httpImage/") === -1
+          ) {
+            item.logoUrl = "/httpImage/" + item.logoUrl;
+          }
+
           if (item.priceBase === 0) {
             this.freeAlg.push(item);
           } else {
@@ -182,7 +187,12 @@
     async getEquipment() {
       const res = await findAllSdk();
       if (res && res.success) {
-        this.equipmentArr = res.data;
+        this.equipmentArr = [];
+        res.data.forEach((item, index) => {
+          if (item.sdkList) {
+            this.equipmentArr.push(item);
+          }
+        });
       }
     },
     //鎷栨嫿寮�濮�
@@ -200,16 +210,21 @@
         sdk_name: this.dragAlg.productName,
       });
 
-      const res = await downloadOrUpgrade({
-        nodeId: devId,
-        path: this.dragAlg.productBaseId,
-        userId: JSON.parse(sessionStorage.getItem("userInfo")).id,
-      });
-      if (res && res.success) {
-        this.$notify({
-          type: "success",
-          message: "鎿嶄綔鎴愬姛,璇风◢鍚�",
+      try {
+        const res = await downloadOrUpgrade({
+          nodeId: devId,
+          path: this.dragAlg.productBaseId,
+          userId: JSON.parse(sessionStorage.getItem("userInfo")).id,
+          inputText: this.dragAlg.productName,
         });
+        if (res && res.success) {
+          this.$notify({
+            type: "success",
+            message: "鎿嶄綔鎴愬姛,璇风◢鍚�",
+          });
+        }
+      } catch (err) {
+        algArr.pop();
       }
 
       this.dragAlg = null;
@@ -256,7 +271,7 @@
       if (res && res.success) {
         this.$notify({
           type: "success",
-          message: "鎿嶄綔鎴愬姛",
+          message: res.msg,
         });
       }
     },

--
Gitblit v1.8.0