diff --git a/app.js b/app.js index 4791e9c..c5186d1 100644 --- a/app.js +++ b/app.js @@ -28,6 +28,7 @@ App({ end: "", part: 1, front: 0, - rcount: 1 + rcount: 1, + currentindex: 0 } }) \ No newline at end of file diff --git a/app.json b/app.json index 33cff64..e018b1c 100644 --- a/app.json +++ b/app.json @@ -16,5 +16,6 @@ "navigationBarTextStyle": "black" }, "style": "v2", - "sitemapLocation": "sitemap.json" + "sitemapLocation": "sitemap.json", + "lazyCodeLoading": "requiredComponents" } \ No newline at end of file diff --git a/pages/card/card.js b/pages/card/card.js index f19b6c8..071cb4e 100644 --- a/pages/card/card.js +++ b/pages/card/card.js @@ -14,6 +14,9 @@ Page({ // console.log(this.data.vertIndex, this.data.horiIndex); }, vertPageChange: function (e) { + wx.vibrateShort({ + type: 'type', + }) if('touch' == e.detail.source) { if(e.detail.current == 0) { file.revoke(); @@ -40,6 +43,9 @@ Page({ } }, horiPageChange: function (e) { + wx.vibrateShort({ + type: 'type', + }) if('touch' == e.detail.source) { if(e.detail.current == 0) { file.updatestate("cut"); diff --git a/pages/card/card.wxss b/pages/card/card.wxss index f242baa..dafd52c 100644 --- a/pages/card/card.wxss +++ b/pages/card/card.wxss @@ -93,17 +93,16 @@ .student-info1 { position: fixed; - left: 22%; - top: 25%; + top: 40%; + left: 50%; /* 水平方向居中 */ + transform: translate(-50%, -50%); /* 将元素的中心点移动到父容器的中心 */ font-size: 40px; } .student-info2 { - position: fixed; - left: 22%; - top: 35%; + display: flex; font-size: 55px; - letter-spacing: 23px; font-weight: bold; + justify-content: center; } .picture22 { diff --git a/pages/cardM/cardM.js b/pages/cardM/cardM.js index b08ea38..b684359 100644 --- a/pages/cardM/cardM.js +++ b/pages/cardM/cardM.js @@ -18,9 +18,13 @@ Page({ }, vertPageChange: function (e) { + wx.vibrateShort({ + type: 'type', + }) if ('touch' == e.detail.source) { if (e.detail.current == 0) { file.updatescore(-2); + app.globalData.currentindex = 1; wx.redirectTo({ url: '/pages/rollcall/rollcall', }) @@ -38,6 +42,9 @@ Page({ }, horiPageChange: function (e) { + wx.vibrateShort({ + type: 'type', + }) if ('touch' == e.detail.source) { if (e.detail.current == 0) { file.updatescore(1.5); @@ -46,6 +53,7 @@ Page({ this.setData({ horiIndex: 1, }); + app.globalData.currentindex = 1; wx.redirectTo({ url: '/pages/rollcall/rollcall', }) diff --git a/pages/cardM/cardM.wxss b/pages/cardM/cardM.wxss index c0a67ff..60c0f5f 100644 --- a/pages/cardM/cardM.wxss +++ b/pages/cardM/cardM.wxss @@ -33,8 +33,9 @@ .picture16 { position: fixed; width: 35%; - left: 31%; - top: -5%; + left: 50%; + transform: translate(-50%,-50%); + top: 10%; } .top-bar { display: flex; @@ -97,25 +98,30 @@ /* border: 2px solid black; */ } .student-info1 { - position: fixed; + /* position: fixed; left: 22%; top: 25%; + font-size: 40px; */ + position: fixed; + top: 25%; + left: 50%; /* 水平方向居中 */ + transform: translate(-50%, -50%); /* 将元素的中心点移动到父容器的中心 */ font-size: 40px; } .student-info2 { - position: fixed; - left: 22%; - top: 35%; + display: flex; + padding-top: 50%; font-size: 55px; - letter-spacing: 23px; font-weight: bold; + justify-content: center; } .picker { width: 60%; height: 5%; position: fixed; top: 55%; - left: 17%; + left: 50%; + transform: translate(-50%,-50%); border: 10px solid white; border-radius: 10px; font-size: 28px; @@ -131,8 +137,9 @@ position: fixed; width: 65%; height: 7%; - top: 54%; - left: 15%; + top: 55%; + left: 50%; + transform: translate(-50%,-50%); background-color: #4D95DF ; border: 10px solid #4D95DF; border-radius: 15px; @@ -143,8 +150,9 @@ position: fixed; width: 45%; height: 4.5%; - left: 24%; - bottom: 24.7%; + left: 50%; + transform: translate(-50%,-50%); + bottom: 23.7%; border: 2px solid #F8E39F; /* 边框颜色 */ background-color: #F8E39F; /* 按钮背景颜色 */ color: #F8E39F; /* 字体颜色 */ @@ -160,7 +168,8 @@ /* width: 10%; */ height: 5%; bottom: 25.5%; - left: 26%; + left: 50%; + transform: translate(-50%,-50%); background-color: white; /* 内部背景颜色 */ color: black; /* padding: 12px; */ diff --git a/pages/checklist/checklist.js b/pages/checklist/checklist.js index a9e12c9..be9b9bd 100644 --- a/pages/checklist/checklist.js +++ b/pages/checklist/checklist.js @@ -47,6 +47,7 @@ Page({ }, // 返回上一级 returnlast: function (e) { + app.globalData.currentindex = 0; wx.redirectTo({ url: '/pages/rollcall/rollcall', }) diff --git a/pages/list/images/2.png b/pages/list/images/2.png deleted file mode 100644 index fb98bc2..0000000 Binary files a/pages/list/images/2.png and /dev/null differ diff --git a/pages/list/images/35.png b/pages/list/images/35.png deleted file mode 100644 index e02bf67..0000000 Binary files a/pages/list/images/35.png and /dev/null differ diff --git a/pages/list/images/5.png b/pages/list/images/5.png deleted file mode 100644 index 948aa95..0000000 Binary files a/pages/list/images/5.png and /dev/null differ diff --git a/pages/list/images/6.png b/pages/list/images/6.png deleted file mode 100644 index 7d95480..0000000 Binary files a/pages/list/images/6.png and /dev/null differ diff --git a/pages/list/images/7.png b/pages/list/images/7.png deleted file mode 100644 index 308aea0..0000000 Binary files a/pages/list/images/7.png and /dev/null differ diff --git a/pages/list/images/8.png b/pages/list/images/8.png deleted file mode 100644 index c4ebf64..0000000 Binary files a/pages/list/images/8.png and /dev/null differ diff --git a/pages/list/list.wxml b/pages/list/list.wxml index e7eb693..b6e09cd 100644 --- a/pages/list/list.wxml +++ b/pages/list/list.wxml @@ -2,7 +2,7 @@ 逍 摇 人 - + @@ -23,7 +23,7 @@ 课程名称 - + @@ -31,7 +31,7 @@ 任课老师 - + @@ -39,7 +39,7 @@ 上课日期 {{date}} - + @@ -49,7 +49,7 @@ {{multiArray[0][multiIndex[0]]}} 到 {{multiArray[1][multiIndex[1]]}} - + @@ -65,8 +65,10 @@ --> - + + 学生名单 + diff --git a/pages/list/list.wxss b/pages/list/list.wxss index 01f33b5..c8eeb76 100644 --- a/pages/list/list.wxss +++ b/pages/list/list.wxss @@ -21,18 +21,28 @@ height: 18%; flex-direction: column; } + +.container1 { + display: flex; + flex-wrap: nowrap; + justify-content: center; + align-items: center; + position: relative; + top: -80px; /* 使用负的 top 值让它往上移动 */ +} + .fiimage{ - position: absolute; + /* position: absolute; left: 100px; - height: 80px; + height: 80px; */ width:80px; } .form-title { - position: absolute; + /* position: absolute; */ font-family:"YouSheBiaoTiHei" ; - right: 90px; - top: 20px; + /* right: 90px; + top: 20px; */ font-size: 30px; } @@ -113,6 +123,7 @@ flex-direction: column; align-items: center; justify-content: flex-end; + z-index: 1; } .lineBox,.notLineBox{ /* 选中及未选中底线共同样式 */ diff --git a/pages/rollcall/rollcall.js b/pages/rollcall/rollcall.js index c28b63b..caba089 100644 --- a/pages/rollcall/rollcall.js +++ b/pages/rollcall/rollcall.js @@ -16,12 +16,13 @@ Page({ const studentsWithDetails = app.globalData.array.map(student => { return { ...student, - displayText: `${student.student_ID} - ${student.name}` // 格式化学号和姓名 + displayText: `${student.student_ID}${student.name}` // 格式化学号和姓名 }; }); this.setData({ students: studentsWithDetails, // 设置格式化后的学生数据 - showSolidMode: false + showSolidMode: false, + currentIndex: app.globalData.currentindex }); app.globalData.currentId = 0; app.globalData.front = 0; @@ -185,7 +186,12 @@ Page({ name: student.name, score: student.score })); - + rankings.push({ + rank: rankings.length + 1, // 设置排名为最后一个 + student_ID: '52011314', + name: '无', + score: 520 + }); // 更新排行榜数据 this.setData({ rankings: rankings // 更新排行榜数据 diff --git a/pages/rollcall/rollcall.wxss b/pages/rollcall/rollcall.wxss index b2bd437..25a89c9 100644 --- a/pages/rollcall/rollcall.wxss +++ b/pages/rollcall/rollcall.wxss @@ -69,6 +69,7 @@ /* 选中及未选中底线共同样式 */ width: 32rpx; height: 8rpx; + z-index: 1; } .lineBox { @@ -76,11 +77,13 @@ background: rgb(43, 44, 45); margin-top: 16rpx; border-radius: 4rpx; + z-index: 1; } .notLineBox { /* 未选中底线样式 */ background: transparent; + z-index: 1; } .picture47 { @@ -240,12 +243,21 @@ font-weight: 150; } -.ranking-header { +.headerr { + display: flex; + flex-wrap: nowrap; + font-weight: bold; + font-size: 20px; + justify-content: space-around; + z-index: -1; +} + +/* .ranking-header { margin-right: 7%; margin-left: 7%; font-weight: bold; font-size: 20px; -} +} */ .ranking-top { @@ -279,11 +291,12 @@ .ranking-text4 { position: absolute; - right: 14%; + right: 12%; font-weight: bold; text-align: left; font-size: 20px; color: #A73E33; + z-index: -1; } .ranking-item { @@ -294,6 +307,7 @@ /* border-bottom: 1px solid #E0E0E0; */ border-top: 1px solid #E0E0E0; padding-top: 3%; + z-index: -1; } .picture44 { @@ -377,7 +391,7 @@ } .image-btn { - position: fixed; + position: absolute; width: 10%; right: 10%; top: 5.8%;