SanHQin 3 weeks ago
parent
commit
325405e967

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.36c9b409bb116f3e5fc769935d9ffdb1.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.c046dd5e92c8da101466.js></script><script type=text/javascript src=./static/js/app.e06fde7302a95ce8434c.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.589c8ca022972246b191e3bcebcfecb6.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.c046dd5e92c8da101466.js></script><script type=text/javascript src=./static/js/app.a5887080eab82a49540e.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.589c8ca022972246b191e3bcebcfecb6.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.589c8ca022972246b191e3bcebcfecb6.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.a5887080eab82a49540e.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.a5887080eab82a49540e.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 29 - 8
src/components/pages/appStore/views/appManagement.vue

@@ -1043,17 +1043,38 @@ export default {
             });
         } else if (item.label == "agent") {//复制智能体
           console.log("复制智能体")
-          let _idList = [id];
-          this.ajax.post('https://appapi.cocorobo.cn/api/agents/copy_agent',{
-            ids: _idList,
-            userId: this.userId,
-            username: this.userName?this.userName:await this.getUserName(this.userId),
-          }).then(_=>{
-            resolve(2);
+          this.ajax.get(`https://appapi.cocorobo.cn/api/agents/agent/parent/${id}`).then(async res=>{
+            let _id = res.data.id;
+            if(_id){
+              let _idList = [_id];
+              this.ajax.post('https://appapi.cocorobo.cn/api/agents/copy_agent',{
+                ids: _idList,
+                userId: this.userId,
+                username: this.userName?this.userName:await this.getUserName(this.userId),
+              }).then(_=>{
+                resolve(2);
+              }).catch(e=>{
+                console.log(e)
+                resolve(0)
+              })
+            }
+            console.log(res)
           }).catch(e=>{
-            console.log(e)
+            console.log(e);
             resolve(0)
+            // this.$message.error("")
           })
+          // let _idList = [id];
+          // this.ajax.post('https://appapi.cocorobo.cn/api/agents/copy_agent',{
+          //   ids: _idList,
+          //   userId: this.userId,
+          //   username: this.userName?this.userName:await this.getUserName(this.userId),
+          // }).then(_=>{
+          //   resolve(2);
+          // }).catch(e=>{
+          //   console.log(e)
+          //   resolve(0)
+          // })
         }
       });
     },

Some files were not shown because too many files changed in this diff