diff --git a/postcss.config.js b/postcss.config.js index b0c0e98..6bd5daa 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -2,7 +2,11 @@ module.exports = { plugins: [ require('postcss-pxtorem')({ rootValue:({ file }) => { - if (file.includes('userRanking') || file.includes('dietaryNutritionTips') || file.includes('restaurantAndCafeteriaCombined')) { + if ( + file.includes('userRanking') || + file.includes('dietaryNutritionTips') || + file.includes('restaurantAndCafeteriaCombined') + ) { return 108; } else { return 192; diff --git a/src/assets/images/mealSurplusInformation/content_r_icon.png b/src/assets/images/mealSurplusInformation/content_r_icon.png new file mode 100644 index 0000000..fe74f55 Binary files /dev/null and b/src/assets/images/mealSurplusInformation/content_r_icon.png differ diff --git a/src/assets/images/mealSurplusInformation/danger_status_icon.png b/src/assets/images/mealSurplusInformation/danger_status_icon.png new file mode 100644 index 0000000..2dd709a Binary files /dev/null and b/src/assets/images/mealSurplusInformation/danger_status_icon.png differ diff --git a/src/assets/images/mealSurplusInformation/index.png b/src/assets/images/mealSurplusInformation/index.png deleted file mode 100644 index 4d430ba..0000000 Binary files a/src/assets/images/mealSurplusInformation/index.png and /dev/null differ diff --git a/src/assets/images/mealSurplusInformation/warning_status_icon.png b/src/assets/images/mealSurplusInformation/warning_status_icon.png new file mode 100644 index 0000000..a14c932 Binary files /dev/null and b/src/assets/images/mealSurplusInformation/warning_status_icon.png differ diff --git a/src/router/index.js b/src/router/index.js index e737026..0ca9442 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -173,14 +173,10 @@ const routes = [ ]; const router = new VueRouter({ - // mode: 'history', base: process.env.BASE_URL, routes }); -// http://192.168.1.210/gateway/local/zhstapi/zhst/tv/rankingList?number=9 -// http://vip.shuziweidao.com/shuwei-zhct/swLargeScreenFood/rankingList?type=1 - router.beforeEach((to, from, next) => { if (to.meta && to.meta.rootValue) { window.POSTCSS_PXTOREM_ROOT_VALUE = to.meta.rootValue; diff --git a/src/views/mealSurplusInformation/mealSurplusInformation.vue b/src/views/mealSurplusInformation/mealSurplusInformation.vue index 1a6a782..b6ed2a6 100644 --- a/src/views/mealSurplusInformation/mealSurplusInformation.vue +++ b/src/views/mealSurplusInformation/mealSurplusInformation.vue @@ -1,163 +1,215 @@ @@ -165,243 +217,369 @@ export default { #mealSurplusInformation { width: 100%; height: 100%; - overflow: hidden; - background-color: #000A14; + display: flex; + flex-flow: column; + padding: 0 24px 24px; + box-sizing: border-box; + font-family: PingFangSC-Medium; + background-color: #051836; - .title { + .header { width: 100%; - height: 120px; - padding: 0 24px; - box-sizing: border-box; + height: 96px; display: flex; - align-items: center; + flex-wrap: nowrap; + justify-content: space-between; - > div:nth-of-type(1) { - flex: 1; - color: #FFFFFF; + .times { + color: #869CC5; + height: 96px; font-size: 18px; - height: 18px; - line-height: 18px; + line-height: 96px; } - > div:nth-of-type(2) { - flex: 1; + .title { color: #FFFFFF; + height: 96px; font-size: 40px; - height: 40px; - font-weight: bold; - line-height: 40px; - text-align: center; + font-weight: 500; + line-height: 96px; } - > div:nth-of-type(3) { - flex: 1; - color: #FFFFFF; + .meal { + color: #869CC5; + height: 96px; font-size: 18px; - height: 18px; - line-height: 18px; - text-align: right; + line-height: 96px; } } .content { - width: 100%; - padding: 0 24px; - box-sizing: border-box; + flex: 1; + overflow: hidden; display: flex; - flex-wrap: wrap; + flex-wrap: nowrap; - .list { - overflow: hidden; - width: 355px; - height: 216px; - position: relative; - margin-bottom: 24px; - margin-right: calc((100% - 355px * 5) / 4); - border-radius: 12px; - border: 2px solid #5272D9; - background-color: #1A3467; + .content_l { + flex: 1; + height: 100%; + display: flex; + flex-wrap: wrap; + align-content: flex-start; + column-gap: 24px; + row-gap: 24px; - .index { - width: 56px; - height: 56px; - position: absolute; - z-index: 2; - top: 0; - left: 0; - color: #FFFFFF; - font-size: 22px; - line-height: 50px; - padding-left: 10px; + .content_l_list { + width: 336px; + height: 222px; + padding: 24px 24px 0; + border-radius: 12px; box-sizing: border-box; - font-weight: bold; - background-size: contain; - background-position: center; - background-repeat: no-repeat; - background-image: url("@/assets/images/mealSurplusInformation/index.png"); - } - .none { - height: 100%; - padding-top: 70px; - box-sizing: border-box; - background-color: #0F1A29; - - .name { - color: #5A6478; - width: 100%; - height: 28px; - font-size: 28px; - line-height: 28px; - font-weight: bold; - text-align: center; - margin-bottom: 25px; - } - - .accumulate { - color: #5A6478; - width: 100%; - height: 16px; - font-size: 16px; - font-weight: bold; - line-height: 16px; - text-align: center; - } - } - - .info { - width: 100%; - padding: 22px 18px 0; - box-sizing: border-box; - margin-bottom: 24px; - - .info_ { + .content_l_list_name { width: 100%; + height: 24px; display: flex; flex-wrap: nowrap; + margin-bottom: 28px; - .info_l { - width: 80px; - height: 80px; - overflow: hidden; - border-radius: 10px; - margin-right: 10px; - - img { - width: 100%; - height: 100%; - } + > div:nth-of-type(1) { + width: 6px; + height: 24px; + border-radius: 3px; + margin-right: 12px; } - .info_r { - padding-top: 10px; + > div:nth-of-type(2) { flex: 1; - width: 0; + height: 24px; + line-height: 24px; + font-size: 20px; + } + } - .name { - width: 100%; - color: #FFFFFF; - font-size: 28px; - height: 28px; - font-weight: bold; - line-height: 28px; - margin-bottom: 16px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + .content_l_list_margin { + width: 100%; + height: 34px; + font-size: 24px; + line-height: 34px; + text-align: center; + margin-bottom: 22px; + + span { + font-size: 34px; + font-weight: bold; + } + } + + .content_l_list_status { + width: 200px; + height: 36px; + display: flex; + flex-wrap: nowrap; + justify-content: center; + align-items: center; + border-radius: 6px; + margin: 0 auto 16px; + + .content_l_list_status_icon { + width: 20px; + height: 20px; + background-repeat: no-repeat; + background-position: center; + background-size: contain; + margin-right: 10px; + } + + .content_l_list_status_text { + height: 16px; + font-size: 16px; + line-height: 16px; + } + } + + .content_l_list_progress { + width: 100%; + height: 12px; + border-radius: 6px; + + > div { + height: 12px; + transition: .3s; + border-radius: 6px; + } + } + + &.normal { + background-color: #1A3467; + border: 2px solid #5272D9; + + .content_l_list_name { + > div:nth-of-type(1) { + background-color: #5272D9; } - .accumulate { - width: 100%; - color: #9DA8BA; - font-size: 16px; - height: 16px; - line-height: 16px; + > div:nth-of-type(2) { + color: #FFFFFF; + } + } + + .content_l_list_margin { + color: #FFFFFF; + + span { + color: #5AF186; + } + } + + .content_l_list_status { + .content_l_list_status_text { + color: #869CC5; + } + } + + .content_l_list_progress { + background-color: rgba(90, 241, 134, .3); + + > div { + background-color: #5AF186; + } + } + } + + &.warning { + background-color: #402200; + border: 2px solid #5E4728; + + .content_l_list_name { + > div:nth-of-type(1) { + background-color: #F8A45A; + } + + > div:nth-of-type(2) { + color: #F6BD9E; + } + } + + .content_l_list_margin { + color: #F6BD9E; + + span { + color: #F8A45A; + } + } + + .content_l_list_status { + background-color: #5A2F00; + + .content_l_list_status_icon { + background-image: url("@/assets/images/mealSurplusInformation/warning_status_icon.png"); + } + + .content_l_list_status_text { + color: #F6BD9E; + } + } + + .content_l_list_progress { + background-color: rgba(248, 164, 90, .3); + + > div { + background-color: #F8A45A; + } + } + } + + &.danger { + background-color: #220203; + border: 2px solid #FF3232; + + .content_l_list_name { + > div:nth-of-type(1) { + background-color: #FF3232; + } + + > div:nth-of-type(2) { + color: #FFC8C8; + } + } + + .content_l_list_margin { + color: #FFC8C8; + + span { + color: #FF3232; + } + } + + .content_l_list_status { + background-color: #5A0A0A; + + .content_l_list_status_icon { + background-image: url("@/assets/images/mealSurplusInformation/danger_status_icon.png"); + } + + .content_l_list_status_text { + color: #FF6464; + } + } + + .content_l_list_progress { + background-color: rgba(200, 50, 50, .3); + + > div { + background-color: #FF3232; } } } } + } - .remaining { + .content_r { + width: 432px; + height: 100%; + padding: 24px; + display: flex; + flex-flow: column; + border-radius: 12px; + box-sizing: border-box; + border: 2px solid #2F415F; + background-color: #051836; + + .content_r_title { width: 100%; - padding: 0 10px; - box-sizing: border-box; + height: 24px; + display: flex; + flex-wrap: nowrap; + margin-bottom: 22px; - .remaining_ { - color: #FFFFFF; - font-size: 24px; - font-weight: bold; - width: 100%; - height: 76px; - line-height: 76px; - border-radius: 8px; - text-align: center; - background-color: #0A2049; + > div:nth-of-type(1) { + width: 24px; + height: 24px; + margin-right: 12px; + background-repeat: no-repeat; + background-position: center; + background-size: contain; + background-image: url("@/assets/images/mealSurplusInformation/content_r_icon.png"); + } - span { - color: #B1FF89; - } + > div:nth-of-type(2) { + flex: 1; + height: 24px; + color: #5272D9; + line-height: 24px; + font-size: 20px; + font-weight: 500; } } - &:nth-of-type(5n) { - margin-right: 0; - } - } + .content_r_content { + flex: 1; + overflow: hidden; - @keyframes warn_animation { - 0% { - border: 2px solid #5272D9; - background-color: #1A3467; - } - 50% { - border: 2px solid #DC2828; - background-color: #7F1520; - } - 100% { - border: 2px solid #5272D9; - background-color: #1A3467; - } - } + .content_r_content_table { + width: 100%; + height: 50%; + display: flex; + flex-flow: column; - @keyframes accumulate_animation { - 0% { - color: #9DA8BA; - } - 50% { - color: #FFC8C8; - } - 100% { - color: #9DA8BA; - } - } + .content_r_content_table_head { + width: 100%; + height: 48px; + display: flex; + flex-wrap: nowrap; + padding: 0 24px; + box-sizing: border-box; + justify-content: space-between; + border-radius: 6px; + background-color: #2F415F; + margin-bottom: 30px; - @keyframes remaining_animation { - 0% { - background-color: #0A2049; - } - 50% { - background-color: #DC2828; - } - 100% { - background-color: #0A2049; - } - } + > div { + color: #FFFFFF; + height: 48px; + font-size: 18px; + line-height: 48px; + } + } - .warning1 { - animation: warn_animation 1s infinite; + .content_r_content_table_body { + flex: 1; + overflow: hidden; + display: flex; + flex-wrap: wrap; + align-content: flex-start; - .accumulate { - animation: accumulate_animation 1s infinite; + > div { + flex: none; + width: 50%; + padding-left: 24px; + box-sizing: border-box; + height: 18px; + display: flex; + flex-wrap: nowrap; + align-items: flex-end; + margin-bottom: 22px; + + > div:nth-of-type(1) { + height: 18px; + font-size: 18px; + line-height: 18px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + > div:nth-of-type(2) { + height: 14px; + font-size: 14px; + line-height: 14px; + margin-left: 8px; + } + } + } + } } - - .remaining_ { - animation: remaining_animation 1s infinite; - } - } - - .warning2 { - border: 2px solid #263249 !important; } } }