Browse Source

3.31修改

master
mk 2 years ago
parent
commit
13dfdbf6cc
  1. 78
      epdc-resident-mp-yushan/pages/index/index.js
  2. 6
      epdc-resident-mp-yushan/pages/index/index.wxml
  3. 8
      epdc-resident-mp-yushan/pages/index/index.wxss
  4. 2
      epdc-resident-mp-yushan/subpages/family/pages/index/index.json
  5. 6
      epdc-resident-mp-yushan/subpages/family/pages/index/index.wxml

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

@ -29,11 +29,17 @@ Page({
communityNewsList: [], communityNewsList: [],
currentIndex: 0, currentIndex: 0,
moduleList: [ moduleList: [
// {
// icon:
// 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/db9d4408de344c419bb22be21ba163b9.png',
// tip: '积分排名',
// module: 'pointRank',
// },
{ {
icon: icon:'../../images/my-home.png',
'https://epdc-yushan.elinkservice.cn/files-pro/20211009/db9d4408de344c419bb22be21ba163b9.png', tip: '一户一码',
tip: '积分排名',
module: 'pointRank', module: 'pointRank',
imgHeightFlag:true
}, },
{ {
icon: icon:
@ -437,25 +443,6 @@ Page({
} }
}) })
}, },
// 获取最新社区资讯
contentList() {
const params = {
pageIndex: 1,
pageSize: 5,
typeId: '',
}
homeApi
.contentList(params)
.then((res) => {
console.log('社区最新资讯', res)
this.setData({
communityNewsList: res.data,
})
})
.catch((err) => {
console.error(err)
})
},
// 模块列表跳转 // 模块列表跳转
navigateToModule(e) { navigateToModule(e) {
const { module } = e.currentTarget.dataset const { module } = e.currentTarget.dataset
@ -464,9 +451,34 @@ Page({
url: '/subpages/gridArmy/pages/communityList/communityList', url: '/subpages/gridArmy/pages/communityList/communityList',
}) })
} else if (module === 'pointRank') { } else if (module === 'pointRank') {
if (!this.data.identityNo) {
wx.showToast({
title: '请先扫描房屋码,绑定家庭',
icon: 'none',
duration: 2500
})
return
}
const params = {
idCard: this.data.identityNo
}
api.getRoomCodeByIdCard(params).then(res => {
if (res.data && res.data.roomCode) {
wx.navigateTo({ wx.navigateTo({
url: '/subpages/integralCentre/pages/index/index', url: `/subpages/family/pages/index/index?roomCode=${res.data.roomCode}`,
}) })
} else {
wx.showToast({
title: '请扫房屋码绑定房屋',
icon: 'none',
duration: 2500
})
}
})
// wx.navigateTo({
// // /subpages/integralCentre/pages/index/index
// url: '/subpages/family/pages/index/index',
// })
} else if (module === 'volunteerService') { } else if (module === 'volunteerService') {
wx.navigateTo({ wx.navigateTo({
url: '/pages/heart/heart', url: '/pages/heart/heart',
@ -485,6 +497,26 @@ Page({
}) })
} }
}, },
// 获取最新社区资讯
contentList() {
const params = {
pageIndex: 1,
pageSize: 5,
typeId: '',
}
homeApi
.contentList(params)
.then((res) => {
console.log('社区最新资讯', res)
this.setData({
communityNewsList: res.data,
})
})
.catch((err) => {
console.error(err)
})
},
// 我有事要说跳转 // 我有事要说跳转
navigateToDiscussion() { navigateToDiscussion() {
if (app.globalData.infoCompleted == 0) { if (app.globalData.infoCompleted == 0) {

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

@ -117,7 +117,7 @@
<view class="module-list"> <view class="module-list">
<view hover-class="hover-module-item" hover-stay-time="150" class="module-item" wx:for="{{moduleList}}" wx:key="index" wx:for-item="item" data-module="{{item.module}}" bindtap="navigateToModule"> <view hover-class="hover-module-item" hover-stay-time="150" class="module-item" wx:for="{{moduleList}}" wx:key="index" wx:for-item="item" data-module="{{item.module}}" bindtap="navigateToModule">
<view class="icon"> <view class="icon">
<image src="{{item.icon}}" /> <image class="{{item.imgHeightFlag?'house_img':''}}" src="{{item.icon}}" />
</view> </view>
<view class="tip">{{item.tip}}</view> <view class="tip">{{item.tip}}</view>
</view> </view>
@ -159,10 +159,10 @@
<complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog> <complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog>
</view> </view>
<!-- 悬浮按钮 --> <!-- 悬浮按钮 -->
<move-btn wx:if="{{vaccinationSwitch}}" button-width="142" button-height="164" button-left="620" area-top="120" area-height="85%" img-url="../../images/vaccines.png" bindmovebtnCallBack="toVaccines"></move-btn> <!-- <move-btn wx:if="{{vaccinationSwitch}}" button-width="142" button-height="164" button-left="620" area-top="120" area-height="85%" img-url="../../images/vaccines.png" bindmovebtnCallBack="toVaccines"></move-btn> -->
<!-- = --> <!-- = -->
<move-btn button-width="140" button-height="140" button-left="620" area-top="120" area-height="60%" img-url="../../images/my-home.png" bindmovebtnCallBack="toFamily"></move-btn> <!-- <move-btn button-width="140" button-height="140" button-left="620" area-top="120" area-height="60%" img-url="../../images/my-home.png" bindmovebtnCallBack="toFamily"></move-btn> -->
<!-- 拨打电话 --> <!-- 拨打电话 -->

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

@ -489,7 +489,13 @@ image {
height: 150rpx; height: 150rpx;
border-radius: 8rpx; border-radius: 8rpx;
overflow: hidden; overflow: hidden;
margin-right: 20rpx; margin-right: 50rpx;
}
.module-list .module-item .icon .house_img {
width: 100% !important;
height: 90% !important;
position: relative;
top: 8rpx;
} }
.news-list .list-item .detail { .news-list .list-item .detail {

2
epdc-resident-mp-yushan/subpages/family/pages/index/index.json

@ -1,4 +1,4 @@
{ {
"navigationBarTitleText": "我的家", "navigationBarTitleText": "我的e家",
"usingComponents": {} "usingComponents": {}
} }

6
epdc-resident-mp-yushan/subpages/family/pages/index/index.wxml

@ -6,7 +6,7 @@
<view class="card-left"> <view class="card-left">
<view class="card-title">{{ familyInfo.plotName }} - {{familyInfo.buildingName}} - {{familyInfo.unit}} - {{familyInfo.roomNo}}</view> <view class="card-title">{{ familyInfo.plotName }} - {{familyInfo.buildingName}} - {{familyInfo.unit}} - {{familyInfo.roomNo}}</view>
<view wx:if="{{familyInfo.roomCodeShow.length <= 24}}" class="card-num"> <view wx:if="{{familyInfo.roomCodeShow.length <= 24}}" class="card-num">
<text>No.{{ familyInfo.roomCodeShow }}</text> <!-- <text>No.{{ familyInfo.roomCodeShow }}</text> -->
<!-- <text >No.6666666666666666666666</text> --> <!-- <text >No.6666666666666666666666</text> -->
<image /> <image />
</view> </view>
@ -28,7 +28,9 @@
</view> </view>
<view class="f-wr"> <view class="f-wr">
<view class="title-wr"> <view class="title-wr">
<view class="title-label">家庭成员</view> <view class="title-label">成员新了</view>
<view class="title-label">房价涨了</view>
<view class="title-label">快递来了</view>
<view class="title-right"> <view class="title-right">
<!-- <view class="title-right-label">明细</view> --> <!-- <view class="title-right-label">明细</view> -->
<image class="right-icon" src="../../images/arrow-right.png" /> <image class="right-icon" src="../../images/arrow-right.png" />

Loading…
Cancel
Save