panhui пре 4 година
родитељ
комит
4e00609f47

+ 1 - 1
src/main/nine-space/src/plugins/http.js

@@ -6,7 +6,7 @@ switch (process.env.NODE_ENV) {
   case "development":
     // baseUrl = 'http://zhirongip.izouma.com';
     // baseUrl = 'http://192.168.50.190:8080';
-    baseUrl = "http://localhost:8080";
+    baseUrl = "http://192.168.50.104:8080";
     // baseUrl = 'http://192.168.50.190:8080';
     break;
   case "test":

+ 5 - 3
src/main/nine-space/src/views/Detail.vue

@@ -108,6 +108,7 @@ export default {
       activeName: "1",
       info: {},
       liked: false,
+      btn: null,
     };
   },
   computed: {
@@ -120,11 +121,12 @@ export default {
   },
   mounted() {
     this.getProduct();
+    this.btn = this.$refs.btn;
     document.body.appendChild(this.$refs.btn);
   },
-  unmounted() {
-    if (this.$refs.btn) {
-      document.body.removeChild(this.$refs.btn);
+  beforeUnmount() {
+    if (this.btn) {
+      document.body.removeChild(this.btn);
     }
   },
   methods: {

+ 5 - 4
src/main/nine-space/src/views/Submit.vue

@@ -96,6 +96,7 @@ export default {
         require("../assets/svgs/icon_gouxuan_huise.svg"),
         require("../assets/svgs/icon_gouxuan_pre.svg"),
       ],
+      bottom: null,
     };
   },
   computed: {
@@ -119,11 +120,12 @@ export default {
         this.bs.value.refresh();
       }, 500);
     });
+    this.bottom = this.$refs.bottom;
     document.body.appendChild(this.$refs.bottom);
   },
   unmounted() {
-    if (this.$refs.bottom) {
-      document.body.removeChild(this.$refs.bottom);
+    if (this.bottom) {
+      document.body.removeChild(this.bottom);
     }
   },
   methods: {
@@ -131,8 +133,7 @@ export default {
       this.$http
         .post("/order/create?collectionId=" + this.$route.query.id + "&qty=1")
         .then((res) => {
-          window.location.href =
-            this.$baseUrl + "/payOrder/alipay?id=" + res.id;
+          this.$router.replace(this.$baseUrl + "/payOrder/alipay?id=" + res.id);
         });
     },
   },