From 806485eebe1a88390b6fe7dc5fbe09cdb8a2b41a Mon Sep 17 00:00:00 2001 From: chen <2659004835@qq.com> Date: Sun, 26 Dec 2021 15:21:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/webpack.base.conf.js | 3 ++- config/index.js | 2 +- src/assets/css/electron.css | 18 +++++++++--------- src/components/attendanceDetail.vue | 24 ++++++++++++------------ src/components/babyActivity.vue | 10 +++++----- src/components/babyAlbumDetail.vue | 2 +- src/components/header.vue | 2 +- src/components/homepage.vue | 4 ++-- src/components/kindIntroduction.vue | 8 ++++---- src/components/yiqingmanagement.vue | 12 +----------- 10 files changed, 38 insertions(+), 47 deletions(-) diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index a07e683..dbec47d 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -46,7 +46,8 @@ module.exports = { loader: 'url-loader', options: { limit: 10000, - name: utils.assetsPath('img/[name].[hash:7].[ext]') + name: utils.assetsPath('img/[name].[hash:7].[ext]'), + esModule: false } }, { diff --git a/config/index.js b/config/index.js index 1f0f155..0cf1b24 100644 --- a/config/index.js +++ b/config/index.js @@ -9,7 +9,7 @@ module.exports = { // Paths assetsSubDirectory: 'static', - assetsPublicPath: '/', + assetsPublicPath: './', proxyTable: {}, // Various Dev Server settings diff --git a/src/assets/css/electron.css b/src/assets/css/electron.css index a244478..6240462 100644 --- a/src/assets/css/electron.css +++ b/src/assets/css/electron.css @@ -35,11 +35,11 @@ img { display: flex; justify-content: center; align-items: center; - background: url(/static/img/home/logo-bottom.png) no-repeat; + background: url(../../../static/img/home/logo-bottom.png) no-repeat; background-size: 100% 100%; width: 177px; height: 162px; - margin-left: 287px; + margin-left: 16%; margin-top: 20px; } .header-box .logo { @@ -71,12 +71,12 @@ img { } .activeTitle { color: #FFFFFF; - background: url(/static/img/home/title-bottom-01.png) no-repeat; + background: url(../../../static/img/home/title-bottom-01.png) no-repeat; background-size: 100% 100%; } .activeTitle2 { color: #FFFFFF; - background: url(/static/img/home/title-bottom-02.png) no-repeat; + background: url(../../../static/img/home/title-bottom-02.png) no-repeat; background-size: 100% 100%; } /* 天气 */ @@ -116,7 +116,7 @@ img { .left-one { position: relative; margin-bottom: 20px; - background: url(/static/img/home/left-kuang.png) no-repeat; + background: url(../../../static/img/home/left-kuang.png) no-repeat; background-size: 100% 100%; width: 390px; height: 296px; @@ -181,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(/static/img/home/class-dongt.png) no-repeat; + background: url(../../../static/img/home/class-dongt.png) no-repeat; background-size: 100% 100%; width: 967px; height: 900px; @@ -199,7 +199,7 @@ img { width: 390px; height: 900px; flex-shrink: 0; - background: url(/static/img/home/right-back.png) no-repeat; + background: url(../../../static/img/home/right-back.png) no-repeat; background-size: 100% 100%; } .right-content {color: #7557CC;text-align: center;height: 90%; overflow: hidden;overflow-y: scroll;} @@ -244,7 +244,7 @@ img { .class-left-one { position: relative; margin-bottom: 20px; - background: url(/static/img/attendancedetail/babyactive-left.png) no-repeat; + background: url(../../../static/img/attendancedetail/babyactive-left.png) no-repeat; background-size: 100% 100%; width: 464px; height: 826px; @@ -342,7 +342,7 @@ img { position: relative; display: inline-block; width: 100%; - background: url(/static/img/attendancedetail/babyactive-right.png) no-repeat; + background: url(../../../static/img/attendancedetail/babyactive-right.png) no-repeat; background-size: 100% 100%; margin-left: 30px; height: 826px; diff --git a/src/components/attendanceDetail.vue b/src/components/attendanceDetail.vue index 361099f..4bd5033 100644 --- a/src/components/attendanceDetail.vue +++ b/src/components/attendanceDetail.vue @@ -28,21 +28,21 @@ data() { return { navArr:[ - {icon:'../../static/img/attendancedetail/icon-attendancedetail.png',title:'出勤详情',num:12}, - {icon:'../../static/img/attendancedetail/icon-lixiao.png',title:'离校情况',num:0}, - {icon:'../../static/img/attendancedetail/icon-weidao.png',title:'未到校宝宝',num:0}, - {icon:'../../static/img/attendancedetail/icon-qingj.png',title:'请假宝宝',num:0}, + {icon:require('../../static/img/attendancedetail/icon-attendancedetail.png'),title:'出勤详情',num:12}, + {icon:require('../../static/img/attendancedetail/icon-lixiao.png'),title:'离校情况',num:0}, + {icon:require('../../static/img/attendancedetail/icon-weidao.png'),title:'未到校宝宝',num:0}, + {icon:require('../../static/img/attendancedetail/icon-qingj.png'),title:'请假宝宝',num:0}, ], navIndex:0, teatherArr:[ - {teatherImg:'../../static/img/seconds/tu-01.png',teatherName:'张跑跑',status:0}, - {teatherImg:'../../static/img/seconds/tu-01.png',teatherName:'张跑跑',status:1}, - {teatherImg:'../../static/img/seconds/tu-01.png',teatherName:'张跑跑',status:2}, - {teatherImg:'../../static/img/seconds/tu-01.png',teatherName:'张跑跑',status:3}, - {teatherImg:'../../static/img/seconds/tu-01.png',teatherName:'张跑跑',status:0}, - {teatherImg:'../../static/img/seconds/tu-01.png',teatherName:'张跑跑',status:0}, - {teatherImg:'../../static/img/seconds/tu-01.png',teatherName:'张跑跑',status:0}, - {teatherImg:'../../static/img/seconds/tu-01.png',teatherName:'张跑跑',status:0}, + {teatherImg:require('../../static/img/seconds/tu-01.png'),teatherName:'张跑跑',status:0}, + {teatherImg:require('../../static/img/seconds/tu-01.png'),teatherName:'张跑跑',status:1}, + {teatherImg:require('../../static/img/seconds/tu-01.png'),teatherName:'张跑跑',status:2}, + {teatherImg:require('../../static/img/seconds/tu-01.png'),teatherName:'张跑跑',status:3}, + {teatherImg:require('../../static/img/seconds/tu-01.png'),teatherName:'张跑跑',status:0}, + {teatherImg:require('../../static/img/seconds/tu-01.png'),teatherName:'张跑跑',status:0}, + {teatherImg:require('../../static/img/seconds/tu-01.png'),teatherName:'张跑跑',status:0}, + {teatherImg:require('../../static/img/seconds/tu-01.png'),teatherName:'张跑跑',status:0}, ], isNothing:false } diff --git a/src/components/babyActivity.vue b/src/components/babyActivity.vue index 8f7b094..723e7bf 100644 --- a/src/components/babyActivity.vue +++ b/src/components/babyActivity.vue @@ -92,11 +92,11 @@ weekNum:0, dateTime:'2021年12月28日', teatherArr:[ - {name:'张芳芳',headImg:'../../static/img/seconds/tu-01.png'}, - {name:'张芳芳',headImg:'../../static/img/seconds/tu-01.png'}, - {name:'张芳芳',headImg:'../../static/img/seconds/tu-01.png'}, - {name:'张芳芳',headImg:'../../static/img/seconds/tu-01.png'}, - {name:'张芳芳',headImg:'../../static/img/seconds/tu-01.png'}, + {name:'张芳芳',headImg:require('../../static/img/seconds/tu-01.png')}, + {name:'张芳芳',headImg:require('../../static/img/seconds/tu-01.png')}, + {name:'张芳芳',headImg:require('../../static/img/seconds/tu-01.png')}, + {name:'张芳芳',headImg:require('../../static/img/seconds/tu-01.png')}, + {name:'张芳芳',headImg:require('../../static/img/seconds/tu-01.png')}, ], kebiaoArr:['时间','星期一','星期二','星期三','星期四','星期五'], dataArr:[], diff --git a/src/components/babyAlbumDetail.vue b/src/components/babyAlbumDetail.vue index 728ba0c..6d9c343 100644 --- a/src/components/babyAlbumDetail.vue +++ b/src/components/babyAlbumDetail.vue @@ -10,7 +10,7 @@
-
+
diff --git a/src/components/header.vue b/src/components/header.vue index 8ec606e..58fd4e7 100644 --- a/src/components/header.vue +++ b/src/components/header.vue @@ -238,7 +238,7 @@ }, }, mounted() { - this.weather = `/static/img/weather/2.png`; + this.weather = require(`../../static/img/weather/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 9822537..ae7846f 100644 --- a/src/components/homepage.vue +++ b/src/components/homepage.vue @@ -87,7 +87,7 @@
-
{{ noticeData }}
+
{{ noticeData }}
宝宝提醒
@@ -128,7 +128,7 @@ return { threeMeals: ["早餐", "午餐", "晚餐"], threeMealIndex: 0, - noticeData: [], + noticeData: 0, babyBirthdayData: "", dynamicPictureData: "", noonArr: [], diff --git a/src/components/kindIntroduction.vue b/src/components/kindIntroduction.vue index 879c02a..ecf6ae2 100644 --- a/src/components/kindIntroduction.vue +++ b/src/components/kindIntroduction.vue @@ -45,10 +45,10 @@ data() { return { navArr:[ - {icon:'../../static/img/kindergartenIntroduce/icon-parkIntroduce.png',title:'园区介绍'}, - {icon:'../../static/img/kindergartenIntroduce/icon-teacher-style.png',title:'教师风采'}, - {icon:'../../static/img/kindergartenIntroduce/icon-new.png',title:'新闻动态'}, - {icon:'../../static/img/kindergartenIntroduce/icon-notice-msg.png',title:'公告信息'}, + {icon:require('../../static/img/kindergartenIntroduce/icon-parkIntroduce.png'),title:'园区介绍'}, + {icon:require('../../static/img/kindergartenIntroduce/icon-teacher-style.png'),title:'教师风采'}, + {icon:require('../../static/img/kindergartenIntroduce/icon-new.png'),title:'新闻动态'}, + {icon:require('../../static/img/kindergartenIntroduce/icon-notice-msg.png'),title:'公告信息'}, ], navIndex:0, } diff --git a/src/components/yiqingmanagement.vue b/src/components/yiqingmanagement.vue index 217aa11..a814d5c 100644 --- a/src/components/yiqingmanagement.vue +++ b/src/components/yiqingmanagement.vue @@ -25,17 +25,7 @@ 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 + } }, methods: {