commit 1b52c78fe721985c0c6b8dd0ae94cc9d41090dec Author: huangge1199 Date: Mon Aug 5 14:25:42 2024 +0800 新闻初版 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6be0179 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +# Mac +.DS_Store +**/.DS_Store + +# vim/vi +*.swp + +# JavaScript +node_modules/ +.node_modules/ +.eslintcache +unpackage/dist/build/ +unpackage/dist/dev/ + +# python +*.pyc +/.hbuilderx/ +/unpackage/ diff --git a/App.vue b/App.vue new file mode 100644 index 0000000..f4c87f2 --- /dev/null +++ b/App.vue @@ -0,0 +1,53 @@ + + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..38d423d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 DCloud + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..eb72d4f --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# uni-template-news +基于uni-app开发的新闻/资讯类App模板 + +## 体验方式 +同步/下载项目后,拖入 HBuilderX 中即可运行体验。 + +## 特点 +* 兼容多个平台 +* 自定义组件实现顶部选项卡切换 +* App 平台使用 nvue 进一步优化体验 + +### 平台支持 +* app-vue +* app-nvue +* H5 +* 微信小程序 +* 支付宝小程序 +* 百度小程序 +* 头条小程序 + +## 注意事项 +* 非 App-nvue 平台暂不支持下拉刷新 diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..2e0852e --- /dev/null +++ b/changelog.md @@ -0,0 +1,23 @@ +## 3.1.7(2022-06-30) +- 新增 支持 ios 安全区 +## 3.1.6(2022-02-08) +- 移除无效的H5平台百度统计 +## 3.1.5(2021-11-26) +- 新增 小程序平台支持VUE3 (HBuilderX 3.3+) +- 修复 某些情况下无法滚动的问题 +## 3.1.4(2021-07-30) +- 适配 VUE3 (需要 HBuilderX 3.2.0+) +## 3.1.3(2021-07-28) +- 适配 VUE3 (需要 HBuilderX 3.2.0+) +## 3.0.0(2021-02-19) +- 修复 某些操作导致上拉加载无效的问题 +## 2.9.5(2020-10-23) +- 修复 app 平台 ios 顶部页签高度显示不正确的问题 +## 2.9.2(2020-09-27) +- 修复app平台运行时出错的bug +## 2.9.1(2020-09-27) +- 修复加载更多文字过大问题 +## 2.9.0(2020-09-25) +- 适配大屏 +## 2.4.2(2019-11-18) +- 重构代码,支持编译到所有平台 \ No newline at end of file diff --git a/common/html-parser.js b/common/html-parser.js new file mode 100644 index 0000000..20a89b2 --- /dev/null +++ b/common/html-parser.js @@ -0,0 +1,352 @@ +/* + * HTML5 Parser By Sam Blowes + * + * Designed for HTML5 documents + * + * Original code by John Resig (ejohn.org) + * http://ejohn.org/blog/pure-javascript-html-parser/ + * Original code by Erik Arvidsson, Mozilla Public License + * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js + * + * ---------------------------------------------------------------------------- + * License + * ---------------------------------------------------------------------------- + * + * This code is triple licensed using Apache Software License 2.0, + * Mozilla Public License or GNU Public License + * + * //////////////////////////////////////////////////////////////////////////// + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * //////////////////////////////////////////////////////////////////////////// + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Simple HTML Parser. + * + * The Initial Developer of the Original Code is Erik Arvidsson. + * Portions created by Erik Arvidssson are Copyright (C) 2004. All Rights + * Reserved. + * + * //////////////////////////////////////////////////////////////////////////// + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * ---------------------------------------------------------------------------- + * Usage + * ---------------------------------------------------------------------------- + * + * // Use like so: + * HTMLParser(htmlString, { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * }); + * + * // or to get an XML string: + * HTMLtoXML(htmlString); + * + * // or to get an XML DOM Document + * HTMLtoDOM(htmlString); + * + * // or to inject into an existing document/DOM node + * HTMLtoDOM(htmlString, document); + * HTMLtoDOM(htmlString, document.body); + * + */ +// Regular Expressions for parsing tags and attributes +var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/; +var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/; +var attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; // Empty Elements - HTML 5 + +var empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr'); // Block Elements - HTML 5 +// fixed by xxx 将 ins 标签从块级名单中移除 + +var block = makeMap('a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video'); // Inline Elements - HTML 5 + +var inline = makeMap('abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'); // Elements that you can, intentionally, leave open +// (and which close themselves) + +var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); // Attributes that have their values filled in disabled="disabled" + +var fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'); // Special Elements (can contain anything) + +var special = makeMap('script,style'); +function HTMLParser(html, handler) { + var index; + var chars; + var match; + var stack = []; + var last = html; + + stack.last = function () { + return this[this.length - 1]; + }; + + while (html) { + chars = true; // Make sure we're not in a script or style element + + if (!stack.last() || !special[stack.last()]) { + // Comment + if (html.indexOf(''); + + if (index >= 0) { + if (handler.comment) { + handler.comment(html.substring(4, index)); + } + + html = html.substring(index + 3); + chars = false; + } // end tag + + } else if (html.indexOf(']*>'), function (all, text) { + text = text.replace(/|/g, '$1$2'); + + if (handler.chars) { + handler.chars(text); + } + + return ''; + }); + parseEndTag('', stack.last()); + } + + if (html == last) { + throw 'Parse Error: ' + html; + } + + last = html; + } // Clean up any remaining tags + + + parseEndTag(); + + function parseStartTag(tag, tagName, rest, unary) { + tagName = tagName.toLowerCase(); + + if (block[tagName]) { + while (stack.last() && inline[stack.last()]) { + parseEndTag('', stack.last()); + } + } + + if (closeSelf[tagName] && stack.last() == tagName) { + parseEndTag('', tagName); + } + + unary = empty[tagName] || !!unary; + + if (!unary) { + stack.push(tagName); + } + + if (handler.start) { + var attrs = []; + rest.replace(attr, function (match, name) { + var value = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : fillAttrs[name] ? name : ''; + attrs.push({ + name: name, + value: value, + escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') // " + + }); + }); + + if (handler.start) { + handler.start(tagName, attrs, unary); + } + } + } + + function parseEndTag(tag, tagName) { + // If no tag name is provided, clean shop + if (!tagName) { + var pos = 0; + } // Find the closest opened tag of the same type + else { + for (var pos = stack.length - 1; pos >= 0; pos--) { + if (stack[pos] == tagName) { + break; + } + } + } + + if (pos >= 0) { + // Close all the open elements, up the stack + for (var i = stack.length - 1; i >= pos; i--) { + if (handler.end) { + handler.end(stack[i]); + } + } // Remove the open elements from the stack + + + stack.length = pos; + } + } +} + +function makeMap(str) { + var obj = {}; + var items = str.split(','); + + for (var i = 0; i < items.length; i++) { + obj[items[i]] = true; + } + + return obj; +} + +function removeDOCTYPE(html) { + return html.replace(/<\?xml.*\?>\n/, '').replace(/\n/, '').replace(/\n/, ''); +} + +function parseAttrs(attrs) { + return attrs.reduce(function (pre, attr) { + var value = attr.value; + var name = attr.name; + + if (pre[name]) { + pre[name] = pre[name] + " " + value; + } else { + pre[name] = value; + } + + return pre; + }, {}); +} + +function parseHtml(html) { + html = removeDOCTYPE(html); + var stacks = []; + var results = { + node: 'root', + children: [] + }; + HTMLParser(html, { + start: function start(tag, attrs, unary) { + var node = { + name: tag + }; + + if (attrs.length !== 0) { + node.attrs = parseAttrs(attrs); + } + + if (unary) { + var parent = stacks[0] || results; + + if (!parent.children) { + parent.children = []; + } + + parent.children.push(node); + } else { + stacks.unshift(node); + } + }, + end: function end(tag) { + var node = stacks.shift(); + if (node.name !== tag) console.error('invalid state: mismatch end tag'); + + if (stacks.length === 0) { + results.children.push(node); + } else { + var parent = stacks[0]; + + if (!parent.children) { + parent.children = []; + } + + parent.children.push(node); + } + }, + chars: function chars(text) { + var node = { + type: 'text', + text: text + }; + + if (stacks.length === 0) { + results.children.push(node); + } else { + var parent = stacks[0]; + + if (!parent.children) { + parent.children = []; + } + + parent.children.push(node); + } + }, + comment: function comment(text) { + var node = { + node: 'comment', + text: text + }; + var parent = stacks[0]; + + if (!parent.children) { + parent.children = []; + } + + parent.children.push(node); + } + }); + return results.children; +} + +export default parseHtml; diff --git a/common/util.js b/common/util.js new file mode 100644 index 0000000..13f40f6 --- /dev/null +++ b/common/util.js @@ -0,0 +1,52 @@ +function friendlyDate(timestamp) { + var formats = { + 'year': '%n% 年前', + 'month': '%n% 月前', + 'day': '%n% 天前', + 'hour': '%n% 小时前', + 'minute': '%n% 分钟前', + 'second': '%n% 秒前', + }; + + var now = Date.now(); + var seconds = Math.floor((now - timestamp) / 1000); + var minutes = Math.floor(seconds / 60); + var hours = Math.floor(minutes / 60); + var days = Math.floor(hours / 24); + var months = Math.floor(days / 30); + var years = Math.floor(months / 12); + + var diffType = ''; + var diffValue = 0; + if (years > 0) { + diffType = 'year'; + diffValue = years; + } else { + if (months > 0) { + diffType = 'month'; + diffValue = months; + } else { + if (days > 0) { + diffType = 'day'; + diffValue = days; + } else { + if (hours > 0) { + diffType = 'hour'; + diffValue = hours; + } else { + if (minutes > 0) { + diffType = 'minute'; + diffValue = minutes; + } else { + diffType = 'second'; + diffValue = seconds === 0 ? (seconds = 1) : seconds; + } + } + } + } + } + return formats[diffType].replace('%n%', diffValue); +} +export { + friendlyDate +} diff --git a/components/nodata.nvue b/components/nodata.nvue new file mode 100644 index 0000000..fae9977 --- /dev/null +++ b/components/nodata.nvue @@ -0,0 +1,188 @@ + + + + + diff --git a/components/uni-list.vue b/components/uni-list.vue new file mode 100644 index 0000000..ab9586c --- /dev/null +++ b/components/uni-list.vue @@ -0,0 +1,130 @@ + + + + + diff --git a/components/uni-load-more.vue b/components/uni-load-more.vue new file mode 100644 index 0000000..8a052ee --- /dev/null +++ b/components/uni-load-more.vue @@ -0,0 +1,381 @@ + + + + + \ No newline at end of file diff --git a/components/uni-refresh.wxs b/components/uni-refresh.wxs new file mode 100644 index 0000000..4e1a1fa --- /dev/null +++ b/components/uni-refresh.wxs @@ -0,0 +1,85 @@ +var pullDown = { + threshold: 95, + maxHeight: 200, + callRefresh: 'onrefresh', + callPullingDown: 'onpullingdown', + refreshSelector: '.uni-refresh' +}; + +function ready(newValue, oldValue, ownerInstance, instance) { + var state = instance.getState() + state.canPullDown = newValue; + console.log(newValue); +} + +function touchStart(e, instance) { + var state = instance.getState(); + state.refreshInstance = instance.selectComponent(pullDown.refreshSelector); + state.canPullDown = (state.refreshInstance != null && state.refreshInstance != undefined); + if (!state.canPullDown) { + return + } + + state.height = 0; + state.touchStartY = e.touches[0].pageY || e.changedTouches[0].pageY; + state.refreshInstance.setStyle({ + 'height': 0 + }); + state.refreshInstance.callMethod("onchange", true); +} + +function touchMove(e, ownerInstance) { + var instance = e.instance; + var state = instance.getState(); + if (!state.canPullDown) { + return + } + + var oldHeight = state.height; + var endY = e.touches[0].pageY || e.changedTouches[0].pageY; + var height = endY - state.touchStartY; + if (height > pullDown.maxHeight) { + return; + } + + var refreshInstance = state.refreshInstance; + refreshInstance.setStyle({ + 'height': height + 'px' + }); + + height = height < pullDown.maxHeight ? height : pullDown.maxHeight; + state.height = height; + refreshInstance.callMethod(pullDown.callPullingDown, { + height: height + }); +} + +function touchEnd(e, ownerInstance) { + var state = e.instance.getState(); + if (!state.canPullDown) { + return + } + + state.refreshInstance.callMethod("onchange", false); + + var refreshInstance = state.refreshInstance; + if (state.height > pullDown.threshold) { + refreshInstance.callMethod(pullDown.callRefresh); + return; + } + + refreshInstance.setStyle({ + 'height': 0 + }); +} + +function propObserver(newValue, oldValue, instance) { + pullDown = newValue; +} + +module.exports = { + touchmove: touchMove, + touchstart: touchStart, + touchend: touchEnd, + propObserver: propObserver +} diff --git a/h5.template.html b/h5.template.html new file mode 100644 index 0000000..581f248 --- /dev/null +++ b/h5.template.html @@ -0,0 +1,45 @@ + + + + + + + + <%= htmlWebpackPlugin.options.title %> + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..c3ff205 --- /dev/null +++ b/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + +
+ + + diff --git a/main.js b/main.js new file mode 100644 index 0000000..18e8362 --- /dev/null +++ b/main.js @@ -0,0 +1,26 @@ +import App from './App.vue' + +const host = 'https://unidemo.dcloud.net.cn/'; + +// #ifndef VUE3 +import Vue from 'vue' +Vue.config.productionTip = false +Vue.prototype.$host = host; +App.mpType = 'app' +const app = new Vue({ + ...App +}) +app.$mount() +// #endif + +// #ifdef VUE3 +import { + createSSRApp +} from 'vue' +export function createApp() { + const app = createSSRApp(App) + return { + app + } +} +// #endif diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..b58c480 --- /dev/null +++ b/manifest.json @@ -0,0 +1,108 @@ +{ + "name" : "news", + "appid" : "__UNI__8C5575B", + "description" : "基于uni-app开发的新闻/资讯类App模板", + "versionName" : "3.1.23", + "versionCode" : 1, + "transformPx" : false, + "uniStatistics" : { + "enable" : false + }, + "compatConfig" : { + "MODE" : 2 // 2代表兼容Vue2模式,3代表非兼容Vue2模式 + }, + "app-plus" : { + "usingComponents" : true, + "nvueCompiler" : "uni-app", + /* 5+App特有相关 */ + "modules" : {}, + /* 模块配置 */ + "distribute" : { + /* 应用发布信息 */ + "android" : { + /* android打包配置 */ + "permissions" : [ + "", + "", + "", + "", + "", + "" + ], + "permissionPhoneState" : { + "request" : "none" + }, + "abiFilters" : [ "armeabi-v7a" ] + }, + "ios" : { + "idfa" : false + }, + /* ios打包配置 */ + "sdkConfigs" : { + "ad" : {} + }, + "icons" : { + "android" : { + "hdpi" : "unpackage/res/icons/72x72.png", + "xhdpi" : "unpackage/res/icons/96x96.png", + "xxhdpi" : "unpackage/res/icons/144x144.png", + "xxxhdpi" : "unpackage/res/icons/192x192.png" + }, + "ios" : { + "appstore" : "unpackage/res/icons/1024x1024.png", + "ipad" : { + "app" : "unpackage/res/icons/76x76.png", + "app@2x" : "unpackage/res/icons/152x152.png", + "notification" : "unpackage/res/icons/20x20.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "proapp@2x" : "unpackage/res/icons/167x167.png", + "settings" : "unpackage/res/icons/29x29.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "spotlight" : "unpackage/res/icons/40x40.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png" + }, + "iphone" : { + "app@2x" : "unpackage/res/icons/120x120.png", + "app@3x" : "unpackage/res/icons/180x180.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "notification@3x" : "unpackage/res/icons/60x60.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "settings@3x" : "unpackage/res/icons/87x87.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png", + "spotlight@3x" : "unpackage/res/icons/120x120.png" + } + } + } + } + }, + "quickapp" : {}, + "mp-weixin" : { + "appid" : "wxabb93d365d4475a4", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "h5" : { + "router" : { + "base" : "./", + "mode" : "hash" + }, + "template" : "h5.template.html", + "optimization" : { + "treeShaking" : { + "enable" : true + } + } + }, + "vueVersion" : "3" +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..e6fc176 --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "id": "uni-template-news", + "name": "新闻资讯App模板", + "displayName": "新闻资讯App模板", + "version": "3.1.7", + "description": "基于uni-app开发的新闻/资讯类App模板", + "keywords": [ + "模板", + "新闻", + "资讯", + "nvue", + "新闻模板" + ], + "dcloudext": { + "category": [ + "前端页面模板", + "uni-app前端项目模板" + ] + } +} \ No newline at end of file diff --git a/pages.json b/pages.json new file mode 100644 index 0000000..d4a57e6 --- /dev/null +++ b/pages.json @@ -0,0 +1,32 @@ +{ + "pages": [{ + "path": "pages/news/index", + "style": {} + }, + { + "path": "pages/news/detail", + "style": { + "app-plus": { + "titleNView": { + "type": "transparent" + } + } + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "white", + "navigationBarTitleText": "新闻资讯", + "navigationBarBackgroundColor": "#2F85FC", + "backgroundColor": "#FFFFFF" + }, + "rightWindow": { + "path": "responsive/right-window.vue", + "style": { + "width": "calc(100vw - 450px)" + }, + "matchMedia": { + "minWidth": 768 + } + } +} diff --git a/pages/news/detail.nvue b/pages/news/detail.nvue new file mode 100644 index 0000000..da5c6a0 --- /dev/null +++ b/pages/news/detail.nvue @@ -0,0 +1,178 @@ + + + + + diff --git a/pages/news/index.nvue b/pages/news/index.nvue new file mode 100644 index 0000000..bb76bc6 --- /dev/null +++ b/pages/news/index.nvue @@ -0,0 +1,381 @@ + + + + + diff --git a/pages/news/news-item.nvue b/pages/news/news-item.nvue new file mode 100644 index 0000000..f0990e9 --- /dev/null +++ b/pages/news/news-item.nvue @@ -0,0 +1,198 @@ + + + + + diff --git a/pages/news/news-page.nvue b/pages/news/news-page.nvue new file mode 100644 index 0000000..1a00c81 --- /dev/null +++ b/pages/news/news-page.nvue @@ -0,0 +1,316 @@ + + + + + \ No newline at end of file diff --git a/pages/ucenter/ucenter.nvue b/pages/ucenter/ucenter.nvue new file mode 100644 index 0000000..5dcc717 --- /dev/null +++ b/pages/ucenter/ucenter.nvue @@ -0,0 +1,188 @@ + + + + + diff --git a/responsive/right-window.vue b/responsive/right-window.vue new file mode 100644 index 0000000..fae1f53 --- /dev/null +++ b/responsive/right-window.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/static/app-icon.png b/static/app-icon.png new file mode 100644 index 0000000..0c5a83c Binary files /dev/null and b/static/app-icon.png differ diff --git a/static/center-active.png b/static/center-active.png new file mode 100644 index 0000000..43aa282 Binary files /dev/null and b/static/center-active.png differ diff --git a/static/center.png b/static/center.png new file mode 100644 index 0000000..7b3edcf Binary files /dev/null and b/static/center.png differ diff --git a/static/home-active.png b/static/home-active.png new file mode 100644 index 0000000..31c0759 Binary files /dev/null and b/static/home-active.png differ diff --git a/static/home.png b/static/home.png new file mode 100644 index 0000000..2ee7ecb Binary files /dev/null and b/static/home.png differ diff --git a/static/logo.png b/static/logo.png new file mode 100644 index 0000000..6cbdbb2 Binary files /dev/null and b/static/logo.png differ diff --git a/static/text-icon.ttf b/static/text-icon.ttf new file mode 100644 index 0000000..6977268 Binary files /dev/null and b/static/text-icon.ttf differ diff --git a/uni.scss b/uni.scss new file mode 100644 index 0000000..f0f426c --- /dev/null +++ b/uni.scss @@ -0,0 +1,76 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ + +/* 颜色变量 */ + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:24upx; +$uni-font-size-base:28upx; +$uni-font-size-lg:32upx; + +/* 图片尺寸 */ +$uni-img-size-sm:40upx; +$uni-img-size-base:52upx; +$uni-img-size-lg:80upx; + +/* Border Radius */ +$uni-border-radius-sm: 4upx; +$uni-border-radius-base: 6upx; +$uni-border-radius-lg: 12upx; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 10px; +$uni-spacing-row-base: 20upx; +$uni-spacing-row-lg: 30upx; + +/* 垂直间距 */ +$uni-spacing-col-sm: 8upx; +$uni-spacing-col-base: 16upx; +$uni-spacing-col-lg: 24upx; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:40upx; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:36upx; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:30upx; \ No newline at end of file