From 9e5948ebfc072b17d607850bd3c1768822630fea Mon Sep 17 00:00:00 2001
From: unknown <331404948@qq.com>
Date: Thu, 18 Jul 2024 18:05:39 +0800
Subject: [PATCH] =?UTF-8?q?=E7=9B=AE=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 1 +
main.js | 2 +
pages.json | 29 +++++++-
pages/exercises/brushQuestions/brushQuestions.vue | 25 +++++++
pages/exercises/chapter/chapter.vue | 81 +++++++++++++++++++++++
pages/index/index.vue | 3 +-
static/css/app.scss | 44 ++++++++++++
utils/utils.js | 8 +++
8 files changed, 190 insertions(+), 3 deletions(-)
create mode 100644 pages/exercises/brushQuestions/brushQuestions.vue
create mode 100644 pages/exercises/chapter/chapter.vue
create mode 100644 static/css/app.scss
create mode 100644 utils/utils.js
diff --git a/App.vue b/App.vue
index 6120dba..39250cf 100644
--- a/App.vue
+++ b/App.vue
@@ -17,4 +17,5 @@
diff --git a/main.js b/main.js
index 928ef31..af5046e 100644
--- a/main.js
+++ b/main.js
@@ -1,6 +1,7 @@
import App from './App'
import uviewPlus from '@/uni_modules/uview-plus'
import request from './config/request.js'
+import { goPage } from '@/utils/utils.js'
// // #ifndef VUE3
// import Vue from 'vue'
// import './uni.promisify.adaptor'
@@ -16,6 +17,7 @@ import request from './config/request.js'
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
+ app.config.globalProperties.$goPage = goPage
app.use(uviewPlus)
request(app)
return {
diff --git a/pages.json b/pages.json
index cf9e5a2..e206ced 100644
--- a/pages.json
+++ b/pages.json
@@ -3,13 +3,38 @@
{
"path": "pages/index/index",
"style": {
- "navigationBarTitleText": "uni-app"
+ "navigationBarTitleText": "",
+ "navigationStyle": "custom"
}
}
],
+ "subPackages": [
+ {
+ "root": "pages/exercises",
+ "pages": [
+ {
+ "path": "chapter/chapter",
+ "style": {
+ "navigationBarTitleText": "章节练习",
+ "enablePullDownRefresh": false,
+ "backgroundTextStyle": "dark"
+ }
+ },
+ {
+ "path": "brushQuestions/brushQuestions",
+ "style": {
+ "navigationBarTitleText": "刷题",
+ "enablePullDownRefresh": false,
+ "backgroundTextStyle": "dark" ,
+ "navigationStyle": "custom"
+ }
+ }
+ ]
+ }
+ ],
"globalStyle": {
"navigationBarTextStyle": "black",
- "navigationBarTitleText": "uni-app",
+ "navigationBarTitleText": "习题题库",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
diff --git a/pages/exercises/brushQuestions/brushQuestions.vue b/pages/exercises/brushQuestions/brushQuestions.vue
new file mode 100644
index 0000000..662ff70
--- /dev/null
+++ b/pages/exercises/brushQuestions/brushQuestions.vue
@@ -0,0 +1,25 @@
+
+
+
+
+
+ 答题模式
+ 背题模式
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/exercises/chapter/chapter.vue b/pages/exercises/chapter/chapter.vue
new file mode 100644
index 0000000..8dcd24c
--- /dev/null
+++ b/pages/exercises/chapter/chapter.vue
@@ -0,0 +1,81 @@
+
+
+
+
+ {{index+1}}
+
+ 安全行车常识
+
+
+
+
+ 60/260
+ 正确率 100%
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 5336f46..62c8b27 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,6 +1,7 @@
- 题库
+
+
diff --git a/static/css/app.scss b/static/css/app.scss
new file mode 100644
index 0000000..863ab82
--- /dev/null
+++ b/static/css/app.scss
@@ -0,0 +1,44 @@
+
+
+page {
+ background-color: #fff;
+ font-size: 32rpx;
+ font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif;
+}
+view {
+ box-sizing: border-box;
+}
+
+.oneRowText {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.towRowText {
+ display: -webkit-box;
+ overflow: hidden;
+ white-space: normal;
+ text-overflow: ellipsis;
+ word-wrap: break-word;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical
+}
+
+.flex {
+ display: flex;
+ align-items: center;
+}
+.flex-b {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+.flex-c {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+.padding {
+ padding: 0 20px;
+}
\ No newline at end of file
diff --git a/utils/utils.js b/utils/utils.js
new file mode 100644
index 0000000..9f30b6a
--- /dev/null
+++ b/utils/utils.js
@@ -0,0 +1,8 @@
+
+export let goPage = (url, params={}, type='navigateTo')=> {
+ uni.$u.route({
+ url,
+ params,
+ type
+ })
+ }
\ No newline at end of file