Просмотр исходного кода

fix: 修正降价弹窗传参及购物车页面返回地址

修复 price-reduction-popup.vue 中 open 方法调用 getIsbnInfo 时未传递完整 data 对象的问题,确保 conditionType 参数正确传入。
同时将购物车页面导航配置中的默认返回页面从 /pages/cart/index 更正为 /pages/home/index。
ylong 3 недель назад
Родитель
Сommit
cc4ea52708
2 измененных файлов с 6 добавлено и 5 удалено
  1. 4 3
      pages-car/components/price-reduction-popup.vue
  2. 2 2
      pages/cart/index.vue

+ 4 - 3
pages-car/components/price-reduction-popup.vue

@@ -79,12 +79,13 @@
 		methods: {
 			open(data) {
 				this.showPopup = true;
-				this.getIsbnInfo(data.isbn);
+				this.getIsbnInfo(data);
 			},
 			//获取信息
-			getIsbnInfo(isbn) {
+			getIsbnInfo(data) {
 				this.$u.api.clickReduceInviteAjax({
-					isbn: isbn,
+					isbn: data.isbn,
+					conditionType: data.conditionType,
 				}).then((res) => {
 					if (res.code == 200) {
 						this.bookInfo = res.data;

+ 2 - 2
pages/cart/index.vue

@@ -44,7 +44,7 @@
             } else {
                 return {
                     title: "书嗨",
-                    page: "/pages/cart/index",
+                    page: "/pages/home/index",
                 };
             }
         },
@@ -69,7 +69,7 @@
             } else {
                 return {
                     title: "书嗨",
-                    page: "/pages/cart/index",
+                    page: "/pages/home/index",
                 };
             }
         },