SanHQin há 6 meses atrás
pai
commit
c45451a7d1

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.986a8e4123c265426b5496995e72ae93.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.de15001ce66f032e9274.js></script><script type=text/javascript src=./static/js/app.6033ad3bf136a8bc50cc.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.cd6474b845b5cca829f83ccfec5c9d22.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.de15001ce66f032e9274.js></script><script type=text/javascript src=./static/js/app.183a3b68f7c5b9ea14b2.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.cd6474b845b5cca829f83ccfec5c9d22.css


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.cd6474b845b5cca829f83ccfec5c9d22.css.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.183a3b68f7c5b9ea14b2.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.183a3b68f7c5b9ea14b2.js.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 42 - 32
src/components/pages/appStore/views/appManagement.vue

@@ -928,7 +928,16 @@ export default {
         type: "warning"
       })
         .then(async e => {
-          this.copyAgentOrWorkflow(item);
+          let _status = await this.copyAgentOrWorkflow(item);
+          if(_status==1){
+            this.$message.success("复制成功,已添加至我的工作流列表。");
+          }else if(_status==2){
+            this.$message.success("复制成功,已添加至我的智能体列表。");
+          }else if(_status==3){
+            this.$message.error("复制失败,该应用无内容")
+          }else if(_status==0){
+            this.$message.error("复制失败")
+          }
           // console.log(item);
           // let url = item.url;
           // let id =
@@ -965,34 +974,34 @@ export default {
           //   console.log('immersivePublishDataId',immersivePublishDataId);
           //   console.log('cardPublishDataId',cardPublishDataId)
           // })
-          let params = [
-            {
-              name: `${item.name}_copy`, //app名称
-              userid: this.userId, //创建的用户ID
-              label: item.label, //app标签
-              detail: item.detail, //app简介
-              url: item.url, //app链接
-              type: item.type, //app类型
-              juri: "1", //app权限 1:我的 2:组织 3:所有人
-              stand: "cn", //语言
-              json: JSON.stringify(item.json) //其他信息
-            }
-          ];
-          this.ajax
-            .post(this.$store.state.api + "insert_appStore", params)
-            .then(res => {
-              if (res.data) {
-                this.$message.success("复制成功,已添加至我的列表。");
-                this.getData();
-                this.insertSave(item, 3);
-              } else {
-                this.$message.error("复制失败");
-              }
-            })
-            .catch(err => {
-              console.log(err);
-              this.$message.error("复制失败");
-            });
+          // let params = [
+          //   {
+          //     name: `${item.name}_copy`, //app名称
+          //     userid: this.userId, //创建的用户ID
+          //     label: item.label, //app标签
+          //     detail: item.detail, //app简介
+          //     url: item.url, //app链接
+          //     type: item.type, //app类型
+          //     juri: "1", //app权限 1:我的 2:组织 3:所有人
+          //     stand: "cn", //语言
+          //     json: JSON.stringify(item.json) //其他信息
+          //   }
+          // ];
+          // this.ajax
+          //   .post(this.$store.state.api + "insert_appStore", params)
+          //   .then(res => {
+          //     if (res.data) {
+          //       this.$message.success("复制成功,已添加至我的列表。");
+          //       this.getData();
+          //       this.insertSave(item, 3);
+          //     } else {
+          //       this.$message.error("复制失败");
+          //     }
+          //   })
+          //   .catch(err => {
+          //     console.log(err);
+          //     this.$message.error("复制失败");
+          //   });
         })
         .catch(_ => {
           console.log("取消复制");
@@ -1006,7 +1015,7 @@ export default {
           item.url.split("/")[item.url.split("/").length - 1];
         if (!id){
           console.log("该链接无对应id")
-          return resolve();
+          return resolve(3);
           // return this.$message.error("复制失败,未找到对应id")
         };
         console.log(item)
@@ -1016,6 +1025,7 @@ export default {
             .get(`https://appapi.cocorobo.cn/api/agents/muti_agent/${id}`)
             .then(async res => {
               let _data = res.data;
+              console.log(_data)
               let _idList = [];
               if (_data["dialoguePublishDataId"])
                 _idList.push(_data["dialoguePublishDataId"]);
@@ -1024,7 +1034,7 @@ export default {
               if (_data["cardPublishDataId"])
                 _idList.push(_data["cardPublishDataId"]);
               if (_idList.length <= 0) {
-                resolve(0);
+                resolve(3);
                 return console.log("该应用无id");
               }
               // /api/agents/copy_mutiAgent
@@ -1047,7 +1057,7 @@ export default {
             userId: this.userId,
             username: this.userName?this.userName:await this.getUserName(this.userId),
           }).then(_=>{
-            resolve(1);
+            resolve(2);
           }).catch(e=>{
             console.log(e)
             resolve(0)

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff