Browse Source

首页改版

integral
zhaoyongnian 5 years ago
parent
commit
3650c29599
  1. 2
      epdc-resident-mp-yushan/pages/index/components/notice/notice.wxml
  2. 4
      epdc-resident-mp-yushan/pages/index/components/notice/notice.wxss
  3. 6
      epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.js
  4. 6
      epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.wxml
  5. 27
      epdc-resident-mp-yushan/pages/index/index.js
  6. 10
      epdc-resident-mp-yushan/pages/index/index.wxml
  7. 14
      epdc-resident-mp-yushan/pages/index/index.wxss

2
epdc-resident-mp-yushan/pages/index/components/notice/notice.wxml

@ -1,7 +1,7 @@
<view class="notice" bindtap="navigateToInfoList"> <view class="notice" bindtap="navigateToInfoList">
<view class="border-content"> <view class="border-content">
<image class="notice-logo" src="../../../../images/home/notice-logo.png" /> <image class="notice-logo" src="../../../../images/home/notice-logo.png" />
<image class="info-note" src="../../../../images/home/info-note.png" /> <image class="info-note" src="../../../../images/home/info-notice.png" />
<swiper circular="{{true}}" autoplay="{{true}}" interval="{{3000}}" vertical="{{true}}"> <swiper circular="{{true}}" autoplay="{{true}}" interval="{{3000}}" vertical="{{true}}">
<swiper-item <swiper-item
wx:for="{{infoList}}" wx:for="{{infoList}}"

4
epdc-resident-mp-yushan/pages/index/components/notice/notice.wxss

@ -20,8 +20,8 @@
margin-left: -80rpx; margin-left: -80rpx;
} }
.notice .info-note { .notice .info-note {
width: 58rpx; width: 90rpx;
height: 30rpx; height: 23rpx;
margin: 5rpx 20rpx 0 10rpx; margin: 5rpx 20rpx 0 10rpx;
} }
.notice swiper { .notice swiper {

6
epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.js

@ -34,9 +34,9 @@ Component({
navigateToSafe () { navigateToSafe () {
this.triggerEvent('navigateToSafe') this.triggerEvent('navigateToSafe')
}, },
// 跳转到政策法规 // 跳转到积分排行
navigateToPolicy () { navigateToIntegral () {
this.triggerEvent('navigateToPolicy') this.triggerEvent('navigateToIntegral')
}, },
// 跳转到综合服务 // 跳转到综合服务
navigateToSyntheticalService () { navigateToSyntheticalService () {

6
epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.wxml

@ -16,9 +16,9 @@
<image src="../../../../images/home/heart.png" /> <image src="../../../../images/home/heart.png" />
<view class="name">互帮互助</view> <view class="name">互帮互助</view>
</view> </view>
<view class="item" hover-stay-time="150" bindtap="navigateToPolicy"> <view class="item" hover-stay-time="150" bindtap="navigateToIntegral">
<image src="../../../../images/home/policy.png" /> <image src="../../../../images/home/integral.png" />
<view class="name">通知公告</view> <view class="name">积分排行</view>
</view> </view>
<view class="item" hover-stay-time="150" bindtap="navigateToSafe"> <view class="item" hover-stay-time="150" bindtap="navigateToSafe">
<image src="../../../../images/home/safe.png" /> <image src="../../../../images/home/safe.png" />

27
epdc-resident-mp-yushan/pages/index/index.js

@ -297,10 +297,24 @@ Page({
url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=project&detailId=${e.detail.itemId}&showClassify=show` url: `/subpages/discussion/pages/discussionDetail/discussionDetail?type=project&detailId=${e.detail.itemId}&showClassify=show`
}) })
}, },
// 跳转到消息列表 // 跳转到通知公告列表
navigateToInfoList () { navigateToInfoList () {
wx.navigateTo({
url: '/subpages/home/pages/notice/notice'
})
},
// 跳转到消息页面
navigateToNotice(){
wx.navigateTo({ url: '/subpages/home/pages/info/info' }) wx.navigateTo({ url: '/subpages/home/pages/info/info' })
}, },
// 消息没有数据
noMore () {
wx.showToast({
title: "暂无更多消息~",
icon: "none",
duration: 1000
})
},
// 跳转到banner详情 // 跳转到banner详情
navigatetoBannerDetail (e) { navigatetoBannerDetail (e) {
const { id, url, newsFlag } = e.detail const { id, url, newsFlag } = e.detail
@ -314,10 +328,15 @@ Page({
}) })
} }
}, },
//政策法规 //积分排行
navigateToPolicy(){ navigateToIntegral(){
api.getUserInfo().then(res => {
// console.log('用户信息', res)
wx.navigateTo({ wx.navigateTo({
url: '/subpages/home/pages/notice/notice' url: "/subpages/integralCentre/pages/index/index?points=" + res.data.points
})
}).catch(err => {
console.log(err)
}) })
}, },
//社区教育 //社区教育

10
epdc-resident-mp-yushan/pages/index/index.wxml

@ -13,6 +13,12 @@
<view class="grid-name">{{departmentName}}</view> <view class="grid-name">{{departmentName}}</view>
<image class="more-grid" src="../../images/home/right-sword.png" /> <image class="more-grid" src="../../images/home/right-sword.png" />
</view> </view>
<!-- 202.9.8 把原消息的入口放在这里了 -->
<view class="notice">
<image wx:if="{{infoList.length == 0}}" bindtap="noMore" src="../../images/home/no-notice.png"></image>
<image wx:elif="{{infoList.length > 0 && unReadNum == 0}}" bindtap="navigateToNotice" src="../../images/home/no-notice.png"></image>
<image wx:elif="{{infoList.length > 0 && unReadNum > 0}}" bindtap="navigateToNotice" src="../../images/home/yes-notice.png"></image>
</view>
</view> </view>
<!-- banner列表 --> <!-- banner列表 -->
@ -21,7 +27,7 @@
bannerList="{{bannerList}}"> bannerList="{{bannerList}}">
</banner> </banner>
<!--消息列表--> <!--通知公告列表 注 以前是消息列表,通知公告需求还没有定下来,数据获取的还是消息的列表数据-->
<notice <notice
bind:navigateToInfoList="navigateToInfoList" bind:navigateToInfoList="navigateToInfoList"
infoList="{{infoList}}" infoList="{{infoList}}"
@ -37,7 +43,7 @@
bind:navigateToHeart="navigateToHeart" bind:navigateToHeart="navigateToHeart"
bind:navigateToEducation="navigateToEducation" bind:navigateToEducation="navigateToEducation"
bind:navigateToSafe="navigateToSafe" bind:navigateToSafe="navigateToSafe"
bind:navigateToPolicy="navigateToPolicy" bind:navigateToIntegral="navigateToIntegral"
bind:navigateToSynthetical="navigateToSynthetical"> bind:navigateToSynthetical="navigateToSynthetical">
</sudoku> </sudoku>

14
epdc-resident-mp-yushan/pages/index/index.wxss

@ -38,6 +38,9 @@ page {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
position: relative; position: relative;
display: flex;
justify-content: space-between;
align-items: center;
} }
.belong-grid .belong-grid-bg { .belong-grid .belong-grid-bg {
width: 100%; width: 100%;
@ -48,13 +51,22 @@ page {
z-index: 10; z-index: 10;
} }
.belong-grid .grid { .belong-grid .grid {
width: 100%; width: calc(100% - 50rpx);
height: 100%; height: 100%;
position: relative; position: relative;
z-index: 100; z-index: 100;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.belong-grid .notice {
width: 40rpx;
height: 40rpx;
margin-right: 10px;
}
.belong-grid .notice image{
width: 40rpx;
height: 40rpx;
}
.belong-grid .grid .party-logo { .belong-grid .grid .party-logo {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;

Loading…
Cancel
Save