From 02eb8d0829a78a30bdb6ce25f93858dfdd61c4dc Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期六, 07 九月 2024 19:06:14 +0800 Subject: [PATCH] bug --- packageBookService/pages/bookServices/detail/index.js | 20 +++++++------------- 1 files changed, 7 insertions(+), 13 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js index ac1c263..e8b3f6f 100644 --- a/packageBookService/pages/bookServices/detail/index.js +++ b/packageBookService/pages/bookServices/detail/index.js @@ -1,6 +1,7 @@ // pages/bookServices/detail/index.js import Toast from "tdesign-miniprogram/toast"; import tool from "../../../../assets/js/toolClass"; +import moment from 'moment' import { loginInfo } from "../../../../assets/js/login"; @@ -192,29 +193,24 @@ bookId: options.id + "", barHeight: systInfo.statusBarHeight, navBarHeight: navBarHeight, - }); - this.setData({ options: { id: options.id, - name: options.name, + name: decodeURI(options.name), storeInfo: options.storeInfo, - }, }); wx.setNavigationBarTitle({ - title: options.name, + title: decodeURI(options.name), }) - const token = wx.getStorageSync(app.config.tokenKey) + let token = wx.getStorageSync(app.config.tokenKey) if (!token) { loginInfo(app, (data) => { if (data) {} else {} }) } - this.getBookInfo(options.id); // this.getResourceClass(); // 鑾峰彇璧勬簮鎵�灞炲垎绫� - - const token = wx.getStorageSync(app.config.tokenKey); + token = wx.getStorageSync(app.config.tokenKey) if (token) { this.getShoppingCartProductGet(); this.getApplyInfo(options.id); @@ -483,9 +479,7 @@ } } this.setData({ - "bookDetail.publicationDate": this.formatDate( - this.data.bookDetail.publicationDate - ), + "bookDetail.publicationDate": moment(this.data.bookDetail.publicationDate).format("YYYY骞碝M鏈�"), "bookDetail.price": this.numFormat(this.data.bookDetail.price), "bookDetail.oldPrice": this.numFormat(this.data.bookDetail.oldPrice), "bookDetail.paperPrice": this.numFormat( @@ -721,7 +715,7 @@ link } = e.currentTarget.dataset; wx.navigateTo({ - url: `/packageBookService/pages/bookServices/webpage/index?url=${link}`, + url: `/packageBookService/pages/bookServices/linkPage/index?path=${link}`, }); }, // tag鍒囨崲 -- Gitblit v1.9.1