From b77e8e776af4d81e748e9e21d51b64a11085a195 Mon Sep 17 00:00:00 2001
From: zhongshujie <2862698242@qq.com>
Date: 星期四, 19 十二月 2024 10:49:11 +0800
Subject: [PATCH] 未提交退出提示

---
 pages/cart/paymentPage/index.js |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/pages/cart/paymentPage/index.js b/pages/cart/paymentPage/index.js
index a9e402d..8a28a08 100644
--- a/pages/cart/paymentPage/index.js
+++ b/pages/cart/paymentPage/index.js
@@ -158,10 +158,12 @@
       if (Number(this.data.payPrice) < Number(this.data.price)) {
         this.handleChange()
       }
+      console.log(res, "res")
       res.saleMethodLinks.forEach(item => {
         const type = item.orderSaleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product';
         item.type = type; // 灏唗ype璁剧疆涓篿tem瀵硅薄鐨勫睘鎬э紝鑰屼笉鏄娇鐢╯etData
         item.paymentIcon = getPublicImage(item.orderSaleMethod.product.icon)
+        item.price = item.orderSaleMethod.price.toFixed(2)
         if (item.orderSaleMethod.product.cmsTypeRefCode == 'jsek_digitalTextbooks') {
           item.typeTxt = '鏁板瓧鏁欐潗'
           item.productType = "鏁板瓧鏁欐潗"
@@ -171,10 +173,13 @@
         } else {
           item.typeTxt = '鐢靛瓙涔�'
           item.productType = "鍥句功鏈嶅姟-鐢靛瓙涔�"
-
           if (item.orderSaleMethod.type == 'createProductItemSaleMethod') {
             item.typeTxt = '浜戝涔�'
             item.productType = "鍥句功鏈嶅姟-浜戝涔�"
+          }
+          if (item.orderSaleMethod.cmsItemList.length && item.orderSaleMethod.cmsItemList[0].type == "questionBankFolder") {
+            item.typeTxt = '棰樺簱'
+            item.productType = "鍥句功鏈嶅姟-浜戞祴璇�"
           }
         }
       })
@@ -342,14 +347,16 @@
       orderNum: this.data.orderGoods
     }
     app.MG.store.confirmOrder(query).then(res => {
-      Toast({
-        context: this,
-        selector: '#t-toast',
-        message: '棰嗗彇鎴愬姛',
-        theme: 'success',
-        direction: 'column',
+      wx.showToast({
+        title: '棰嗗彇鎴愬姛',
+        icon: 'success',
+        complete: res => {
+          setTimeout(() => {
+            wx.navigateBack()
+          }, 1000);
+        }
       });
-      wx.navigateBack()
+
     })
   }
 })
\ No newline at end of file

--
Gitblit v1.9.1