24 changed files with 593 additions and 63 deletions
@ -0,0 +1,14 @@ |
|||||
|
{ |
||||
|
"pagePath": "pages/information/information", |
||||
|
"text": "数据", |
||||
|
"iconPath": "images/home/information.png", |
||||
|
"selectedIconPath": "images/home/informationSelected.png" |
||||
|
}, |
||||
|
<!-- 跳转web-view页面 --> |
||||
|
wx.navigateTo({ |
||||
|
url: `/subpages/home/pages/webview/webview?url=${global.WEBROOT()}&token=${token}&deptName=${this.data.street}&gridId=${this.data.departmentId}` |
||||
|
}) |
||||
|
|
||||
|
2a43afb52996723c6517edb048de6c79 小程序密钥 |
||||
|
15554200534 |
||||
|
12345678 |
After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 552 KiB |
After Width: | Height: | Size: 770 B |
@ -0,0 +1,19 @@ |
|||||
|
const app = getApp() |
||||
|
Page({ |
||||
|
data: { |
||||
|
url: '' |
||||
|
}, |
||||
|
onLoad: function (options) { |
||||
|
if (options.token) { |
||||
|
this.setData({ |
||||
|
url: `${options.url}?token=${options.token}&deptName=${options.deptName}&gridId=${options.gridId}` |
||||
|
}) |
||||
|
console.log('url',this.data.url) |
||||
|
} else { |
||||
|
this.setData({ |
||||
|
// url: options.url
|
||||
|
url:`${options.url}?deptName=${options.deptName}&gridId=${options.gridId}` |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
@ -0,0 +1,3 @@ |
|||||
|
{ |
||||
|
"usingComponents": {} |
||||
|
} |
@ -0,0 +1,2 @@ |
|||||
|
<web-view src="{{url}}"> |
||||
|
</web-view> |
@ -0,0 +1 @@ |
|||||
|
/* pages/webView/webView.wxss */ |
@ -0,0 +1,195 @@ |
|||||
|
import {getCommunityHouse,getResidentBaseInfo} from "../../../../utils/api" |
||||
|
const app = getApp() |
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
title:'社区满意度自查', |
||||
|
tableData:[{ |
||||
|
monthName: "9", |
||||
|
agencyName: "市北", |
||||
|
status: 2, |
||||
|
personQty: 95, |
||||
|
synthesisScore: 45, |
||||
|
qrCodeImgUrl: "http://dummyimage.com/400x400", |
||||
|
questionnaireUrl: "http://otkchmw.mobi/inquewx" |
||||
|
},{ |
||||
|
monthName: "8", |
||||
|
agencyName: "市北", |
||||
|
status: 3, |
||||
|
personQty: 95, |
||||
|
synthesisScore: 45, |
||||
|
qrCodeImgUrl: "http://dummyimage.com/400x400", |
||||
|
questionnaireUrl: "http://otkchmw.mobi/inquewx" |
||||
|
|
||||
|
},{ |
||||
|
monthName: "7", |
||||
|
agencyName: "市北", |
||||
|
status: 3, |
||||
|
personQty: 95, |
||||
|
synthesisScore: 45, |
||||
|
qrCodeImgUrl: "http://dummyimage.com/400x400", |
||||
|
questionnaireUrl: "http://otkchmw.mobi/inquewx" |
||||
|
|
||||
|
}], |
||||
|
lowerThreshold:'10', |
||||
|
loadMoreVisible:false, |
||||
|
loadMoreType: "none", |
||||
|
nodata:false, |
||||
|
pageNo:1, |
||||
|
pageSize:10, |
||||
|
type:'' |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad(options) { |
||||
|
this.setData({ |
||||
|
statusHeight: app.globalData.deviceInfo.statusHeight, |
||||
|
navigationHeight: app.globalData.deviceInfo.navigationHeight, |
||||
|
share:app.globalData.share, |
||||
|
type:options.type, |
||||
|
keyWord:options.keyWord |
||||
|
}) |
||||
|
// this.getTable()
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||
|
*/ |
||||
|
onReady() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面显示 |
||||
|
*/ |
||||
|
onShow() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面隐藏 |
||||
|
*/ |
||||
|
onHide() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面卸载 |
||||
|
*/ |
||||
|
onUnload() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||
|
*/ |
||||
|
onPullDownRefresh() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 用户点击右上角分享 |
||||
|
*/ |
||||
|
onShareAppMessage() { |
||||
|
|
||||
|
}, |
||||
|
getTable(){ |
||||
|
this.setData({ |
||||
|
loadMoreVisible: true, |
||||
|
nodata: false, |
||||
|
loadMoreType: "more", |
||||
|
}) |
||||
|
let parm ={ |
||||
|
searchKey:this.data.keyWord, |
||||
|
pageSize:this.data.pageSize, |
||||
|
pageNo:this.data.pageNo |
||||
|
} |
||||
|
if(this.data.type == 'resi'){ |
||||
|
getResidentBaseInfo(parm).then(res=>{ |
||||
|
this.setData({ |
||||
|
loadMoreType: res.data.list.length === this.data.pageSize ? 'more' : 'none', |
||||
|
tableData: this.data.tableData.concat(res.data.list), |
||||
|
}) |
||||
|
console.log(this.data.loadMoreType); |
||||
|
if (this.data.tableData.length == 0) { |
||||
|
this.setData({ |
||||
|
loadMoreVisible: false, |
||||
|
nodata: true |
||||
|
}) |
||||
|
} |
||||
|
}).catch(err=>{ |
||||
|
this.setData({ |
||||
|
loadMoreVisible: false, |
||||
|
nodata: true, |
||||
|
}) |
||||
|
}) |
||||
|
}else{ |
||||
|
getCommunityHouse(parm).then(res=>{ |
||||
|
this.setData({ |
||||
|
loadMoreType: res.data.list.length === this.data.pageSize ? 'more' : 'none', |
||||
|
tableData: this.data.tableData.concat(res.data.list), |
||||
|
}) |
||||
|
console.log(this.data.loadMoreType); |
||||
|
if (this.data.tableData.length == 0) { |
||||
|
this.setData({ |
||||
|
loadMoreVisible: false, |
||||
|
nodata: true |
||||
|
}) |
||||
|
} |
||||
|
}).catch(err=>{ |
||||
|
console.log(err); |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
onScrollToLower(e){ |
||||
|
if (this.data.loadMoreType === 'more') { |
||||
|
this.setData({ |
||||
|
loadMoreVisible: true, |
||||
|
}) |
||||
|
this.data.pageNo += 1 |
||||
|
this.getTable() |
||||
|
} |
||||
|
}, |
||||
|
jumpAdd(){ |
||||
|
if(this.data.type == 'resi'){ |
||||
|
wx.navigateTo({ |
||||
|
url: '/subpages/addResi/pages/addResi/addResi', |
||||
|
}) |
||||
|
}else{ |
||||
|
wx.navigateTo({ |
||||
|
url: '/subpages/addhouse/pages/addhouse/addhouse', |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
handelClickedit(e){ |
||||
|
console.log(e); |
||||
|
if(this.data.type == 'resi'){ |
||||
|
wx.navigateTo({ |
||||
|
url: `/subpages/addResi/pages/addResi/addResi?type=edit&resiId=${e.currentTarget.dataset.item.resiId}`, |
||||
|
}) |
||||
|
}else{ |
||||
|
wx.navigateTo({ |
||||
|
url: `/subpages/addhouse/pages/addhouse/addhouse?type=edit&houseId=${e.currentTarget.dataset.item.id}`, |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
back() { |
||||
|
//返回上一级,关闭当前页面
|
||||
|
wx.navigateBack({ |
||||
|
delta: 1 |
||||
|
}) |
||||
|
}, |
||||
|
}) |
@ -0,0 +1,7 @@ |
|||||
|
{ |
||||
|
"navigationStyle": "custom", |
||||
|
"usingComponents": { |
||||
|
"load-more": "../../../../components/loadMore/loadMore", |
||||
|
"no-data": "../../../../components/noData/nodata" |
||||
|
} |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
<view class="header"> |
||||
|
<image src="../../../../images/back.png" class="back" style=" top: {{statusHeight}}px;width: 30rpx;height: 30rpx;" bindtap="back" mode="" /> |
||||
|
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;"> |
||||
|
{{title}} |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="content"> |
||||
|
|
||||
|
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower"> |
||||
|
<view class="card"> |
||||
|
<view class="list_card {{index == 0?'bgc':''}}" wx:for="{{tableData}}" wx:key="index" data-item="{{item}}" bind:tap="handelClickedit"> |
||||
|
<view class="left"> |
||||
|
<view> {{item.agencyName}} {{item.monthName}}</view> |
||||
|
<view class="left_bto_box"> |
||||
|
<view class="{{item.status == 2?'bule':'gray'}}">{{item.status == 2?'进行中':'已结束'}}</view> |
||||
|
<view>测评人数:{{item.synthesisScore}}</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="right"> |
||||
|
<view wx:if="{{item.status == 2}}" class="bule"> |
||||
|
<image src="../../../../images/share.png" mode=""/> 分享 |
||||
|
</view> |
||||
|
<view wx:else class="score"> |
||||
|
<b>{{item.synthesisScore}}</b>分 |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<load-more loadVisible="{{loadMoreVisible}}" loadType="{{loadMoreType}}"></load-more> |
||||
|
<no-data isShow="{{nodata}}" wx:if="{{nodata}}"></no-data> |
||||
|
</scroll-view> |
||||
|
|
||||
|
</view> |
@ -0,0 +1,167 @@ |
|||||
|
page { |
||||
|
width: 100%; |
||||
|
min-height: 100vh; |
||||
|
overflow: hidden; |
||||
|
background-color: #f7f7f7; |
||||
|
} |
||||
|
.header { |
||||
|
width: 100%; |
||||
|
height: 532rpx; |
||||
|
background: linear-gradient(180deg, #7DB5FF 0%, #E8F2FF 66%, #F7F7F7 100%); |
||||
|
} |
||||
|
|
||||
|
.header .header-bg { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
/* position: absolute; |
||||
|
z-index: 10; |
||||
|
left: 0; |
||||
|
top: 0; */ |
||||
|
position: absolute; |
||||
|
height: 100%; |
||||
|
z-index: -999; |
||||
|
} |
||||
|
|
||||
|
.header .navigation { |
||||
|
width: 100%; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
font-size: 32rpx; |
||||
|
position: relative; |
||||
|
z-index: 1; |
||||
|
} |
||||
|
.back { |
||||
|
width: 30rpx; |
||||
|
height: 30rpx; |
||||
|
margin-left: 20rpx; |
||||
|
position: absolute; |
||||
|
margin-top: 25rpx; |
||||
|
border-radius: 0rpx; |
||||
|
z-index: 2; |
||||
|
} |
||||
|
.content{ |
||||
|
height: auto; |
||||
|
width: 100%; |
||||
|
overflow: hidden; |
||||
|
position: relative; |
||||
|
top: -380rpx; |
||||
|
padding: 0 20rpx; |
||||
|
box-sizing: border-box; |
||||
|
} |
||||
|
.content .scroll { |
||||
|
height: calc(100vh - 450rpx); |
||||
|
overflow-y: scroll; |
||||
|
} |
||||
|
.content .scroll .card{ |
||||
|
background-color: #fff; |
||||
|
border-radius: 20rpx; |
||||
|
box-sizing: border-box; |
||||
|
} |
||||
|
.content .card .bgc{ |
||||
|
background:linear-gradient(531deg, #cfe5f7 0%, #E8F2FF 66%, #F7F7F7 100%); |
||||
|
border-radius: 20rpx 20rpx 0 0; |
||||
|
} |
||||
|
|
||||
|
.content .card .list_card{ |
||||
|
display: flex; |
||||
|
justify-content: space-around; |
||||
|
padding: 30rpx; |
||||
|
align-items: center; |
||||
|
color: #333333; |
||||
|
border-top: 1px solid #EAEAEA; |
||||
|
} |
||||
|
.content .card .list_card .left{ |
||||
|
flex: 1; |
||||
|
height: 100%; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
justify-content: space-between; |
||||
|
font-size: 32rpx; |
||||
|
font-family: PingFang SC; |
||||
|
font-weight: 500; |
||||
|
overflow: hidden; |
||||
|
text-overflow: ellipsis; |
||||
|
white-space: nowrap; |
||||
|
color: #666666 ; |
||||
|
} |
||||
|
.content .card .list_card .left :nth-child(1), |
||||
|
.content .card .list_card .left :nth-child(2){ |
||||
|
overflow: hidden; |
||||
|
text-overflow: ellipsis; |
||||
|
white-space: nowrap; |
||||
|
} |
||||
|
|
||||
|
.content .card .list_card .left .left_bto_box{ |
||||
|
display: flex; |
||||
|
font-size: 28rpx; |
||||
|
margin-top: 28rpx; |
||||
|
} |
||||
|
.content .card .list_card .left .left_bto_box .bule{ |
||||
|
color: #3A80E7; |
||||
|
background-color:#d5e6fa ; |
||||
|
width: fit-content; |
||||
|
padding: 5rpx 12rpx; |
||||
|
box-sizing: border-box; |
||||
|
border-radius: 6rpx; |
||||
|
font-size: 26rpx; |
||||
|
margin-right: 20rpx; |
||||
|
} |
||||
|
.content .card .list_card .left .left_bto_box .gray{ |
||||
|
color: #999999; |
||||
|
background-color: #f5f5f5; |
||||
|
width: fit-content; |
||||
|
padding: 5rpx 12rpx; |
||||
|
box-sizing: border-box; |
||||
|
border-radius: 6rpx; |
||||
|
font-size: 26rpx; |
||||
|
margin-right: 20rpx; |
||||
|
} |
||||
|
|
||||
|
.list_card .right .bule{ |
||||
|
background-color: #3a80e7; |
||||
|
color: #fff; |
||||
|
padding: 16rpx; |
||||
|
font-size: 28rpx; |
||||
|
width: fit-content; |
||||
|
color:#fff; |
||||
|
height: 56rpx; |
||||
|
border-radius: 25rpx; |
||||
|
box-sizing: border-box; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
} |
||||
|
.list_card .right .score{ |
||||
|
color: #999; |
||||
|
font-size: 24rpx; |
||||
|
} |
||||
|
.list_card .right .score b{ |
||||
|
font-size: 40rpx; |
||||
|
font-family: DIN Alternate; |
||||
|
font-weight: bold; |
||||
|
color: #FF783C; |
||||
|
} |
||||
|
.list_card .right image{ |
||||
|
width: 25rpx; |
||||
|
height: 25rpx; |
||||
|
} |
||||
|
button{ |
||||
|
width: 360rpx; |
||||
|
height: 76rpx; |
||||
|
background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%); |
||||
|
border-radius: 76rpx !important; |
||||
|
font-size: 32rpx; |
||||
|
font-weight: 400 !important; |
||||
|
font-family: PingFang SC; |
||||
|
color: #FFFFFF; |
||||
|
position: fixed; |
||||
|
bottom: 63rpx; |
||||
|
left: 50%; |
||||
|
transform: translateX(-180rpx); |
||||
|
} |
||||
|
.fixed_btn{ |
||||
|
position: fixed; |
||||
|
bottom: 30rpx; |
||||
|
left: 50%; |
||||
|
transform: translateX(-184rpx); |
||||
|
} |
Loading…
Reference in new issue