123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781 |
- <template>
- <view>
- <view class="status_bar"></view>
- <view class="container">
- <view class="top"></view>
- <view class="content">
- <!-- 查询 -->
- <view class="search" @click="go_search()">
- <view class="icon">
- <image src="./icon/search.png" mode=""></image>
- </view>
- <view class="text">查询</view>
- </view>
- <!-- 日期天气 -->
- <view class="date">
- <view class="text">{{date}}</view>
- <view class="icon">
- <image src="./icon/weather.png" mode=""></image>
- </view>
- </view>
- <!-- 值班 -->
- <view class="notice">
- <view class="left">
- <uni-notice-bar scrollable="true" :speed="20" background-color="#ffffff00" color="#fff"
- single="true" :text="notice"></uni-notice-bar>
- </view>
- <view class="right">
- <view class="icon">
- <uni-icons type="more-filled" size="20" color="#fff"></uni-icons>
- </view>
- </view>
- </view>
- <!-- 轮播 -->
- <view class="banner">
- <swiper class="box" autoplay circular>
- <swiper-item v-for="(item_2,index_2) in banner" :key="index_2" @click="go_link(item_2.jumpURL)">
- <view class="item">
- <view class="img">
- <image :src="item_2.imgURL"></image>
- </view>
- <view class="title">
- <view class="text">{{item_2.title}}</view>
- <view class="num">
- <text>{{index_2+1}} / {{banner.length}}</text>
- </view>
- </view>
- </view>
- </swiper-item>
- </swiper>
- </view>
- <view v-for="(item,index) in common">
-
- <view class="banner" v-if="item.type_name == '轮播图' && item.index == index">
- <swiper class="box" autoplay circular>
- <swiper-item v-for="(item_2,index_2) in banner" :key="index_2" @click="go_link(item_2.jumpURL)">
- <view class="item">
- <view class="img">
- <image :src="item_2.imgURL"></image>
- </view>
- <view class="title">
- <view class="text">{{item_2.title}}</view>
- <view class="num">
- <text>{{index_2+1}} / {{banner.length}}</text>
- </view>
- </view>
- </view>
- </swiper-item>
- </swiper>
- </view>
-
- <view class="fixed_system" v-if="item.type_name == '七个建设' && item.index == index">
- <view class="line">
- <view class="item" v-for="(item_2,index_2) in item.data" :key="index_2" v-if="index_2 < 3">
- <view class="icon">
- <image src="./icon/icon.png" mode=""></image>
- </view>
- <view class="text">{{item_2.title}}</view>
- </view>
- </view>
- <view class="line">
- <view class="item" v-for="(item_2,index_2) in item.data" :key="index_2" v-if="index_2 > 2">
- <view class="icon">
- <image src="./icon/icon.png" mode=""></image>
- </view>
- <view class="text">{{item_2.title}}</view>
- </view>
- </view>
- </view>
-
- <view class="nav" v-if="item.type_name == '实操应用' && item.index == index">
- <view class="section" v-for="(item_2,index_2) in item.data" :key="index_2">
- <view class="title">
- <view class="icon"></view>
- <view class="text">{{item_2.title}}</view>
- </view>
- <view class="list">
- <view class="item" v-for="(item_3,index_3) in item_2.children" :key="index_3">
- <view class="icon">
- <image src="./icon/icon_1.png" mode=""></image>
- </view>
- <view class="text">{{item_3.title}}</view>
- </view>
- </view>
- </view>
- </view>
-
- <view class="nav" v-if="item.type_name == '数据平台' && item.index == index">
- <view class="section" v-for="(item_2,index_2) in item.data" :key="index_2">
- <view class="title">
- <view class="icon"></view>
- <view class="text">{{item_2.title}}</view>
- </view>
- <view class="list">
- <view class="item" v-for="(item_3,index_3) in item_2.children" :key="index_3">
- <view class="icon">
- <image src="./icon/icon_1.png" mode=""></image>
- </view>
- <view class="text">{{item_3.title}}</view>
- </view>
- </view>
- </view>
- </view>
-
- <view class="nav" v-if="item.type_name == '学习资料' && item.index == index">
- <view class="section" v-for="(item_2,index_2) in item.data" :key="index_2">
- <view class="title">
- <view class="icon"></view>
- <view class="text">{{item_2.title}}</view>
- </view>
- <view class="list">
- <view class="item" v-for="(item_3,index_3) in item_2.children" :key="index_3">
- <view class="icon">
- <image src="./icon/icon_1.png" mode=""></image>
- </view>
- <view class="text">{{item_3.title}}</view>
- </view>
- </view>
- </view>
- </view>
-
- </view>
- <!-- 七块体系建设 -->
- <!-- <view class="fixed_system">
- <view class="line">
- <view class="item" v-for="(item,index) in data.build" :key="index" v-if="index < 3">
- <view class="icon">
- <image src="./icon/icon.png" mode=""></image>
- </view>
- <view class="text">{{item.name}}</view>
- </view>
- </view>
- <view class="line">
- <view class="item" v-for="(item,index) in data.build" :key="index" v-if="index > 2">
- <view class="icon">
- <image src="./icon/icon.png" mode=""></image>
- </view>
- <view class="text">{{item.name}}</view>
- </view>
- </view>
- </view> -->
- <!-- 待办事项 -->
- <view class="todo">
- <view class="left">
- <view class="title">
- <view class="icon"></view>
- <view class="text">待办事项</view>
- </view>
- </view>
- <view class="right">
- <view class="tip">您有 <text style="color: #FF0000;">5</text> 项待办</view>
- <view class="detail">
- 详情 <uni-icons type="right" size="12" color="#B5B5B5"></uni-icons>
- </view>
- </view>
- </view>
- <!-- 实操应用 -->
- <!-- 数据平台 -->
- <!-- 学习资料 -->
- <!-- <view class="nav">
- <view class="section" v-for="(item,index) in data.common" :key="index">
- <view class="title">
- <view class="icon"></view>
- <view class="text">{{item.title}}</view>
- </view>
- <view class="list">
- <view class="item" v-for="(item_2,index_2) in item.list" :key="index_2">
- <view class="icon">
- <image src="./icon/icon_1.png" mode=""></image>
- </view>
- <view class="text">{{item_2.name}}</view>
- </view>
- </view>
- </view>
- </view> -->
- <!-- 动态信息 -->
- <view class="news">
- <view class="title_box">
- <view class="left">
- <view class="title">
- <view class="icon"></view>
- <view class="text">动态信息</view>
- </view>
- </view>
- <view class="right" @click="go_more()">
- <view class="detail">
- 查看全部 <uni-icons type="right" size="12" color="#B5B5B5"></uni-icons>
- </view>
- </view>
- </view>
- <view class="list">
- <view class="item" v-for="(item,index) in news" :key="index">
- <view class="icon"></view>
- <view class="inner">
- <view class="new_title">{{item.title}}</view>
- <view class="tip">
- <view class="time">{{item.created_at}}</view>
- <view class="detail" @click="go_detail(item.id)">
- 详情<image src="./icon/new_detail.png" mode=""></image>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
-
-
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- getCurrentDate
- } from "@/common/time.js"
- import {
- goToLink
- } from "@/common/common.js"
- import data from "./data.json"
- export default {
- data() {
- return {
- data: {},
- date: "",
- notice: "",
- banner: [],
- news: [],
- common: []
- }
- },
- onPullDownRefresh() {
- uni.reLaunch({
- url: "./index"
- })
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- onLoad() {
- this.data = data
- this.date = getCurrentDate()
- this.get_notice()
- this.get_scrollImg_list()
- this.get_article_list()
- this.get_home_aqyk_newLinks()
- },
- methods: {
- get_notice() {
- this.$api.notice_list({
- }).then((res) => {
- if (res.data.data.content) {
- this.notice = res.data.data.content.replace(/<br /g, " ").replace(/>/g, " ").replace(/\//g,
- " ")
- } else {
- this.notice = "暂无公告"
- }
- })
- },
- get_scrollImg_list() {
- this.$api.scrollImg_list({
- }).then((res) => {
- this.banner = res.data.data.data
- })
- },
- get_article_list() {
- this.$api.article_list({
- }).then((res) => {
- this.news = res.data.data.data
- })
- },
- get_home_aqyk_newLinks() {
- this.$api.home_aqyk_newLinks({
- }).then((res) => {
- // console.log(res.data)
-
- let data = res.data
- data.forEach((item,index)=>{
- item['index'] = index
- })
-
- console.log(data)
-
- this.common = res.data
- })
- },
- go_search() {
- uni.navigateTo({
- url: "../../index/search/search?mine_code=ningmeijituan"
- })
- },
- go_link(link) {
- let item = {
- link: link
- }
- goToLink(item, this.mine_code)
- },
- // 打开详情页
- go_detail(id) {
- uni.navigateTo({
- url: "../../index/news/news?id=" + id + "&mine_code=ningmeijituan"
- })
- },
- // 打开列表
- go_more() {
- uni.navigateTo({
- url: "../../index/news/news_list/news_list?mine_code=ningmeijituan"
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .status_bar {
- background-color: #00A0E8;
- }
- .container {
- position: relative;
- }
- .top {
- position: fixed;
- top: 0;
- left: 0;
- width: 750rpx;
- height: 665rpx;
- background-image: linear-gradient(to top, #FFFFFF 0%, #00A0E8 100%);
- }
- .content {
- position: absolute;
- top: 0rpx;
- box-sizing: border-box;
- padding: 25rpx;
- .search {
- width: 700rpx;
- height: 64rpx;
- box-sizing: border-box;
- border: 2rpx solid #FFFFFF;
- border-radius: 30rpx;
- opacity: 0.5;
- display: flex;
- align-items: center;
- padding: 0 30rpx;
- .icon {
- margin-right: 10rpx;
- image {
- width: 35rpx;
- height: 27rpx;
- }
- }
- .text {
- color: #DDF4FF;
- font-size: 27rpx;
- }
- }
- .date {
- height: 98rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .text {
- font-size: 34rpx;
- font-weight: 400;
- color: #FFFFFF;
- font-weight: 700;
- }
- .icon {
- image {
- width: 38rpx;
- height: 29rpx;
- }
- }
- }
- .notice {
- background: #FFFFFF40;
- border-radius: 21rpx;
- box-sizing: border-box;
- padding: 25rpx;
- height: 124rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .left {
- width: 580rpx;
- /deep/.uni-noticebar {
- margin-bottom: 0;
- }
- }
- .right {
- width: 50rpx;
- height: 72rpx;
- display: flex;
- align-items: center;
- .icon {
- transform: rotate(90deg);
- }
- }
- }
- .banner {
- margin-top: 30rpx;
- .box {
- width: 700rpx;
- height: 430rpx;
- .item {
- width: 700rpx;
- position: relative;
- .img {
- text-align: center;
- image {
- width: 700rpx;
- height: 400rpx;
- border-radius: 20rpx;
- }
- }
- .title {
- position: absolute;
- left: 0;
- bottom: 10rpx;
- box-sizing: border-box;
- padding: 15rpx 20rpx;
- width: 700rpx;
- font-size: 30rpx;
- display: flex;
- justify-content: space-between;
- .text {
- width: 520rpx;
- color: #FFFFFF;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .num {
- color: #FFFFFF;
- text {
- color: #FFFFFF;
- }
- }
- }
- }
- }
- }
- .fixed_system {
- margin: -10rpx -25rpx 0;
- box-sizing: border-box;
- padding: 25rpx 0;
- width: 750rpx;
- height: 436rpx;
- background-image: url(./icon/section.png);
- background-size: 100% 100%;
- background-repeat: no-repeat;
- .line {
- box-sizing: border-box;
- padding: 25rpx;
- display: flex;
- justify-content: center;
- .item {
- margin-right: 54rpx;
- .icon {
- image {
- width: 109rpx;
- height: 109rpx;
- display: block;
- }
- }
- .text {
- font-size: 25rpx;
- color: #171717;
- }
- }
- }
- .line:first-child {
- .item:nth-child(3) {
- margin-right: 0;
- }
- }
- .line:last-child {
- .item:nth-child(4) {
- margin-right: 0;
- }
- }
- }
- .todo {
- padding: 20rpx 0;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .left {
- .title {
- display: flex;
- align-items: center;
- .icon {
- width: 9rpx;
- height: 34rpx;
- background-color: #04A0E8;
- border-radius: 5rpx;
- }
- .text {
- margin-left: 10rpx;
- color: #6A6A6A;
- font-size: 33rpx;
- font-weight: 700;
- }
- }
- }
- .right {
- display: flex;
- align-items: baseline;
- .tip {
- font-size: 25rpx;
- color: #6A6A6A;
- }
- .detail {
- margin-left: 24rpx;
- font-size: 25rpx;
- color: #B5B5B5;
- }
- }
- }
- .nav {
- background-color: #F7F9F7;
- margin: 0 -25rpx;
- width: 750rpx;
- padding-top: 20rpx;
- .section {
- margin-bottom: 20rpx;
- background-color: #FFFFFF;
- box-sizing: border-box;
- padding: 25rpx;
- .title {
- padding: 20rpx 0;
- display: flex;
- align-items: center;
- .icon {
- width: 9rpx;
- height: 34rpx;
- background-color: #04A0E8;
- border-radius: 5rpx;
- }
- .text {
- margin-left: 10rpx;
- color: #6A6A6A;
- font-size: 33rpx;
- font-weight: 700;
- }
- }
- .list {
- width: 700rpx;
- overflow: hidden;
- .item {
- margin-top: 20rpx;
- float: left;
- margin-right: 20rpx;
- width: 120rpx;
- text-align: center;
- .icon {
- image {
- width: 73rpx;
- height: 73rpx;
- }
- }
- .text {
- color: #171717;
- font-size: 24rpx;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- .item:nth-child(5n) {
- margin-right: 0;
- }
- }
- }
- }
- .news {
- background-color: #F7F9F7;
- margin: 0 -25rpx;
- margin-bottom: 40rpx;
- padding-top: 20rpx;
- .title_box {
- background-color: #FFFFFF;
- box-sizing: border-box;
- padding: 25rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .left {
- .title {
- display: flex;
- align-items: center;
- .icon {
- width: 9rpx;
- height: 34rpx;
- background-color: #04A0E8;
- border-radius: 5rpx;
- }
- .text {
- margin-left: 10rpx;
- color: #6A6A6A;
- font-size: 33rpx;
- font-weight: 700;
- }
- }
- }
- .right {
- display: flex;
- align-items: baseline;
- .tip {
- font-size: 25rpx;
- color: #6A6A6A;
- }
- .detail {
- margin-left: 24rpx;
- font-size: 25rpx;
- color: #B5B5B5;
- }
- }
- }
- .list {
- box-sizing: border-box;
- padding: 25rpx;
- background-color: #FFFFFF;
- .item {
- margin-bottom: 20rpx;
- display: flex;
- justify-content: space-between;
- border-bottom: 1rpx solid #F5F6F7;
- .icon {
- position: relative;
- top: 16rpx;
- width: 8rpx;
- height: 8rpx;
- background: #999999;
- border-radius: 50%;
- }
- .inner {
- width: 680rpx;
- .new_title {
- color: #171717;
- font-size: 29rpx;
- line-height: 44rpx;
- }
- .tip {
- margin: 20rpx 0;
- display: flex;
- justify-content: space-between;
- .time {
- font-size: 23rpx;
- color: #999999;
- }
- .detail {
- color: #FD6B5C;
- font-size: 23rpx;
- image {
- margin-left: 8rpx;
- width: 19rpx;
- height: 16rpx;
- }
- }
- }
- }
- }
- .item:last-child {
- border: none;
- }
- }
- }
- }
- </style>
|