From c0ea198a24e07c29c260d609db52d5cbbaac39bc Mon Sep 17 00:00:00 2001 From: chen <2659004835@qq.com> Date: Sat, 25 Dec 2021 13:09:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E7=94=A8=E5=B7=B2?= =?UTF-8?q?=E6=9C=89=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- package-lock.json | 27 + package.json | 1 + src/assets/css/electron.css | 61 +- src/components/attendanceDetail.vue | 30 +- src/components/babyActivity.vue | 128 +-- src/components/babyAlbum.vue | 37 +- src/components/babyAlbumDetail.vue | 16 +- src/components/header.vue | 76 +- src/components/homepage.vue | 234 ++-- src/components/kindIntroduction.vue | 12 +- src/components/newsInformation.vue | 19 +- src/components/newsInformationDetail.vue | 4 +- src/components/noticeInfo.vue | 49 +- src/components/parkIntroduce.vue | 67 +- src/components/teacherStyle.vue | 31 +- src/components/teacherStyleDetail.vue | 4 +- src/config.js | 4 +- src/utils/mobile-detect.js | 1012 +++++++++++++++++ .../attendancedetail/-s-插画.png | Bin .../attendancedetail/-s-暂无.png | Bin static/attendancedetail/babyactive-left.png | Bin 0 -> 10867 bytes static/attendancedetail/babyactive-right.png | Bin 0 -> 22677 bytes .../icon-attendancedetail.png | Bin .../attendancedetail/icon-lixiao.png | Bin .../attendancedetail/icon-qingj.png | Bin .../attendancedetail/icon-weidao.png | Bin .../attendancedetail/icon-暂无数据.png | Bin .../assets => static}/babyalbum/-s-插画.png | Bin .../babyalbum/-s-选择1.png | Bin .../babyalbum/-s-选择2.png | Bin {src/assets => static}/error/error-icon.png | Bin {src/assets => static}/home/baby-foot.png | Bin {src/assets => static}/home/class-dongt.png | Bin {src/assets => static}/home/flower.png | Bin {src/assets => static}/home/foot-icon.png | Bin {src/assets => static}/home/icon-link.png | Bin {src/assets => static}/home/icon-notice.png | Bin {src/assets => static}/home/icon-set.png | Bin {src/assets => static}/home/left-kuang.png | Bin {src/assets => static}/home/logo-bottom.png | Bin {src/assets => static}/home/logo.png | Bin {src/assets => static}/home/right-back.png | Bin {src/assets => static}/home/slices.png | Bin .../home/title-bottom-01.png | Bin .../home/title-bottom-02.png | Bin .../kindergartenIntroduce/chahua-01.png | Bin .../kindergartenIntroduce/icon-back.png | Bin .../kindergartenIntroduce/icon-browse.png | Bin .../kindergartenIntroduce/icon-choose.png | Bin .../kindergartenIntroduce/icon-new.png | Bin .../kindergartenIntroduce/icon-notice-msg.png | Bin .../kindergartenIntroduce/icon-notice.png | Bin .../icon-parkIntroduce.png | Bin .../icon-teacher-style.png | Bin {src/assets => static}/seconds/tu-01.png | Bin {src/assets => static}/weather/1.png | Bin {src/assets => static}/weather/2.png | Bin {src/assets => static}/weather/3.png | Bin {src/assets => static}/weather/4.png | Bin {src/assets => static}/weather/5.png | Bin {src/assets => static}/weather/6.png | Bin {src/assets => static}/weather/7.png | Bin {src/assets => static}/weather/8.png | Bin {src/assets => static}/weather/9.png | Bin 65 files changed, 1443 insertions(+), 371 deletions(-) create mode 100644 src/utils/mobile-detect.js rename {src/assets => static}/attendancedetail/-s-插画.png (100%) rename {src/assets => static}/attendancedetail/-s-暂无.png (100%) create mode 100644 static/attendancedetail/babyactive-left.png create mode 100644 static/attendancedetail/babyactive-right.png rename {src/assets => static}/attendancedetail/icon-attendancedetail.png (100%) rename {src/assets => static}/attendancedetail/icon-lixiao.png (100%) rename {src/assets => static}/attendancedetail/icon-qingj.png (100%) rename {src/assets => static}/attendancedetail/icon-weidao.png (100%) rename {src/assets => static}/attendancedetail/icon-暂无数据.png (100%) rename {src/assets => static}/babyalbum/-s-插画.png (100%) rename {src/assets => static}/babyalbum/-s-选择1.png (100%) rename {src/assets => static}/babyalbum/-s-选择2.png (100%) rename {src/assets => static}/error/error-icon.png (100%) rename {src/assets => static}/home/baby-foot.png (100%) rename {src/assets => static}/home/class-dongt.png (100%) rename {src/assets => static}/home/flower.png (100%) rename {src/assets => static}/home/foot-icon.png (100%) rename {src/assets => static}/home/icon-link.png (100%) rename {src/assets => static}/home/icon-notice.png (100%) rename {src/assets => static}/home/icon-set.png (100%) rename {src/assets => static}/home/left-kuang.png (100%) rename {src/assets => static}/home/logo-bottom.png (100%) rename {src/assets => static}/home/logo.png (100%) rename {src/assets => static}/home/right-back.png (100%) rename {src/assets => static}/home/slices.png (100%) rename {src/assets => static}/home/title-bottom-01.png (100%) rename {src/assets => static}/home/title-bottom-02.png (100%) rename {src/assets => static}/kindergartenIntroduce/chahua-01.png (100%) rename {src/assets => static}/kindergartenIntroduce/icon-back.png (100%) rename {src/assets => static}/kindergartenIntroduce/icon-browse.png (100%) rename {src/assets => static}/kindergartenIntroduce/icon-choose.png (100%) rename {src/assets => static}/kindergartenIntroduce/icon-new.png (100%) rename {src/assets => static}/kindergartenIntroduce/icon-notice-msg.png (100%) rename {src/assets => static}/kindergartenIntroduce/icon-notice.png (100%) rename {src/assets => static}/kindergartenIntroduce/icon-parkIntroduce.png (100%) rename {src/assets => static}/kindergartenIntroduce/icon-teacher-style.png (100%) rename {src/assets => static}/seconds/tu-01.png (100%) rename {src/assets => static}/weather/1.png (100%) rename {src/assets => static}/weather/2.png (100%) rename {src/assets => static}/weather/3.png (100%) rename {src/assets => static}/weather/4.png (100%) rename {src/assets => static}/weather/5.png (100%) rename {src/assets => static}/weather/6.png (100%) rename {src/assets => static}/weather/7.png (100%) rename {src/assets => static}/weather/8.png (100%) rename {src/assets => static}/weather/9.png (100%) diff --git a/index.html b/index.html index e3e8263..f28d1e0 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - electron-banpai + 都江堰机关幼儿园
diff --git a/package-lock.json b/package-lock.json index b3f7ca7..434bdc8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "dependencies": { "axios": "^0.24.0", + "mobile-detect": "^1.4.5", "vue": "^2.5.2", "vue-router": "^3.0.1" }, @@ -39,6 +40,7 @@ "rimraf": "^2.6.0", "semver": "^5.3.0", "shelljs": "^0.7.6", + "swiper": "^3.4.2", "uglifyjs-webpack-plugin": "^1.1.1", "url-loader": "^0.5.8", "vue-loader": "^13.3.0", @@ -6722,6 +6724,11 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/mobile-detect": { + "version": "1.4.5", + "resolved": "https://registry.nlark.com/mobile-detect/download/mobile-detect-1.4.5.tgz", + "integrity": "sha1-2jk8PEE8oam83ZztZTw4KBwPtq0=" + }, "node_modules/move-concurrently": { "version": "1.0.1", "resolved": "https://registry.nlark.com/move-concurrently/download/move-concurrently-1.0.1.tgz", @@ -12055,6 +12062,15 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/swiper": { + "version": "3.4.2", + "resolved": "https://registry.npmmirror.com/swiper/download/swiper-3.4.2.tgz", + "integrity": "sha512-bXolyzBIawQRluQwFbN8DYpe6Q02bKJ2/h4JV+6dzN/WX8a8ZFPa+F0o8z7hEHSyh2NzKkTWaogaTZYVfgmKTw==", + "dev": true, + "engines": { + "node": ">= 4.7.0" + } + }, "node_modules/tapable": { "version": "0.2.9", "resolved": "https://registry.npmmirror.com/tapable/download/tapable-0.2.9.tgz", @@ -19673,6 +19689,11 @@ "minimist": "^1.2.5" } }, + "mobile-detect": { + "version": "1.4.5", + "resolved": "https://registry.nlark.com/mobile-detect/download/mobile-detect-1.4.5.tgz", + "integrity": "sha1-2jk8PEE8oam83ZztZTw4KBwPtq0=" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.nlark.com/move-concurrently/download/move-concurrently-1.0.1.tgz", @@ -24105,6 +24126,12 @@ } } }, + "swiper": { + "version": "3.4.2", + "resolved": "https://registry.npmmirror.com/swiper/download/swiper-3.4.2.tgz", + "integrity": "sha512-bXolyzBIawQRluQwFbN8DYpe6Q02bKJ2/h4JV+6dzN/WX8a8ZFPa+F0o8z7hEHSyh2NzKkTWaogaTZYVfgmKTw==", + "dev": true + }, "tapable": { "version": "0.2.9", "resolved": "https://registry.npmmirror.com/tapable/download/tapable-0.2.9.tgz", diff --git a/package.json b/package.json index 01598e0..6f22f7c 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "axios": "^0.24.0", + "mobile-detect": "^1.4.5", "vue": "^2.5.2", "vue-router": "^3.0.1" }, diff --git a/src/assets/css/electron.css b/src/assets/css/electron.css index cc89d5a..ecebd46 100644 --- a/src/assets/css/electron.css +++ b/src/assets/css/electron.css @@ -16,6 +16,7 @@ img { .clips2{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;text-overflow: ellipsis;word-wrap: break-word;word-break:break-all;} .clips3{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;text-overflow: ellipsis;word-wrap: break-word;word-break:break-all;} .clips4{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 4;overflow: hidden;text-overflow: ellipsis;word-wrap: break-word;word-break:break-all;} +.flex-s0{flex-shrink: 0;} /* 头部导航 */ .header-box { position: sticky; @@ -34,7 +35,7 @@ img { display: flex; justify-content: center; align-items: center; - background: url(../home/logo-bottom.png) no-repeat; + background: url(/static/home/logo-bottom.png) no-repeat; background-size: 100% 100%; width: 177px; height: 162px; @@ -70,12 +71,12 @@ img { } .activeTitle { color: #FFFFFF; - background: url(../home/title-bottom-01.png) no-repeat; + background: url(/static/home/title-bottom-01.png) no-repeat; background-size: 100% 100%; } .activeTitle2 { color: #FFFFFF; - background: url(../home/title-bottom-02.png) no-repeat; + background: url(/static/home/title-bottom-02.png) no-repeat; background-size: 100% 100%; } /* 天气 */ @@ -115,7 +116,7 @@ img { .left-one { position: relative; margin-bottom: 20px; - background: url(../home/left-kuang.png) no-repeat; + background: url(/static/home/left-kuang.png) no-repeat; background-size: 100% 100%; width: 390px; height: 296px; @@ -180,7 +181,7 @@ img { } .center-title {color: #7557CC;font-size: 36px;text-align: center;line-height: 40px;padding-top: 40px;} .center-img-box { - background: url(../home/class-dongt.png) no-repeat; + background: url(/static/home/class-dongt.png) no-repeat; background-size: 100% 100%; width: 967px; height: 900px; @@ -198,7 +199,7 @@ img { width: 390px; height: 900px; flex-shrink: 0; - background: url(../home/right-back.png) no-repeat; + background: url(/static/home/right-back.png) no-repeat; background-size: 100% 100%; } .right-content {color: #7557CC;text-align: center;height: 90%; overflow: hidden;overflow-y: scroll;} @@ -243,7 +244,7 @@ img { .class-left-one { position: relative; margin-bottom: 20px; - background: url(../home/right-back.png) no-repeat; + background: url(/static/attendancedetail/babyactive-left.png) no-repeat; background-size: 100% 100%; width: 464px; height: 826px; @@ -299,8 +300,14 @@ img { } .teather-box { display: flex; - justify-content: space-around; padding-bottom: 40px; + width: 100%; + display: -webkit-box; + overflow-x: scroll; + -webkit-overflow-scrolling:touch; +} +.teather-box::-webkit-scrollbar{ + display: none; } .teather-box div { display: flex; @@ -309,6 +316,8 @@ img { font-size: 18px; color: #666666; margin-top: 30px; + flex-shrink: 0; + margin-left: 30px; } .teather-box span { margin-top: 10px; @@ -333,14 +342,14 @@ img { position: relative; display: inline-block; width: 100%; - background: url(../home/right-back.png) no-repeat; + background: url(/static/attendancedetail/babyactive-right.png) no-repeat; background-size: 100% 100%; margin-left: 30px; height: 826px; } .time-title-box {background-color: #9C7CFA;font-size: 18px;font-weight: bold;color: #FFFFFF; height: 34px;border-radius: 10px;line-height: 34px;display: flex;justify-content: space-around;} .time-title-box div{width: 16%;text-align: center;} -.tiam-data-box {display: flex;position: relative;align-items: center;margin-top: 10px;} +.tiam-data-box {display: flex;position: relative;align-items: center;margin-top: 10px;min-height: 120px;} .time-left {position: absolute;left: 0;top: 0;bottom: 0; width: 40px;background-color: #C3AEFF;padding: 10px 7px;font-size: 24px;color: #FFFFFF;line-height: 40px;border-radius: 10px;display: flex;justify-content: center;align-items: center;margin-right: 10px;} .time-right-box {display: flex;justify-content: space-around;text-align: center;height: 37px;background: #FFFFFF;border-radius: 10px;line-height: 37px;margin-bottom: 5px;} .time-right-box:last-child {margin-bottom: 0px;} @@ -514,7 +523,7 @@ img { .noticeInfo-item { display: flex;align-items: center;justify-content: space-between;margin-bottom: 16px;border-bottom: 1px solid #D3D3D3; } -.notice-title {display: flex;align-items: center;padding-bottom: 16px;} +.notice-title {display: flex;align-items: center;padding-bottom: 16px;margin-right: 20px;} .notice-title img{width: 21px;height: 21px;margin-right: 12px;} .notice-title div{font-size: 18px;color: #3F3F3F;font-weight: bold;} .noticeInfo-time {font-size: 14px;color: #959595;} @@ -556,8 +565,34 @@ img { .baby-name {font-size: 24px;font-weight: 800;color: #3F3F3F;} .baby-album-box {padding: 97px 0 126px 0;height: 100%; display: flex;align-items: center;justify-content: space-between;box-sizing: border-box;position: relative;} .baby-album-box > img {width: 58px;height: 58px;} -@media screen and (min-width:768px) and (max-width:1024px) { +.introduce-img {display: flex;flex-wrap: wrap;} +.introduce-img img {margin: 10px 10px 0 0;} +@media screen and (min-width:768px) and (max-width:1400px) { .header-box { - background-color: #000000; + height: 70px; + padding: 0 20px; } + .main { + margin: 40px 0 70px 0; + padding: 0 20px; + } + .left-one { + width: 250px; + height: 200px; + } + .line {margin: 5px 0;} + .left-title {font-size: 18px;height: 46px;} + .left-content {padding: 0 10px;} + .second-title {font-size: 16px;} + .three-content {font-size: 14px;line-height: 24px;} + .left-last > div div:nth-child(1) {font-size: 16px;} + .left-last > div div:nth-child(2) {font-size: 14px;} + .threeMealActive {font-size: 20px!important;} + .eat-three {font-size: 18px;} + .meal-box img {width: 76px; + max-height: 70px; + margin-right: 15px;} + .meal-box div {font-size: 14px;line-height: 24px;} + .notice-time { margin-top: 10px;font-size: 14px;} + .main-center{width: auto;} } \ No newline at end of file diff --git a/src/components/attendanceDetail.vue b/src/components/attendanceDetail.vue index 49ad7bc..9a6cb31 100644 --- a/src/components/attendanceDetail.vue +++ b/src/components/attendanceDetail.vue @@ -4,18 +4,18 @@
- +
{{item.title}}({{item.num}})
- + {{item.teatherName}}
{{['正常','未到校','离校','请假'][item.status]}}
- +
{{['没有出勤','暂无离校','暂无未到校','没有请假'][navIndex]}}的宝宝
@@ -28,21 +28,21 @@ data() { return { navArr:[ - {icon:'../assets/attendancedetail/icon-attendancedetail.png',title:'出勤详情',num:12}, - {icon:'../assets/attendancedetail/icon-lixiao.png',title:'离校情况',num:0}, - {icon:'../assets/attendancedetail/icon-qingj.png',title:'未到校宝宝',num:0}, - {icon:'../assets/attendancedetail/icon-weidao.png',title:'请假宝宝',num:0}, + {icon:'/static/attendancedetail/icon-attendancedetail.png',title:'出勤详情',num:12}, + {icon:'/static/attendancedetail/icon-lixiao.png',title:'离校情况',num:0}, + {icon:'/static/attendancedetail/icon-weidao.png',title:'未到校宝宝',num:0}, + {icon:'/static/attendancedetail/icon-qingj.png',title:'请假宝宝',num:0}, ], navIndex:0, teatherArr:[ - {teatherImg:'',teatherName:'张跑跑',status:0}, - {teatherImg:'',teatherName:'张跑跑',status:1}, - {teatherImg:'',teatherName:'张跑跑',status:2}, - {teatherImg:'',teatherName:'张跑跑',status:3}, - {teatherImg:'',teatherName:'张跑跑',status:0}, - {teatherImg:'',teatherName:'张跑跑',status:0}, - {teatherImg:'',teatherName:'张跑跑',status:0}, - {teatherImg:'',teatherName:'张跑跑',status:0}, + {teatherImg:'/static/seconds/tu-01.png',teatherName:'张跑跑',status:0}, + {teatherImg:'/static/seconds/tu-01.png',teatherName:'张跑跑',status:1}, + {teatherImg:'/static/seconds/tu-01.png',teatherName:'张跑跑',status:2}, + {teatherImg:'/static/seconds/tu-01.png',teatherName:'张跑跑',status:3}, + {teatherImg:'/static/seconds/tu-01.png',teatherName:'张跑跑',status:0}, + {teatherImg:'/static/seconds/tu-01.png',teatherName:'张跑跑',status:0}, + {teatherImg:'/static/seconds/tu-01.png',teatherName:'张跑跑',status:0}, + {teatherImg:'/static/seconds/tu-01.png',teatherName:'张跑跑',status:0}, ], isNothing:false } diff --git a/src/components/babyActivity.vue b/src/components/babyActivity.vue index 863eee4..b93ddc9 100644 --- a/src/components/babyActivity.vue +++ b/src/components/babyActivity.vue @@ -8,8 +8,8 @@
- - + +
班级情况
@@ -55,28 +55,30 @@
-
宝宝课表第15周(2021年12月08日)
+
宝宝课表第{{weekNum}}周({{dateTime}})
{{item}}
-
-
{{item.title}}
-
-
-
-
-
{{itemt.time}}
+
@@ -87,66 +89,58 @@ name: 'babyActivity', data() { return { + weekNum:0, + dateTime:'2021年12月28日', teatherArr:[ - {name:'张芳芳',headImg:'../assets/seconds/tu-01.png'}, - {name:'张芳芳',headImg:'../assets/seconds/tu-01.png'}, - {name:'张芳芳',headImg:'../assets/seconds/tu-01.png'}, + {name:'张芳芳',headImg:'/static/seconds/tu-01.png'}, + {name:'张芳芳',headImg:'/static/seconds/tu-01.png'}, + {name:'张芳芳',headImg:'/static/seconds/tu-01.png'}, + {name:'张芳芳',headImg:'/static/seconds/tu-01.png'}, + {name:'张芳芳',headImg:'/static/seconds/tu-01.png'}, ], kebiaoArr:['时间','星期一','星期二','星期三','星期四','星期五'], - dataArr:[ - { - title:'上午', - children:[ - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - ] - }, - { - title:'中午', - children:[ - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - ] - },{ - title:'下午', - children:[ - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - {time:'08:00-08:30',dayOne:'养成教育及餐前准备',dayTwo:'养成教育及餐前准备',dayThree:'养成教育及餐前准备',dayFour:'养成教育及餐前准备',dayFive:'养成教育及餐前准备'}, - ] - } - ] + dataArr:[], + isNothing:false } }, methods: { + async getbabycourseEv() { + let data = await this.$axios({ + // 调用 serviceAPI + url: this.$https.getbabycourse, + methods: "get", + params: { + EquipmentID: "yaohaotest001", + }, + }); + let newData = data.data.data; + // 第几周 + this.weekNum = newData[0].NowWeekNo; + // 时间 + let newTime = newData[0].NowDate.slice(0,10).split('/'); + this.dateTime = `${newTime[2]}年${newTime[1]}月${newTime[0]}日`; + // 一周安排 + this.dataArr = newData[0].WeekData; + if(this.dataArr.length) this.isNothing = true; + }, + async getbabynowtimecourseEv() { + let data = await this.$axios({ + // 调用 serviceAPI + url: this.$https.getbabynowtimecourse, + methods: "get", + params: { + EquipmentID: "yaohaotest001", + }, + }); + console.log(data.data.data); + }, }, mounted() { - + // 查看一周的宝宝课表 + this.getbabycourseEv(); + // 查看当前课程及下节课内容 + this.getbabynowtimecourseEv(); } } diff --git a/src/components/babyAlbum.vue b/src/components/babyAlbum.vue index e8e2d6f..07902bf 100644 --- a/src/components/babyAlbum.vue +++ b/src/components/babyAlbum.vue @@ -2,13 +2,13 @@
-
+
{{item.babyName}}的相册
{{item.albumNum}}张图
-
- +
+
暂无宝宝相册
@@ -24,17 +24,8 @@ name: 'babyActivity', data() { return { - babyArr:[ - {babyImg:'',babyName:'张跑跑',albumNum:0}, - {babyImg:'',babyName:'张跑跑',albumNum:0}, - {babyImg:'',babyName:'张跑跑',albumNum:0}, - {babyImg:'',babyName:'张跑跑',albumNum:0}, - {babyImg:'',babyName:'张跑跑',albumNum:0}, - {babyImg:'',babyName:'张跑跑',albumNum:0}, - {babyImg:'',babyName:'张跑跑',albumNum:0}, - {babyImg:'',babyName:'张跑跑',albumNum:0}, - ], - isNothing:false, + babyArr:[], + isNothing:true, showDetail:false } }, @@ -44,10 +35,24 @@ }, backBaby(e){ this.showDetail = e; - } + }, + async babyphotoEv() { + let data = await this.$axios({ + // 调用 serviceAPI + url: this.$https.babyphoto, + methods: "get", + params: { + EquipmentID: "yaohaotest001", + }, + }); + this.babyArr = data.data.data; + if(this.babyArr.length==0) { + this.isNothing = false; + } + }, }, mounted() { - + this.babyphotoEv(); } } diff --git a/src/components/babyAlbumDetail.vue b/src/components/babyAlbumDetail.vue index a8629d1..3cda760 100644 --- a/src/components/babyAlbumDetail.vue +++ b/src/components/babyAlbumDetail.vue @@ -4,34 +4,34 @@
宝宝相册>宝宝详情
- +
龚柯源的相册
- +
- +
- +
- +
- +
- +
- +
diff --git a/src/components/header.vue b/src/components/header.vue index 0671930..5e683e5 100644 --- a/src/components/header.vue +++ b/src/components/header.vue @@ -5,7 +5,7 @@
@@ -16,7 +16,7 @@
- +
{{date}}
@@ -27,7 +27,7 @@
-
+
@@ -50,17 +50,17 @@
班排设备ID:*******
网络链接状态:网络监测({{onLine?'已连接':'已断开'}})
+ src="/static/home/icon-link.png" style="width: 20px;">
班牌显示模式:
@@ -129,8 +129,10 @@ temperature: '', //天气温度 time: '', //当前时间 timer: null, + currentTemper:1,// activeTitle: 'activeTitle', - isNetwork:false + isNetwork:false, + weather:'' } }, methods: { @@ -157,22 +159,47 @@ } }, // 天气 - weatherEv() { - // 获取时间 - this.dateEv(); - this.timer = setInterval(() => { + // weatherEv() { + // // 获取时间 + // this.dateEv(); + // this.timer = setInterval(() => { + // this.dateEv(); + // }, 1000) + // var that = this; + // this.$axios.get('http://wthrcdn.etouch.cn/weather_mini?city=' + '成都').then((res) => { + // let weatherList = res.data.data.forecast; + // // 星期几 + // this.week = weatherList[0].date.slice(weatherList[0].date.indexOf('日') + 1); + // // 当天气温 + // this.temperature = `${weatherList[0].low.slice(2,-1)} -${weatherList[0].high.slice(2)}` + // }).catch((err) => { + // console.log(err); + // }) + // }, + // 宝宝食谱 + async weatherEv() { + let data = await this.$axios({ + // 调用 serviceAPI + url: this.$https.weather, + methods: "get", + params: { + EquipmentID: "yaohaotest001", + }, + }); + console.log(data.data.data); + if(data.data.code==200) { + // 获取时间 this.dateEv(); - }, 1000) - var that = this; - this.$axios.get('http://wthrcdn.etouch.cn/weather_mini?city=' + '成都').then((res) => { - let weatherList = res.data.data.forecast; + this.timer = setInterval(() => { + this.dateEv(); + }, 1000) // 星期几 - this.week = weatherList[0].date.slice(weatherList[0].date.indexOf('日') + 1); + this.week = data.data.data.week; + let newtempera = data.data.data.weather.result.forecasts[0]; // 当天气温 - this.temperature = `${weatherList[0].low.slice(2,-1)} -${weatherList[0].high.slice(2)}` - }).catch((err) => { - console.log(err); - }) + this.temperature = `${newtempera.low}-${newtempera.high}°C`; + + } }, // 当前时间 dateEv() { @@ -208,9 +235,10 @@ this.activeIndex = 0; this.isNetwork = false; },100) - } + }, }, mounted() { + this.weather = `/static/2.png`; this.weatherEv(); window.addEventListener('online', this.updateOnlineStatus); //网络由异常到正常时触发 window.addEventListener('offline', this.updateOnlineStatus); //网络由正常到异常时触发 diff --git a/src/components/homepage.vue b/src/components/homepage.vue index eb2dacf..ff4952b 100644 --- a/src/components/homepage.vue +++ b/src/components/homepage.vue @@ -39,19 +39,21 @@
宝宝食谱
-
-
- {{ item.Type }} + +
+
+ {{ item.Type }} +
-
-
-
-
- -
{{ item.FoodName }}
+
+
+
+ +
{{ item.FoodName }}
+
-
+
@@ -67,7 +69,7 @@
2021-11-15
-
15
+
15
@@ -78,13 +80,13 @@
班级动态
- +
- +
{{ noticeData }}
@@ -103,15 +105,17 @@
今日活动
-
-
{{ item.Ampm }}
-
-
-
{{ itemc.TimePart }}
-
{{ itemc.Name }}
+ +
+
{{ item.Ampm }}
+
+
+
{{ itemc.TimePart }}
+
{{ itemc.Name }}
+
-
+
@@ -127,111 +131,7 @@ noticeData: [], babyBirthdayData: "", dynamicPictureData: "", - noonArr: [{ - title: "上午", - children: [{ - time: "08:30 - 08:50", - content: "晨检,晨间活动晨间活动晨间活动晨间活动晨间活动晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - ], - }, - { - title: "中午", - children: [{ - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - ], - }, - { - title: "下午", - children: [{ - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - { - time: "08:30 - 08:50", - content: "晨检,晨间活动", - }, - ], - }, - ], + noonArr: [], }; }, methods: { @@ -290,22 +190,94 @@ async dynamicPicture() { let data = await this.$axios({ // 调用 serviceAPI - url: this.$https.dynamicPicture, + url: this.$https.getupdatestudentlist, methods: "post", params: { EquipmentID: "yaohaotest001", }, }); - }, - - + // 获取当日宝宝生日 + async babyBirthdayEv() { + let data = await this.$axios({ + // 调用 serviceAPI + url: this.$https.babyBirthday, + methods: "post", + params: { + EquipmentGuid: "yaohaotest001", + }, + }); + }, }, mounted() { this.babyRecipeEv(); this.schedulingWeb(); this.babyBirthday() this.dynamicPicture() + // // 引用mobile-detect文件 + // var MobileDetect = require('../utils/mobile-detect.js'); + // console.log(navigator.language, '当前系统语言'); + // // 判断是不是手机 + // if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) { + // // this.is_telephone = "是"; + // console.log("是手机"); + // } else { + // // this.is_telephone = "不是"; + // console.log("不是手机"); + // } + // // 检测是浏览器端还是微信端 + // let ua = navigator.userAgent.toLowerCase(); + // // 微信端 + // if (String(ua.match(/MicroMessenger/i)) === 'micromessenger') { + // console.log('是微信'); + // // this.isWechat = true + // } else { + // // this.isWechat = false + // console.log('不是微信'); + // } + // var md = new MobileDetect(navigator.userAgent); + // // 品牌 + // console.log(md.mobile(), '手机品牌'); + // // 操作系统 + // console.log(md.os(), '操作系统'); + // var device_type = navigator.userAgent; //获取userAgent信息 + // var networkStr = device_type.match(/NetType\/\w+/) ? device_type.match(/NetType\/\w+/)[0] : 'NetType/other'; + // networkStr = networkStr.toLowerCase().replace('nettype/', ''); + // var networkType; + // switch (networkStr) { + // case 'wifi': + // networkType = 'wifi'; + // break; + // case '4g': + // networkType = '4g'; + // break; + // case '3g': + // networkType = '3g'; + // break; + // case '3gnet': + // networkType = '3g'; + // break; + // case '2g': + // networkType = '2g'; + // break; + // default: + // networkType = 'other'; + // } + // // this.device_network_type = networkType; + // console.log(networkType, '网络类型'); + // var os = md.os(); //获取系统 + // var model = ""; + // if (os == "iOS") { //ios系统的处理 + // model = md.mobile(); + // } else if (os == "AndroidOS") { //Android系统的处理 + // var sss = device_type.split(";"); + // var i = sss.contains("Build/"); + // if (i > -1) { + // model = sss[i].substring(0, sss[i].indexOf("Build/")); + // } + // } + // console.log(model, '手机型号'); + }, created() { this.notice(); diff --git a/src/components/kindIntroduction.vue b/src/components/kindIntroduction.vue index b06136f..732ddf5 100644 --- a/src/components/kindIntroduction.vue +++ b/src/components/kindIntroduction.vue @@ -5,10 +5,10 @@
- +
{{item.title}}
- +
@@ -45,10 +45,10 @@ data() { return { navArr:[ - {icon:'../assets/attendancedetail/icon-attendancedetail.png',title:'园区介绍'}, - {icon:'../assets/attendancedetail/icon-lixiao.png',title:'教师风采'}, - {icon:'../assets/attendancedetail/icon-qingj.png',title:'新闻动态'}, - {icon:'../assets/attendancedetail/icon-weidao.png',title:'公告信息'}, + {icon:'/static/kindergartenIntroduce/icon-parkIntroduce.png',title:'园区介绍'}, + {icon:'/static/kindergartenIntroduce/icon-teacher-style.png',title:'教师风采'}, + {icon:'/static/kindergartenIntroduce/icon-new.png',title:'新闻动态'}, + {icon:'/static/kindergartenIntroduce/icon-notice-msg.png',title:'公告信息'}, ], navIndex:0, } diff --git a/src/components/newsInformation.vue b/src/components/newsInformation.vue index 4fe249b..f4ebbbd 100644 --- a/src/components/newsInformation.vue +++ b/src/components/newsInformation.vue @@ -2,7 +2,7 @@