diff --git a/pages.json b/pages.json index 037ad5b..037717d 100644 --- a/pages.json +++ b/pages.json @@ -1,145 +1,151 @@ -{ - "pages": [ - { - "path": "pages/home/home", - "style": { - "navigationBarTitleText": "图书馆" - } - }, - { - "path": "pages/search/search", - "style": { - "navigationBarTitleText": "图书检索" - } - }, - { - "path": "pages/user/user", - "style": { - "navigationBarTitleText": "我的" - } - }, - { - "path": "pages/login/login", - "style": { - "navigationBarTitleText": "登录" - } - }, - { - "path": "pages/lendCar/lendCar", - "style": { - "navigationBarTitleText": "借阅清单" - } - } - ], - "globalStyle": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "uni-app", - "navigationBarBackgroundColor": "#F8F8F8", - "backgroundColor": "#F8F8F8", - "app-plus": { - "background": "#efeff4" - } - }, - "tabBar":{ - "selectedColor": "#409EFF", - "list": [{ - "pagePath": "pages/home/home", - "text": "首页", - "iconPath": "static/tab/shouye.png", - "selectedIconPath": "static/tab/shouyeActive.png" - },{ - "pagePath": "pages/search/search", - "text": "搜索", - "iconPath": "static/tab/search.png", - "selectedIconPath": "static/tab/searchActive.png" - },{ - "pagePath": "pages/lendCar/lendCar", - "text": "借阅", - "iconPath": "static/tab/order.png", - "selectedIconPath": "static/tab/orderActive.png" - },{ - "pagePath": "pages/user/user", - "text": "我的", - "iconPath": "static/tab/my.png", - "selectedIconPath": "static/tab/myActive.png" - }] - }, - "subPackages": [ - { - "root": "subpkg", - "pages": [ - { - "path": "pages/book-detail/book-detail", - "style": { - "navigationBarTitleText": "图书详情", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/book-list/book-list", - "style": { - "navigationBarTitleText": "图书列表" - } - }, - { - "path": "pages/ranking/ranking", - "style": { - "navigationBarTitleText": "借阅排行榜" - } - }, - { - "path": "pages/activity-list/activity-list", - "style": { - "navigationBarTitleText": "活动列表" - } - }, - { - "path": "pages/activity-detail/activity-detail", - "style": { - "navigationBarTitleText": "活动详情" - } - }, - { - "path": "pages/myLending/myLending", - "style": { - "navigationBarTitleText": "我的借阅", - "enablePullDownRefresh": true, // 必须开启-下拉刷新需要 - "onReachBottomDistance": 100 - } - }, - { - "path": "pages/feedback/feedback", - "style": { - "navigationBarTitleText": "读者留言" - } - }, - { - "path": "pages/reader-card/reader-card", - "style": { - "navigationBarTitleText": "读者证" - } - }, - { - "path": "pages/feedback-list/feedback-list", - "style": { - "navigationBarTitleText": "读者留言" - } - }, - { - "path": "pages/collect-list/collect-list", - "style": { - "navigationBarTitleText": "我的收藏", - "enablePullDownRefresh": true, // 必须开启-下拉刷新需要 - "onReachBottomDistance": 100 - } - }, - { - "path": "pages/user-info/user-info", - "style": { - "navigationBarTitleText": "个人资料" - } - } - ] - } - ] -} +{ + "pages": [ + { + "path": "pages/home/home", + "style": { + "navigationBarTitleText": "图书馆" + } + }, + { + "path": "pages/search/search", + "style": { + "navigationBarTitleText": "图书检索" + } + }, + { + "path": "pages/user/user", + "style": { + "navigationBarTitleText": "我的" + } + }, + { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "登录" + } + }, + { + "path": "pages/lendCar/lendCar", + "style": { + "navigationBarTitleText": "借阅清单" + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8", + "app-plus": { + "background": "#efeff4" + } + }, + "tabBar":{ + "selectedColor": "#409EFF", + "list": [{ + "pagePath": "pages/home/home", + "text": "首页", + "iconPath": "static/tab/shouye.png", + "selectedIconPath": "static/tab/shouyeActive.png" + },{ + "pagePath": "pages/search/search", + "text": "搜索", + "iconPath": "static/tab/search.png", + "selectedIconPath": "static/tab/searchActive.png" + },{ + "pagePath": "pages/lendCar/lendCar", + "text": "借阅", + "iconPath": "static/tab/order.png", + "selectedIconPath": "static/tab/orderActive.png" + },{ + "pagePath": "pages/user/user", + "text": "我的", + "iconPath": "static/tab/my.png", + "selectedIconPath": "static/tab/myActive.png" + }] + }, + "subPackages": [ + { + "root": "subpkg", + "pages": [ + { + "path": "pages/book-detail/book-detail", + "style": { + "navigationBarTitleText": "图书详情", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/book-list/book-list", + "style": { + "navigationBarTitleText": "图书列表" + } + }, + { + "path": "pages/ranking/ranking", + "style": { + "navigationBarTitleText": "借阅排行榜" + } + }, + { + "path": "pages/activity-list/activity-list", + "style": { + "navigationBarTitleText": "活动列表" + } + }, + { + "path": "pages/activity-detail/activity-detail", + "style": { + "navigationBarTitleText": "活动详情" + } + }, + { + "path": "pages/myLending/myLending", + "style": { + "navigationBarTitleText": "我的借阅", + "enablePullDownRefresh": true, + "onReachBottomDistance": 100 + } + }, + { + "path": "pages/feedback/feedback", + "style": { + "navigationBarTitleText": "读者留言" + } + }, + { + "path": "pages/reader-card/reader-card", + "style": { + "navigationBarTitleText": "读者证" + } + }, + { + "path": "pages/feedback-list/feedback-list", + "style": { + "navigationBarTitleText": "读者留言" + } + }, + { + "path": "pages/feedback-detail/feedback-detail", + "style": { + "navigationBarTitleText": "留言详情" + } + }, + { + "path": "pages/collect-list/collect-list", + "style": { + "navigationBarTitleText": "我的收藏", + "enablePullDownRefresh": true, + "onReachBottomDistance": 100 + } + }, + { + "path": "pages/user-info/user-info", + "style": { + "navigationBarTitleText": "个人资料" + } + } + ] + } + ] +} diff --git a/pages/home/home.vue b/pages/home/home.vue index dfcab45..dd06039 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -337,7 +337,7 @@ export default { goToBookDetail(item) { // 把整个图书对象 转成字符串 带过去 uni.navigateTo({ - url: "/subpkg/pages/book-detail/book-detail?bookData=" + encodeURIComponent(JSON.stringify(item)) + url: "/subpkg/pages/book-detail/book-detail?bookData=" + encodeURIComponent(JSON.stringify(item)) + "&fromRecommend=true" }) }, @@ -397,7 +397,7 @@ export default { }); }, toFeedback() { - this.checkBindAndNavigate("/subpkg/pages/feedback-list/feedback-list", "请您绑定读者证"); + this.checkBindAndNavigate("/subpkg/pages/feedback/feedback", "请您绑定读者证"); }, // 去借阅证列表页 toLibraryCard() { diff --git a/pages/user/user.vue b/pages/user/user.vue index 53d56fb..60942c8 100644 --- a/pages/user/user.vue +++ b/pages/user/user.vue @@ -185,29 +185,7 @@ export default { } }); }); - }, - - toLogOut() { - uni.showModal({ - title: '确认退出', - content: '确定要退出当前账号吗?', - success: (res) => { - if (res.confirm) { - uni.removeStorageSync(USER_KEY); - uni.removeStorageSync(STORAGE_KEYS.READER_CARD_LIST); - uni.removeStorageSync(STORAGE_KEYS.CURRENT_READER_CARD); - - this.userInfo = {}; - this.cardNo = ""; - this.isBindLibraryCard = false; - this.base64Img = ""; - - uni.showToast({ title: '退出成功', icon: 'success' }); - uni.switchTab({ url: "/pages/home/home" }); - } - } - }); - }, + } } } diff --git a/subpkg/pages/activity-detail/activity-detail.vue b/subpkg/pages/activity-detail/activity-detail.vue index 39a84b1..7d59248 100644 --- a/subpkg/pages/activity-detail/activity-detail.vue +++ b/subpkg/pages/activity-detail/activity-detail.vue @@ -15,7 +15,10 @@ - 活动介绍/回顾 + 活动介绍/回顾 +
+ +
@@ -25,12 +28,12 @@ 分享 - - @@ -47,7 +50,6 @@ export default { contentNodes: "" }; }, - onLoad(options) { const item = JSON.parse(decodeURIComponent(options.item)); this.detail = item; @@ -60,22 +62,15 @@ export default { formatContent() { let content = this.detail.content || ""; - // ====================================== - // 1. 把 content 里的 转成 标签 - // ====================================== - const localImgReg = /]*\s+src\s*=\s*['"]@\/static\/([^'"]+)['"][^>]*>/gi; - content = content.replace(localImgReg, (match, path) => { - const imgPath = path.startsWith('/') ? path : '/' + path; - return ` -
- -
- `; - }); + // const localImgReg = /]*\s+src\s*=\s*['"]@\/static\/([^'"]+)['"][^>]*>/gi; + // content = content.replace(localImgReg, (match, path) => { + // return ` + //
+ // + //
+ // `; + // }); - // ====================================== - // 2. 把 https://mmbiz.qpic.cn 图片链接转成图片 - // ====================================== const httpImgReg = /https:\/\/mmbiz\.qpic\.cn[^ \n\r'"]+/g; content = content.replace(httpImgReg, url => { return ` @@ -88,7 +83,6 @@ export default { this.contentNodes = content; }, - checkCollectStatus() { const list = uni.getStorageSync('activityCollectList') || []; this.isCollected = list.includes(this.activityId); @@ -105,6 +99,16 @@ export default { } uni.setStorageSync('activityCollectList', list); this.isCollected = !this.isCollected; + }, + + handleJoin() { + if (this.detail.status === 0) { + return; + } + uni.showToast({ + title: '报名成功', + icon: 'success' + }); } }, @@ -211,4 +215,4 @@ export default { .disabled-btn { background: #ccc !important; } - \ No newline at end of file + diff --git a/subpkg/pages/activity-list/activity-list.vue b/subpkg/pages/activity-list/activity-list.vue index a787b26..b6b6f84 100644 --- a/subpkg/pages/activity-list/activity-list.vue +++ b/subpkg/pages/activity-list/activity-list.vue @@ -1,5 +1,22 @@