123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267 |
- <template>
- <view class="content" style="position: relative;">
- <view>
- <image src="https://121.37.40.217/app/images/5fde4230055e4eefb4dded5ba3325333.png" mode="" class="header">
- </image>
- </view>
- <view class="justify-content">
- <view class="align-items" style="position: absolute; top: 66rpx;left: 40rpx;">
- <image src="https://121.37.40.217/app/images/sgglpt.png" mode="" class="header-title"></image>
- </view>
- <view class="align-items"
- style="position: absolute; top: 180rpx; left: 300rpx; font-size: 10pt;font-size: 36rpx; color: #fff;">
- {{name}} !欢迎你登录本应用
- </view>
- <!-- <view class="align-items" style="position: absolute; top: 90rpx; left: 0;" @click="gotopage('/pages/noLogin/typeList')">
- <back></back>
- </view> -->
- </view>
- <view style="margin: 0 30rpx;">
- <swiper class="swiper" @change="change" autoplay="true" interval="3000">
- <swiper-item v-for="(item,index) in lunbo" :key="index">
- <view>
- <image :src="item.picUrl" mode=""></image>
- </view>
- </swiper-item>
- </swiper>
- </view>
- <!-- <view class="distance justify-content">
- <view class="square" @click="gotopage('/pages/cityConstrution/cityConstrution')">
- <image src="https://121.37.40.217/app/images//city.png" mode="" class="icon"></image>
- <view class="font-thirty-six">
- 阀管施工
- </view>
- </view>
- <view class="square" @click="history()">
- <image src="https://121.37.40.217/app/images//construction.png" mode="" class="icon"></image>
- <view class="font-thirty-six">
- 历史施工
- </view>
- </view>
- <view class="square" @click="gotopage('/pages/service/service')">
- <image src="https://121.37.40.217/app/images//service.png" mode="" class="icon"></image>
- <view class="font-thirty-six">
- 服务说明
- </view>
- </view>
- <view class="square" @click="gotopage('/pages/aboutme/aboutme')">
- <image src="https://121.37.40.217/app/images//construction.png" mode="" class="icon"></image>
- <view class="font-thirty-six">
- 关于我们
- </view>
- </view>
- </view>
- <view class="justify-content" style="margin: 50rpx 30rpx 0;"> -->
- <view class="tongzhicont">
- <view class="gonggao">
- <view class="justify-content">
- <view class="font-forty-eight text"> 公告内容 </view>
- <view class="font-thirty-six darkgray more" @click="more()"> 更多<u-icon name="arrow-right"></u-icon>
- </view>
- </view>
- <view v-for="(item,index) in list" style="margin: 30rpx 0;">
- <u-parse class="title" :html="item.text"></u-parse>
- </view>
- </view>
- <view class="notice" :key="index">
- <view style="margin: 30rpx 0;">
- <rich-text class="one-title" :nodes="oneManage.title"></rich-text>
- <rich-text class="one-time" :nodes="oneManage.time"></rich-text>
- <!-- <view class="font-forty"> -->
- <mpHtml :content="oneManage.text"></mpHtml>
- <!-- </view> -->
- </view>
- </view>
- <!-- </view> -->
- </view>
- </view>
- </template>
- <script>
- import service from '@/api/index.js'
- import mpHtml from '@/components/mp-html/mp-html.vue'
- export default {
- components: {
- mpHtml
- },
- data() {
- return {
- list: [],
- oneManage: {},
- name: '',
- lunbo: []
- }
- },
- onLoad() {
- uni.showTabBar();
- //this.getLunBo();
- this.getUserName();
- },
- onShow() {
- this.getOne();
- this.getnotice()
- uni.showTabBar();
- },
- onTabItemTap(e) {
- console.log(e)
- uni.removeStorageSync('type')
- },
- methods: {
- getUserName() {
- service.getUserName().then(res => {
- this.name = res.name;
- this.power = res.power;
- })
- },
- change(e) {
- this.current = e.detail.current;
- },
- gotopage(url) {
- uni.navigateTo({
- url
- })
- },
- getLunBo() {
- service.getLunBo().then(res => {
- this.lunbo = res;
- })
- },
- getOne() {
- service.getOne().then(res => {
- this.oneManage = res
- console.log(this.oneManage)
- })
- },
- getnotice() {
- service.getNoticeList().then(res => {
- let list = []
- this.list = []
- list = res
- let i = res.length - 1
- if (res.length != 0) {
- this.list.push(list[i])
- } else {
- this.list = res
- }
- })
- },
- more() {
- console.log(11111)
- uni.navigateTo({
- url: '/pages/notice/noticeList'
- })
- },
- history() {
- uni.switchTab({
- url: '/pages/historyConstruction/historyConstruction'
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .header {
- width: 100%;
- height: 530rpx;
- }
- .header-title {
- width: 310rpx;
- height: 40rpx;
- }
- .row-item {
- overflow: hidden;
- -webkit-line-clamp: 2;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- }
- .tongzhicont {
- position: absolute;
- top: 396rpx;
- width: 100%;
- }
- .more {
- font-size: 30rpx;
- color: #666666;
- }
- .gonggao {
- width: 90%;
- margin: 0 auto;
- border-radius: 30rpx;
- background: linear-gradient(45deg, #ffffff, #e7f9ff);
- box-shadow: 7rpx 1rpx 10rpx #e5f0ff;
- padding: 20rpx;
- }
- .one-title {
- font-size: 40rpx;
- font-weight: bold;
- color: #666;
- line-height: 2rem;
- }
- .one-time {
- color: #999;
- font-size: 32rpx;
- }
- .font-forty {
- font-size: 32rpx;
- line-height: 2rem;
- margin: 20rpx 0 0 0;
- }
- .title {
- overflow: hidden;
- text-overflow: ellipsis;
- width: 100%;
- /*将对象作为弹性伸缩盒子模型显示*/
- display: -webkit-box;
- /*限制文本行数*/
- -webkit-line-clamp: 2;
- /*子元素的排列方式*/
- -webkit-box-orient: vertical;
- /*将对象作为弹性伸缩盒子模型显示*/
- }
- .swiper {
- position: absolute;
- top: 200rpx;
- width: 690rpx;
- height: 280rpx;
- margin: 0 30rpx;
- }
- .distance {
- margin: 250rpx 30rpx 0;
- .square {
- margin: 15rpx;
- text-align: center;
- .icon {
- width: 100rpx;
- height: 100rpx;
- }
- }
- }
- .notice {
- margin: 20rpx;
- padding: 20rpx;
- background: #FFFFFF;
- box-shadow: 0rpx 8rpx 17rpx 0rpx rgba(0, 0, 0, 0.04);
- border-radius: 10rpx;
- }
- .text {
- padding-left: 20rpx;
- font-size: 44rpx;
- font-weight: bold;
- color: #4194fd;
- }
- </style>
|