From c476915fdcb57387459ce6da1b43a502f4168628 Mon Sep 17 00:00:00 2001
From: yiming <m13691596795@163.com>
Date: 星期一, 29 四月 2024 09:38:54 +0800
Subject: [PATCH] 标题

---
 pages/cart/index.js                                                   |    5 ++++-
 packageBookService/pages/bookServices/detail/components/tree/index.js |    5 ++++-
 pages/bookExhibitionList/index.js                                     |   14 ++++++++------
 pages/cart/index.wxml                                                 |    6 ++++--
 4 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js
index da6920d..08238f8 100644
--- a/packageBookService/pages/bookServices/detail/components/tree/index.js
+++ b/packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -187,6 +187,7 @@
 
         if (item.selectType == "document" || item.selectType == "pdf") {
           // freeFile
+          console.log(item);
           const fileLink = item.file ?
             app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.file : app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.freeFile
           console.log(fileLink, "fileLink");
@@ -195,6 +196,7 @@
           // 鍗曟涓嬭浇鍏佽鐨勬渶澶ф枃浠朵负 200MB
           wx.downloadFile({
             url: fileLink,
+            filePath: wx.env.USER_DATA_PATH + `/${item.name}.${item.selectType}`,
             success: function (res) {
               console.log(res, "wx.downloadFile success res");
               if (res.statusCode != 200) {
@@ -202,8 +204,9 @@
                 return false;
               }
               var Path = res.tempFilePath; //杩斿洖鐨勬枃浠朵复鏃跺湴鍧�锛岀敤浜庡悗闈㈡墦寮�鏈湴棰勮鎵�鐢�
+              let data = res.filePath;
               wx.openDocument({
-                filePath: Path,
+                filePath: data,
                 showMenu: true,
                 success: function (res) {
                   console.log("鎵撳紑鎴愬姛");
diff --git a/pages/bookExhibitionList/index.js b/pages/bookExhibitionList/index.js
index 91e0257..0d31525 100644
--- a/pages/bookExhibitionList/index.js
+++ b/pages/bookExhibitionList/index.js
@@ -87,7 +87,9 @@
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
   onLoad(options) {
+    this.bookExhibitionGet()
 
+    this.keyProjectsGet(this.data.newPrice)
     // this.setData({
     //   'product.value': '*',
     // });
@@ -100,12 +102,12 @@
     })
 
 
-    // watch.setWatcher(this);
-    // let that = this;
-    // setTimeout(function () {
-    //   that.data.name = "娴嬭瘯watch鍙樺寲浜�"
-    // }, 5000)
-    // 
+    watch.setWatcher(this);
+    let that = this;
+    setTimeout(function () {
+      that.data.name = "娴嬭瘯watch鍙樺寲浜�"
+    }, 500)
+
   },
   watch: {
     name: function (newVal, oldVal) {
diff --git a/pages/cart/index.js b/pages/cart/index.js
index 9f187c7..8dfc613 100644
--- a/pages/cart/index.js
+++ b/pages/cart/index.js
@@ -11,6 +11,7 @@
 
 Page({
   data: {
+    price: '',
     loading: true,
     hidden: true,
     swipeOpened: false,
@@ -88,9 +89,11 @@
         totalSize: res.totalSize
       })
       res.datas.forEach(item => {
+
         this.setData({
           bookId: res.id,
-          bookName: res.name
+          bookName: res.name,
+          price: item.saleMethod.price.toFixed(2),
         })
         item.imgUrl = getPublicImage(item.productMonWithLinkDto.product.icon, '', '160');
         // this.setData({
diff --git a/pages/cart/index.wxml b/pages/cart/index.wxml
index 8d664f4..ff79a21 100644
--- a/pages/cart/index.wxml
+++ b/pages/cart/index.wxml
@@ -36,7 +36,7 @@
                 <view class="textBox" wx:if="{{item.type == 'item'}}">鍥句功鏈嶅姟-浜戝涔�</view>
               </view>
               <view wx:if="{{item.saleMethod.price != 0}}">
-                锟{item.saleMethod.price}}
+                锟{price}}
               </view>
               <view wx:else class="descriptionBox"> 绔嬪嵆棰嗗彇</view>
             </view>
@@ -72,7 +72,9 @@
     <view class="settlementBox">
       <view class="totalPrice">鎬讳环:<text class="totalPriceText">锟{totalPrice}}</text></view>
       <view class="buttonBox">
-        <t-button  class="tButtonBox" size="small" shape="round" bind:tap="goPaymentPage"> <view >鍘荤粨绠�({{selectedCount}})</view> </t-button>
+        <t-button class="tButtonBox" size="small" shape="round" bind:tap="goPaymentPage">
+          <view>鍘荤粨绠�({{selectedCount}})</view>
+        </t-button>
       </view>
     </view>
   </view>

--
Gitblit v1.9.1