From 4295fe09def342030a160fb78ef9a2fe0ae616eb Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 11 Nov 2022 17:02:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=20=E8=80=83?= =?UTF-8?q?=E8=AF=95=E5=8A=9F=E8=83=BD=E5=88=9D=E6=AC=A1=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client_mp/App.vue | 1 + client_mp/common/http.api.js | 8 +- client_mp/common/uni-ui.scss | 119 +++++++++++++++++++++++++++ client_mp/pages.json | 57 ++++++++++++- client_mp/pages/exam/exam.vue | 22 +++++ client_mp/pages/exam/index.vue | 60 ++++++++++++++ client_mp/pages/exam/main.vue | 22 +++++ client_mp/pages/exam/preview.vue | 76 ++++++++++++++++++ client_mp/pages/exam/record.vue | 133 +++++++++++++++++++++++++++++++ client_mp/pages/exam/result.vue | 97 ++++++++++++++++++++++ client_mp/pages/vod/video.vue | 2 +- client_mp/uview-ui/theme.scss | 7 ++ 12 files changed, 599 insertions(+), 5 deletions(-) create mode 100644 client_mp/common/uni-ui.scss create mode 100644 client_mp/pages/exam/exam.vue create mode 100644 client_mp/pages/exam/index.vue create mode 100644 client_mp/pages/exam/main.vue create mode 100644 client_mp/pages/exam/preview.vue create mode 100644 client_mp/pages/exam/record.vue create mode 100644 client_mp/pages/exam/result.vue diff --git a/client_mp/App.vue b/client_mp/App.vue index 051fa44..0453561 100644 --- a/client_mp/App.vue +++ b/client_mp/App.vue @@ -60,4 +60,5 @@ diff --git a/client_mp/common/http.api.js b/client_mp/common/http.api.js index 90377a5..4904415 100644 --- a/client_mp/common/http.api.js +++ b/client_mp/common/http.api.js @@ -44,6 +44,10 @@ const install = (Vue, vm) => { let getVideos = (params={})=>vm.$u.get('/vod/video/', params);//点播视频 let getDickey = (params={})=>vm.$u.get('/system/dict/', params);//查询字典 let putMyVideoView =(id)=>vm.$u.put(`/vod/video/${id}/myview/`);//更新本人观看信息 + + + //考试有关 + let getExamList = (params={})=>vm.$u.get('/exam/exam/', params);//考试列表 vm.$u.api = {getUserInfo, getCode, codeLogin, @@ -64,7 +68,9 @@ const install = (Vue, vm) => { getDocument, getVideos, getDickey, - putMyVideoView + putMyVideoView, + + getExamList }; } diff --git a/client_mp/common/uni-ui.scss b/client_mp/common/uni-ui.scss new file mode 100644 index 0000000..71bb980 --- /dev/null +++ b/client_mp/common/uni-ui.scss @@ -0,0 +1,119 @@ +.uni-flex { + display: flex; +} + +.uni-flex-row { + @extend .uni-flex; + flex-direction: row; + box-sizing: border-box; +} + +.uni-flex-column { + @extend .uni-flex; + flex-direction: column; +} + +.uni-color-gary { + color: #3b4144; +} + +/* 标题 */ +.uni-title { + display: flex; + margin-bottom: $uni-spacing-col-base; + font-size: $uni-font-size-lg; + font-weight: bold; + color: #3b4144; +} + +.uni-title-sub { + display: flex; + // margin-bottom: $uni-spacing-col-base; + font-size: $uni-font-size-base; + font-weight: 500; + color: #3b4144; +} + +/* 描述 额外文本 */ +.uni-note { + margin-top: 10px; + color: #999; + font-size: $uni-font-size-sm; +} + +/* 列表内容 */ +.uni-list-box { + @extend .uni-flex-row; + flex: 1; + margin-top: 10px; +} + +/* 略缩图 */ +.uni-thumb { + flex-shrink: 0; + margin-right: $uni-spacing-row-base; + width: 125px; + height: 75px; + border-radius: $uni-border-radius-lg; + overflow: hidden; + border: 1px #f5f5f5 solid; + image { + width: 100%; + height: 100%; + } +} + +.uni-media-box { + @extend .uni-flex-row; + // margin-bottom: $uni-spacing-col-base; + border-radius: $uni-border-radius-lg; + overflow: hidden; + .uni-thumb { + margin: 0; + margin-left: 4px; + flex-shrink: 1; + width: 33%; + border-radius:0; + &:first-child { + margin: 0; + } + } +} + +/* 内容 */ +.uni-content { + @extend .uni-flex-column; + justify-content: space-between; +} + +/* 列表footer */ +.uni-footer { + @extend .uni-flex-row; + justify-content: space-around; + margin-top: $uni-spacing-col-lg; +} +.uni-footer-text { + font-size: $uni-font-size-sm; + color: $uni-text-color-grey; + margin-left: 5px; +} + +/* 标签 */ + +.uni-tag { + flex-shrink: 0; + padding: 0 5px; + border: 1px $uni-border-color solid; + margin-right: $uni-spacing-row-sm; + border-radius: $uni-border-radius-base; + background: $uni-bg-color-grey; + color: $uni-text-color; + font-size: $uni-font-size-sm; +} + +/* 链接 */ +.uni-link { + margin-left: 10px; + color: $uni-text-color; + text-decoration: underline; +} \ No newline at end of file diff --git a/client_mp/pages.json b/client_mp/pages.json index 3305407..d388705 100644 --- a/client_mp/pages.json +++ b/client_mp/pages.json @@ -124,7 +124,52 @@ "path" : "pages/vod/video", "style" : { - "navigationBarTitleText": "云点播", + "navigationBarTitleText": "视频观看", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/exam/index", + "style" : + { + "navigationBarTitleText": "考试列表", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/exam/preview", + "style" : + { + "navigationBarTitleText": "考试须知", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/exam/main", + "style" : + { + "navigationBarTitleText": "答题中", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/exam/record", + "style" : + { + "navigationBarTitleText": "答题记录", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/exam/result", + "style" : + { + "navigationBarTitleText": "答题结束", "enablePullDownRefresh": false } @@ -147,12 +192,18 @@ "selectedIconPath": "static/common/homec.png", "text": "主页" }, - /* { + { + "pagePath": "pages/exam/index", + "iconPath": "static/common/play.png", + "selectedIconPath": "static/common/playc.png", + "text": "答题" + }, + { "pagePath": "pages/vod/video", "iconPath": "static/common/play.png", "selectedIconPath": "static/common/playc.png", "text": "点播" - }, */ + }, { "pagePath": "pages/my/my", "iconPath": "static/common/me.png", diff --git a/client_mp/pages/exam/exam.vue b/client_mp/pages/exam/exam.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/client_mp/pages/exam/exam.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/client_mp/pages/exam/index.vue b/client_mp/pages/exam/index.vue new file mode 100644 index 0000000..085c88e --- /dev/null +++ b/client_mp/pages/exam/index.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/client_mp/pages/exam/main.vue b/client_mp/pages/exam/main.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/client_mp/pages/exam/main.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/client_mp/pages/exam/preview.vue b/client_mp/pages/exam/preview.vue new file mode 100644 index 0000000..17397dd --- /dev/null +++ b/client_mp/pages/exam/preview.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/client_mp/pages/exam/record.vue b/client_mp/pages/exam/record.vue new file mode 100644 index 0000000..c716c20 --- /dev/null +++ b/client_mp/pages/exam/record.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/client_mp/pages/exam/result.vue b/client_mp/pages/exam/result.vue new file mode 100644 index 0000000..a79e1e3 --- /dev/null +++ b/client_mp/pages/exam/result.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/client_mp/pages/vod/video.vue b/client_mp/pages/vod/video.vue index 8a5a0d6..d306c83 100644 --- a/client_mp/pages/vod/video.vue +++ b/client_mp/pages/vod/video.vue @@ -31,7 +31,7 @@ {{video.name}} - {{video.viewsp}}人观看 + {{video.views}}次播放 diff --git a/client_mp/uview-ui/theme.scss b/client_mp/uview-ui/theme.scss index f3bb36d..37264d5 100644 --- a/client_mp/uview-ui/theme.scss +++ b/client_mp/uview-ui/theme.scss @@ -2,6 +2,7 @@ // uni.scss中引入的样式会同时混入到全局样式文件和单独每一个页面的样式中,造成微信程序包太大, // 故uni.scss只建议放scss变量名相关样式,其他的样式可以通过main.js或者App.vue引入 +$theme-color:#0080d1; $u-main-color: #303133; $u-content-color: #606266; $u-tips-color: #909399; @@ -36,3 +37,9 @@ $u-type-info-light: #f4f4f5; $u-form-item-height: 70rpx; $u-form-item-border-color: #dcdfe6; + +/* 文字尺寸 */ +$u-font-size-sm:24rpx; +$u-font-size-lg:32rpx; +$u-font-size-base:28rpx; +$u-font-size-title:36rpx; \ No newline at end of file