diff --git a/App.vue b/App.vue index a4337a3..8bab8f2 100644 --- a/App.vue +++ b/App.vue @@ -19,24 +19,32 @@ export default { Vue.prototype.winHeight=res.screenHeight } }) + // 取出播放列表 uni.getStorage({ key: 'playData', success: function (res) { console.log(res.data,'取出的本地数据'); - music.setList(res.data.myList) + if(res.data.myList.length<=0){ + store.commit('setUserInfo',{'playVisible': false}) + }else{ + music.setList(res.data.myList,'',store.state.userInfo.playIndex) // music.setCoverImg(res.data.fengImg) - store.commit('setUserInfo',res.data) - store.commit('setUserInfo',{'playFlag': false}); // 设置播放按钮状态为暂停 + store.commit('setUserInfo',res.data) + } + store.commit('setUserInfo',{'playFlag': false}); // 设置播放按钮状态为暂停 store.commit('setUserInfo',{'currentTime': 0}); + }, fail:function(e){ console.log('本地无数据'); music.setList([]) + store.commit('setUserInfo',{'playingInfo': {'bookid':0,'chapterId':0}}); + store.commit('setUserInfo',{'playVisible': false}) // music.setCoverImg('../../static/icon/x1.jpg') store.commit('setUserInfo',{ 'myList':[], - 'fengImg':'../../static/icon/x1.jpg' + 'fengImg':'../../static/icon/fengziIcon.jpg' }) store.commit('setUserInfo',{'playFlag': false}); store.commit('setUserInfo',{'currentTime': 0}); diff --git a/bkhumor-emojiplus/components/bkhumor-emojiplus/bkhumor-emojiplus.vue b/bkhumor-emojiplus/components/bkhumor-emojiplus/bkhumor-emojiplus.vue index 4ca345e..77b5768 100644 --- a/bkhumor-emojiplus/components/bkhumor-emojiplus/bkhumor-emojiplus.vue +++ b/bkhumor-emojiplus/components/bkhumor-emojiplus/bkhumor-emojiplus.vue @@ -80,7 +80,8 @@ const list = Array.from({length:100}, (v,k) => k) let index = list.indexOf(res) // return `` - return `` + // return `` + return "https://www.nuttyreading.com/emojis/emojis/qq/"+res } diff --git a/components/z-navigation/z-navigation.vue b/components/z-navigation/z-navigation.vue index 07737f9..fb51b66 100644 --- a/components/z-navigation/z-navigation.vue +++ b/components/z-navigation/z-navigation.vue @@ -33,10 +33,10 @@ text: '首页' }, { - pagePath: 'pages/peanut/shopping', - iconPath: 'static/tab/icon2_n.png', - selectedIconPath: 'static/tab/icon2_y.png', - text: '购物车' + "pagePath": "pages/library/library", + "iconPath": "static/tab/icon3_n.png", + "selectedIconPath": "static/tab/icon3_y.png", + "text": "我的图书" }, // { // pagePath: 'pages/peanut/bookshelf', @@ -46,8 +46,8 @@ // }, { pagePath: 'pages/bookShop/orderList', - iconPath: 'static/tab/icon3_n.png', - selectedIconPath: 'static/tab/icon3_y.png', + iconPath: 'static/tab/icon2_n.png', + selectedIconPath: 'static/tab/icon2_y.png', text: '我的订单' }, diff --git a/pages.json b/pages.json index b87344d..747a131 100644 --- a/pages.json +++ b/pages.json @@ -352,6 +352,60 @@ } } + ,{ + "path" : "pages/listen/listenNotBuy", + "style" : + { + "navigationBarTitleText": "未购买的详情", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/comments/comments", + "style" : + { + "navigationBarTitleText": "书评1", + "enablePullDownRefresh": true + } + + } + ,{ + "path" : "pages/comments/commentsDetail", + "style" : + { + "navigationBarTitleText": "书评详情1", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/bookShop/settlementBook", + "style" : + { + "navigationBarTitleText": "book购买1", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/library/library", + "style" : + { + "navigationBarTitleText": "我的图书", + "enablePullDownRefresh": true + } + + } + ,{ + "path" : "pages/clock/clock", + "style" : + { + "navigationBarTitleText": "读书打卡", + "enablePullDownRefresh": false + } + + } ], "globalStyle": { "navigationBarTextStyle": "black", @@ -373,11 +427,17 @@ "selectedIconPath": "static/tab/icon1_y.png", "text": "首页" }, + // { + // "pagePath": "pages/peanut/shopping", + // "iconPath": "static/tab/icon2_n.png", + // "selectedIconPath": "static/tab/icon2_y.png", + // "text": "购物车" + // }, { - "pagePath": "pages/peanut/shopping", - "iconPath": "static/tab/icon2_n.png", - "selectedIconPath": "static/tab/icon2_y.png", - "text": "购物车" + "pagePath": "pages/library/library", + "iconPath": "static/tab/icon3_n.png", + "selectedIconPath": "static/tab/icon3_y.png", + "text": "我的图书" }, // { // "pagePath": "pages/peanut/bookshelf", @@ -387,15 +447,15 @@ // }, { "pagePath": "pages/bookShop/orderList", - "iconPath": "static/tab/icon3_n.png", - "selectedIconPath": "static/tab/icon3_y.png", + "iconPath": "static/tab/icon2_n.png", + "selectedIconPath": "static/tab/icon2_y.png", "text": "我的订单" }, { "pagePath": "pages/peanut/mine", "iconPath": "static/tab/icon4_n.png", "selectedIconPath": "static/tab/icon4_y.png", - "text": "我的" + "text": "我" } ] }, diff --git a/pages/bookShop/bookShopType.vue b/pages/bookShop/bookShopType.vue index bb7396a..8048a0d 100644 --- a/pages/bookShop/bookShopType.vue +++ b/pages/bookShop/bookShopType.vue @@ -41,10 +41,12 @@ + diff --git a/pages/clock/clock.vue b/pages/clock/clock.vue new file mode 100644 index 0000000..7118a4e --- /dev/null +++ b/pages/clock/clock.vue @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + diff --git a/pages/comments/comments.vue b/pages/comments/comments.vue new file mode 100644 index 0000000..03c9702 --- /dev/null +++ b/pages/comments/comments.vue @@ -0,0 +1,438 @@ + + + + + + + + + + {{productInfo.name}} + {{productInfo.description}} + + + + + + + + + {{item.title}} + + + {{item.updateTime}} + + + + + + + + + + + + 暂无书评内容~ + + + + 努力加载中 + + + + + + + + + 添加评论 + + + + + + + + + + + + + + + + + 提交 + + + + + + + + + + + + + + + + diff --git a/pages/comments/commentsDetail.vue b/pages/comments/commentsDetail.vue new file mode 100644 index 0000000..e6d99e5 --- /dev/null +++ b/pages/comments/commentsDetail.vue @@ -0,0 +1,444 @@ + + + + + + + + + + {{productInfo.name}} + {{productInfo.description}} + + + + + + + + {{commentInfo.title}} + + + {{commentInfo.updateTime}} + + + + + + + + + + + 添加评论 + ~ 精彩热评 ~ + + + + + {{item.createTime}} + + + + + + 暂无评论内容~ + + + + + + + 添加评论 + + + + + + + + + + + + 提交 + + + + + + + + + + + + + + + + diff --git a/pages/library/library.vue b/pages/library/library.vue new file mode 100644 index 0000000..1704f02 --- /dev/null +++ b/pages/library/library.vue @@ -0,0 +1,438 @@ + + + + + + + + + + 搜索... + + + + + + + + + + + + + + + + + + + + 读 书 + + + + 听 书 + + + + 评 书 + + + + {{item.bookName}} + + + + + + + + + + + + + + + + 读 书 + + + + 听 书 + + + + 评 书 + + + + {{item.productName}} + + + + + + + + 努力加载中 + + + + + + + + + + + + + + + + diff --git a/pages/listen/home.vue b/pages/listen/home.vue index b55dda7..b81551f 100644 --- a/pages/listen/home.vue +++ b/pages/listen/home.vue @@ -1,25 +1,72 @@ - - - + + + + + + + 搜索... + + + + + - + - - + + {{item.bookName}} + + + + 听 书 + + + + 评 书 + + - - - - 暂无听书数据~ + + + + + + + + + {{item.productName}} + + + + 听 书 + + + + 评 书 + + + + + + + + + 努力加载中 + + + + + + @@ -33,21 +80,75 @@ export default { data() { return { + showEbook:false, playData:{}, loadingNow : false, - bookList:[] + bookList:[], + contentShow:0, + page:1, // 页码 + status: 3, + ygtotalPage:1, + tjPage:1, + tjTotalPage:1, + tjBookLIst:[], + contentButtonList: [{ + name: '已购图书' + }, + { + name: '推荐图书' + } + ], } }, onLoad() { this.getListDate() + this.getfreeBook() }, onPullDownRefresh() { console.log('下拉刷新了') - uni.stopPullDownRefresh(); + uni.stopPullDownRefresh(); + if(this.contentShow == 0){ + this.page=1, // 页码 + this.bookList = [] + this.getfreeBook() + } + else if(this.contentShow == 1){ + this.tjPage=1, // 页码 + this.tjBookLIst = [] + this.getListDate() + } }, onReachBottom() { this.loadingNow = true console.log('到底了') + + if(this.contentShow == 0){ + //console.log(this.page , this.ygtotalPage) + if(this.page < this.ygtotalPage){ + this.page++ + console.log('加载',this.page) + this.status = 0 + this.getfreeBook() + + }else{ + this.status = 1 + console.log('加载完成了',this.page) + return + } + + }else if(this.contentShow == 1){ + if(this.tjPage < this.tjTotalPage){ + this.tjPage++ + console.log('加载',this.tjPage) + this.status = 0 + this.getListDate() + + }else{ + this.status = 1 + console.log('加载完成了',this.tjPage) + return + } + } }, components:{ musicPlay @@ -56,39 +157,142 @@ ...mapState(['userInfo']) }, methods: { + // 未购买图书,评书跳转 + wgGoPingshu(item){ + console.log('未购买评书',item) + if(item.bookId == null || item.bookId.length <= 0){ + //uni.showModal() + uni.showModal({ + title: '提示', + showCancel:false, + content: '当前未关联图书信息,请联系联系管理员', + success: function (res) { + if (res.confirm) { + console.log('好的'); + } + } + }); + }else{ + uni.navigateTo({ + url: '../comments/comments?bookid='+item.bookId[0], + // url:'../bookShop/commodityDetail' + + }); + } + }, + // 跳转到评书 + goPingshu(val){ + console.log('评书',val) + uni.navigateTo({ + url: '../comments/comments?bookid='+val, + // url:'../bookShop/commodityDetail' + + }); + }, + contentButtonClick(e){ + this.contentShow = e.index + }, // 获取已购买书籍 getfreeBook(){ this.$http - .post('book/bookshelf/getUserBookshelf', { - 'userId': this.userInfo.id + .post('book/userebookbuy/buylist', { + // .post('book/buyorderdetail/querybuy', { + 'id': this.userInfo.id, + 'page':this.page, + 'limit':9 }) .then(res => { + if(res.code == 0){ - this.bookList = res.userBookshelf - console.log(res) + this.ygtotalPage = res.page.totalPage + this.bookList = this.bookList.concat(res.page.list) + console.log(res,'已购买') + this.status = 3 } }); }, + + // 获取推荐图书(未购买) getListDate(){ this.loadingNow = false // 获取书架列表 this.$http - .post('book/bookshelf/getUserBookshelf', { - 'userId': this.userInfo.id + .post('book/shopproduct/booklist', { + 'userId': this.userInfo.id, + 'limit':9, + 'page':this.tjPage }) .then(res => { + console.log(res) if(res.code == 0){ - this.bookList = res.userBookshelf - console.log(res) - } + this.tjTotalPage = res.pages.totalPage + var arr = [] + if(res.pages.list.length > 0){ + for (var i=0; i { + // var ids = item.bookId.split(",") + // item.bookId = ids + // console.log(ids) + // console.log(item,666) + // arr.push(item) + // console.log(arr,888) + // }) + // console.log(arr,444) + // }else{ + // arr = [] + // } + console.log(res.pages.list,'res.pages.list') + // var arr = res.pages.list + this.tjBookLIst = this.tjBookLIst.concat(res.pages.list) + // console.log(res) + this.status = 3 + } } }); }, - goToListen(item){ + // 跳转详情页 + goDetail(item) { + console.log(item,'goDetail-----') + uni.navigateTo({ + url: '../bookShop/commodityDetail?id=' + item.productId + }); + }, + goToListen(item){ + if(item.bookId == null || item.bookId.length <= 0){ + //uni.showModal() + uni.showModal({ + title: '提示', + showCancel:false, + content: '当前图书暂不支持试听', + success: function (res) { + if (res.confirm) { + console.log('好的'); + } + } + }); + }else{ + uni.navigateTo({ + url: "./listen?bookid="+item.bookId[0] + }); + } + }, + // 跳转到听书详情 + goToListenFree(item){ uni.navigateTo({ // url: "./musicbg?bookid="+item.bookid+"&fengImg="+item.image // 后台播放版本 - url: "./listen?bookid="+item.bookid+"&fengImg="+item.image // 前台播放版本 + url: "./listen?bookid="+item.bookId+"&fengImg="+item.image // 前台播放版本 // url: "./bgMusix" }); }, @@ -104,6 +308,10 @@ diff --git a/pages/listen/music.js b/pages/listen/music.js deleted file mode 100644 index 7af4a1f..0000000 --- a/pages/listen/music.js +++ /dev/null @@ -1,138 +0,0 @@ -export default [{ - id: 1, //ID - musicName: "美人谷", //歌名 - musicArtist: "阿兰", //歌手 - musicAlbum: "美人谷",//专辑 - musicAlbumID: 1, //专辑ID - musicAlbumURl: "https://p1.music.126.net/byZ9hvAI2r20WBnuB-S_ng==/109951163069341151.jpg?imageView&thumbnail=360y360&quality=75&tostatic=0", //专辑图片路径 - musicPath: "https://music.163.com/song?id=1454732243&userid=306770142", //路径 - musicYear: "2017-10-27", //发布年份 - musicDuration: 281000, //时长 - size: 3436481, //文件大小 - favour: false, - lyric: `[ti:美人谷] -[ar:阿兰] -[al:十念] - -[by:天龙888] -[00:00.00]美人谷 - 阿兰 -[00:05.00] -[00:07.95]词:毛慧 -[00:09.09]曲:阿兰/毛慧 -[00:11.31]编曲:叶月/王晨 -[00:13.57]制作人:毛慧 -[00:15.76]录音:张生磊(记忆时刻录音棚) -[00:17.45] -[00:38.13]越过山河的神秘 -[00:41.03]一幕自然的洗礼 -[00:44.18]看见山川出云泽被着大地 -[00:49.76] -[00:50.59]雨顺菁华自天际 -[00:53.69]花随鱼翔潜水底 -[00:57.44]可有语言能形容的美丽 -[01:02.62] -[01:03.44]如此熟悉的声音 -[01:06.38]莫名安全的气息 -[01:09.45]这是谁安排了我们的相聚 -[01:14.87] -[01:15.84]没有前世的际遇 -[01:18.93]怎会有心灵相犀 -[01:22.48]任日夕月落耳鬓无语 -[01:28.34] -[01:31.72]如果道路很遥远 -[01:35.19]你是否会愿意 -[01:38.44]等春播秋忙 -[01:40.34]夏耕冬藏 -[01:41.83]平凡的神谕 -[01:44.69]如果你看到我的心 -[01:47.84]就能看到自己 -[01:51.06]我会陪你一同醉去 -[01:57.00] -[02:47.58]采撷飘来的飞絮 -[02:50.56]点缀纯净的天宇 -[02:53.73]谁让万物轮转都不会死去 -[02:58.84] -[03:00.04]穿越最远的距离 -[03:03.14]唤醒沉睡的记忆 -[03:06.91]我的爱在这里等你 -[03:11.88] -[03:12.74]如果道路很遥远 -[03:16.20]你是否会愿意 -[03:19.49]等春播秋忙 -[03:21.35]夏耕冬藏 -[03:22.89]平凡的神谕 -[03:25.78]如果你看到我的心 -[03:28.98]就能看到自己 -[03:32.01]我会陪你一同醉去 -[03:37.11] -[03:38.01]如果时间很遥远 -[03:41.46]你是否会愿意 -[03:44.66]等朝花夕拾 -[03:46.57]缤纷舞尽 -[03:48.16]神灵的游戏 -[03:50.96]如果你能找到我心 -[03:54.19]就能找到自己 -[03:57.32]因为我的爱已随你而去 -[04:04.55] -[04:06.88]lrc歌词编辑:天龙 QQ:26092798` -}, { - id: 2, - musicName: "朝暮", - musicArtist: "阿兰", - musicAlbum: "朝暮", - musicAlbumID: 2, - musicAlbumURl: "https://p1.music.126.net/hB5AqPeXTg5Q-5BsyLiCwg==/109951164325877834.jpg?imageView&thumbnail=360y360&quality=75&tostatic=0", - musicPath: "https://music.163.com/song?id=1454732243&userid=306770142", - musicYear: "2019-08-28", - musicDuration: 247000, - size: 3022101, - favour: false, - lyric: `[ti:朝暮] -[ar:阿兰] -[al:朝暮] -[by:] -[offset:0] -[00:00.22]朝暮 - 阿兰 -[00:01.15]词:林乔 -[00:01.75]曲:罗力威 -[00:02.55]编曲:郭峻江 -[00:03.47]制作人:郭峻江 -[00:04.87]人声监制/录音:张生磊 -[00:07.01]吉他录制:金天 -[00:08.23]弦乐录制:国际首席爱乐乐团 -[00:10.57]混音工程师:李嘉佳 -[00:12.15]混音工作室:记忆时刻 -[00:13.96]母带制作:玉霖@麦合星臣 -[00:15.87]出品:阿兰工作室 -[00:40.33]天雨润酥街 我遥遥 又怅羡 -[00:45.02]莫非清风转 你茫茫 化流年 -[00:49.84]落晖别有涟 撑纸伞 -[00:53.07]徐徐踱步犹犹几夜 -[00:59.55]跃上星宿间 我幽幽 洒心愿 -[01:04.26]月华徒倚圆 你返返 在何年 -[01:09.88]若祈愿苍天 聚散一眸间 -[01:18.76]朝朝若相盼 暮暮若相唤 -[01:23.60]何何你再伴 流流萤扑扇 -[01:28.28]长啸复琴弹 歌待欢 -[01:33.33]怎负花尽看 惹泪低惋 -[01:38.24]朝朝若相盼 暮暮若相唤 -[01:42.79]何何你再伴 红红烛窗婉 -[01:47.46]天涯再远端 近思眷 -[01:52.53]岁月终会换 执手彼岸 相挽 -[02:01.92]天雨润酥街 我遥遥 又怅羡 -[02:06.74]莫非清风转 你茫茫 化流年 -[02:11.65]落晖别有涟 撑纸伞 -[02:14.62]徐徐踱步犹犹几夜 -[02:21.26]跃上星宿间 我幽幽 洒心愿 -[02:26.02]月华徒倚圆 你返返 在何年 -[02:31.51]若祈愿苍天 聚散一眸间 -[03:02.02]朝朝若相盼 暮暮若相唤 -[03:06.76]何何你再伴 流流萤扑扇 -[03:11.51]长啸复琴弹 歌待欢 -[03:16.43]怎负花尽看 惹泪低惋 -[03:21.39]朝朝若相盼 暮暮若相唤 -[03:25.87]何何你再伴 红红烛窗婉 -[03:30.67]天涯再远端 近思眷 -[03:35.71]岁月终会换 执手彼岸 相挽 -[03:45.25]岁月终会换 执手彼岸 相挽` -}] \ No newline at end of file diff --git a/pages/listen/setListen.vue b/pages/listen/setListen.vue index fd25fdb..9088ee8 100644 --- a/pages/listen/setListen.vue +++ b/pages/listen/setListen.vue @@ -23,7 +23,7 @@ return { playData:{}, formData:{}, - playerVisible:false + // playerVisible:false // playerVisible:this.userInfo.playVisible } }, @@ -36,7 +36,18 @@ musicPlay }, computed:{ - ...mapState(['userInfo']) + ...mapState(['userInfo']), + // boardRemark(){ + // return this.userInfo.playTitle + // // console.log(this.userInfo, 'this.userInfo') + // }, + playerVisible(){ + if(this.userInfo.playVisible){ + return this.userInfo.playVisible + }else{ + return false + } + } }, methods: { ...mapMutations(['setUserInfo']), diff --git a/pages/peanut/aboutUs.vue b/pages/peanut/aboutUs.vue index 0071eef..fe21d2e 100644 --- a/pages/peanut/aboutUs.vue +++ b/pages/peanut/aboutUs.vue @@ -21,13 +21,16 @@ 一款线上电子书APP,包含医学类、国学类、文学类、中医古籍等各种类型。3D仿真翻页、护眼模式等阅读技术,打造舒适阅读体验。图文混排,AI人声读书听书。部分电子书也有对应的纸质书,给予用户更多的阅读选择。 +
一款线上电子书APP,包含医学类、国学类、文学类、中医古籍等各种类型。3D仿真翻页、护眼模式等阅读技术,打造舒适阅读体验。图文混排,AI人声读书听书。部分电子书也有对应的纸质书,给予用户更多的阅读选择。