From b312b2e57bc62b5c58989e656c2ac7ecc56f7ead Mon Sep 17 00:00:00 2001 From: MrKBear Date: Mon, 3 Jan 2022 17:52:42 +0800 Subject: [PATCH 1/4] Link API Doc --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dcb92d2..0e91ec7 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ __*!!!警告!!!*__ - [社区介绍](#小程序社区) - [项目设计](#第三代小程序) - [贡献规范](#社区贡献规范) +- [API文档](https://docs.apipost.cn/preview/e737de418d4ef150/419d45d8c97d6a9f) - [入门文档(等待撰写)](#第三代掌上教务处小程序) - [设计架构(等待撰写)](#第三代掌上教务处小程序) From 28d6870a844e1f1aabf6c8f24963826fffb096d2 Mon Sep 17 00:00:00 2001 From: MrKBear Date: Tue, 4 Jan 2022 13:57:47 +0800 Subject: [PATCH 2/4] Change theme color --- miniprogram/app.scss | 13 +++++++----- miniprogram/pages/Account/Account.json | 3 ++- miniprogram/pages/Account/Account.scss | 9 +++++++++ miniprogram/pages/Account/Account.wxml | 9 ++++++++- miniprogram/pages/Timetable/StatusBar.scss | 4 ++-- miniprogram/theme.json | 4 ++-- project.private.config.json | 23 ++++++++++++++++++++++ 7 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 project.private.config.json diff --git a/miniprogram/app.scss b/miniprogram/app.scss index 50e6753..72fb7f3 100644 --- a/miniprogram/app.scss +++ b/miniprogram/app.scss @@ -7,8 +7,8 @@ $theme-color-light-background: #f4f0f1; $theme-color-light-title: rgba(0, 0, 0, .65); $theme-color-light-text: rgba(0, 0, 0, .55); -$theme-color-dark-layout: #191919; -$theme-color-dark-background: #1f1f1f; +$theme-color-dark-layout: #1f1f1f; +$theme-color-dark-background: #181615; $theme-color-dark-title: rgba(255, 255, 255, .65); $theme-color-dark-text: rgba(255, 255, 255, .55); @@ -16,10 +16,13 @@ $black-filter: brightness(0) opacity(.65); $white-filter: brightness(100) opacity(.65); $blue-filter: opacity(.65); - +view.container { + width: 88%; + padding: 0 6%; +} page { - background-color: #f4f0f1; + background-color: $theme-color-light-background; color: $theme-color-light-text; font-weight: 500; font-size: .9em; @@ -28,7 +31,7 @@ page { @media (prefers-color-scheme: dark){ page { - background-color: #1f1f1f; + background-color: $theme-color-dark-background; color: $theme-color-dark-text; } } \ No newline at end of file diff --git a/miniprogram/pages/Account/Account.json b/miniprogram/pages/Account/Account.json index 8835af0..e8c2c06 100644 --- a/miniprogram/pages/Account/Account.json +++ b/miniprogram/pages/Account/Account.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "navigationBarTitleText": "设置" } \ No newline at end of file diff --git a/miniprogram/pages/Account/Account.scss b/miniprogram/pages/Account/Account.scss index e69de29..a003654 100644 --- a/miniprogram/pages/Account/Account.scss +++ b/miniprogram/pages/Account/Account.scss @@ -0,0 +1,9 @@ +view.container { + + // 用户卡片 + view.user-card { + width: 100%; + height: 200px; + background-color: aqua; + } +} \ No newline at end of file diff --git a/miniprogram/pages/Account/Account.wxml b/miniprogram/pages/Account/Account.wxml index 715e00c..788e060 100644 --- a/miniprogram/pages/Account/Account.wxml +++ b/miniprogram/pages/Account/Account.wxml @@ -1 +1,8 @@ - + + + + + + + + \ No newline at end of file diff --git a/miniprogram/pages/Timetable/StatusBar.scss b/miniprogram/pages/Timetable/StatusBar.scss index 3e5863f..c0bca9f 100644 --- a/miniprogram/pages/Timetable/StatusBar.scss +++ b/miniprogram/pages/Timetable/StatusBar.scss @@ -9,7 +9,7 @@ view.status-bar { display: flex; position: fixed; justify-content: space-between; - background-color: #F8F8F8; + background-color: $theme-color-light-layout; view.select { flex: 1; @@ -111,7 +111,7 @@ view.status-bar-blank { } view.status-bar { - background-color: #191919; + background-color: $theme-color-dark-layout; view.select image { filter: $white-filter; diff --git a/miniprogram/theme.json b/miniprogram/theme.json index f7a1521..5be0b04 100644 --- a/miniprogram/theme.json +++ b/miniprogram/theme.json @@ -11,9 +11,9 @@ }, "dark": { - "navigationBarBackgroundColor": "#191919", + "navigationBarBackgroundColor": "#1f1f1f", "navigationBarTextStyle": "white", - "backgroundColor": "#1f1f1f", + "backgroundColor": "#191919", "tabBarColor": "#666666", "tabBarImage0": "image/navBar/0_dark.png", diff --git a/project.private.config.json b/project.private.config.json new file mode 100644 index 0000000..41aae51 --- /dev/null +++ b/project.private.config.json @@ -0,0 +1,23 @@ +{ + "condition": { + "plugin": { + "list": [] + }, + "game": { + "list": [] + }, + "gamePlugin": { + "list": [] + }, + "miniprogram": { + "list": [ + { + "name": "Account", + "pathName": "pages/Account/Account", + "query": "", + "scene": null + } + ] + } + } +} \ No newline at end of file From 1c3171f1e40351693a434e9e269e775523fe8e0a Mon Sep 17 00:00:00 2001 From: MrKBear Date: Tue, 4 Jan 2022 17:31:35 +0800 Subject: [PATCH 3/4] Account page --- miniprogram/app.scss | 33 ++++++++++++++++++++++++-- miniprogram/pages/Account/Account.scss | 26 +++++++++++++++++--- miniprogram/pages/Account/Account.wxml | 18 ++++++++++++-- 3 files changed, 70 insertions(+), 7 deletions(-) diff --git a/miniprogram/app.scss b/miniprogram/app.scss index 72fb7f3..a6bfbf7 100644 --- a/miniprogram/app.scss +++ b/miniprogram/app.scss @@ -16,11 +16,36 @@ $black-filter: brightness(0) opacity(.65); $white-filter: brightness(100) opacity(.65); $blue-filter: opacity(.65); +// 页面容器外边距 view.container { width: 88%; padding: 0 6%; } +// 带阴影的 card +view.card { + width: calc( 100% - 36px ); + padding: 0 18px; + border-radius: 15px; + background-color: $theme-color-light-layout; + box-shadow: 0 1.6px 3.6px 0 rgba(0, 0, 0, .08), + 0 0.3px 0.9px 0 rgba(0, 0, 0, .05); +} + +// 顶部导航栏阴影 +view.top-shadow { + position: fixed; + z-index: 9999; + width: 100%; + height: 10px; + top: -10px; + box-shadow: 0 1.6px 3.6px 0 rgba(0, 0, 0, .05); +} + +view.text { + +} + page { background-color: $theme-color-light-background; color: $theme-color-light-text; @@ -31,7 +56,11 @@ page { @media (prefers-color-scheme: dark){ page { - background-color: $theme-color-dark-background; - color: $theme-color-dark-text; + background-color: $theme-color-dark-background; + color: $theme-color-dark-text; + } + + view.card { + background-color: $theme-color-dark-layout; } } \ No newline at end of file diff --git a/miniprogram/pages/Account/Account.scss b/miniprogram/pages/Account/Account.scss index a003654..d02eeb4 100644 --- a/miniprogram/pages/Account/Account.scss +++ b/miniprogram/pages/Account/Account.scss @@ -1,9 +1,29 @@ +@import "../../app.scss"; + view.container { // 用户卡片 view.user-card { - width: 100%; - height: 200px; - background-color: aqua; + margin-top: 20px; + height: 100px; + display: flex; + padding-top: 20px; + padding-bottom: 20px; + + view.avatar { + width: 80px; + height: 80px; + border-radius: 1000px; + overflow: hidden; + } + + view.info { + width: calc(100% - 80px - 20px); + padding-left: 20px; + + view.nick { + color: $theme-color-light-title; + } + } } } \ No newline at end of file diff --git a/miniprogram/pages/Account/Account.wxml b/miniprogram/pages/Account/Account.wxml index 788e060..46dec69 100644 --- a/miniprogram/pages/Account/Account.wxml +++ b/miniprogram/pages/Account/Account.wxml @@ -1,8 +1,22 @@ + + + + + - - + + + + + + + + + 秦浩轩 + 1806240113 + \ No newline at end of file From 1db7507293660e1ad5606ddcc02d32c33f4b1f8c Mon Sep 17 00:00:00 2001 From: mrkbear Date: Tue, 4 Jan 2022 22:48:21 +0800 Subject: [PATCH 4/4] App Style --- miniprogram/app.scss | 46 +++++++++-- miniprogram/pages/Account/Account.scss | 12 ++- miniprogram/pages/Account/Account.wxml | 2 +- project.config.json | 110 ++++++++++++------------- 4 files changed, 104 insertions(+), 66 deletions(-) diff --git a/miniprogram/app.scss b/miniprogram/app.scss index a6bfbf7..c31657e 100644 --- a/miniprogram/app.scss +++ b/miniprogram/app.scss @@ -5,12 +5,12 @@ $theme-color-red: #FF9393; $theme-color-light-layout: #F8F8F8; $theme-color-light-background: #f4f0f1; $theme-color-light-title: rgba(0, 0, 0, .65); -$theme-color-light-text: rgba(0, 0, 0, .55); +$theme-color-light-text: rgba(0, 0, 0, .5); $theme-color-dark-layout: #1f1f1f; $theme-color-dark-background: #181615; $theme-color-dark-title: rgba(255, 255, 255, .65); -$theme-color-dark-text: rgba(255, 255, 255, .55); +$theme-color-dark-text: rgba(255, 255, 255, .5); $black-filter: brightness(0) opacity(.65); $white-filter: brightness(100) opacity(.65); @@ -42,18 +42,31 @@ view.top-shadow { box-shadow: 0 1.6px 3.6px 0 rgba(0, 0, 0, .05); } -view.text { - -} - page { background-color: $theme-color-light-background; color: $theme-color-light-text; - font-weight: 500; - font-size: .9em; +} + +view, text { + font-size: .99em; font-family: Hiragino Sans GB, MicroSoft YaHei; } - + +view.h1 { + color: $theme-color-light-title; + font-size: 1.5em; +} + +view.h2 { + color: $theme-color-light-title; + font-size: 1.3em; +} + +view.h3 { + color: $theme-color-light-title; + font-size: 1em; +} + @media (prefers-color-scheme: dark){ page { background-color: $theme-color-dark-background; @@ -63,4 +76,19 @@ page { view.card { background-color: $theme-color-dark-layout; } + + view.h1 { + color: $theme-color-dark-title; + font-size: 1.2em; + } + + view.h2 { + color: $theme-color-dark-title; + font-size: 1.3em; + } + + view.h3 { + color: $theme-color-dark-title; + font-size: 1em; + } } \ No newline at end of file diff --git a/miniprogram/pages/Account/Account.scss b/miniprogram/pages/Account/Account.scss index d02eeb4..1557d1d 100644 --- a/miniprogram/pages/Account/Account.scss +++ b/miniprogram/pages/Account/Account.scss @@ -22,8 +22,18 @@ view.container { padding-left: 20px; view.nick { - color: $theme-color-light-title; + margin: 4px 0; + } + + view.student { + margin: 1px 0; } } } +} + +@media (prefers-color-scheme: dark) { + view.container view.user-card view.avatar{ + filter: brightness(.8); + } } \ No newline at end of file diff --git a/miniprogram/pages/Account/Account.wxml b/miniprogram/pages/Account/Account.wxml index 46dec69..9b41eea 100644 --- a/miniprogram/pages/Account/Account.wxml +++ b/miniprogram/pages/Account/Account.wxml @@ -11,7 +11,7 @@ - + 秦浩轩 diff --git a/project.config.json b/project.config.json index ec8c334..de9e730 100644 --- a/project.config.json +++ b/project.config.json @@ -1,58 +1,58 @@ { - "description": "项目配置文件", - "packOptions": { - "ignore": [] - }, - "miniprogramRoot": "miniprogram/", - "compileType": "miniprogram", - "libVersion": "2.16.1", - "projectname": "mini-dlpu-v3", - "setting": { - "urlCheck": false, - "es6": true, - "enhance": true, - "postcss": true, - "preloadBackgroundData": false, - "minified": true, - "newFeature": false, - "coverView": true, - "nodeModules": false, - "autoAudits": false, - "showShadowRootInWxmlPanel": true, - "scopeDataCheck": false, - "uglifyFileName": true, - "checkInvalidKey": true, - "checkSiteMap": true, - "uploadWithSourceMap": true, - "compileHotReLoad": false, - "lazyloadPlaceholderEnable": false, - "useMultiFrameRuntime": true, - "useApiHook": true, - "useApiHostProcess": true, - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" + "description": "项目配置文件", + "packOptions": { + "ignore": [] }, - "enableEngineNative": false, - "useIsolateContext": false, - "userConfirmedBundleSwitch": false, - "packNpmManually": false, - "packNpmRelationList": [], - "minifyWXSS": true, - "disableUseStrict": false, - "minifyWXML": true, - "showES6CompileOption": false, - "useCompilerPlugins": [ - "typescript", - "sass" - ] - }, - "simulatorType": "wechat", - "simulatorPluginLibVersion": {}, - "appid": "wx7d809f5e8955843d", - "scripts": { - "beforeCompile": "" - }, - "condition": {} + "miniprogramRoot": "miniprogram/", + "compileType": "miniprogram", + "libVersion": "2.16.1", + "projectname": "mini-dlpu-v3", + "setting": { + "urlCheck": false, + "es6": true, + "enhance": true, + "postcss": true, + "preloadBackgroundData": false, + "minified": true, + "newFeature": false, + "coverView": true, + "nodeModules": false, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "scopeDataCheck": false, + "uglifyFileName": true, + "checkInvalidKey": true, + "checkSiteMap": true, + "uploadWithSourceMap": true, + "compileHotReLoad": false, + "lazyloadPlaceholderEnable": false, + "useMultiFrameRuntime": false, + "useApiHook": false, + "useApiHostProcess": false, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "enableEngineNative": false, + "useIsolateContext": false, + "userConfirmedBundleSwitch": false, + "packNpmManually": false, + "packNpmRelationList": [], + "minifyWXSS": true, + "disableUseStrict": false, + "minifyWXML": true, + "showES6CompileOption": false, + "useCompilerPlugins": [ + "typescript", + "sass" + ] + }, + "simulatorType": "wechat", + "simulatorPluginLibVersion": {}, + "appid": "wx7d809f5e8955843d", + "scripts": { + "beforeCompile": "" + }, + "condition": {} } \ No newline at end of file