ソースを参照

feature_20250910_建议订单跳转购物车

zhujindu 2 ヶ月 前
コミット
540f29d734
1 ファイル変更19 行追加17 行削除
  1. 19 17
      src/views/deviceOutside/productItem.vue

+ 19 - 17
src/views/deviceOutside/productItem.vue

@@ -167,23 +167,25 @@ export default {
         buryingPointName: '去下单',
         buryingPointPosition: '门店ICON',
       });
-      let cartUrl =
-        'https://np-dorder-we.vip-test.tech/?userid=0190108574&token=9D6ADDD376D3463B8D0BF3842A7A04D3&state=#/tab/cart';
-      window.location.href = cartUrl;
-      // getOrderUrlByStoreId({
-      //   storeId: this.$route.query.id,
-      //   from: this.$route.query.from || '',
-      // }).then((res) => {
-      //   loading1.clear();
-      //   if (res.code == 200 && res.data) {
-      //     window.location.href = res.data;
-      //   } else {
-      //     this.Toast({
-      //       message: res.msg,
-      //       duration: 5000,
-      //     });
-      //   }
-      // });
+      let loading1 = this.$toast.loading({
+        duration: 0,
+        message: '加载中...',
+        forbidClick: true,
+      });
+      getOrderUrlByStoreId({
+        storeId: this.$route.query.id,
+        from: this.$route.query.from || '',
+      }).then((res) => {
+        loading1.clear();
+        if (res.code == 200 && res.data) {
+          window.location.href = res.data + '&state=#/tab/cart';
+        } else {
+          this.Toast({
+            message: res.msg,
+            duration: 5000,
+          });
+        }
+      });
     },
     onClickLeft() {
       this.$router.go(-1);