Browse Source

居民查询功能,工作页样式完成

jw-featrue-zhanlibiao
mk 2 years ago
parent
commit
09c552ee46
  1. 10
      app.js
  2. 7
      app.json
  3. BIN
      images/back.png
  4. BIN
      images/right.png
  5. BIN
      images/work/card.png
  6. BIN
      images/work/center.png
  7. BIN
      images/work/header_left.png
  8. BIN
      images/work/house.png
  9. BIN
      images/work/map.png
  10. BIN
      images/work/resi.png
  11. BIN
      images/work/right.png
  12. BIN
      images/work/search.png
  13. BIN
      images/work/select.png
  14. BIN
      images/work/tx.png
  15. 5
      pages/index/index.js
  16. 2
      pages/index/index.json
  17. 2
      pages/index/index.wxml
  18. 2
      pages/index/index.wxss
  19. 65
      pages/information/echartsCallBack.js
  20. 4
      pages/information/information.wxml
  21. 27
      pages/work/work.js
  22. 3
      pages/work/work.json
  23. 94
      pages/work/work.wxml
  24. 418
      pages/work/work.wxss
  25. 23
      project.private.config.json
  26. 132
      subpages/searchResult/pages/searchResult/searchResult.js
  27. 7
      subpages/searchResult/pages/searchResult/searchResult.json
  28. 30
      subpages/searchResult/pages/searchResult/searchResult.wxml
  29. 138
      subpages/searchResult/pages/searchResult/searchResult.wxss
  30. 12
      utils/api.js

10
app.js

@ -5,6 +5,13 @@ App({
//这个最初我是在组件中获取,但是出现了一个问题,当第一次进入小程序时导航栏会把
//页面内容盖住一部分,当打开调试重新进入时就没有问题,这个问题弄得我是莫名其妙
//虽然最后解决了,但是花费了不少时间
let code = [1011,1017,1025,1047,1124,1001,1038,1041,1089,1090,1104,1131,1187];
if (code.includes(options.scene)) {
console.log(options.scene);
this.globalData.share = true
}else{
this.globalData.share = false
}
const menuButtonInfo = wx.getMenuButtonBoundingClientRect()
wx.getSystemInfo({
success: (res) => {
@ -19,6 +26,7 @@ App({
deviceInfo: {
statusHeight: 20,
navigationHeight: 40
}
},
share:false
}
})

7
app.json

@ -15,6 +15,13 @@
"pages": [
"pages/addhouse/addhouse"
]
},
{
"root": "subpages/searchResult",
"name": "searchResult",
"pages": [
"pages/searchResult/searchResult"
]
}
],
"window": {

BIN
images/back.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

BIN
images/right.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

BIN
images/work/card.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
images/work/center.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

BIN
images/work/header_left.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
images/work/house.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
images/work/map.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
images/work/resi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
images/work/right.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/work/search.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
images/work/select.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

BIN
images/work/tx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

5
pages/index/index.js

@ -20,13 +20,13 @@ Page({
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
share:app.globalData.share
})
this.getToken()
this.getIntelligentMessage()
},
onScrollToLower(e){
console.log(e);
if (this.data.loadMoreType === 'more') {
this.setData({
loadMoreVisible: true,
@ -49,13 +49,10 @@ onScrollToLower(e){
}
if(!parm.type) delete parm.type
getIntelligentMessage(parm).then(res=>{
console.log(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);
console.log(res.data.list.length);
if (this.data.tableData.length == 0) {
this.setData({
loadMoreVisible: false,

2
pages/index/index.json

@ -1,5 +1,5 @@
{
"navigationStyle": "custom",
"navigationStyle": "custom",
"usingComponents": {
"load-more": "../../components/loadMore/loadMore",
"no-data": "../../components/noData/nodata"

2
pages/index/index.wxml

@ -33,7 +33,7 @@
<text>{{item.createdTime}}</text>
</view>
</view>
<load-more loadVisible="{{loadMoreVisible}}" loadMoreType="{{loadMoreType}}" ></load-more>
<load-more loadVisible="{{loadMoreVisible}}" loadType="{{loadMoreType}}" ></load-more>
<no-data isShow="{{nodata}}" wx:if="{{nodata}}"></no-data>
</scroll-view>

2
pages/index/index.wxss

@ -94,8 +94,6 @@ page {
}
.content{
width: 100%;
/* height: calc(100vh - 560rpx);
overflow-y: scroll; */
padding:0 20rpx ;
box-sizing: border-box;
}

65
pages/information/echartsCallBack.js

@ -0,0 +1,65 @@
import * as echarts from '../../ec-canvas/echarts';
function initLineChart(canvas, width, height, dpr,xData) {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
canvas.setChart(chart);
var option = {
title: {
text: '线状图',
left: 'center'
},
legend: {
data: ['A', 'B', 'C'],
top: 30,
left: 'center',
z: 100
},
grid: {
containLabel: true
},
tooltip: {
show: true,
trigger: 'axis'
},
xAxis: {
type: 'category',
boundaryGap: false,
data: xData,
// show: false
},
yAxis: {
x: 'center',
type: 'value',
splitLine: {
lineStyle: {
type: 'dashed'
}
}
// show: false
},
series: [{
name: 'A',
type: 'line',
smooth: true,
data: [18, 36, 65, 30, 78, 40, 33]
}, {
name: 'B',
type: 'line',
smooth: true,
data: [12, 50, 51, 35, 70, 30, 20]
}, {
name: 'C',
type: 'line',
smooth: true,
data: [10, 30, 31, 50, 40, 20, 10]
}]
};
chart.setOption(option);
return chart;
}
export {
initLineChart
}

4
pages/information/information.wxml

@ -1,4 +1,4 @@
<!--pages/information/information.wxml-->
<view class="containers">
<ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec }}" style="width: 100%;height: 500rpx;"></ec-canvas>
</view>
<ec-canvas data canvas-id="mychart-line" ec="{{ ec }}" style="width: 100%;height: 500rpx;"></ec-canvas>
</view>

27
pages/work/work.js

@ -1,18 +1,24 @@
// pages/work/work.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
setlectVal:'resi',
keyWord:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
share:app.globalData.share
})
},
/**
@ -62,5 +68,22 @@ Page({
*/
onShareAppMessage() {
},
handelTab(e){
console.log(e);
this.setData({
setlectVal :e.currentTarget.dataset.value
})
},
handelBlurKeyWord(e){
this.setData({
keyWord: e.detail.value
})
},
handelClickSearch(e){
if(!this.data.keyWord) return
wx.navigateTo({
url: `/subpages/searchResult/pages/searchResult/searchResult?type=${this.data.setlectVal}&keyWord=${this.data.keyWord}`,
})
}
})

3
pages/work/work.json

@ -1,4 +1,3 @@
{
"usingComponents": {},
"navigationBarTitleText": "工作"
"navigationStyle": "custom"
}

94
pages/work/work.wxml

@ -1,2 +1,94 @@
<!--pages/work/work.wxml-->
<text>pages/work/work.wxml</text>
<view class="header">
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">
<image src="../../images/work/header_left.png" mode=""/> 亿星社区
</view>
<view class="content">
<view class="tab">
<text bind:tap="handelTab" data-value="resi">查询居民</text>
<text bind:tap="handelTab" data-value="house">查询房屋</text>
<image class="{{setlectVal == 'resi'?'tab_resi':'tab_house'}}" src="../../images/work/select.png" mode=""/>
</view>
<view class="inout_box">
<image src="../../images/work/search.png" mode=""/>
<input type="text" placeholder="{{setlectVal == 'resi'?'姓名/手机/身份证/住址等任意组合关键词':'输入小区/楼栋/单元/门牌号/房主等任意组合关键词'}}" bindblur="handelBlurKeyWord" value="{{keyWord}}" />
<view class="btn_box" bind:tap="handelClickSearch">搜索</view>
</view>
<view class="jump">
<image style="height: 50rpx;width: 50rpx; margin-right: 11rpx;" src="../../images/work/card.png" mode=""/>
<view>识别身份证查询</view>
<image style="height: 32rpx;width: 32rpx;" src="../../images/work/right.png" mode=""/>
</view>
<view class="list"></view>
</view>
</view>
<view class="body">
<view class="top">
<view class="title">
<view>信息采集</view>
<text>采集记录></text>
</view>
<view class="tip ">
<image src="../../images/work/tx.png" mode=""/><view >关注官方公众号,可接受重要消息提醒。</view>
</view>
<view class="big_box">
<view class="left">
<view class="left_title"><image src="../../images/work/house.png" mode=""/><text class="blue">房屋采集情况</text></view>
<view class="left_body">
<view><text class="yellow font_size_44">2,503</text><text class="font_size_26">实有房屋数</text></view>
<view><text class="font_size_44 gray">2,503</text><text class="font_size_26">待采集</text></view>
<view><text class="green font_size_44">2,503</text><text class="font_size_26">采集房屋数</text></view>
</view>
</view>
<view class="right">
<view class="right_title"><text class="yellow_T">人口采集情况</text><image src="../../images/work/resi.png" mode=""/></view>
<view class="right_body">
<view><text class="yellow font_size_44">2,503</text><text class="font_size_26">实有房屋数</text></view>
<view><text class="font_size_44 gray">2,503</text><text class="font_size_26">待采集</text></view>
<view><text class="green font_size_44">2,503</text><text class="font_size_26">采集房屋数</text></view>
</view>
</view>
<image src="../../images/work/center.png" mode="" class="center_image"/>
</view>
</view>
<view class="bto">
<view class="title">
<view>满意度自评</view>
<text>历史自评></text>
</view>
<view class="content">
<view class="bg_box">
<view class="bg_left">
<view class="h2">亿星社区8月份满意度自评</view>
<view class="submit">已提交 <b>178</b> 人</view>
<view class="btn_Box"> <view class="btn_fx">一键分享</view> <view class="btn_tj">查看统计</view>
</view>
</view>
<view class="bg_right">
<text class="tag">进行中</text>
<image src="../../images/work/map.png" mode=""/>
</view>
</view>
</view>
<view class="list">
<view class="list_card">
<view class="left">
<view>亿星社区7月份满意度自评</view>
<view class="submit">已提交:152人</view>
</view>
<view class="right">
<b>78</b>分
</view>
</view>
<view class="list_card">
<view class="left">
<view>亿星社区7月份满意度自评</view>
<view class="submit">已提交:152人</view>
</view>
<view class="right">
<b>78</b>分
</view>
</view>
</view>
</view>
</view>

418
pages/work/work.wxss

@ -1 +1,417 @@
/* pages/work/work.wxss */
/* pages/work/work.wxss */
page {
width: 100%;
min-height: 100vh;
overflow-y: auto;
overflow-x: hidden;
background-color: #f7f7f7;
}
.gray{
color: #B6B6B6;
}
.yellow_T{
color: #DFA168;
}
.yellow{
color:#FF783C;
font-weight: 500;
}
.green{
color:#10B2A5 ;
}
.blue{
color: #5F9BD4 ;
}
.font_size_44{
font-size: 44rpx;
}
.font_size_26{
font-size: 26rpx;
}
.header {
width: 100%;
height: 470rpx;
/* position: fixed;
top: 0;
left: 0;
z-index: 1000; */
background: linear-gradient(180deg, #116FED 0%, #66A6FD 63%, #F7F7F7 100%);
overflow: hidden;
}
.header .header-bg {
width: 100%;
height: 444rpx;
position: absolute;
height: 100%;
z-index: -999;
}
.header .navigation {
width: 100%;
display: flex;
align-items: center;
justify-content: start;
color: #fff;
font-size: 32rpx;
position: relative;
padding-left: 20rpx;
z-index: 100;
}
.header .navigation image{
width: 34rpx;
height: 34rpx;
margin-right: 17rpx;
}
.header .content{
margin:90rpx 0 0;
width: 100%;
padding: 0 20rpx;
box-sizing: border-box;
}
.header .content .tab{
display: flex;
justify-content: space-around;
text-align: center;
position: relative;
color: #fff;
}
.header .content .tab image{
position: absolute;
width:140rpx;
height: 14rpx;
}
.header .content .tab_resi{
top: 50rpx;
left: 109rpx;
}
.header .content .tab_house{
top: 50rpx;
left: 462rpx;
}
.header .content .inout_box {
position: relative;
margin-top: 47rpx;
}
.header .content .inout_box input{
width: auto;
background: #F5F5FA;
border-radius: 47rpx;
padding:0 110rpx 0 69rpx;
height: 76rpx;
font-size: 26rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.header .content .inout_box image{
position: absolute;
left: 21rpx;
top: 24rpx;
width: 30rpx;
height: 30rpx;
}
.header .content .inout_box .btn_box{
width: 69rpx;
height: 30rpx;
line-height: 30rpx;
position: absolute;
top: 24rpx;
right:30rpx;
font-size: 28rpx;
color:#3A80E7;
padding-left: 15rpx;
border-left:2rpx #3A80E7 solid ;
}
.header .content .jump {
height: 80rpx;
background: linear-gradient(0deg, #579EFD 0%, #408DF3 100%);
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: space-around;
padding: 0 30rpx;
margin-top: 20rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
.header .content .jump view{
flex: 1;
text-align: left;
}
.body{
height: auto;
padding: 0 20rpx;
position: relative;
top: -20rpx;
box-sizing: border-box;
overflow: hidden;
}
.body .top{
width: 100%;
height: 695rpx;
background: #FFFFFF;
border-radius: 20rpx;
box-sizing: border-box;
padding: 0 30rpx;
}
.body .top .title{
display: flex;
justify-content: space-between;
height: 90rpx;
align-items: center;
}
.body .top .title text{
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #B4B4B4;
}
.body .top .tip{
display: flex;
align-items: center;
height: 60rpx;
background-color:#ffeccc;
border-radius: 10rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FF783C ;
padding:0 20rpx;
}
.body .top .tip image {
width: 30rpx;
height: 30rpx;
margin-right: 12rpx;
}
.big_box {
display: flex;
justify-content: space-between;
position: relative;
width: 100%;
height: 498rpx;
margin-top: 16rpx;
}
.big_box .left{
width: 310rpx;
background-color: #f6f9fe;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.big_box .left .left_title{
display: flex;
align-items: center;
padding-left: 17rpx;
font-family: PingFang SC;
font-weight: 600;
}
.big_box .left .left_body {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.big_box .left .left_body view {
display: flex;
flex-direction: column;
padding-left: 50rpx;
justify-content: space-between;
}
.big_box .left image {
width: 50rpx;
height: 50rpx;
}
.big_box .center_image{
position: absolute;
width: 352rpx;
height: 352rpx;
left: 50%;
top: 50%;
transform: translateX(-170rpx) translateY(-170rpx);
}
.big_box .right{
width: 310rpx;
background-color: #fefbf0;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.big_box .right .right_title{
display: flex;
align-items: center;
justify-content: end;
padding-left: 55rpx;
font-family: PingFang SC;
font-weight: 600;
}
.big_box .right .right_body {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.big_box .right .right_body view {
display: flex;
flex-direction: column;
padding-right: 50rpx;
text-align: right;
justify-content: space-between;
}
.big_box .right image {
width: 50rpx;
height: 50rpx;
}
.body .bto{
width: 100%;
height: 695rpx;
background: #FFFFFF;
border-radius: 20rpx;
box-sizing: border-box;
margin-top:20rpx ;
padding: 0 30rpx;
}
.body .bto .content{
border-radius: 20rpx;
/* */
border-image: linear-gradient(0deg, #E7F1FF, #E5EDFB) 10 10;
background: rgba(246,249,254,0.72);
border: 1px solid #E7F1FF;
box-sizing: border-box;
padding: 32rpx 26rpx;
}
.body .bto .title{
display: flex;
justify-content: space-between;
height: 90rpx;
align-items: center;
}
.body .bto .title text{
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #B4B4B4;
}
.body .bto .content .bg_box{
display: flex;
}
.body .bto .content .bg_box .bg_left{
flex: 1;
display: flex;
flex-direction: column;
}
.body .bto .content .bg_box .bg_left .h2{
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
}
.body .bto .content .bg_box .bg_left .submit{
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
margin-top: 20rpx;
}
.body .bto .content .bg_box .bg_left .btn_Box{
display: flex;
height: 56rpx;
padding-right: 50rpx;
color: #fff;
font-size: 28rpx;
margin-top:30rpx ;
}
.body .bto .content .bg_box .bg_left .btn_Box .btn_fx{
width: 160rpx;
height: 56rpx;
background: #FF783C;
border-radius: 28rpx;
text-align: center;
line-height: 56rpx;
margin-right:31rpx ;
}
.body .bto .content .bg_box .bg_left .btn_Box .btn_tj{
width: 160rpx;
height: 56rpx;
background: #13c8bd;
border-radius: 28rpx;
text-align: center;
line-height: 56rpx;
}
.body .bto .content .bg_box .bg_left .submit b{
color:#3A80E7 ;
}
.body .bto .content .bg_box .bg_right{
position: relative;
width: 160rpx;
height: 100%;
display: flex;
align-items: center;
}
.body .bto .content .bg_box .bg_right image{
width: 160rpx;
height: 160rpx;
position: relative;
top: 20rpx;
}
.body .bto .content .bg_box .bg_right .tag{
display: inline-block;
position: absolute;
top: -36rpx;
right: -28rpx;
background: #FFEFDB;
border-radius: 0rpx 10rpx 0rpx 10rpx;
padding: 10rpx 26rpx;
box-sizing: border-box;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FF783C;
}
.body .bto .list{
display: flex;
flex-direction: column;
}
.body .bto .list .list_card{
display: flex;
justify-content: space-around;
padding: 30rpx 0;
align-items: center;
color: #333333;
border-bottom: 1px solid #EAEAEA;
}
.body .bto .list .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;
}
.body .bto .list .list_card .left :nth-child(1),
.body .bto .list .list_card .left :nth-child(2){
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.body .bto .list .list_card .left .submit{
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
margin-top: 29rpx;
}
.list_card .right b{
font-size: 40rpx;
font-family: DIN Alternate;
font-weight: bold;
color: #FF783C;
}

23
project.private.config.json

@ -2,7 +2,7 @@
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "epmet-work-minniprogram",
"setting": {
"compileHotReLoad": true,
"compileHotReLoad": false,
"urlCheck": false
},
"condition": {
@ -14,6 +14,27 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/index/index",
"query": "",
"launchMode": "default",
"scene": 1017
},
{
"name": "工作",
"pathName": "pages/work/work",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "查询结果",
"pathName": "subpages/searchResult/pages/searchResult/searchResult",
"query": "type=resi&keyWord=测",
"launchMode": "default",
"scene": null
}
]
}

132
subpages/searchResult/pages/searchResult/searchResult.js

@ -0,0 +1,132 @@
// subpages/searchResult/pages/searchResult/searchResult.js
import {getCommunityHouse,getResidentBaseInfo} from "../../../../utils/api"
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
title:'居民查询结果',
tableData:[],
lowerThreshold:'10',
loadMoreVisible:false,
loadMoreType: "none",
nodata:false,
pageNo:1,
pageSize:10
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
share:app.globalData.share,
title:options.type =='resi'?'居民查询结果':'房屋查询结果',
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{
}
},
onScrollToLower(e){
if (this.data.loadMoreType === 'more') {
this.setData({
loadMoreVisible: true,
})
this.data.pageNo += 1
this.getTable()
}
},
back() {
//返回上一级,关闭当前页面
wx.navigateBack({
delta: 1
})
},
})

7
subpages/searchResult/pages/searchResult/searchResult.json

@ -0,0 +1,7 @@
{
"navigationStyle": "custom",
"usingComponents": {
"load-more": "../../../../components/loadMore/loadMore",
"no-data": "../../../../components/noData/nodata"
}
}

30
subpages/searchResult/pages/searchResult/searchResult.wxml

@ -0,0 +1,30 @@
<!--subpages/searchResult/pages/searchResult/searchResult.wxml-->
<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">
<view class="content_header">
<view class="title"> 查询关键字: {{keyWord}}</view>
<view class="font"> 您可以对查询出的居民信息进行修改编辑,也可以点击底部按钮新增居民信息</view>
</view>
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="card">
<view class="list_card" wx:for="{{tableData}}">
<view class="left">
<view> {{item.name}} {{item.mobile}}</view>
<view class="address">地址:{{item.homeName}}</view>
</view>
<view class="right">
<image src="../../../../images/right.png" mode=""/>
</view>
</view>
</view>
<load-more loadVisible="{{loadMoreVisible}}" loadType="{{loadMoreType}}" ></load-more>
<no-data isShow="{{nodata}}" wx:if="{{nodata}}"></no-data>
</scroll-view>
</view>
<button class="fixed_btn">{{type=='resi'?'新增居民':'新增房屋'}}</button>

138
subpages/searchResult/pages/searchResult/searchResult.wxss

@ -0,0 +1,138 @@
/* subpages/searchResult/pages/searchResult/searchResult.wxss */
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: 0 0 20rpx 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
}
.content .content_header{
height:162rpx;
background:linear-gradient(531deg, #cfe5f7 0%, #E8F2FF 66%, #F7F7F7 100%);
padding: 30rpx;
border-radius:20rpx 20rpx 0 0;
}
.content .content_header .title{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
}
.content .content_header .font{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #666666;
margin: 30rpx 0;
}
.content .card .list_card{
display: flex;
justify-content: space-around;
padding: 30rpx 0;
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;
}
.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 .address{
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
margin-top: 29rpx;
}
.list_card .right image{
width: 20rpx;
height: 20rpx;
}
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);
}

12
utils/api.js

@ -2,7 +2,9 @@ var fly = require('./request.js')
module.exports = {
getIntelligentMessage:getIntelligentMessage,
userLoginlog:userLoginlog,
getToken:getToken
getToken:getToken,
getResidentBaseInfo:getResidentBaseInfo,
getCommunityHouse:getCommunityHouse
}
function getIntelligentMessage(param){
@ -16,4 +18,10 @@ function userLoginlog (para) {
}
function getToken (para) {
return fly.post('auth/gov/loginwxmp/loginbywxcode', para)
}
}
function getResidentBaseInfo (para) {
return fly.post('actual/base/residentBaseInfo/residentSearch', para)
}
function getCommunityHouse (para) {
return fly.post('actual/base/communityHouse/houseSearch', para)
}
Loading…
Cancel
Save