├── README.md ├── app.js ├── app.json ├── app.wxss ├── components ├── navBar │ ├── app.js │ ├── navBar.js │ ├── navBar.json │ ├── navBar.wxml │ ├── navBar.wxss │ └── package.json └── wx-pulltorefresh-view │ ├── wx-pulltorefresh-view.js │ ├── wx-pulltorefresh-view.json │ ├── wx-pulltorefresh-view.wxml │ └── wx-pulltorefresh-view.wxss ├── image ├── kefu.png └── nav-icon │ ├── Diamond.png │ ├── all.png │ ├── business.png │ ├── food.png │ ├── goup.png │ ├── night.png │ └── theme.png ├── pages └── index │ ├── detail │ ├── detail.js │ ├── detail.json │ ├── detail.wxml │ └── detail.wxss │ ├── entertain │ ├── entertain.js │ ├── entertain.json │ ├── entertain.wxml │ └── entertain.wxss │ ├── index.js │ ├── index.json │ ├── index.wxml │ ├── index.wxss │ ├── leisure │ ├── leisure.js │ ├── leisure.json │ ├── leisure.wxml │ └── leisure.wxss │ ├── recommond │ ├── recommond.js │ ├── recommond.json │ ├── recommond.wxml │ └── recommond.wxss │ ├── technology │ ├── technology.js │ ├── technology.json │ ├── technology.wxml │ └── technology.wxss │ └── topline │ ├── topline.js │ ├── topline.json │ ├── topline.wxml │ └── topline.wxss ├── project.config.json ├── sitemap.json ├── utils └── utils.js └── wxParse ├── html2json.js ├── htmlparser.js ├── showdown.js ├── wxDiscode.js ├── wxParse.js ├── wxParse.json ├── wxParse.wxml └── wxParse.wxss /README.md: -------------------------------------------------------------------------------- 1 |
2.0# 计划开放后端接口调用(之前服务器down了一直没去弄......),尽请期待,另外本人建了一个爱情博客,希望能一起交流技术,交流恋爱,交流生活 2 |
[探花网https://exploregirl.com](https://exploregirl.com) 3 |
[伴你同行https://cpbuff.com](cpbuff.com) 4 |
1.0 # 微信小程序前端fuliba-front 5 | 可以直接一步步调试的小程序,涉及轮播图,列表页,页面细节,客服按钮,下拉框等等
6 | 完全使用微信小程序原生开发,没有使用自定义组件(使用了一个自己实现的搜索组件)。
所以这是一个初级项目,非常的适合🤹‍♀️微信小程序开发新手🤹‍♀️,如果你有 `html` `css` `js` 前端基础那么你将很快上手,代码完全免费开源,看得上可以自取哦!
(当然如果您能愉快的给一个Start就更好了❤😋) 7 | ### 效果预览 8 | 9 |

10 | 11 |    12 | 13 |

14 |
待开源收藏功能,订阅功能,赞赏功能等等,欢迎star!
15 |
1:小程序从零开始 16 |
2:涉及多个完整网站的信息聚合 17 |
3:更多功能待加入,任何使用问题,欢迎反馈 18 | 19 | 项目使用方法:直接使用官方微信开发者工具导入项目即可使用
20 | 21 | 涉及功能组件
22 | 富文本解析:https://github.com/icindy/wxParse
23 | 下拉框:https://github.com/zhongxuqi/wx-pulltorefresh-view
24 | 导航栏:https://github.com/lingxiaoyi/navigation-bar
25 | 26 | 欢迎issue 27 | 打赏我们 28 |

29 | 30 |    31 | 32 |

33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | //app.js 2 | 3 | App({ 4 | onLaunch: function () { 5 | // 展示本地存储能力 6 | var logs = wx.getStorageSync('logs') || [] 7 | logs.unshift(Date.now()) 8 | wx.setStorageSync('logs', logs) 9 | 10 | // 登录 11 | wx.login({ 12 | success: res => { 13 | // 发送 res.code 到后台换取 openId, sessionKey, unionId 14 | } 15 | }) 16 | // 获取用户信息 17 | wx.getSetting({ 18 | success: res => { 19 | if (res.authSetting['scope.userInfo']) { 20 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 21 | wx.getUserInfo({ 22 | success: res => { 23 | // 可以将 res 发送给后台解码出 unionId 24 | this.globalData.userInfo = res.userInfo 25 | 26 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 27 | // 所以此处加入 callback 以防止这种情况 28 | if (this.userInfoReadyCallback) { 29 | this.userInfoReadyCallback(res) 30 | } 31 | } 32 | }) 33 | } 34 | } 35 | }) 36 | }, 37 | globalData: { 38 | userInfo: null 39 | }, 40 | }) -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/index/index", 4 | "pages/index/topline/topline", 5 | "pages/index/technology/technology", 6 | "pages/index/recommond/recommond", 7 | "pages/index/leisure/leisure", 8 | "pages/index/entertain/entertain", 9 | "pages/index/detail/detail" 10 | 11 | ], 12 | "window": { 13 | "backgroundTextStyle": "light", 14 | "navigationBarTextStyle": "black", 15 | "navigationStyle": "custom", 16 | "enablePullDownRefresh": true 17 | }, 18 | "usingComponents": { 19 | "navBar": "/components/navBar/navBar" 20 | }, 21 | "style": "v2", 22 | "sitemapLocation": "sitemap.json" 23 | } -------------------------------------------------------------------------------- /app.wxss: -------------------------------------------------------------------------------- 1 | /**app.wxss**/ 2 | 3 | .container { 4 | height: 100%; 5 | display: flex; 6 | flex-direction: column; 7 | align-items: center; 8 | justify-content: space-between; 9 | padding: 200rpx 0; 10 | box-sizing: border-box; 11 | } 12 | /* 用于不带导航得子子页面 */ 13 | .contentBigImg{ 14 | width: 100%; 15 | border-radius: 5rpx; 16 | overflow:hidden; 17 | display:flex; 18 | justify-content: center; 19 | } 20 | .contentBigImg>image{ 21 | width: 100%; 22 | height: 100%; 23 | border-radius: 15rpx; 24 | overflow:hidden; 25 | } 26 | .content-title{ 27 | width: 100%; 28 | height: 100%; 29 | margin-left: 0rpx; 30 | display: flex; 31 | flex-direction: column; 32 | } -------------------------------------------------------------------------------- /components/navBar/app.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/prefer-default-export 2 | export { default as navBar } from './navBar'; 3 | -------------------------------------------------------------------------------- /components/navBar/navBar.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | options: { 3 | multipleSlots: true, 4 | addGlobalClass: true 5 | }, 6 | properties: { 7 | extClass: { 8 | type: String, 9 | value: '' 10 | }, 11 | background: { 12 | type: String, 13 | value: 'rgba(255, 255, 255, 1)', 14 | observer: '_showChange' 15 | }, 16 | backgroundColorTop: { 17 | type: String, 18 | value: 'rgba(255, 255, 255, 1)', 19 | observer: '_showChangeBackgroundColorTop' 20 | }, 21 | color: { 22 | type: String, 23 | value: 'rgba(0, 0, 0, 1)' 24 | }, 25 | title: { 26 | type: String, 27 | value: '' 28 | }, 29 | searchText: { 30 | type: String, 31 | value: '点我搜索' 32 | }, 33 | searchBar: { 34 | type: Boolean, 35 | value: false 36 | }, 37 | back: { 38 | type: Boolean, 39 | value: false 40 | }, 41 | home: { 42 | type: Boolean, 43 | value: false 44 | }, 45 | iconTheme: { 46 | type: String, 47 | value: 'black' 48 | }, 49 | /* animated: { 50 | type: Boolean, 51 | value: true 52 | }, 53 | show: { 54 | type: Boolean, 55 | value: true, 56 | observer: '_showChange' 57 | }, */ 58 | delta: { 59 | type: Number, 60 | value: 1 61 | } 62 | }, 63 | created: function() { 64 | this.getSystemInfo(); 65 | }, 66 | attached: function() { 67 | this.setStyle(); //设置样式 68 | }, 69 | data: {}, 70 | pageLifetimes: { 71 | show: function() { 72 | if (getApp().globalSystemInfo.ios) { 73 | this.getSystemInfo(); 74 | this.setStyle(); //设置样式1 75 | } 76 | }, 77 | hide: function() {} 78 | }, 79 | methods: { 80 | setStyle: function(life) { 81 | const { 82 | statusBarHeight, 83 | navBarHeight, 84 | capsulePosition, 85 | navBarExtendHeight, 86 | ios, 87 | windowWidth 88 | } = getApp().globalSystemInfo; 89 | const { back, home, title } = this.data; 90 | let rightDistance = windowWidth - capsulePosition.right; //胶囊按钮右侧到屏幕右侧的边距 91 | let leftWidth = windowWidth - capsulePosition.left; //胶囊按钮左侧到屏幕右侧的边距 92 | 93 | let navigationbarinnerStyle = [ 94 | `color: ${this.data.color}`, 95 | `background: ${this.data.background}`, 96 | `height:${navBarHeight + navBarExtendHeight}px`, 97 | `padding-top:${statusBarHeight}px`, 98 | `padding-right:${leftWidth}px`, 99 | `padding-bottom:${navBarExtendHeight}px` 100 | ].join(';'); 101 | let navBarLeft = []; 102 | if ((back && !home) || (!back && home)) { 103 | navBarLeft = [`width:${capsulePosition.width}px`, `height:${capsulePosition.height}px`].join(';'); 104 | } else if ((back && home) || title) { 105 | navBarLeft = [ 106 | `width:${capsulePosition.width}px`, 107 | `height:${capsulePosition.height}px`, 108 | `margin-left:${rightDistance}px` 109 | ].join(';'); 110 | } else { 111 | navBarLeft = [`width:auto`, `margin-left:0px`].join(';'); 112 | } 113 | if (life === 'created') { 114 | this.data = { 115 | navigationbarinnerStyle, 116 | navBarLeft, 117 | navBarHeight, 118 | capsulePosition, 119 | navBarExtendHeight, 120 | ios 121 | }; 122 | } else { 123 | this.setData({ 124 | navigationbarinnerStyle, 125 | navBarLeft, 126 | navBarHeight, 127 | capsulePosition, 128 | navBarExtendHeight, 129 | ios 130 | }); 131 | } 132 | }, 133 | _showChange: function(value) { 134 | this.setStyle(); 135 | }, 136 | // 返回事件 137 | back: function() { 138 | this.triggerEvent('back', { delta: this.data.delta }); 139 | }, 140 | home: function() { 141 | this.triggerEvent('home', {}); 142 | }, 143 | search: function() { 144 | this.triggerEvent('search', {}); 145 | }, 146 | getSystemInfo() { 147 | var app = getApp(); 148 | if (app.globalSystemInfo && !app.globalSystemInfo.ios) { 149 | return app.globalSystemInfo; 150 | } else { 151 | let systemInfo = wx.getSystemInfoSync(); 152 | let ios = !!(systemInfo.system.toLowerCase().search('ios') + 1); 153 | let rect; 154 | try { 155 | rect = wx.getMenuButtonBoundingClientRect ? wx.getMenuButtonBoundingClientRect() : null; 156 | if (rect === null) { 157 | throw 'getMenuButtonBoundingClientRect error'; 158 | } 159 | //取值为0的情况 有可能width不为0 top为0的情况 160 | if (!rect.width || !rect.top || !rect.left || !rect.height) { 161 | throw 'getMenuButtonBoundingClientRect error'; 162 | } 163 | } catch (error) { 164 | let gap = ''; //胶囊按钮上下间距 使导航内容居中 165 | let width = 96; //胶囊的宽度 166 | if (systemInfo.platform === 'android') { 167 | gap = 8; 168 | width = 96; 169 | } else if (systemInfo.platform === 'devtools') { 170 | if (ios) { 171 | gap = 5.5; //开发工具中ios手机 172 | } else { 173 | gap = 7.5; //开发工具中android和其他手机 174 | } 175 | } else { 176 | gap = 4; 177 | width = 88; 178 | } 179 | if (!systemInfo.statusBarHeight) { 180 | //开启wifi的情况下修复statusBarHeight值获取不到 181 | systemInfo.statusBarHeight = systemInfo.screenHeight - systemInfo.windowHeight - 20; 182 | } 183 | rect = { 184 | //获取不到胶囊信息就自定义重置一个 185 | bottom: systemInfo.statusBarHeight + gap + 32, 186 | height: 32, 187 | left: systemInfo.windowWidth - width - 10, 188 | right: systemInfo.windowWidth - 10, 189 | top: systemInfo.statusBarHeight + gap, 190 | width: width 191 | }; 192 | console.log('error', error); 193 | console.log('rect', rect); 194 | } 195 | 196 | let navBarHeight = ''; 197 | if (!systemInfo.statusBarHeight) { 198 | systemInfo.statusBarHeight = systemInfo.screenHeight - systemInfo.windowHeight - 20; 199 | navBarHeight = (function() { 200 | let gap = rect.top - systemInfo.statusBarHeight; 201 | return 2 * gap + rect.height; 202 | })(); 203 | 204 | systemInfo.statusBarHeight = 0; 205 | systemInfo.navBarExtendHeight = 0; //下方扩展4像素高度 防止下方边距太小 206 | } else { 207 | navBarHeight = (function() { 208 | let gap = rect.top - systemInfo.statusBarHeight; 209 | return systemInfo.statusBarHeight + 2 * gap + rect.height; 210 | })(); 211 | if (ios) { 212 | systemInfo.navBarExtendHeight = 4; //下方扩展4像素高度 防止下方边距太小 213 | } else { 214 | systemInfo.navBarExtendHeight = 0; 215 | } 216 | } 217 | systemInfo.navBarHeight = navBarHeight; //导航栏高度不包括statusBarHeight 218 | systemInfo.capsulePosition = rect; //右上角胶囊按钮信息bottom: 58 height: 32 left: 317 right: 404 top: 26 width: 87 目前发现在大多机型都是固定值 为防止不一样所以会使用动态值来计算nav元素大小 219 | systemInfo.ios = ios; //是否ios 220 | 221 | app.globalSystemInfo = systemInfo; //将信息保存到全局变量中,后边再用就不用重新异步获取了 222 | 223 | //console.log('systemInfo', systemInfo); 224 | return systemInfo; 225 | } 226 | } 227 | } 228 | }); 229 | -------------------------------------------------------------------------------- /components/navBar/navBar.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } 5 | -------------------------------------------------------------------------------- /components/navBar/navBar.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | {{title}} 24 | 25 | 26 | 27 | {{searchText}} 28 | 29 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /components/navBar/navBar.wxss: -------------------------------------------------------------------------------- 1 | view, 2 | text, 3 | scroll-view, 4 | input, 5 | button, 6 | image, 7 | cover-view { 8 | box-sizing: border-box; 9 | } 10 | page { 11 | --height: 44px; /* 4*2+32 */ 12 | --right: 97px; /* 10+87 */ 13 | --navBarExtendHeight: 4px; 14 | box-sizing: border-box; 15 | } 16 | .lxy-nav-bar .ios { 17 | --height: 44px; /* 4*2+32 */ 18 | --right: 97px; /* 10+87 */ 19 | --navBarExtendHeight: 4px; 20 | box-sizing: border-box; 21 | } 22 | .lxy-nav-bar .android { 23 | --height: 48px; /* 8*2+32 */ 24 | --right: 96px; /* 10+87 */ 25 | --navBarExtendHeight: 4px; 26 | box-sizing: border-box; 27 | } 28 | .lxy-nav-bar .devtools { 29 | --height: 42px; /* 5*2+32 */ 30 | --right: 88px; /* 10+87 */ 31 | --navBarExtendHeight: 4px; 32 | box-sizing: border-box; 33 | } 34 | .lxy-nav-bar__inner { 35 | position: fixed; 36 | top: 0; 37 | left: 0; 38 | z-index: 5001; 39 | height: var(--height); 40 | display: flex; 41 | align-items: center; 42 | padding-right: var(--right); 43 | width: 100%; 44 | padding-bottom: var(--navBarExtendHeight); 45 | } 46 | .lxy-nav-bar__inner .lxy-nav-bar__left { 47 | position: relative; 48 | width: var(--right); 49 | height: 32px; 50 | /* padding-left: 10px; */ 51 | display: flex; 52 | align-items: center; 53 | } 54 | .lxy-nav-bar__buttons { 55 | height: 100%; 56 | width: 100%; 57 | display: flex; 58 | align-items: center; 59 | border-radius: 16px; 60 | border: 1rpx solid rgba(204, 204, 204, 0.6); 61 | position: relative; 62 | } 63 | .lxy-nav-bar__buttons.android { 64 | border: 1rpx solid rgba(234, 234, 234, 0.6); 65 | } 66 | .lxy-nav-bar__buttons::after { 67 | position: absolute; 68 | content: ''; 69 | width: 1rpx; 70 | height: 18.4px; 71 | background: rgba(204, 204, 204, 0.6); 72 | left: 50%; 73 | top: 50%; 74 | transform: translate(-50%, -50%); 75 | } 76 | .lxy-nav-bar__buttons.android::after { 77 | background: rgba(234, 234, 234, 0.6); 78 | } 79 | .lxy-nav-bar__button { 80 | width: 50%; 81 | height: 100%; 82 | display: flex; 83 | font-size: 12px; 84 | background-repeat: no-repeat; 85 | background-position: center center; 86 | background-size: 1em 2em; 87 | } 88 | 89 | .lxy-nav-bar__inner .lxy-nav-bar__left .lxy-nav-bar__btn_goback:active, 90 | .lxy-nav-bar__inner .lxy-nav-bar__left .lxy-nav-bar__btn_gohome:active { 91 | opacity: 0.5; 92 | } 93 | .lxy-nav-bar__inner .lxy-nav-bar__center { 94 | font-size: 17px; 95 | line-height: 17px; 96 | text-align: center; 97 | position: relative; 98 | flex: 1; 99 | display: -webkit-box; 100 | display: -webkit-flex; 101 | display: flex; 102 | align-items: center; 103 | justify-content: center; 104 | padding-left: 10px; 105 | } 106 | .lxy-nav-bar__inner .lxy-nav-bar__center .lxy-nav-bar__center-title { 107 | margin-top: -2px; 108 | } 109 | .lxy-nav-bar__inner .lxy-nav-bar__loading { 110 | font-size: 0; 111 | } 112 | .lxy-nav-bar__inner .lxy-nav-bar__loading .lxy-loading { 113 | margin-left: 0; 114 | } 115 | .lxy-nav-bar__inner .lxy-nav-bar__right { 116 | margin-right: 10px; 117 | } 118 | .lxy-nav-bar__placeholder { 119 | height: var(--height); 120 | background: #f8f8f8; 121 | position: relative; 122 | z-index: 50; 123 | } 124 | 125 | .lxy-nav-bar-search { 126 | width: 100%; 127 | height: 100%; 128 | display: flex; 129 | justify-content: center; 130 | align-items: center; 131 | width: 100%; 132 | height: 32px; 133 | border-radius: 16px; 134 | position: relative; 135 | background: #f6f6f6; 136 | } 137 | 138 | .lxy-nav-bar-search__input { 139 | height: 100%; 140 | display: flex; 141 | align-items: center; 142 | color: #999; 143 | font-size: 15px; 144 | line-height: 15px; 145 | } 146 | .lxy-nav-bar__inner .lxy-nav-bar__left .lxy-nav-bar__btn_goback { 147 | background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E"); 148 | } 149 | .lxy-nav-bar__inner .lxy-nav-bar__left .lxy-nav-bar__btn_goback.white { 150 | background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z' fill='%23ffffff'/%3E%3C/svg%3E"); 151 | } 152 | .lxy-nav-bar__inner .lxy-nav-bar__left .lxy-nav-bar__btn_gohome { 153 | background-image: url("data:image/svg+xml,%3Csvg t='1565752242401' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='4326' width='48' height='48'%3E%3Cpath d='M931.148 451.25L591.505 97.654c-21.106-21.953-49.313-34.034-79.551-34.034-30.235 0-58.448 12.081-79.554 34.034L92.76 451.25c-35.049 36.498-30.536 68.044-24.742 81.222 4.13 9.35 18.07 35.05 58.231 35.05h49.78v272.016c0 61.756 44.342 119.906 107.357 119.906h144.587v-287.87c0-30.866-4.675-48.062 26.848-48.062h114.268c31.52 0 26.845 17.196 26.845 48.061v287.872h144.588c63.013 0 107.358-58.15 107.358-119.906V567.523h49.782c40.16 0 54.1-25.7 58.229-35.05 5.793-13.18 10.306-44.726-24.743-81.224z m-33.486 60.28h-105.77v328.007c0 30.865-19.877 63.917-51.37 63.917h-88.6V671.572c0-61.761-19.79-104.05-82.832-104.05H454.821c-63.045 0-82.836 42.289-82.836 104.05v231.883h-88.599c-31.495 0-51.37-33.052-51.37-63.917V511.529H126.25c-0.984 0-1.888-3.852-2.708-3.907 1.94-3.388 5.276-11.975 10.825-17.743l339.671-353.35c10.142-10.578 24.467-17.057 38.353-16.924 13.888-0.133 27.342 6.346 37.483 16.923L889.54 489.88c5.549 5.768 8.885 14.355 10.825 17.743-0.818 0.055-1.72 3.907-2.704 3.907z' fill='%23000000' p-id='4327'%3E%3C/path%3E%3C/svg%3E"); 154 | background-size: 22px 22px; 155 | } 156 | .lxy-nav-bar__inner .lxy-nav-bar__left .lxy-nav-bar__btn_gohome.white { 157 | background-image: url("data:image/svg+xml,%3Csvg t='1565752242401' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='4326' width='48' height='48'%3E%3Cpath d='M931.148 451.25L591.505 97.654c-21.106-21.953-49.313-34.034-79.551-34.034-30.235 0-58.448 12.081-79.554 34.034L92.76 451.25c-35.049 36.498-30.536 68.044-24.742 81.222 4.13 9.35 18.07 35.05 58.231 35.05h49.78v272.016c0 61.756 44.342 119.906 107.357 119.906h144.587v-287.87c0-30.866-4.675-48.062 26.848-48.062h114.268c31.52 0 26.845 17.196 26.845 48.061v287.872h144.588c63.013 0 107.358-58.15 107.358-119.906V567.523h49.782c40.16 0 54.1-25.7 58.229-35.05 5.793-13.18 10.306-44.726-24.743-81.224z m-33.486 60.28h-105.77v328.007c0 30.865-19.877 63.917-51.37 63.917h-88.6V671.572c0-61.761-19.79-104.05-82.832-104.05H454.821c-63.045 0-82.836 42.289-82.836 104.05v231.883h-88.599c-31.495 0-51.37-33.052-51.37-63.917V511.529H126.25c-0.984 0-1.888-3.852-2.708-3.907 1.94-3.388 5.276-11.975 10.825-17.743l339.671-353.35c10.142-10.578 24.467-17.057 38.353-16.924 13.888-0.133 27.342 6.346 37.483 16.923L889.54 489.88c5.549 5.768 8.885 14.355 10.825 17.743-0.818 0.055-1.72 3.907-2.704 3.907z' fill='%23ffffff' p-id='4327'%3E%3C/path%3E%3C/svg%3E"); 158 | background-size: 22px 22px; 159 | } 160 | .lxy-nav-bar-search__icon { 161 | width: 22px; 162 | height: 22px; 163 | display: flex; 164 | align-items: center; 165 | justify-content: center; 166 | background-image: url("data:image/svg+xml,%3Csvg t='1565691512239' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='1240' width='48' height='48'%3E%3Cpath d='M819.2 798.254545L674.909091 653.963636c46.545455-48.872727 74.472727-114.036364 74.472727-186.181818 0-151.272727-123.345455-274.618182-274.618182-274.618182-151.272727 0-274.618182 123.345455-274.618181 274.618182 0 151.272727 123.345455 274.618182 274.618181 274.618182 65.163636 0 128-23.272727 174.545455-62.836364l144.290909 144.290909c2.327273 2.327273 6.981818 4.654545 11.636364 4.654546s9.309091-2.327273 11.636363-4.654546c6.981818-6.981818 6.981818-18.618182 2.327273-25.6zM235.054545 467.781818c0-132.654545 107.054545-239.709091 239.709091-239.709091 132.654545 0 239.709091 107.054545 239.709091 239.709091 0 132.654545-107.054545 239.709091-239.709091 239.709091-132.654545 0-239.709091-107.054545-239.709091-239.709091z' fill='%23999999' p-id='1241'%3E%3C/path%3E%3C/svg%3E"); 167 | background-repeat: no-repeat; 168 | background-size: cover; 169 | } 170 | -------------------------------------------------------------------------------- /components/navBar/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "weapp-navigation-bar", 3 | "version": "2.2.1", 4 | "description": "原生封装的自定义导航栏 可自定义返回事件 返回home 搜索框 自定义左中右", 5 | "main": "app.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [ 10 | "weapp", 11 | "miniprogram", 12 | "navbar", 13 | "navigation-bar", 14 | "navigationbar" 15 | ], 16 | "repository": { 17 | "type": "git", 18 | "url": "https://github.com/lingxiaoyi/navigation-bar" 19 | }, 20 | "author": "lxy", 21 | "license": "ISC", 22 | "dependencies": {} 23 | } 24 | -------------------------------------------------------------------------------- /components/wx-pulltorefresh-view/wx-pulltorefresh-view.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | properties: { 3 | pullText: { 4 | type: String, 5 | value: '上拉加载更多', 6 | }, 7 | releaseText: { 8 | type: String, 9 | value: '松开立即刷新', 10 | }, 11 | loadingText: { 12 | type: String, 13 | value: '正在刷新数据中', 14 | }, 15 | finishText: { 16 | type: String, 17 | value: '刷新完成', 18 | }, 19 | pullUpText: { 20 | type: String, 21 | value: '上拉加载更多', 22 | }, 23 | pullUpReleaseText: { 24 | type: String, 25 | value: '松开立即加载', 26 | }, 27 | loadmoreText: { 28 | type: String, 29 | value: '正在加载更多数据', 30 | }, 31 | loadmoreFinishText: { 32 | type: String, 33 | value: '加载完成', 34 | }, 35 | nomoreText: { 36 | type: String, 37 | value: '已经全部加载完毕', 38 | }, 39 | refreshing: { 40 | type: Boolean, 41 | value: false, 42 | observer: 'refreshingChange', 43 | }, 44 | nomore: { 45 | type: Boolean, 46 | value: false, 47 | }, 48 | disablePullDown: { 49 | type: Boolean, 50 | value: false, 51 | }, 52 | disablePullUp: { 53 | type: Boolean, 54 | value: false, 55 | }, 56 | }, 57 | data: { 58 | pullDownStatus: 0, 59 | pullUpStatus: 0, 60 | offsetY: 40, 61 | isOutBound: false, 62 | eventName: '', 63 | }, 64 | methods: { 65 | scrollToBottom: function() { 66 | const query = this.createSelectorQuery() 67 | query.select('#pulltorefresh-view-container').boundingClientRect() 68 | query.exec((function(res){ 69 | const innerHeight = res[0].height 70 | query.select('#pulltorefresh-view').boundingClientRect() 71 | query.exec((function(res) { 72 | const outerHeight = res[0].height 73 | this.setData({ 74 | pullUpStatus: 3, 75 | offsetY: -(innerHeight - outerHeight - 40), 76 | }) 77 | setTimeout((function() { 78 | this.setData({ 79 | pullUpStatus: 0, 80 | }) 81 | }).bind(this), 500) 82 | }).bind(this)) 83 | }).bind(this)) 84 | }, 85 | touchend: function(e) { 86 | if (this.data.isOutBound && this.data.offsetY > 40 && !this.properties.disablePullDown) { 87 | this.setData({ 88 | pullDownStatus: 2, 89 | eventName: 'pulldownrefresh', 90 | }) 91 | this.triggerEvent('pulldownrefresh'); 92 | } else if (this.data.isOutBound && this.data.offsetY < 40 && !this.properties.disablePullUp) { 93 | if (this.properties.nomore) { 94 | this.scrollToBottom() 95 | } else { 96 | this.setData({ 97 | pullUpStatus: 2, 98 | eventName: 'loadmore', 99 | }) 100 | this.triggerEvent('loadmore'); 101 | } 102 | } else { 103 | this.setData({ 104 | offsetY: 40, 105 | pullDownStatus: 0, 106 | }) 107 | } 108 | }, 109 | change: function(e) { 110 | if (this.properties.refreshing) return 111 | this.data.isOutBound = e.detail.source == 'touch-out-of-bounds' 112 | this.data.offsetY = e.detail.y + 40 113 | if (this.data.isOutBound) { 114 | if (this.data.offsetY > 40) { 115 | this.setData({ 116 | pullDownStatus: 1, 117 | }) 118 | } else { 119 | this.setData({ 120 | pullUpStatus: 1, 121 | }) 122 | } 123 | } else if ((this.data.pullDownStatus != 0 && this.data.pullDownStatus != 3) || (this.data.pullUpStatus != 0 && this.data.pullUpStatus != 3)) { 124 | this.setData({ 125 | pullDownStatus: 0, 126 | pullUpStatus: 0, 127 | }) 128 | } 129 | if (this.data.isOutBound && this.data.offsetY > 40 && this.data.pullDownStatus == 0) { 130 | this.setData({ 131 | pullDownStatus: 1, 132 | }) 133 | } else if (this.data.offsetY <= 40 && this.data.pullDownStatus == 1) { 134 | this.setData({ 135 | pullDownStatus: 0, 136 | }) 137 | } 138 | }, 139 | refreshingChange: function(newVal, oldVal) { 140 | if (oldVal === true && newVal === false) { 141 | if (this.data.eventName == 'pulldownrefresh') { 142 | this.setData({ 143 | offsetY: 40, 144 | pullDownStatus: 3, 145 | }) 146 | setTimeout(() => { 147 | this.setData({ 148 | pullDownStatus: 0, 149 | }) 150 | }, 500); 151 | } else if (this.data.eventName = 'loadmore') { 152 | this.scrollToBottom() 153 | } 154 | } 155 | }, 156 | }, 157 | }) -------------------------------------------------------------------------------- /components/wx-pulltorefresh-view/wx-pulltorefresh-view.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /components/wx-pulltorefresh-view/wx-pulltorefresh-view.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{pullText}} 7 | 8 | 9 | {{releaseText}} 10 | 11 | 12 | {{loadingText}}... 13 | 14 | 15 | {{finishText}} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | {{pullUpText}} 25 | 26 | 27 | {{pullUpReleaseText}} 28 | 29 | 30 | {{loadmoreText}}... 31 | 32 | 33 | {{loadmoreFinishText}} 34 | 35 | 36 | 37 | {{nomoreText}} 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /components/wx-pulltorefresh-view/wx-pulltorefresh-view.wxss: -------------------------------------------------------------------------------- 1 | .pulltorefresh-view { 2 | height: 100%; 3 | width: 100%; 4 | display: flex; 5 | flex-direction: column; 6 | align-items: center; 7 | justify-content: center; 8 | 9 | } 10 | 11 | movable-area { 12 | height: 100%; 13 | width: 100%; 14 | } 15 | 16 | movable-view { 17 | height: calc(100% + 80px); 18 | width: 80%; 19 | } 20 | 21 | .pulltorefresh-view .header { 22 | height: 40px; 23 | } 24 | 25 | .pulltorefresh-view .header-text { 26 | height: 40px; 27 | margin: 0px auto; 28 | line-height: 40px; 29 | text-align: center; 30 | } 31 | 32 | .pulltorefresh-view .body { 33 | height: calc(100% - 80px); 34 | } 35 | 36 | .pulltorefresh-view .loadmore { 37 | height: 40px; 38 | } 39 | 40 | .pulltorefresh-view .loadmore view { 41 | height: 40px; 42 | margin: 0px auto; 43 | line-height: 40px; 44 | text-align: center; 45 | } 46 | 47 | .loading { 48 | display: inline-block; 49 | transform-origin: 50% 50%; 50 | animation: loading 1s linear infinite; 51 | } 52 | 53 | @keyframes loading { 54 | 0% {transform: rotate(0deg)} 55 | 50% {transform: rotate(180deg)} 56 | 100% {transform: rotate(360deg)} 57 | } 58 | 59 | @font-face {font-family: "iconfont"; 60 | src: url('iconfont.eot?t=1520838078027'); /* IE9*/ 61 | src: url('iconfont.eot?t=1520838078027#iefix') format('embedded-opentype'), /* IE6-IE8 */ 62 | url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAWkAAsAAAAACCgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZW7kuaY21hcAAAAYAAAAB6AAAByKkz+SxnbHlmAAAB/AAAAYYAAAGYdRuBnWhlYWQAAAOEAAAALwAAADYQt9FAaGhlYQAAA7QAAAAcAAAAJAfeA4dobXR4AAAD0AAAABMAAAAYF+kAAGxvY2EAAAPkAAAADgAAAA4B4AE4bWF4cAAAA/QAAAAfAAAAIAEVAF1uYW1lAAAEFAAAAUUAAAJtPlT+fXBvc3QAAAVcAAAASAAAAFncWPV6eJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/sM4gYGVgYOpk+kMAwNDP4RmfM1gxMjBwMDEwMrMgBUEpLmmMDgwVLxcw9zwv4EhhrmBoQEozAiSAwAxqA0feJzFkbENhTAMRJ8hfCHEKEyCmOeLgp6egilYzFPAOYGCCbjoRbmTFUcx0AC1GEQCWzBCf6WW85ou54lRvqel0nn21Tff/ThPpW/3yFT9rHCV7krR0X58Jvuu9Vt93qfbxRzmGz3R14L+DN8KMSffCzErPwo0FyyDIOcAAHicJY+7SgNREIZnzsleotmNe99sks1lkxwlGjBZEy+YiNgoFoKVYKEPoI2FIBZpBAtBwdJKCWgrKFj4ABbWgoKFFxArWxFZ3ejwNwPffD8DHMDPE72mNmjQD8MwAwsAyJcxL5M05phfIWU0cpxh6TJlHssJXr5CJ9HK87pZrfslixf4OMroYi1XrbMKYTjiN8kEVs00YiLpLKrFlEoPsMdm7k4wR07QyHipeHMomB1s6dWsJm7GVDWhqnsiz3EiIZG4jGuWGeWiPXzQ4eKOcZ0ZIBmMJZgzvyRlk+rqrr+eLlpRxHYbtWRWPm0pjhJm2zE1NSH0SaLtSF5Bx83XXluLpUsvEA6Gv+6TDzoKfLhYAlM8hRgPxcsajTwULr7v6FmXAaBbpN1lisiiKCBuECET2MGni6VlwruBjaIb3P/5DolJ/S7LsYal1BR8vi9c1sZCHfW+V+Dfh29hpwTQqOBIExuGjIJuWjfN6cj7+dEtnayPT3WWrr5kX3o8Xjyohxe/NMZLegAAeJxjYGRgYADi0vZZW+P5bb4ycLMwgMC1M277EPT/fhYGZgsgl4OBCSQKAEcNCx8AeJxjYGRgYG7438AQw8IAAkCSkQEVsAEARwwCb3icY2FgYGB+ycDAwoCKARKfAQEAAAAAAAB2AIgAngCwAMwAAHicY2BkYGBgYwhkYGUAASYg5gJCBob/YD4DABFIAXMAeJxlj01OwzAQhV/6B6QSqqhgh+QFYgEo/RGrblhUavdddN+mTpsqiSPHrdQDcB6OwAk4AtyAO/BIJ5s2lsffvHljTwDc4Acejt8t95E9XDI7cg0XuBeuU38QbpBfhJto41W4Rf1N2MczpsJtdGF5g9e4YvaEd2EPHXwI13CNT+E69S/hBvlbuIk7/Aq30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicY2BigAAuBuyAjZGJkZmRhZGVkY2RnYGxgqsoNSc1sThVt7SAIzk/tyAntSSVs6A0J0c3Jb88jz0nPzElMy+dgQEARPMOmw==') format('woff'), 63 | url('iconfont.ttf?t=1520838078027') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 64 | url('iconfont.svg?t=1520838078027#iconfont') format('svg'); /* iOS 4.1- */ 65 | } 66 | 67 | .iconfont { 68 | font-family:"iconfont" !important; 69 | font-size:16px; 70 | font-style:normal; 71 | -webkit-font-smoothing: antialiased; 72 | -moz-osx-font-smoothing: grayscale; 73 | } 74 | 75 | .icon-release-up:before { content: "\e987"; } 76 | 77 | .icon-complete:before { content: "\e992"; } 78 | 79 | .icon-pull-down:before { content: "\e996"; } 80 | 81 | .icon-loading:before { content: "\e9ac"; } -------------------------------------------------------------------------------- /image/kefu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kilakila-heart/fuliba-front/40764d65826bce20455b0727b522ec64bcb8a3f6/image/kefu.png -------------------------------------------------------------------------------- /image/nav-icon/Diamond.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kilakila-heart/fuliba-front/40764d65826bce20455b0727b522ec64bcb8a3f6/image/nav-icon/Diamond.png -------------------------------------------------------------------------------- /image/nav-icon/all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kilakila-heart/fuliba-front/40764d65826bce20455b0727b522ec64bcb8a3f6/image/nav-icon/all.png -------------------------------------------------------------------------------- /image/nav-icon/business.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kilakila-heart/fuliba-front/40764d65826bce20455b0727b522ec64bcb8a3f6/image/nav-icon/business.png -------------------------------------------------------------------------------- /image/nav-icon/food.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kilakila-heart/fuliba-front/40764d65826bce20455b0727b522ec64bcb8a3f6/image/nav-icon/food.png -------------------------------------------------------------------------------- /image/nav-icon/goup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kilakila-heart/fuliba-front/40764d65826bce20455b0727b522ec64bcb8a3f6/image/nav-icon/goup.png -------------------------------------------------------------------------------- /image/nav-icon/night.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kilakila-heart/fuliba-front/40764d65826bce20455b0727b522ec64bcb8a3f6/image/nav-icon/night.png -------------------------------------------------------------------------------- /image/nav-icon/theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kilakila-heart/fuliba-front/40764d65826bce20455b0727b522ec64bcb8a3f6/image/nav-icon/theme.png -------------------------------------------------------------------------------- /pages/index/detail/detail.js: -------------------------------------------------------------------------------- 1 | const app = getApp(); 2 | var utils = require('../../../utils/utils.js') 3 | var wxParse = require('../../../wxParse/wxParse.js') 4 | 5 | // 定义一个全局变量保存从接口获取到的数据,以免重复请求接口 6 | var resut; 7 | Page({ 8 | 9 | /** 10 | * 页面的初始数据 11 | */ 12 | data: { 13 | article:'' 14 | }, 15 | 16 | /** 17 | * 生命周期函数--监听页面加载 18 | */ 19 | onLoad: function (options) { 20 | // wx.showToast({ title: '玩命加载中', icon: 'loading', duration: 10000 }); 21 | var that = this; 22 | //将字符串转换成对象 23 | var article = decodeURIComponent(options.pagesource) 24 | // var article ='

HiddenMe – 快速隐藏 macOS 桌面所有图标、文件

HiddenMe 是一款简单的 macOS 小工具,它能帮你快速隐藏桌面上的所有图标,还你一个清爽的屏幕,以用来欣赏、截图、录屏等。@Appinn

HiddenMe - 快速隐藏 macOS 桌面所有图标、文件 3
左一:HiddenMe

当 HiddenMe 的小图标上显示很多点的时候,意味着未隐藏图标;当小点变暗的时候,隐藏图标。

可以在 Mac App Store 免费安装 HiddenMe。

' 25 | 26 | this.setData({ 27 | article: article 28 | }) 29 | 30 | //用于测试-- 31 | // url ='https://recod.cn:8081/api/v2.0/topic/?pageNum=1&num=4&kind=娱乐' 32 | 33 | //成功获取数据后调用渲染函数使用this调用 34 | that.renderHtml() 35 | // WxParse.wxParse('article', 'html', that.data.article, that, 5); 36 | // wx.hideToast() 37 | 38 | }, 39 | handlerGobackClick(delta) { 40 | utils.handlerClick.GobackClick(delta) 41 | }, 42 | handlerGohomeClick() { 43 | utils.handlerClick.GohomeClick() 44 | }, 45 | //渲染函数 46 | renderHtml:function(){ 47 | var that=this 48 | var article = that.data.article 49 | 50 | wxParse.wxParse('article', 'html', article, that, 5); 51 | } 52 | }) -------------------------------------------------------------------------------- /pages/index/detail/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/index/detail/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |