panhui 4 gadi atpakaļ
vecāks
revīzija
185aec3591

+ 5 - 0
src/main/nine-space/src/components/order/OrderOpen.vue

@@ -48,6 +48,10 @@ export default {
         collectionId: {
             type: Number,
             defalut: 0
+        },
+        id: {
+            type: Number,
+            defalut: 0
         }
     },
     data() {
@@ -58,6 +62,7 @@ export default {
     },
     methods: {
         open() {
+            this.$http.post('/order/open?id=' + this.id);
             this.addClass('img2', 'animate__rollOut', false)
                 .then(() => {
                     return this.addClass('img3', 'animate__bounceOutUp', false);

+ 1 - 1
src/main/nine-space/src/views/order/Detail.vue

@@ -79,6 +79,7 @@
             ref="box"
             :collectionId="info.collectionId"
             :imgSrc="getImg(changeImgs(collection.pic))"
+            :id="info.id"
         ></order-open>
     </div>
 </template>
@@ -114,7 +115,6 @@ export default {
                 this.collection = res;
                 if (!this.info.opened) {
                     this.$refs.box.show = true;
-                    this.$http.post('/order/open?id=' + this.info.id);
                 }
             });
     },