├── README.md ├── app.js ├── app.json ├── app.wxss ├── assets ├── css │ └── common.wxss ├── icon │ └── iconfont.wxss ├── images │ ├── 44.png │ ├── name.png │ ├── ncode.jpg │ ├── share.jpg │ └── wx_04.jpg └── nav │ ├── home.png │ ├── home_fill.png │ ├── project.png │ ├── project_fill.png │ ├── user.png │ └── user_fill.png ├── components ├── backtop │ ├── backtop.js │ ├── backtop.json │ ├── backtop.wxml │ └── backtop.wxss ├── bottombar │ ├── bottombar.js │ ├── bottombar.json │ ├── bottombar.wxml │ └── bottombar.wxss ├── copyright │ ├── copyright.js │ ├── copyright.json │ ├── copyright.wxml │ └── copyright.wxss ├── loading │ ├── loading.js │ ├── loading.json │ ├── loading.wxml │ └── loading.wxss ├── modal │ ├── modal.js │ ├── modal.json │ ├── modal.wxml │ └── modal.wxss ├── nomore │ ├── comment.wxml │ ├── nomore.js │ ├── nomore.json │ ├── nomore.wxml │ └── nomore.wxss ├── photo │ ├── photo.js │ ├── photo.json │ ├── photo.wxml │ └── photo.wxss └── share │ ├── share.js │ ├── share.json │ ├── share.wxml │ └── share.wxss ├── pages ├── about │ ├── about.js │ ├── about.json │ ├── about.wxml │ └── about.wxss ├── comm.wxs ├── detail │ ├── detail.js │ ├── detail.json │ ├── detail.wxml │ └── detail.wxss ├── feedback │ ├── feedback.js │ ├── feedback.json │ ├── feedback.wxml │ └── feedback.wxss ├── index │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── lists │ ├── lists.js │ ├── lists.json │ ├── lists.wxml │ └── lists.wxss ├── me │ ├── me.js │ ├── me.json │ ├── me.wxml │ └── me.wxss ├── more │ ├── more.js │ ├── more.json │ ├── more.wxml │ └── more.wxss └── project │ ├── project.js │ ├── project.json │ ├── project.wxml │ └── project.wxss ├── project.config.json ├── sitemap.json ├── utils ├── api.js ├── login.js ├── request.js └── util.js └── wxParse ├── html2json.js ├── htmlparser.js ├── showdown.js ├── wxDiscode.js ├── wxParse.js ├── wxParse.wxml └── wxParse.wxss /README.md: -------------------------------------------------------------------------------- 1 | # KAPO博客 2 | 这是用微信小程序做的一个自己的博客, 喜欢记得star哟! 3 | 4 | 长期维护版本,欢迎大家踊跃提交贡献代码, 5 | 6 | 更多项目请关注 [https://github.com/Rose-GoGo](https://github.com/Rose-GoGo)。 7 | 8 | 期待您的加入~ ,欢迎大家踊跃提交代码, 9 | 10 | 开发问题欢迎一起交流: QQ:583459700 11 | 12 | 注: 若小伙伴需使用代码,请在您的博客中添加我的友情链接 KAPO博客:[https://www.zhmzjl.com/](https://www.zhmzjl.com.com/), 就这一点要求,忘满足! 13 | 14 | 15 | 16 | ## 扫码体验 17 | 18 |

19 | 20 | 21 | ## 项目截图 22 | 23 |

24 | 25 |

26 | 27 | 28 | ## 博客主要分为三大模块: 文章/项目/我 29 | 30 | - 文章:主要记录我在开发中遇到的问题,并且记录下来,作为技术分享 31 | 32 | - 项目: 主要记录我做的一些项目,并且对项目的理解和介绍 33 | 34 | - 我:主要分为4大模块,我的简介、打卡、意见反馈、感谢。最近读一本叫《微习惯》的书籍,然后给自己做了几个打卡的功能,算是自己监督自己。虽然现在很多现在这样的小程序,但是自己做的应该会更有意义。 35 | 36 | 37 | 38 | ## 版本更新细信息 39 | 40 | #### Version 2.0.1 开发中 41 | - 文章详情页添加点赞功能 42 | - 评论添加服务通知功能 43 | - 修改打卡翻年后数据无法依旧显示前一年数据的bug, 44 | - 添加海报保存功能 45 | - 添加绑定微信公众号,添加联系我的功能 46 | - 多词搜索全文内容 47 | - 小程序内添加文章 48 | 49 | 50 | 51 | #### Version 2.0.0 52 | - 修改设计与结构,博客改为首页-分类-我三大板块,原有的项目改到‘我’中 53 | - 文章详情页添加desciption 54 | - 更换背景音乐, 原有的改为 'qianbenyin' 55 | - 打卡删除添加确认删除操作,避免误删 56 | 57 | 58 | #### Version 1.0.8 59 | - 添加背景音乐 60 | - 文章详情页添加到首页的链接 61 | - 打卡进行数据请求,如果本月数据小于5条,请求一次上个月的数据 62 | - 打卡的收缩功能点击的时候,请求下一个月的数据 63 | - 文章列表页的分类向下滚动隐藏 向上滚动就显示出来 64 | 65 | 66 | #### Version 1.0.7 67 | - 打卡中json数据乱序的问题 68 | - 文章详情页添加PC文章地址 69 | - 添加返回顶部 70 | - 截图保存分享 71 | - 数据加载失败后,弹框后点击重新拉取数据 72 | - 打卡添加为富文本编辑器? 73 | - 摇一摇访问我的小程序或者添加我为好友? 74 | - 授权问题,授权后验证是否是Rose本人,如果是,才能在前台对数据进行增删改查操作 75 | 76 | 77 | #### Version 1.0.6 78 | - 打卡页点击编辑内容,网页返回到顶部编辑部分 79 | - 禁止评论输入为空格的bug 80 | - 修改留言页的设计 81 | - 文章详情页添加推荐阅读功能 82 | - 打赏功能自定义模态框且添加分享功能 83 | - 文章详情页代码不能换行问题 84 | 85 | 86 | #### Version 1.0.5 87 | - 文章列表与首页添加阅读量与作者 88 | - 文章详情页授权通过后才能评论的bug 89 | - 未授权无法打卡 90 | - 简历下载? 91 | - 打赏功能(支付对个人似乎有问题,计划保留中) 92 | 93 | 94 | #### Version 1.0.4 95 | - 添加公告模块信息; 96 | - 文章添加评论功能; 97 | - 更新Rose Zhao的个人信息; 98 | - 打卡修复月初数据加载异常bug; 99 | - 代码优化,去除项目详情页的代码,并归入文章详情页; 100 | 101 | #### Version 1.0.3 102 | - 首页文章列表图片的高宽解除限制; 103 | - 修改文章列表的选项卡的表现形式; 104 | - 添加数据加载的loading效果; 105 | - 调整打卡顺序; 106 | 107 | #### Version 1.0.2 108 | - 打卡功能添加图片 109 | - 首页添加下拉刷新功能 110 | 111 | 112 | ## 博客PC地址 113 | 欢迎大家关注我的博客,PC地址: [https://www.zhmzjl.com/](https://www.zhmzjl.com.com/) 114 | 此小程序仅供学习,不得以任何形式商用。 115 | 116 | ## 联系我? 117 | 有任何建议和意见都可以提哟,欢迎指正! 118 | 119 | 120 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | //app.js 2 | var common = require('utils/login.js'); 3 | App({ 4 | onLoad: function (options) { 5 | }, 6 | onShow: function (option) {}, 7 | onPageNotFound: function (res) { }, 8 | onLaunch: function () { 9 | let that = this; 10 | that.AppMusic = wx.createInnerAudioContext(); 11 | that.AppMusic.autoplay = true; 12 | that.AppMusic.src = 'https://zhmzjl.com/statics/images/blog/qianbenyin.mp3'; 13 | that.AppMusic.loop = true; 14 | that.AppMusic.volume = 0.05; 15 | that.AppMusic.onPlay(() => { 16 | }) 17 | that.AppMusic.onError((res) => { 18 | }); 19 | that.autoUpdate(); 20 | }, 21 | autoUpdate() { 22 | var self = this 23 | // 获取小程序更新机制兼容 24 | if (wx.canIUse('getUpdateManager')) { 25 | const updateManager = wx.getUpdateManager() 26 | //1. 检查小程序是否有新版本发布 27 | updateManager.onCheckForUpdate(function (res) { 28 | // 请求完新版本信息的回调 29 | if (res.hasUpdate) { 30 | //2. 小程序有新版本,则静默下载新版本,做好更新准备 31 | updateManager.onUpdateReady(function () { 32 | wx.showModal({ 33 | title: '更新提示', 34 | content: '新版本已经准备好,是否重启?', 35 | success: function (res) { 36 | if (res.confirm) { 37 | //3. 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 38 | updateManager.applyUpdate() 39 | } else if (res.cancel) { 40 | //如果需要强制更新,则给出二次弹窗,如果不需要,则这里的代码都可以删掉了 41 | wx.showModal({ 42 | title: '温馨提示~', 43 | content: '本次版本更新涉及到新的功能添加,旧版本无法正常访问的哦~', 44 | success: function (res) { 45 | self.autoUpdate() 46 | return; 47 | //第二次提示后,强制更新 48 | if (res.confirm) { 49 | // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 50 | updateManager.applyUpdate() 51 | } else if (res.cancel) { 52 | //重新回到版本更新提示 53 | self.autoUpdate() 54 | } 55 | } 56 | }) 57 | } 58 | } 59 | }) 60 | }) 61 | updateManager.onUpdateFailed(function () { 62 | // 新的版本下载失败 63 | wx.showModal({ 64 | title: '已经有新版本了哟~', 65 | content: `新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~`, 66 | }) 67 | }) 68 | } 69 | }) 70 | } else { 71 | // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示 72 | wx.showModal({ 73 | title: '提示', 74 | content: `当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。` 75 | }) 76 | } 77 | }, 78 | globalData: { 79 | kinds: [{ 80 | icon: 'icon-quanju', 81 | name: '前端', 82 | catid: '11' 83 | }, { 84 | icon: 'icon-anquan', 85 | name: '安全', 86 | catid: '12' 87 | }, 88 | { 89 | icon: 'icon-xiazai47', 90 | name: '生活', 91 | catid: '13' 92 | }], 93 | userInfo: {} 94 | } 95 | }) 96 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/index/index", 4 | "pages/detail/detail", 5 | "pages/about/about", 6 | "pages/project/project", 7 | "pages/more/more", 8 | "pages/feedback/feedback", 9 | "pages/lists/lists", 10 | "pages/me/me" 11 | ], 12 | "window": { 13 | "backgroundTextStyle": "light", 14 | "navigationBarBackgroundColor": "#1d8f59", 15 | "navigationBarTitleText": "KAPO博客-记录学习和生活", 16 | "navigationBarTextStyle": "white", 17 | "enablePullDownRefresh": true, 18 | "onReachBottomDistance": 50 19 | }, 20 | "tabBar": { 21 | "color": "#fff", 22 | "position": "bottom", 23 | "backgroundColor": "#4bb777", 24 | "selectedColor": "#fff", 25 | "borderStyle": "black", 26 | "list": [ 27 | { 28 | "pagePath": "pages/index/index", 29 | "iconPath": "assets/nav/home.png", 30 | "selectedIconPath": "assets/nav/home_fill.png", 31 | "text": "首页" 32 | }, 33 | { 34 | "pagePath": "pages/lists/lists", 35 | "iconPath": "assets/nav/project.png", 36 | "selectedIconPath": "assets/nav/project_fill.png", 37 | "text": "分类" 38 | }, 39 | { 40 | "pagePath": "pages/about/about", 41 | "iconPath": "assets/nav/user.png", 42 | "selectedIconPath": "assets/nav/user_fill.png", 43 | "text": "我" 44 | } 45 | ] 46 | }, 47 | "networkTimeout": { 48 | "request": 10000, 49 | "downloadFile": 10000 50 | }, 51 | "debug": false, 52 | "sitemapLocation": "sitemap.json" 53 | } 54 | -------------------------------------------------------------------------------- /app.wxss: -------------------------------------------------------------------------------- 1 | /**app.wxss**/ 2 | @import "/assets/icon/iconfont"; 3 | @import "/assets/css/common"; 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/css/common.wxss: -------------------------------------------------------------------------------- 1 | page { 2 | width: 100%; 3 | overflow-x: hidden; 4 | background: #e5e9f0 5 | } 6 | button::after { 7 | border: none; 8 | } 9 | .Rose-left{ 10 | float: left; 11 | } 12 | .Rose-right{ 13 | float: right 14 | } 15 | .Rose-flex { 16 | display: flex; 17 | } 18 | .Rose-flex1 { 19 | flex: 1; 20 | } 21 | .Rose-color5 { 22 | background-color: #16c2c2; 23 | } 24 | .Rose-color4 { 25 | background-color: #8a90fa; 26 | } 27 | .Rose-color3 { 28 | background-color: #4dc6ee; 29 | } 30 | .Rose-color2 { 31 | background-color: #fed030; 32 | } 33 | .Rose-color1 { 34 | background-color: #fd9d21; 35 | } 36 | /*none*/ 37 | .allLoaded { 38 | position: relative; 39 | text-align: center; 40 | font-size: 28rpx; 41 | color: #ccc; 42 | padding: 40rpx; 43 | } 44 | .allLoaded:before { 45 | position: absolute; 46 | left: 5%; 47 | top: 60rpx; 48 | width: 90%; 49 | z-index: 1; 50 | height: 2rpx; 51 | content: ''; 52 | background: #ddd; 53 | } 54 | .line-word { 55 | position: relative; 56 | padding: 0 20rpx; 57 | z-index: 2; 58 | background: #e5e9f0; 59 | } 60 | .Rose-center { 61 | text-align: center 62 | } 63 | .Rose-white { 64 | background: #fff 65 | } 66 | .green-color { 67 | font-size: 14px; 68 | color: #1d8f59 69 | } 70 | .wxParse-wxxxcode-style{ 71 | white-space: pre; 72 | } 73 | /*copyright*/ 74 | .Rose-copyRight{ 75 | padding: 40rpx; 76 | text-align: center; 77 | font-size: 20rpx; 78 | color: #ccc; 79 | line-height: 1.4 80 | } 81 | .kapo-name{ 82 | font-size: 24rpx; 83 | color: #a8a8a8 84 | } 85 | -------------------------------------------------------------------------------- /assets/icon/iconfont.wxss: -------------------------------------------------------------------------------- 1 | @font-face {font-family: "iconfont"; 2 | src: url('iconfont.eot?t=1551957502685'); /* IE9 */ 3 | src: url('iconfont.eot?t=1551957502685#iefix') format('embedded-opentype'), /* IE6-IE8 */ 4 | url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAACNUAAsAAAAAQ1gAACMDAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCMHArqANQ0ATYCJAOBcAt6AAQgBYRtB4UKG0g3FeOYI7BxAEO8PTqiWpTJ/v+YQMcYXB2AZmVYpE98uWi/XbVh4Y/f1jXn8cjDtEaCBAkGo3cExTLlXsaSOSFROdpXnvdL8RuqWKhCxLpDKXn4b7/f77kXE3moJDySAqtTGuRAtMq3M/MXYDCbOeBNauLb2m1qtRE4++uvKZpLsfrPfWx/MAiQjSUn3az3B35u/+fGtnt310QNNwYG6WC0sWDK6BEbtAPdABGlhz0sBvqfaCNPwahhYP8v+JyVDytAUP8Dny/0VbAaMA+AMEcUr1umZ74gdrKWljTj2buTBg4aTGGblwAaDAGbF7k/0lf6tqQBQ2g4YUPAEKAFbqi6Jz7eZ/9Tl9I+OfAIWHrbfLtOo1Zc+q8p4rFwgMKZuRLwapUS/cIQqrt3IF9mzsFCU7uYxfACCODh4XLc2JT4EzymrvVrc7iWWeYTQ0t5iXr/v07f1f7MY/x7Qtuns+PZu43vSk70np6dWgraDslBGXosOyB9AprSDcmK0x7JLkifuYhjJ4Rh7jB36thh7DYy1LT/dZZHPHgpBeqvmniMqeVAk3ZrFrVKE0QUFJzjx3xOgg5De7r5kZwFhuM0Epw8YWkxGKrPcepJ2PYZD5tAr6EJq5a9C+CFvD79QFgigIpXg3Px0TRjDnz6Bj7uZCkp6GFOq5ti/wg1NKAJ9QNzVl1t9t68wYpftg6VK9S8UeBoHvANmtFFKAmSxaekpWcWlRgra+qXr77uFzff9mj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T+fL9XZ/PF/vz/eHP39lSlk+nNBR6uV/xFJ0QPi4kOoWXTiDBJ/3x6WSOFrl0DB3KiClRjTy3+lwv/qElFg5ig6OsyeYQAsDJiPdiyR8GJFk5oyKy+hOMK7F48rSklpkgICec1ai6Dh6RUjNmWUFI5ZwdvjwbOIp5gyk1tCkVUwEUiHVJ8wG8JeF8Ch/fj04PGfHRo14e8xacasXwS6sVLXqcnZfv+lG0QDdqvGe2Irc9qtA1YdLM+c8di4CKkehgoppBc9o0gSzT/R4loJUI0W+9Dj5AvVQZPaPTvcwzy7BIXMPh4IdKKHr0VSRS4Dp0oVQO+9ZaClXw0PvsBwzuGkxCSiNIN9VQTZf/EU81vPUMtyM8EkcnRvIbRCcafXBVGQgbQAAAAA=') format('woff2'), 5 | url('iconfont.woff?t=1551957502685') format('woff'), 6 | url('iconfont.ttf?t=1551957502685') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ 7 | url('iconfont.svg?t=1551957502685#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .iconfont { 11 | font-family: "iconfont" !important; 12 | font-size: 16px; 13 | font-style: normal; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | .icon-yonghu:before { 19 | content: "\e633"; 20 | } 21 | 22 | .icon-xiangmu_fill:before { 23 | content: "\e64f"; 24 | } 25 | 26 | .icon-xiangmu:before { 27 | content: "\e67d"; 28 | } 29 | 30 | .icon-tianjiayonghutianchong:before { 31 | content: "\e697"; 32 | } 33 | 34 | .icon-guanyu:before { 35 | content: "\e685"; 36 | } 37 | 38 | .icon-book:before { 39 | content: "\e66d"; 40 | } 41 | 42 | .icon-dingbu:before { 43 | content: "\e76c"; 44 | } 45 | 46 | .icon-yonghu2:before { 47 | content: "\e788"; 48 | } 49 | 50 | .icon-duanxin:before { 51 | content: "\e647"; 52 | } 53 | 54 | .icon-xiangqu:before { 55 | content: "\e64d"; 56 | } 57 | 58 | .icon-daohang:before { 59 | content: "\e651"; 60 | } 61 | 62 | .icon-dianping:before { 63 | content: "\e653"; 64 | } 65 | 66 | .icon-kanguo:before { 67 | content: "\e65e"; 68 | } 69 | 70 | .icon-qian:before { 71 | content: "\e662"; 72 | } 73 | 74 | .icon-shijian2:before { 75 | content: "\e665"; 76 | } 77 | 78 | .icon-xiangji:before { 79 | content: "\e672"; 80 | } 81 | 82 | .icon-youji:before { 83 | content: "\e675"; 84 | } 85 | 86 | .icon-tupian:before { 87 | content: "\e67f"; 88 | } 89 | 90 | .icon-shanchu:before { 91 | content: "\e68e"; 92 | } 93 | 94 | .icon-pinglun:before { 95 | content: "\e6ad"; 96 | } 97 | 98 | .icon-shouye:before { 99 | content: "\e6cb"; 100 | } 101 | 102 | .icon-xiazai47:before { 103 | content: "\e61c"; 104 | } 105 | 106 | .icon-jianshen:before { 107 | content: "\e62c"; 108 | } 109 | 110 | .icon-yingyu:before { 111 | content: "\e600"; 112 | } 113 | 114 | .icon-fenxiang:before { 115 | content: "\e86e"; 116 | } 117 | 118 | .icon-xihuan-fill:before { 119 | content: "\e870"; 120 | } 121 | 122 | .icon-xihuan:before { 123 | content: "\e871"; 124 | } 125 | 126 | .icon-paizhao:before { 127 | content: "\e874"; 128 | } 129 | 130 | .icon-pinglun1:before { 131 | content: "\e891"; 132 | } 133 | 134 | .icon-qian1:before { 135 | content: "\e896"; 136 | } 137 | 138 | .icon-tuikuan:before { 139 | content: "\e8ab"; 140 | } 141 | 142 | .icon-jiazai:before { 143 | content: "\e622"; 144 | } 145 | 146 | .icon-CD:before { 147 | content: "\eb9b"; 148 | } 149 | 150 | .icon-banben1:before { 151 | content: "\e68c"; 152 | } 153 | 154 | .icon-quanju:before { 155 | content: "\e607"; 156 | } 157 | 158 | .icon-yinyue:before { 159 | content: "\e9d5"; 160 | } 161 | 162 | .icon-md-shijian:before { 163 | content: "\e602"; 164 | } 165 | 166 | .icon-kafei:before { 167 | content: "\e664"; 168 | } 169 | 170 | .icon-anquan:before { 171 | content: "\e615"; 172 | } 173 | 174 | .icon-fangzi:before { 175 | content: "\e8ff"; 176 | } 177 | 178 | .icon-xiangyou:before { 179 | content: "\e912"; 180 | } 181 | 182 | .icon-zulin:before { 183 | content: "\e900"; 184 | } 185 | 186 | .icon-info-circle:before { 187 | content: "\e77e"; 188 | } 189 | 190 | .icon-plus-circle:before { 191 | content: "\e781"; 192 | } 193 | 194 | .icon-message:before { 195 | content: "\e78a"; 196 | } 197 | 198 | .icon-home:before { 199 | content: "\e7c6"; 200 | } 201 | 202 | .icon-like:before { 203 | content: "\e7c8"; 204 | } 205 | 206 | .icon-unlike:before { 207 | content: "\e7c9"; 208 | } 209 | 210 | .icon-folder-add:before { 211 | content: "\e7d1"; 212 | } 213 | 214 | .icon-accountbook:before { 215 | content: "\e7d3"; 216 | } 217 | 218 | .icon-mail:before { 219 | content: "\e7de"; 220 | } 221 | 222 | .icon-heart:before { 223 | content: "\e7df"; 224 | } 225 | 226 | .icon-gengduo2:before { 227 | content: "\e67e"; 228 | } 229 | 230 | .icon-heart-fill:before { 231 | content: "\e849"; 232 | } 233 | 234 | .icon-like-fill:before { 235 | content: "\e869"; 236 | } 237 | 238 | .icon-unlike-fill:before { 239 | content: "\e86a"; 240 | } 241 | 242 | .icon-xuanzhong:before { 243 | content: "\e694"; 244 | } 245 | 246 | .icon-xiangxia:before { 247 | content: "\eb9c"; 248 | } 249 | 250 | .icon-xiangshang:before { 251 | content: "\eb9d"; 252 | } 253 | 254 | -------------------------------------------------------------------------------- /assets/images/44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rose-GoGo/KAPO/2e47b575aab8cb4dddc7d2d7882768f598094e33/assets/images/44.png -------------------------------------------------------------------------------- /assets/images/name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rose-GoGo/KAPO/2e47b575aab8cb4dddc7d2d7882768f598094e33/assets/images/name.png -------------------------------------------------------------------------------- /assets/images/ncode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rose-GoGo/KAPO/2e47b575aab8cb4dddc7d2d7882768f598094e33/assets/images/ncode.jpg -------------------------------------------------------------------------------- /assets/images/share.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rose-GoGo/KAPO/2e47b575aab8cb4dddc7d2d7882768f598094e33/assets/images/share.jpg -------------------------------------------------------------------------------- /assets/images/wx_04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rose-GoGo/KAPO/2e47b575aab8cb4dddc7d2d7882768f598094e33/assets/images/wx_04.jpg -------------------------------------------------------------------------------- /assets/nav/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rose-GoGo/KAPO/2e47b575aab8cb4dddc7d2d7882768f598094e33/assets/nav/home.png -------------------------------------------------------------------------------- /assets/nav/home_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rose-GoGo/KAPO/2e47b575aab8cb4dddc7d2d7882768f598094e33/assets/nav/home_fill.png -------------------------------------------------------------------------------- /assets/nav/project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rose-GoGo/KAPO/2e47b575aab8cb4dddc7d2d7882768f598094e33/assets/nav/project.png -------------------------------------------------------------------------------- /assets/nav/project_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rose-GoGo/KAPO/2e47b575aab8cb4dddc7d2d7882768f598094e33/assets/nav/project_fill.png -------------------------------------------------------------------------------- /assets/nav/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rose-GoGo/KAPO/2e47b575aab8cb4dddc7d2d7882768f598094e33/assets/nav/user.png -------------------------------------------------------------------------------- /assets/nav/user_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rose-GoGo/KAPO/2e47b575aab8cb4dddc7d2d7882768f598094e33/assets/nav/user_fill.png -------------------------------------------------------------------------------- /components/backtop/backtop.js: -------------------------------------------------------------------------------- 1 | // components/backtop/backtop.js 2 | Component({ 3 | /** 4 | * 组件的属性列表 5 | */ 6 | properties: { 7 | backShow: { 8 | type: Boolean, 9 | value: false 10 | }, 11 | }, 12 | /** 13 | * 组件的初始数据 14 | */ 15 | data: { 16 | }, 17 | /** 18 | * 组件的方法列表 19 | */ 20 | methods: { 21 | backTop(){ 22 | if (wx.pageScrollTo) { 23 | wx.pageScrollTo({ 24 | scrollTop: 0, 25 | duration: 300 26 | }) 27 | } else { 28 | wx.showModal({ 29 | title: '提示', 30 | content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。' 31 | }) 32 | } 33 | } 34 | } 35 | }) 36 | -------------------------------------------------------------------------------- /components/backtop/backtop.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /components/backtop/backtop.wxml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /components/backtop/backtop.wxss: -------------------------------------------------------------------------------- 1 | /* components/backtop/backtop.wxss */ 2 | @import "/assets/icon/iconfont"; 3 | 4 | .Rose-backtop { 5 | position: fixed; 6 | width: 60rpx; 7 | height: 60rpx; 8 | right: 20rpx; 9 | bottom: 120rpx; 10 | border: 2rpx solid #1d8f59; 11 | z-index: 2; 12 | border-radius: 4rpx; 13 | background: #fff; 14 | color: #1d8f59; 15 | text-align: center; 16 | line-height: 60rpx; 17 | } 18 | 19 | .icon-dingbu { 20 | font-size: 36rpx; 21 | } 22 | 23 | .fadeInUp { 24 | animation: fadeInUp 0.5s linear; 25 | } 26 | 27 | .fadeOutDown { 28 | animation: fadeOutDown 0.12s linear; 29 | } 30 | 31 | @-webkit-keyframes fadeInUp { 32 | from { 33 | opacity: 0; 34 | -webkit-transform: translate3d(0, 100%, 0); 35 | transform: translate3d(0, 100%, 0); 36 | } 37 | 38 | to { 39 | opacity: 1; 40 | -webkit-transform: none; 41 | transform: none; 42 | } 43 | } 44 | 45 | @keyframes fadeInUp { 46 | from { 47 | opacity: 0; 48 | -webkit-transform: translate3d(0, 100%, 0); 49 | transform: translate3d(0, 100%, 0); 50 | } 51 | 52 | to { 53 | opacity: 1; 54 | -webkit-transform: none; 55 | transform: none; 56 | } 57 | } 58 | 59 | @-webkit-keyframes fadeOutDown { 60 | from { 61 | opacity: 1; 62 | } 63 | 64 | to { 65 | opacity: 0; 66 | -webkit-transform: translate3d(0, 100%, 0); 67 | transform: translate3d(0, 100%, 0); 68 | } 69 | } 70 | 71 | @keyframes fadeOutDown { 72 | from { 73 | opacity: 1; 74 | } 75 | 76 | to { 77 | opacity: 0; 78 | -webkit-transform: translate3d(0, 100%, 0); 79 | transform: translate3d(0, 100%, 0); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /components/bottombar/bottombar.js: -------------------------------------------------------------------------------- 1 | // components/bottombar/bottombar.js 2 | import Api from '/../../utils/api.js'; 3 | Component({ 4 | /** 5 | * 组件的属性列表 6 | */ 7 | properties: { 8 | commentShow: { 9 | type: Boolean, 10 | value: false 11 | }, 12 | newsid: { 13 | type: String, 14 | value: '' 15 | }, 16 | items: { 17 | type: Object, 18 | value: {} 19 | }, 20 | pid: { 21 | type: String, 22 | value: '' 23 | }, 24 | placeholder: { 25 | type: String, 26 | value: '' 27 | }, 28 | reply_username: { 29 | type: String, 30 | value: '' 31 | }, 32 | }, 33 | /** 34 | * 组件的初始数据 35 | */ 36 | data: { 37 | bottom: 0, 38 | canIUse: wx.canIUse('button.open-type.getUserInfo'), 39 | userInfo: {}, 40 | disabled: true, 41 | content: '', 42 | show: false, //分享 43 | }, 44 | /** 45 | * 组件的方法列表 46 | */ 47 | methods: { 48 | bindGetUserInfo(e) { 49 | var that = this; 50 | var userInfo = {}; 51 | if (e.detail.userInfo) { 52 | userInfo = e.detail.userInfo; 53 | } else { 54 | wx.getUserInfo({ 55 | success: function (res) { 56 | userInfo = res.userInfo; 57 | }, 58 | fail: function (res) { 59 | wx.showModal({ 60 | showCancel: false, 61 | confirmColor: '#1d8f59', 62 | content: '授权通过后才能评论哟,请重新授权!' 63 | }) 64 | } 65 | }) 66 | } 67 | if (JSON.stringify(userInfo) == '{}') return false; 68 | that.setData({ 69 | userInfo: userInfo 70 | }) 71 | that.postComments(); 72 | }, 73 | closeBox() { 74 | this.setData({ 75 | commentShow: false, 76 | }) 77 | }, 78 | forContent(e) { 79 | let that = this; 80 | let _content = e.detail.value; 81 | // 禁止输入空格 82 | var regu = "^[ ]+$"; 83 | var re = new RegExp(regu); 84 | var emptyy = re.test(_content); 85 | if (emptyy) return false; 86 | //end 87 | that.setData({ 88 | content: _content 89 | }) 90 | if (that.data.content) { 91 | that.setData({ 92 | disabled: false 93 | }) 94 | } else { 95 | that.setData({ 96 | disabled: true 97 | }) 98 | } 99 | }, 100 | postComments() { 101 | var that = this; 102 | var _content = this.data.content; 103 | if (!_content) { 104 | wx.showModal({ 105 | showCancel: false, 106 | confirmColor: '#1d8f59', 107 | content: '评论不能为空!' 108 | }); 109 | return false; 110 | } 111 | var postinfo = that.data.userInfo; 112 | if (JSON.stringify(postinfo) == "{}") return false; 113 | wx.showLoading(); 114 | let _params = { 115 | newsid: that.data.newsid, // 博客文章ID 116 | pid: that.data.pid, // 父评论ID,默认为0 117 | from_username: postinfo.nickName, // 评论者用户名 118 | from_avatar: postinfo.avatarUrl, // 评论者头像 119 | reply_username: that.data.reply_username, // 回复了谁,pid不为0时,不允许未空 120 | reply_avatar: "", // 回复了谁的头像,允许为空 121 | content: _content 122 | } 123 | Api.postcomments(_params).then(res => { 124 | if (!res.data.code) { 125 | wx.hideLoading(); 126 | wx.showToast({ 127 | title: '评论成功', 128 | icon: 'success', 129 | duration: 2000 130 | }) 131 | that.setData({ 132 | commentShow: false, 133 | content: '', 134 | reply_username: '', 135 | pid: 0, 136 | disabled: true 137 | }); 138 | that.cancelBut(); 139 | that.triggerEvent('commentlists') 140 | } 141 | }); 142 | }, 143 | cancelBut(e) { 144 | var that = this; 145 | var myEventDetail = { page: 1 } // detail对象,提供给事件监听函数 146 | this.triggerEvent('pullComment', myEventDetail) // 147 | }, 148 | rewardRose() { 149 | var that = this; 150 | that.setData({ 151 | show: true 152 | }) 153 | }, 154 | goHome() { 155 | wx.switchTab({ 156 | url: '../index/index' 157 | }); 158 | }, 159 | makePhoto() { //父組件調用子組件的方法 160 | var that = this; 161 | that.triggerEvent('makePhoto') 162 | }, 163 | rewardRose() { 164 | var that = this; 165 | that.setData({ 166 | show: true 167 | }) 168 | }, 169 | } 170 | }) 171 | -------------------------------------------------------------------------------- /components/bottombar/bottombar.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "share": "../share/share", 5 | "photo": "../photo/photo" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /components/bottombar/bottombar.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 12 | 海报 13 | 14 | 15 | 16 | 赞赏 17 | 18 | 19 | 20 | 首页 21 | 22 | 23 | 24 | 25 | 26 | 您的转发与关注是对我最大的奖赏! 27 | 28 | -------------------------------------------------------------------------------- /components/bottombar/bottombar.wxss: -------------------------------------------------------------------------------- 1 | /* components/bottombar/bottombar.wxss */ 2 | @import "/assets/icon/iconfont"; 3 | .Rose-left { 4 | float: left 5 | } 6 | .Rose-right { 7 | float: right 8 | } 9 | .Rose-center { 10 | text-align: center 11 | } 12 | .Rose-comments { 13 | position: fixed; 14 | left: 0; 15 | bottom: 115rpx; 16 | width: 100%; 17 | z-index: 4; 18 | background: #fefefe; 19 | border-top: 2rpx solid #d9d9d9; 20 | transition: all 0.25s ease; 21 | } 22 | .Rose-post { 23 | width: auto; 24 | height: 200rpx; 25 | margin: 20rpx 40rpx 0; 26 | padding: 10rpx; 27 | background: #eee; 28 | color: #333; 29 | font-size: 28rpx; 30 | border-radius: 8rpx; 31 | } 32 | .Rose-btn { 33 | background: #4bb777; 34 | margin: 20rpx 40rpx; 35 | color: #fff; 36 | font-size: 26rpx; 37 | border-radius: 8rpx; 38 | padding: 0 20rpx; 39 | text-align: center; 40 | box-shadow: none; 41 | } 42 | .Rose-btn.disabled { 43 | opacity: 0.5; 44 | color: #eee 45 | } 46 | .Rose-close { 47 | background: #DEDEDE 48 | } 49 | .Rose-tool { 50 | color: #999; 51 | font-size: 18rpx; 52 | padding: 10rpx 0; 53 | line-height: 40rpx; 54 | border-bottom: 1rpx solid #f2f2f2 55 | } 56 | .Rose-flex { 57 | display: flex; 58 | } 59 | .Rose-flex1 { 60 | flex: 1 61 | } 62 | .Rose-tool .iconfont { 63 | display: block; 64 | color: #333; 65 | font-size: 48rpx; 66 | color: #4bb777; 67 | font-weight: 500 68 | } 69 | .Rose-content { 70 | padding: 60rpx 0; 71 | } 72 | .Rose-share { 73 | font-size: 18rpx; 74 | color: #999; 75 | line-height: 40rpx; 76 | background: transparent; 77 | } 78 | .animated { 79 | animation-duration: 0.5s; 80 | animation-fill-mode: both 81 | } 82 | .animated.infinite { 83 | animation-iteration-count: infinite 84 | } 85 | @keyframes slideInUp { 86 | from { 87 | -webkit-transform: translate3d(0, 100%, 0); 88 | transform: translate3d(0, 100%, 0); 89 | visibility: visible 90 | } 91 | to { 92 | -webkit-transform: translate3d(0, 0, 0); 93 | transform: translate3d(0, 0, 0) 94 | } 95 | } 96 | .slideInUp { 97 | -webkit-animation-name: slideInUp; 98 | animation-name: slideInUp 99 | } 100 | @keyframes slideOutDown { 101 | from { 102 | -webkit-transform: translate3d(0, 0, 0); 103 | transform: translate3d(0, 0, 0) 104 | } 105 | to { 106 | visibility: hidden; 107 | -webkit-transform: translate3d(0, 100%, 0); 108 | transform: translate3d(0, 100%, 0) 109 | } 110 | } 111 | .slideOutDown { 112 | -webkit-animation-name: slideOutDown; 113 | animation-name: slideOutDown 114 | } 115 | -------------------------------------------------------------------------------- /components/copyright/copyright.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | /** 3 | * 组件的属性列表 4 | */ 5 | properties: { 6 | }, 7 | /** 8 | * 组件的初始数据 9 | */ 10 | data: { 11 | yearss: '' 12 | }, 13 | ready: function(){ 14 | this.getYear(); 15 | }, 16 | /** 17 | * 组件的方法列表 18 | */ 19 | methods: { 20 | getYear() { 21 | var date = new Date(); 22 | var _year = date.getFullYear(); 23 | this.setData({ 24 | yearss: _year 25 | }) 26 | } 27 | } 28 | }) 29 | -------------------------------------------------------------------------------- /components/copyright/copyright.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | 5 | } 6 | } -------------------------------------------------------------------------------- /components/copyright/copyright.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | KAPO博客 13 | Copyright © 2014-{{yearss}} KAPO. All Rights Reserved. 14 | 15 | 16 | -------------------------------------------------------------------------------- /components/copyright/copyright.wxss: -------------------------------------------------------------------------------- 1 | .Rose-copyRight{ 2 | padding: 40rpx; 3 | text-align: center; 4 | font-size: 20rpx; 5 | color: #ccc; 6 | line-height: 1.4 7 | } 8 | .kapo-name{ 9 | font-size: 24rpx; 10 | color: #a8a8a8 11 | } 12 | -------------------------------------------------------------------------------- /components/loading/loading.js: -------------------------------------------------------------------------------- 1 | // pages/loading/loading.js 2 | Component({ 3 | /** 4 | * 组件的属性列表 5 | */ 6 | properties: { 7 | loadMore: { 8 | type: Boolean, 9 | value: false 10 | } 11 | }, 12 | /** 13 | * 组件的初始数据 14 | */ 15 | data: { 16 | }, 17 | /** 18 | * 组件的方法列表 19 | */ 20 | methods: { 21 | } 22 | }) 23 | -------------------------------------------------------------------------------- /components/loading/loading.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /components/loading/loading.wxml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /components/loading/loading.wxss: -------------------------------------------------------------------------------- 1 | /* pages/loading/loading.wxss */ 2 | @import "/assets/icon/iconfont"; 3 | 4 | .Rose-loading { 5 | height: 64rpx; 6 | text-align: center; 7 | font-size: 12px; 8 | color: #999; 9 | } 10 | 11 | .icon-jiazai { 12 | height: 72rpx; 13 | font-size: 28rpx; 14 | animation: rotate 1s linear infinite; 15 | } 16 | 17 | @keyframes rotate { 18 | 0% { 19 | -webkit-transform: rotate(0deg); 20 | transform: rotate(0deg); 21 | transform-origin: 50% 50%; 22 | } 23 | 24 | 100% { 25 | -webkit-transform: rotate(360deg); 26 | transform: rotate(360deg); 27 | transform-origin: 50% 50%; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /components/modal/modal.js: -------------------------------------------------------------------------------- 1 | // components/share/share.js 2 | Component({ 3 | 4 | /** 5 | * 组件的属性列表 6 | */ 7 | properties: { 8 | //是否显示modal 9 | show: { 10 | type: Boolean, 11 | value: false 12 | } 13 | }, 14 | 15 | /** 16 | * 组件的初始数据 17 | */ 18 | data: { 19 | 20 | }, 21 | 22 | /** 23 | * 组件的方法列表 24 | */ 25 | methods: { 26 | clickMask() { 27 | // this.setData({show: false}) 28 | }, 29 | 30 | cancel() { 31 | this.setData({ 32 | show: false 33 | }) 34 | this.triggerEvent('cancel') 35 | }, 36 | 37 | confirm() { 38 | this.setData({ 39 | show: false 40 | }) 41 | this.triggerEvent('confirm') 42 | } 43 | } 44 | }) 45 | -------------------------------------------------------------------------------- /components/modal/modal.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /components/modal/modal.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /components/modal/modal.wxss: -------------------------------------------------------------------------------- 1 | /* components/share/share.wxss */ 2 | 3 | .Rose-mask { 4 | position: fixed; 5 | left: 0; 6 | right: 0; 7 | top: 0; 8 | bottom: 0; 9 | margin-top: -104rpx; 10 | display: flex; 11 | justify-content: center; 12 | align-items: center; 13 | background-color: rgba(0, 0, 0, 0.4); 14 | z-index: 9; 15 | } 16 | 17 | .Rose-content { 18 | display: flex; 19 | flex-direction: column; 20 | width: 618rpx; 21 | background-color: #fff; 22 | border-radius: 8rpx; 23 | color: #999; 24 | text-align: center; 25 | font-size: 30rpx; 26 | } 27 | 28 | .Rose-main { 29 | flex: 1; 30 | height: 100%; 31 | overflow-y: hidden; 32 | } 33 | 34 | .Rose-btns { 35 | display: flex; 36 | flex-direction: row; 37 | height: 98rpx; 38 | line-height: 98rpx; 39 | border-top: 2rpx solid #e6e5e7; 40 | overflow: hidden; 41 | } 42 | 43 | .Rose-cancel, .Rose-confirm { 44 | position: relative; 45 | flex: 1; 46 | height: 100rpx; 47 | line-height: 100rpx; 48 | text-align: center; 49 | font-size: 36rpx; 50 | color: #999; 51 | z-index: 1; 52 | } 53 | 54 | button.Rose-confirm { 55 | color: #1d8f59; 56 | } 57 | 58 | button:after { 59 | border: none; 60 | } 61 | 62 | button { 63 | border-radius: 0; 64 | padding: 0; 65 | background-color: transparent; 66 | } 67 | 68 | button.Rose-cancel { 69 | border-right: 2rpx solid #e6e5e7; 70 | } 71 | -------------------------------------------------------------------------------- /components/nomore/comment.wxml: -------------------------------------------------------------------------------- 1 | 2 | 我是有底线滴~ 3 | 4 | -------------------------------------------------------------------------------- /components/nomore/nomore.js: -------------------------------------------------------------------------------- 1 | // components/comment.js 2 | Component({ 3 | /** 4 | * 组件的属性列表 5 | */ 6 | properties: { 7 | 8 | }, 9 | 10 | /** 11 | * 组件的初始数据 12 | */ 13 | data: { 14 | 15 | }, 16 | 17 | /** 18 | * 组件的方法列表 19 | */ 20 | methods: { 21 | 22 | } 23 | }) 24 | -------------------------------------------------------------------------------- /components/nomore/nomore.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /components/nomore/nomore.wxml: -------------------------------------------------------------------------------- 1 | 2 | 我是有底线滴~ 3 | 4 | -------------------------------------------------------------------------------- /components/nomore/nomore.wxss: -------------------------------------------------------------------------------- 1 | /* components/comment.wxss */ 2 | 3 | -------------------------------------------------------------------------------- /components/photo/photo.js: -------------------------------------------------------------------------------- 1 | // components/photo/photo.js 2 | Component({ 3 | /** 4 | * 组件的属性列表 5 | */ 6 | properties: { 7 | dataSource: { 8 | type: Object, 9 | value: {} 10 | }, 11 | modalshow: { 12 | type: Boolean, 13 | value: true 14 | }, 15 | }, 16 | /** 17 | * 组件的初始数据 18 | */ 19 | data: { 20 | maskHidden: true, 21 | imagePath: '' 22 | }, 23 | /** 24 | * 组件的方法列表 25 | */ 26 | methods: { 27 | makePhoto: function (e) { //点击生成海报 28 | var that = this; 29 | that.setData({ 30 | maskHidden: false 31 | }); 32 | wx.showToast({ 33 | title: '请骚等...', 34 | icon: 'loading', 35 | duration: 1000 36 | }); 37 | setTimeout(function () { 38 | wx.hideToast() 39 | that.createNewImg(); 40 | that.setData({ 41 | maskHidden: true 42 | }); 43 | }, 1000) 44 | }, 45 | /* 46 | 海报 47 | */ 48 | createNewImg: function () { 49 | var that = this; 50 | var context = wx.createCanvasContext('mycanvas'); 51 | context.setFillStyle("#ffffff") 52 | context.fillRect(0, 0, 600, 970); //填充一个矩形。用 setFillStyle 53 | var dataSource = this.data.dataSource; 54 | var title = dataSource.title; 55 | var desc = dataSource.description; 56 | var thumb = dataSource.thumb; 57 | var qrcodeLoal = "https://www.zhmzjl.com/statics/images/blog/kapo.jpg"; 58 | context.drawImage(thumb, 40, 40, 520, 260); //绘制首图 59 | context.drawImage(qrcodeLoal, 210, 650, 180, 180); //绘制二维码 60 | context.drawImage(qrcodeLoal, 210, 650, 180, 180); //绘制二维码 61 | context.setFillStyle("#000000"); 62 | context.setFontSize(20); //设置字体大小 63 | context.setTextAlign('center'); //设置字体对齐 64 | context.fillText("阅读文章,请长按识别二维码", 300, 895); 65 | context.setFillStyle("#000000"); 66 | context.beginPath() //分割线 67 | context.moveTo(30, 620) 68 | context.lineTo(570, 620) 69 | context.stroke(); 70 | context.setTextAlign('left'); 71 | context.setFontSize(40); 72 | if (title.lengh <= 12) { 73 | context.fillText(title, 40, 360); //文章标题 74 | } else { 75 | context.fillText(title.substring(0, 12), 40, 360); 76 | context.fillText(title.substring(12, 26), 40, 410); 77 | } 78 | context.setFontSize(20); 79 | if (desc.lengh <= 26) { 80 | context.fillText(desc, 40, 470); //文章描述 81 | } else { 82 | context.fillText(desc.substring(0, 26), 40, 470); 83 | context.fillText(desc.substring(26, 50) + '...', 40, 510); 84 | } 85 | //绘制图片 86 | context.draw(false, wx.canvasToTempFilePath({ 87 | canvasId: 'mycanvas', 88 | destWidth:600, 89 | destHeight:970, 90 | quality:22, 91 | fileType:'jpg', 92 | success: function (res) { 93 | console.log(res) 94 | var tempFilePath = res.tempFilePath; 95 | that.setData({ 96 | imagePath: tempFilePath, 97 | // modalshow: false 98 | }); 99 | wx.hideToast() 100 | }, 101 | fail: function (res) { 102 | console.log(res); 103 | } 104 | },this)); 105 | }, 106 | //点击保存到相册 107 | baocun: function () { 108 | var that = this 109 | wx.saveImageToPhotosAlbum({ 110 | filePath: that.data.imagePath, 111 | success(res) { 112 | wx.showModal({ 113 | content: '图片已保存到相册,赶紧晒一下吧~', 114 | showCancel: false, 115 | confirmText: '好的', 116 | confirmColor: '#333', 117 | success: function (res) { 118 | if (res.confirm) { 119 | console.log('用户点击确定'); 120 | /* 该隐藏的隐藏 */ 121 | that.setData({ 122 | modalshow: true 123 | }) 124 | } 125 | }, 126 | fail: function (res) { 127 | console.log(11111) 128 | } 129 | }) 130 | } 131 | }) 132 | }, 133 | //点击生成 134 | getCode: function () { //生成二维码 135 | var that = this; 136 | let _params = { 137 | catid: that.data.catid, 138 | id: that.data.id 139 | } 140 | Api.creatcode(_params).then(res => { 141 | if (res.data.code == 0) { 142 | let _data = res.data.url; 143 | that.setData({ 144 | codeurl: _data 145 | }) 146 | } 147 | }); 148 | }, 149 | } 150 | }) 151 | -------------------------------------------------------------------------------- /components/photo/photo.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /components/photo/photo.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /components/photo/photo.wxss: -------------------------------------------------------------------------------- 1 | /* components/photo/photo.wxss */ 2 | 3 | .Rose-photo { 4 | width: 100%; 5 | height: 100%; 6 | background: rgba(0, 0, 0, 0.7); 7 | position: fixed; 8 | top: 0; 9 | left: 0; 10 | right: 0; 11 | bottom: 0; 12 | z-index: 10; 13 | } 14 | 15 | .Rose-done { 16 | width: 80%; 17 | height: 80%; 18 | position: fixed; 19 | top: 50rpx; 20 | left: 50%; 21 | margin-left: -40%; 22 | z-index: 10; 23 | } 24 | 25 | .Rose-save { 26 | display: block; 27 | width: 80%; 28 | height: 80rpx; 29 | padding: 0; 30 | line-height: 80rpx; 31 | text-align: center; 32 | position: fixed; 33 | bottom: 50rpx; 34 | left: 10%; 35 | background: #fff; 36 | color: #333; 37 | font-size: 32rpx; 38 | border-radius: 44rpx; 39 | } 40 | 41 | .Rose-canvas { 42 | /* width: 0; 43 | height:0; 44 | overflow: hidden*/ 45 | width: 600px; 46 | height: 970px; 47 | } 48 | -------------------------------------------------------------------------------- /components/share/share.js: -------------------------------------------------------------------------------- 1 | // components/share/share.js 2 | Component({ 3 | 4 | /** 5 | * 组件的属性列表 6 | */ 7 | properties: { 8 | //是否显示modal 9 | show: { 10 | type: Boolean, 11 | value: false 12 | } 13 | }, 14 | 15 | /** 16 | * 组件的初始数据 17 | */ 18 | data: { 19 | 20 | }, 21 | 22 | /** 23 | * 组件的方法列表 24 | */ 25 | methods: { 26 | clickMask() { 27 | // this.setData({show: false}) 28 | }, 29 | 30 | cancel() { 31 | this.setData({ 32 | show: false 33 | }) 34 | this.triggerEvent('cancel') 35 | }, 36 | 37 | confirm() { 38 | this.setData({ 39 | show: false 40 | }) 41 | this.triggerEvent('confirm') 42 | } 43 | } 44 | }) 45 | -------------------------------------------------------------------------------- /components/share/share.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /components/share/share.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /components/share/share.wxss: -------------------------------------------------------------------------------- 1 | /* components/share/share.wxss */ 2 | .Rose-mask { 3 | position: fixed; 4 | left: 0; 5 | right: 0; 6 | top: 0; 7 | bottom: 0; 8 | margin-top: -104rpx; 9 | display: flex; 10 | justify-content: center; 11 | align-items: center; 12 | background-color: rgba(0, 0, 0, 0.4); 13 | z-index: 9; 14 | } 15 | .Rose-content { 16 | display: flex; 17 | flex-direction: column; 18 | width: 618rpx; 19 | background-color: #fff; 20 | border-radius: 8rpx; 21 | color: #999; 22 | text-align: center; 23 | font-size: 30rpx; 24 | } 25 | .Rose-main { 26 | flex: 1; 27 | height: 100%; 28 | overflow-y: hidden; 29 | } 30 | .Rose-btns { 31 | display: flex; 32 | flex-direction: row; 33 | height: 98rpx; 34 | line-height: 98rpx; 35 | border-top: 2rpx solid #e6e5e7; 36 | overflow: hidden; 37 | } 38 | .Rose-cancel, .Rose-confirm { 39 | position: relative; 40 | flex: 1; 41 | height: 100rpx; 42 | line-height: 100rpx; 43 | text-align: center; 44 | font-size: 36rpx; 45 | color: #999; 46 | z-index: 1; 47 | } 48 | button.Rose-confirm { 49 | color: #1d8f59; 50 | } 51 | button { 52 | border-radius: 0; 53 | padding: 0; 54 | background-color: transparent; 55 | } 56 | button.Rose-cancel { 57 | border-right: 2rpx solid #e6e5e7; 58 | } 59 | -------------------------------------------------------------------------------- /pages/about/about.js: -------------------------------------------------------------------------------- 1 | //index.js 2 | //获取应用实例 3 | const app = getApp() 4 | Page({ 5 | data: {}, 6 | onLoad: function () { 7 | }, 8 | onReady: function () { }, 9 | /** 10 | * 生命周期函数--监听页面显示 11 | */ 12 | onShow: function () { }, 13 | /** 14 | * 生命周期函数--监听页面隐藏 15 | */ 16 | onHide: function () { }, 17 | /** 18 | * 生命周期函数--监听页面卸载 19 | */ 20 | onUnload: function () { }, 21 | /** 22 | * 页面相关事件处理函数--监听用户下拉动作 23 | */ 24 | onPullDownRefresh: function () { }, 25 | /** 26 | * 页面上拉触底事件的处理函数 27 | */ 28 | onReachBottom: function () { }, 29 | /** 30 | * 用户点击右上角分享 31 | */ 32 | onShareAppMessage: function () { 33 | return { 34 | title: '锲而舍之,朽木不折;锲而不舍,金石可镂', 35 | imageUrl: '/assets/images/share.jpg' 36 | } 37 | } 38 | }) 39 | -------------------------------------------------------------------------------- /pages/about/about.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "我", 3 | "enablePullDownRefresh": false, 4 | "usingComponents": { 5 | "copyright": "../../components/copyright/copyright" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /pages/about/about.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 余秋雨: 一个在教师看来生气勃勃的学生,过几年看到他,他成为了一个平庸的人。所以我始终要提醒大家,人生要不断地设定起点,不断地突破围城,不断地提醒自己,你有一个更精彩的生命。即使年纪很大也应该这样,生命才会比较有价值。 5 | 6 | 7 | 8 | 9 | 10 | 留言 11 | 12 | 13 | 14 | 15 | 16 | 17 | 项目 18 | 19 | 20 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 特别感谢 34 | 35 | 36 | 37 | 38 | 39 | 40 | 版本记录 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 关于我 49 | 50 | 51 | 52 | 53 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /pages/about/about.wxss: -------------------------------------------------------------------------------- 1 | /**index.wxss**/ 2 | .Rose-floor { 3 | background: #fff; 4 | margin: 20rpx 0; 5 | } 6 | .Rose-menu { 7 | padding: 40rpx 30rpx 20rpx; 8 | display: flex; 9 | flex-flow: row; 10 | justify-content: space-between; 11 | } 12 | .Rose-flex1 { 13 | flex: 1; 14 | } 15 | .Rose-about-title { 16 | text-align: center; 17 | } 18 | .Rose-about { 19 | padding: 20rpx; 20 | background: #1d8f59; 21 | color: #fff; 22 | font-size: 32rpx; 23 | } 24 | .Rose-kinds { 25 | text-align: center; 26 | font-size: 28rpx; 27 | color: #333; 28 | width: 90rpx; 29 | } 30 | .Rose-kinds .iconfont { 31 | font-size: 42rpx; 32 | display: block; 33 | } 34 | .view-circle { 35 | border-radius: 100%; 36 | color: #fff; 37 | width: 90rpx; 38 | height: 90rpx; 39 | line-height: 90rpx; 40 | margin: 0 auto 20rpx; 41 | } 42 | .color4 { 43 | background-color: #8a90fa; 44 | } 45 | .color3 { 46 | background-color: #4dc6ee; 47 | } 48 | .color2 { 49 | background-color: #fed030; 50 | } 51 | .color1 { 52 | background-color: #fd9d21; 53 | } 54 | .Rose-floor-title { 55 | padding: 20rpx 20rpx; 56 | font-size: 32rpx; 57 | color: #666; 58 | border-bottom: 2rpx solid #f2f2f2; 59 | } 60 | .Rose-floor-title .iconfont { 61 | color: #555; 62 | font-size: 15px; 63 | } 64 | .Rose-content { 65 | font-size: 26rpx; 66 | margin: 10rpx 0 30rpx; 67 | line-height: 1.4; 68 | } 69 | .Rose-article { 70 | padding: 50rpx 20rpx 40rpx; 71 | display: flex; 72 | } 73 | .Rose-title { 74 | flex: 1; 75 | text-align: center; 76 | font-size: 26rpx; 77 | color: #666; 78 | } 79 | .Rose-title .iconfont { 80 | font-size: 52rpx; 81 | display: block; 82 | color: #599eec; 83 | } 84 | .Rose-Line .iconfont, .Rose-btn .iconfont{ 85 | color: #599eec; 86 | font-size: 46rpx; 87 | padding-right: 10rpx; 88 | vertical-align: middle; 89 | } 90 | .Rose-Line .iconfont.fr { 91 | float: right; 92 | color: #a8a8a8; 93 | padding-right: 0; 94 | font-size: 30rpx; 95 | } 96 | .Rose-Line,.Rose-btn { 97 | padding: 20rpx 20rpx 20rpx 0; 98 | border-bottom: 1rpx solid #f5f5f5; 99 | background: #fff; 100 | font-size: 34rpx; 101 | color: #333; 102 | margin-left: 20rpx; 103 | line-height: 60rpx; 104 | text-align: left 105 | } 106 | .Rose-btn{ 107 | padding: 0; 108 | margin: 0; 109 | border-bottom: none 110 | } 111 | .Rose-Line:last-child { 112 | border-bottom: none; 113 | } 114 | -------------------------------------------------------------------------------- /pages/comm.wxs: -------------------------------------------------------------------------------- 1 | var common = { 2 | formatDate: function (time) { 3 | var date = getDate(time * 1000); 4 | var year = date.getFullYear(); 5 | var month = date.getMonth() + 1; 6 | var day = date.getDate(); 7 | var hour = date.getHours(); 8 | var minute = date.getMinutes(); 9 | var second = date.getSeconds(); 10 | if (month < 10) month = '0' + month; 11 | if (day < 10) day = '0' + day; 12 | if (hour < 10) hour = '0' + hour; 13 | if (minute < 10) minute = '0' + minute; 14 | if (second < 10) second = '0' + second; 15 | return year + '-' + month + '-' + day; 16 | }, 17 | formatTime: function (time) { 18 | var date = getDate(time * 1000); 19 | var year = date.getFullYear(); 20 | var month = date.getMonth() + 1; 21 | var day = date.getDate(); 22 | var hour = date.getHours(); 23 | var minute = date.getMinutes(); 24 | var second = date.getSeconds(); 25 | if (month < 10) month = '0' + month; 26 | if (day < 10) day = '0' + day; 27 | if (hour < 10) hour = '0' + hour; 28 | if (minute < 10) minute = '0' + minute; 29 | if (second < 10) second = '0' + second; 30 | return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second; 31 | } 32 | } 33 | module.exports = { 34 | formatDate: common.formatDate, 35 | formatTime: common.formatTime, 36 | } 37 | -------------------------------------------------------------------------------- /pages/detail/detail.js: -------------------------------------------------------------------------------- 1 | // pages/detail/detail.js 2 | import Api from '/../../utils/api.js'; 3 | import util from '/../../utils/util.js'; 4 | let wxparse = require("../../wxParse/wxParse.js"); 5 | const app = getApp(); 6 | Page({ 7 | /** 8 | * 页面的初始数据 9 | */ 10 | data: { 11 | items: {}, 12 | dkcontent: '', 13 | id: '', 14 | catid: '', 15 | comments: [], //反馈列表 16 | canIUse: wx.canIUse('button.open-type.getUserInfo'), 17 | disabled: true, 18 | loadMore: true, 19 | focus: false, 20 | userInfo: {}, 21 | content: '', 22 | placeholder: '爱发言的人运气都不会太差', 23 | reply_username: '', 24 | pid: 0, 25 | page: 1, 26 | likenum: null, 27 | like: false, 28 | maskHidden: false, 29 | codeurl: "", 30 | commentshow: false, 31 | modalshow: true, 32 | imagePath: '' 33 | }, 34 | /** 35 | * 生命周期函数--监听页面加载 36 | */ 37 | onLoad: function(options) { 38 | wx.showLoading(); 39 | var that = this; 40 | let _userInfo = wx.getStorageSync('userInfo') 41 | let scene = decodeURIComponent(options.scene); 42 | if (options.scene) { 43 | let scene = decodeURIComponent(options.scene); 44 | let info_arr = []; 45 | info_arr = scene.split('&'); 46 | let _catid = info_arr[0]; 47 | let _id = info_arr[1]; 48 | that.setData({ 49 | userInfo: _userInfo, 50 | id: _id, 51 | catid: _catid 52 | }); 53 | } else { 54 | that.setData({ 55 | userInfo: _userInfo, 56 | id: options.id, 57 | catid: options.catid 58 | }); 59 | } 60 | if (wx.getStorageSync('userInfo')) {} else { 61 | wx.getSetting({ 62 | success: function(res) { 63 | if (res.authSetting['scope.userInfo']) { 64 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称 65 | wx.getUserInfo({ 66 | success: function(res) { 67 | let _userInfo = res.userInfo; 68 | app.globalData.userInfo = _userInfo; 69 | wx.setStorageSync('userInfo', _userInfo) 70 | } 71 | }) 72 | } 73 | } 74 | }); 75 | } 76 | that.getData(); 77 | that.commentlists(); //反馈列表 78 | that.top10(); //top 10推荐 79 | }, 80 | /** 81 | * 生命周期函数--监听页面初次渲染完成 82 | */ 83 | onReady: function() {}, 84 | /** 85 | * 生命周期函数--监听页面显示 86 | */ 87 | onShow: function() {}, 88 | /** 89 | * 生命周期函数--监听页面隐藏 90 | */ 91 | onHide: function() {}, 92 | /** 93 | * 生命周期函数--监听页面卸载 94 | */ 95 | onUnload: function() {}, 96 | /** 97 | * 页面相关事件处理函数--监听用户下拉动作 98 | */ 99 | onPullDownRefresh: function() {}, 100 | /** 101 | * 页面上拉触底事件的处理函数 102 | */ 103 | onReachBottom: function() { 104 | var that = this; 105 | let page = that.data.page + 1; 106 | that.setData({ 107 | page: page 108 | }); 109 | if (that.data.loadMore) { 110 | that.commentlists(); 111 | } 112 | }, 113 | /** 114 | * 用户点击右上角分享 115 | */ 116 | onShareAppMessage: function() { 117 | return { 118 | title: this.data.items.title, 119 | path: "/detail/detail", 120 | imageUrl: '/assets/images/share.jpg' 121 | } 122 | }, 123 | getData() { 124 | var that = this; 125 | let _params = { 126 | catid: that.data.catid, 127 | id: that.data.id 128 | }; 129 | Api.pageitem(_params).then(res => { 130 | if (!res.data.code) { 131 | wx.hideLoading(); 132 | let _data = res.data.data; 133 | var _tpl = _data.content; 134 | that.setData({ 135 | likenum: _data.thumbs_up, 136 | items: _data, 137 | dkcontent: _tpl 138 | }); 139 | wxparse.wxParse('dkcontent', 'html', _tpl, that, 5); 140 | } 141 | }) 142 | }, 143 | commentNow() { 144 | this.setData({ 145 | focus: true 146 | }) 147 | }, 148 | commentBox() { 149 | var that = this; 150 | that.setData({ 151 | commentshow: !that.data.commentshow, 152 | }) 153 | if (!that.data.codeurl) { 154 | that.getCode(); 155 | } 156 | }, 157 | wetherLike() { //点赞 158 | var that = this; 159 | let params = { 160 | id: that.data.id, 161 | catid: that.data.catid 162 | } 163 | if (!that.data.like) { 164 | Api.likenum(params).then(res => { 165 | if (!res.data.code) { 166 | let _data = res.data.data; 167 | let linknn = parseInt(that.data.likenum) 168 | that.setData({ 169 | likenum: linknn + 1, 170 | like: !that.data.like 171 | }) 172 | wx.showToast({ 173 | title: '感谢您的鼓励!', 174 | icon: 'none', 175 | duration: 2000 176 | }) 177 | } 178 | }); 179 | } 180 | if (that.data.like) { 181 | let linknn = parseInt(that.data.likenum) 182 | that.setData({ 183 | likenum: linknn - 1, 184 | like: !that.data.like 185 | }) 186 | wx.showToast({ 187 | title: '我会继续努力!', 188 | icon: 'none', 189 | duration: 2000 190 | }) 191 | } 192 | }, 193 | backContent(e) { //回复的评论 194 | let _from = e.currentTarget.dataset.from; 195 | let _id = e.currentTarget.dataset.pid; 196 | this.setData({ 197 | placeholder: '回复 ' + _from, 198 | focus: true, 199 | reply_username: _from, 200 | pid: _id, 201 | commentshow: false 202 | }) 203 | }, 204 | top10() { //推荐阅读 205 | var that = this; 206 | let params = { 207 | pagesize: 5, 208 | page: 1, 209 | catid: that.data.catid 210 | } 211 | Api.lists(params).then(res => { //文章列表 212 | if (!res.data.code) { 213 | let _data = res.data.data; 214 | that.setData({ 215 | top10: _data 216 | }); 217 | } 218 | }) 219 | }, 220 | articleDetail(e) { 221 | let {id, catid} = e.currentTarget.dataset; 222 | wx.navigateTo({ 223 | url: '../detail/detail?catid=' + catid + '&id=' + id 224 | }); 225 | }, 226 | previewImage(e) { 227 | var current = e.target.dataset.src; 228 | wx.previewImage({ 229 | current: current, 230 | urls: [current] 231 | }) 232 | }, 233 | goHome() { 234 | wx.switchTab({ 235 | url: '../index/index' 236 | }); 237 | }, 238 | forContent(e) { 239 | let that = this; 240 | let _content = e.detail.value; 241 | // 禁止输入空格 242 | var regu = "^[ ]+$"; 243 | var re = new RegExp(regu); 244 | var emptyy = re.test(_content); 245 | if (emptyy) return false; 246 | //end 247 | that.setData({ 248 | content: _content 249 | }) 250 | if (that.data.content) { 251 | that.setData({ 252 | disabled: false 253 | }) 254 | } else { 255 | that.setData({ 256 | disabled: true 257 | }) 258 | } 259 | }, 260 | bindGetUserInfo(e) { 261 | var that = this; 262 | var userInfo = {}; 263 | if (e.detail.userInfo) { 264 | userInfo = e.detail.userInfo; 265 | } else { 266 | wx.getUserInfo({ 267 | success: function (res) { 268 | userInfo = res.userInfo; 269 | }, 270 | fail: function (res) { 271 | wx.showModal({ 272 | showCancel: false, 273 | confirmColor: '#1d8f59', 274 | confirmColor: '#1d8f59', 275 | content: '授权通过后才能评论哟,请重新授权!' 276 | }) 277 | } 278 | }) 279 | } 280 | if (JSON.stringify(userInfo) == '{}') return false; 281 | that.setData({ 282 | userInfo: userInfo 283 | }) 284 | that.postComments() 285 | }, 286 | postComments() { 287 | var that = this; 288 | if (!that.data.content) { 289 | wx.showModal({ 290 | showCancel: false, 291 | confirmColor: '#1d8f59', 292 | content: '评论不能为空!' 293 | }); 294 | return false; 295 | } 296 | if (!that.data.userInfo) return false; 297 | wx.showLoading(); 298 | let _params = { 299 | newsid: that.data.id, // 博客文章ID 300 | pid: that.data.pid, // 父评论ID,默认为0 301 | from_username: that.data.userInfo.nickName, // 评论者用户名 302 | from_avatar: that.data.userInfo.avatarUrl, // 评论者头像 303 | reply_username: that.data.reply_username, // 回复了谁,pid不为0时,不允许未空 304 | reply_avatar: "", // 回复了谁的头像,允许为空 305 | content: that.data.content 306 | } 307 | Api.postcomments(_params).then(res => { 308 | if (!res.data.code) { 309 | wx.hideLoading(); 310 | wx.showToast({ 311 | title: '评论成功', 312 | icon: 'success', 313 | duration: 2000 314 | }) 315 | that.setData({ 316 | content: '', 317 | page: 1, 318 | comments: [], 319 | reply_username: '', 320 | pid: 0, 321 | placeholder: '点击评论回复...', 322 | disabled: true 323 | }); 324 | that.commentlists(); 325 | } 326 | }); 327 | }, 328 | commentlists() { 329 | var that = this; 330 | let _params = { 331 | newsid: that.data.id, 332 | page: that.data.page, 333 | pagesize: 10 334 | } 335 | Api.commentlists(_params).then(res => { 336 | if (res.data.code == 0) { 337 | let _data = res.data.data; 338 | let _count = res.data.count; 339 | let _arr = that.data.comments.concat(_data); 340 | that.setData({ 341 | comments: _arr, 342 | count: _count 343 | }); 344 | if (_data.length < 10) { 345 | that.setData({ 346 | loadMore: false 347 | }); 348 | } 349 | } else { 350 | wx.showModal({ 351 | showCancel: false, 352 | confirmColor: '#1d8f59', 353 | content: '评论加载失败!' 354 | }) 355 | } 356 | }); 357 | }, 358 | forRemark(e) { 359 | var that = this; 360 | let _data = e.detail.value; 361 | // 禁止输入空格 362 | var regu = "^[ ]+$"; 363 | var re = new RegExp(regu); 364 | var emptyy = re.test(_data); 365 | if (emptyy) return false; 366 | //end 367 | that.setData({ 368 | content: _data 369 | }); 370 | if (that.data.content) { 371 | that.setData({ 372 | disabled: false 373 | }) 374 | } else { 375 | that.setData({ 376 | disabled: true 377 | }) 378 | } 379 | }, 380 | makePhoto(e) { //点击生成海报 381 | var that = this; 382 | if (this.data.imagePath) { 383 | that.setData({ 384 | modalshow: false, 385 | }); 386 | return false; 387 | } 388 | wx.showToast({ 389 | title: '请骚等...', 390 | icon: 'loading', 391 | duration: 1000 392 | }); 393 | that.setData({ 394 | modalshow: false, 395 | commentshow: false 396 | }); 397 | const datas = that.data.items; 398 | const titles = datas.title; //標題 399 | const desc = datas.description; //介绍 400 | const imgs = datas.thumb ? datas.thumb : 'https://www.zhmzjl.com/statics/images/blog/ncode.jpg'; //图片 401 | wx.getImageInfo({ 402 | src: that.data.codeurl, //服务器返回的图片地址 403 | success: res => { 404 | let Path = res.path; 405 | that.createNewImg(Path, imgs, titles, desc); 406 | } 407 | }) 408 | }, 409 | /* 410 | 海报 411 | */ 412 | createNewImg: function(codes, img, title, desc) { 413 | var that = this; 414 | var Rose = wx.createCanvasContext('mycanvas'); 415 | Rose.setFillStyle("#ffffff") 416 | Rose.fillRect(0, 0, 600, 1000); //填充一个矩形。用 setFillStyle 417 | wx.getImageInfo({ 418 | src: img, //服务器返回的图片地址 419 | success: function(res) { 420 | var thumb = res.path; 421 | var datee = new Date(); 422 | var cctime = util.formatTime(datee); 423 | var bg = "/assets/images/44.png"; 424 | Rose.drawImage(bg, 0, 737, 640, 395); //绘制首图 425 | Rose.drawImage(thumb, 20, 140, 560, 300); //绘制首图 426 | Rose.drawImage(codes, 360, 720, 200, 200); //绘制二维码 427 | Rose.setFontSize(30); 428 | Rose.setTextAlign('right'); //设置字体对齐 429 | Rose.setFillStyle('#1d8f59'); 430 | Rose.fillText('KAPO博客', 560, 60); 431 | Rose.setFontSize(20); 432 | Rose.setFillStyle('#666'); 433 | Rose.fillText(cctime, 560, 120); 434 | Rose.beginPath(); 435 | Rose.lineWidth = "2"; 436 | Rose.strokeStyle = "#1d8f59"; 437 | Rose.rect(400, 20, 180, 60); 438 | Rose.stroke(); 439 | Rose.beginPath(); 440 | Rose.lineWidth = "2"; 441 | Rose.strokeStyle = "#f2f2f2"; 442 | Rose.rect(20, 690, 570, 230); 443 | Rose.stroke(); 444 | Rose.setFillStyle("#333"); 445 | Rose.setFontSize(20); //设置字体大小 446 | Rose.setTextAlign('center'); //设置字体对齐 447 | Rose.beginPath() //分割线 448 | Rose.stroke(); 449 | Rose.setTextAlign('left'); 450 | Rose.setFontSize(40); 451 | if (title.length <= 14) { 452 | Rose.fillText(title, 40, 500); //文章标题 453 | } else { 454 | Rose.fillText(title.substring(0, 14), 40, 500); 455 | Rose.fillText(title.substring(14, 26), 40, 550); 456 | } 457 | Rose.setFillStyle("#999"); 458 | Rose.setFontSize(20); 459 | if (title.length <= 14 && desc.length >= 26) { 460 | Rose.fillText(desc.substring(0, 26), 40, 560); 461 | Rose.fillText(desc.substring(26, 50) + '...', 40, 595); 462 | } else if (title.length <= 14 && desc.length <= 26) { 463 | Rose.fillText(desc, 26, 560); 464 | } else if (title.length >= 14 && desc.length <= 26) { 465 | Rose.fillText(desc, 26, 640); //文章描述 466 | } else { 467 | Rose.fillText(desc.substring(0, 26), 40, 610); 468 | Rose.fillText(desc.substring(26, 50) + '...', 40, 645); 469 | } 470 | Rose.setTextAlign('left'); 471 | Rose.setFontSize(28); 472 | Rose.setFillStyle('#666'); 473 | Rose.fillText('Hi, 这篇文章很精彩,', 40, 770); 474 | Rose.fillText('我想转发给你!', 40, 820); 475 | Rose.setFillStyle('#999'); 476 | Rose.setFontSize(20); 477 | Rose.fillText('长按识别阅读文章', 380, 950); 478 | wx.showToast({ 479 | title: '分享图片生成中...', 480 | icon: 'loading', 481 | duration: 1000 482 | }); 483 | Rose.draw(); 484 | // 将生成好的图片保存到本地,需要延迟一会,绘制期间耗时 485 | setTimeout(function() { 486 | wx.canvasToTempFilePath({ 487 | canvasId: 'mycanvas', 488 | success: function(res) { 489 | var tempFilePath = res.tempFilePath; 490 | that.setData({ 491 | imagePath: tempFilePath, 492 | canvasHidden: true, 493 | commentShow: false 494 | }); 495 | wx.hideToast() 496 | }, 497 | fail: function(res) {} 498 | }, this); 499 | }, 1000); 500 | } 501 | }) 502 | }, 503 | //点击保存到相册 504 | baocun() { 505 | var that = this 506 | wx.saveImageToPhotosAlbum({ 507 | filePath: that.data.imagePath, 508 | success(res) { 509 | wx.showModal({ 510 | content: '图片已保存到相册,赶紧晒一下吧~', 511 | showCancel: false, 512 | confirmText: '好的', 513 | confirmColor: '#333', 514 | success: function(res) { 515 | if (res.confirm) { 516 | /* 该隐藏的隐藏 */ 517 | that.setData({ 518 | modalshow: true 519 | }) 520 | } 521 | }, 522 | fail: function(res) {} 523 | }) 524 | } 525 | }) 526 | }, 527 | quxiao() { 528 | var that = this; 529 | that.setData({ 530 | modalshow: true 531 | }) 532 | }, 533 | //点击生成 534 | getCode() { //生成二维码 535 | var that = this; 536 | let _params = { 537 | catid: that.data.catid, 538 | id: that.data.id 539 | } 540 | Api.creatcode(_params).then(res => { 541 | if (res.data.code == 0) { 542 | let _data = res.data.url; 543 | that.setData({ 544 | codeurl: _data 545 | }) 546 | } 547 | }); 548 | } 549 | }) 550 | -------------------------------------------------------------------------------- /pages/detail/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "文章详情", 3 | "enablePullDownRefresh": false, 4 | "usingComponents": { 5 | "loading": "../../components/loading/loading", 6 | "backtop": "../../components/backtop/backtop", 7 | "bottombar": "../../components/bottombar/bottombar", 8 | "copyright": "../../components/copyright/copyright" 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /pages/detail/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{items.title}} 7 | 8 | 9 | 10 | {{items.inputtime}} 11 | 12 | 13 | 14 | {{items.views}} 15 | 16 | 17 | {{items.description}} 18 | 19 |