Browse Source

Merge branch 'data-page' of http://120.46.222.128:10021/elink-star/epmet-work-mp into resi_search

work_tab_bar
mk 1 year ago
parent
commit
6e7a99b3ae
  1. 10
      app.json
  2. 9
      components/custom-tab-bar/index.js
  3. 2
      components/custom-tab-bar/index.wxml
  4. BIN
      images/work2/Header.png
  5. BIN
      images/work2/add_houses.png
  6. BIN
      images/work2/add_record.png
  7. BIN
      images/work2/add_resident.png
  8. BIN
      images/work2/data.png
  9. BIN
      images/work2/footer.png
  10. BIN
      images/work2/rep_record.png
  11. BIN
      images/work2/reporting.png
  12. BIN
      images/work2/satisfaction.png
  13. BIN
      images/work2/time.png
  14. BIN
      images/work2/work2.png
  15. 1
      pages/index/index.js
  16. 4
      pages/index/index.json
  17. 17
      pages/login/login.js
  18. 5
      pages/login/login.wxml
  19. 4
      pages/login/login.wxss
  20. 4
      pages/work/work.wxss
  21. 114
      pages/work2/work2.js
  22. 9
      pages/work2/work2.json
  23. 79
      pages/work2/work2.wxml
  24. 315
      pages/work2/work2.wxss
  25. 3
      project.config.json
  26. 32
      project.private.config.json

10
app.json

@ -4,6 +4,8 @@
"pages/logs/logs",
"pages/login/login",
"pages/work/work",
"pages/work2/work2",
"pages/work1/work1",
"pages/information/information",
"pages/mine/mine",
"pages/webView/webView",
@ -21,6 +23,8 @@
"pages/addhouse/addhouse"
]
},
{
"root": "subpages/searchResult",
"name": "searchResult",
@ -134,6 +138,12 @@
"iconPath": "images/home/resiAndHouse.png",
"selectedIconPath": "images/home/resiAndHouseSelected.png"
},
{
"pagePath": "pages/work2/work2",
"text": "工作",
"iconPath": "images/home/work.png",
"selectedIconPath": "images/home/workSelected.png"
},
{
"pagePath": "pages/statistics/statistics",
"text": "统计",

9
components/custom-tab-bar/index.js

@ -24,6 +24,15 @@ Component({
show: true
},
,
{
"pagePath": "/pages/work2/work2",
"text": "工作",
"iconPath": "/images/home/work.png",
"selectedIconPath": "/images/home/workSelected.png",
show: true
},
{
"pagePath": "/pages/statistics/statistics",
"text": "数据",

2
components/custom-tab-bar/index.wxml

@ -1,7 +1,7 @@
<view class="tab-bar-block"></view>
<view class="tab-bar">
<view wx:for="{{list}}" wx:if="{{item.show}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
<view wx:for="{{list}}" wx:if="{{item.show}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
<!-- <image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image> -->
<!-- <view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view> -->
<!-- <view >

BIN
images/work2/Header.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
images/work2/add_houses.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
images/work2/add_record.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/work2/add_resident.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/work2/data.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/work2/footer.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
images/work2/rep_record.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
images/work2/reporting.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
images/work2/satisfaction.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/work2/time.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
images/work2/work2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

1
pages/index/index.js

@ -4,6 +4,7 @@ const app = getApp()
import api, {getIntelligentMessage,getToken,getStaffbasicinfo,clearMessage} from "../../utils/api"
Page({
data: {
selectList:['全部消息','居民信息采集','房屋信息采集','社区满意度自查'],
selectValue:0,
pageSize:10,

4
pages/index/index.json

@ -1,10 +1,14 @@
{
"usingComponents": {
"load-more": "../../components/loadMore/loadMore",
"no-data": "../../components/noData/nodata",
"custom-tab-bar":"../../components/custom-tab-bar"
},
"navigationBarTitleText": "消息",
"enablePullDownRefresh": true,
"backgroundColor": "#f8f8f8",
"backgroundTextStyle": "dark"

17
pages/login/login.js

@ -1,4 +1,5 @@
// pages/register/register.js
// 到入一个
import {userLoginlog} from "../../utils/api"
Page({
@ -63,20 +64,24 @@ Page({
},
handelBlurMobile(e){
this.setData({
// 获取绑定过的值,付给fromData.mobile
'formData.mobile': e.detail.value
})
console.log(this.data.formData)
},
handelBlurPassword(e){
this.setData({
// 获取绑定过的值,付给fromData.password
'formData.password': e.detail.value
})
console.log(this.data.formData)
},
handelClickSubmit(){
if(!this.data.formData.mobile){
// 微信的轻量级api
wx.showToast({
title: '请填写手机号',
// 不显示图标
icon:'none',
duration:3000
})
@ -86,27 +91,39 @@ Page({
wx.showToast({
title: '请输入密码',
icon:'none',
// 提示时间为3s
duration:3000
})
return
}
//var和const的区别,一个可变,一个不可变,
// const 声明一个不可变的对象parm,并创建了对象
const parm = {
// wxCode对象的初始化
wxCode :'',
// ...将this.data.formData所有属性,赋值到表单中
...this.data.formData
}
// 轻量级api,在加载时进行显示
wx.showLoading({
title: '登录中',
})
//微信的api,获取登录凭证
// 在这一步骤中,用户获取凭证
wx.login({
success: (res) => {
parm.wxCode = res.code
console.log(parm.wxCode);
// 调用登录的接口
userLoginlog(parm).then((res)=>{
console.log(res);
// 不明白这里判断的是什么
if(res.code == 0){
// 用于跳转的api,跳转到某某某
wx.switchTab({
url: '/pages/index/index',
})
//加入本地内存的api
wx.setStorageSync('token', res.data.token)
}
}).catch(err=>{

5
pages/login/login.wxml

@ -11,10 +11,13 @@
<view class="login">
<view class="input_box">
<image src="../../images/login/user.png" mode=""/>
<!-- 失去焦点的时候bindblur="handelBlurMobile" -->
<input type="text" placeholder="请输入手机号" bindblur="handelBlurMobile" value="{{formData.mobile}}" confirm-type="next"/>
<image src="../../images/login/password.png" mode=""/>
<!-- 将值绑定formData.password中 -->
<input type="text" confirm-type="go" password="true" placeholder="请输入密码" bindinput="handelBlurPassword" bindblur="handelBlurPassword" value="{{formData.password}}" />
</view>
<text wx:if="{{false}}">忘记密码</text>
<text wx:if="{true}">忘记密码</text>
<!-- tap事件绑定到handelClickSubmit。tab事件,当触摸屏时 -->
<button bind:tap="handelClickSubmit" style="font-weight: 600;">登录</button>
</view>

4
pages/login/login.wxss

@ -1,12 +1,16 @@
/* pages/register/register.wxss */
page {
/*宽度为100% */
width: 100%;
/* 最小高度 */
min-height: 100vh;
/* 垂直方向.元素溢出时,显示滚动条 */
overflow-y: auto;
}
.header {
height: 500rpx;
width: 100%;
/*渐变色 */
background: linear-gradient(180deg, #1673ee 0%, #66A6FD 63%, #F7F7F7 100%);
box-sizing: border-box;
padding: 140rpx 0rpx 100rpx 50rpx;

4
pages/work/work.wxss

@ -62,8 +62,8 @@ page {
width: 100%;
display: flex;
align-items: center;
justify-content: start;
color: #fff;
/* justify-content: start; */
color: rgb(131, 80, 80);
font-size: 32rpx;
position: relative;
padding-left: 20rpx;

114
pages/work2/work2.js

@ -0,0 +1,114 @@
// pages/work2/work2.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
onAddResident(){
wx.navigateTo({
url: '../../subpages/addResi/pages/addResi/addResi',
})
},
onAddHouse(){
wx.navigateTo({
url: '../../subpages/addhouse/pages/addhouse/addhouse',
})
},
onBusinessRecord(){
wx.navigateTo({
url: '../../subpages/businessRecord/businessRecord',
})
},
onHistoryQuery(){
wx.navigateTo({
url: '../../subpages/communitySelfInsp/pages/historyQuery/historyQuery',
})
},
onFollowUpList(){
wx.navigateTo({
url: '../../subpages/communitySelfInsp/pages/followUpList/followUpList',
})
},
onMyTroubleshootDemand(){
wx.navigateTo({
url: '../../subpages/myTroubleshootDemand/pages/index/index',
})
},
onDemandCheck(){
wx.navigateTo({
url: '../../subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck',
})
},
onAddHouse(){
wx.navigateTo({
url: '../../subpages/communitySelfInsp/pages/followUpList/followUpList',
})
}
// onAddHouse(){
// wx.navigateTo({
// url: '../../subpages/addhouse/pages/addhouse/addhouse',
// })
// },
})

9
pages/work2/work2.json

@ -0,0 +1,9 @@
{
"navigationStyle": "custom",
"usingComponents": {
"custom-tab-bar":"../../components/custom-tab-bar"
},
"navigationBarBackgroundColor": "#1673ee",
"navigationBarTitleText": " ",
"backgroundTextStyle": "dark"
}

79
pages/work2/work2.wxml

@ -0,0 +1,79 @@
<!--pages/work2/work2.wxml-->
<view class="page">
<view class="header">
<view>
<image src="/images/work2/Header.png "class="image_1" ></image>
<text lines="1" class="text_1">海伦路街道</text>
</view>
</view>
<view class="box_2">
<view class="section_5">
<view class="list_1">
<view class="section_1-0">
<view class="text-wrapper_7-0">
<text lines="1" class="text_2-0">居民信息</text>
</view>
<view class="content_1">
<view>
<image src="/images/work2/add_resident.png" class="image_12-0" bind:tap="onAddResident"></image>
<text lines="1" class="text_3-0" bind:tap="onAddResident">新增居民信息</text>
</view>
<view>
<image src="/images/work2/add_record.png" class="image_13-0" bind:tap="onFollowUpList"></image>
<text lines="1" class="text_4-0">新增记录</text>
</view>
</view>
</view>
<view class="section_1-0">
<view class="text-wrapper_7-0">
<text lines="1" class="text_2-0" >房屋信息</text>
</view>
<view class="content_1">
<view>
<image src="/images/work2/add_houses.png" class="image_12-1" bind:tap="onAddHouse"></image>
<text lines="1" class="text_3-0">新增房屋信息</text>
</view>
<view> <image src="/images/work2/add_record.png" class="image_13-1" bind:tap="onFollowUpList"></image>
<text lines="1" class="text_4-0">新增记录</text>
</view>
</view>
</view>
<view class="section_1-0">
<view class="text-wrapper_7-0">
<text lines="1" class="text_2-0">信息服务</text>
</view>
<view class="house">
<view>
<image src="/images/work2/reporting.png" class="image_12-2" bind:tap="onDemandCheck"></image>
<text lines="1" class="text_3-0">诉求上报</text>
</view>
<view>
<image src="/images/work2/rep_record.png" class="image_13-2" bind:tap="onMyTroubleshootDemand"></image>
<text lines="1" class="text_4-0">诉求上报记录</text>
</view>
<view>
<image src="/images/work2/satisfaction.png" class="image_13-2" bind:tap="onHistoryQuery"></image>
<text lines="1" class="text_5-0">满意度调查</text>
</view>
</view>
</view>
<view class="section_1-0">
<view class="text-wrapper_7-0">
<text lines="1" class="text_2-0">数据</text>
</view>
<view class="content_1">
<view>
<image src="/images/work2/data.png" class="image_15">
</image>
<text lines="1" class="text_13">数据</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<custom-tab-bar></custom-tab-bar>

315
pages/work2/work2.wxss

@ -0,0 +1,315 @@
/* pages/work2/work2.wxss */
.page {
/*定位方式为相对定位 */
position: relative;
width: 750rpx;
height: 1400rpx;
/* 超过页面显示滑轮 */
overflow: hidden;
display: flex;
/* 按照行排序 */
flex-direction: column;
}
.header {
display: flex;
background: #1673ee;
width: 100%;
height: 400rpx;
flex-direction: column;
/* margin: 100rpx 0 0 31rpx; */
height: 500rpx;
}
.header>view{
display:flex;
flex-direction: row;
justify-items:self-end;
margin: 130rpx 0 0 29rpx;
width: 100%;
}
.image_1 {
width: 34rpx;
height: 31rpx;
}
.text_1 {
/* width: 157rpx;
height: 30rpx; */
overflow-wrap: break-word;
color: rgba(255,255,255,1);
font-size: 32rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
margin-left: 15rpx;
}
.box_2 {
background-color: rgba(247,247,247,1.000000);
border-radius: 20rpx;
/* 相对于父级进行定位 */
position: absolute;
left: 0rpx;
top: 181rpx;
width: 750rpx;
height: 1365rpx;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
.section_5 {
width: 750rpx;
height: 1395rpx;
display: flex;
flex-direction: column;
}
.content_1{
display: flex;
/* flex-direction: row; */
justify-self:center;
margin: 40rpx 0 0 10rpx;
}
.content_1>view{
display: flex;
flex-direction: column;
align-items: center;
width: 250rpx;
height:210rpx;
}
.data{
display: flex;
flex-direction: column;
margin: 40rpx 0 0 10rpx;
}
.data >view{
display: flex;
flex-direction: column;
align-items: center;
width: 303rpx;
height: 200rpx;
}
.house{
display: flex;
justify-content: start;
margin: 40rpx 0 0 10rpx;
}
.house >view{
display: flex;
flex-direction: column;
align-items: center;
width: 303rpx;
height: 200rpx;
}
.image_2 {
width: 158rpx;
height: 56rpx;
margin-left: 332rpx;
}
.list_1 {
width: 710rpx;
height: 603rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 43rpx 0 0 20rpx;
}
.section_1-0 {
background-color: rgba(255,255,255,1.000000);
border-radius: 20rpx;
height: 292rpx;
margin-bottom: 19rpx;
width: 710rpx;
display: flex;
flex-direction: column;
}
.image-wrapper_9-1{
width: 404rpx;
height: 100rpx;
flex-direction: row;
display: flex;
justify-content: space-between;
margin: 40rpx 0 0 59rpx;
}
.text-wrapper_7-0 {
width: 134rpx;
height: 33rpx;
display: flex;
/* row水平排列 */
flex-direction: row;
margin: 29rpx 0 0 29rpx;
}
.text_2-0 {
width: 134rpx;
height: 33rpx;
/* 文本换行 */
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 34rpx;
font-family: PingFang-SC-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
}
.image-wrapper_9-0 {
width: 303rpx;
height: 100rpx;
flex-direction: row;
display: flex;
justify-content: space-between;
margin: 40rpx 0 0 59rpx;
}
.image_12-0 {
width: 100rpx;
height: 100rpx;
}
.image_13-0 {
width: 100rpx;
height: 100rpx;
}
.text-wrapper_8-0 {
width: 336rpx;
height: 27rpx;
flex-direction: row;
display: flex;
justify-content: space-between;
margin: 23rpx 0 40rpx 31rpx;
}
.text_3-0 {
height: 27rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 28rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 28rpx;
margin-top: 15rpx;
}
.text_4-0 {
/* width: 109rpx; */
height: 27rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 28rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 28rpx;
margin-top: 15rpx;
}
.text_5-0 {
width: 109rpx;
height: 27rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 28rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: right;
white-space: nowrap;
line-height: 28rpx;
margin-top: 15rpx;
}
.text-wrapper_8-1{
width: 500rpx;
height: 27rpx;
flex-direction: row;
display: flex;
justify-content: space-between;
margin: 23rpx 0 40rpx 31rpx;
}
.image-wrapper_9-1 {
width: 500rpx;
height: 100rpx;
flex-direction: row;
display: flex;
justify-content: space-between;
margin: 40rpx 0 0 59rpx;
}
.image_12-1 {
width: 100rpx;
height: 100rpx;
}
.image_13-1 {
width: 100rpx;
height: 100rpx;
}
.image_12-2{
width: 100rpx;
height: 100rpx;
}
.image_13-2{
width: 100rpx;
height: 100rpx;
}
.image_14-1 {
width: 100rpx;
height: 100rpx;
margin-left: 5rpx;
}
.image_14-2 {
width: 100rpx;
height: 100rpx;
margin-left: 5rpx;
}
.text_12 {
width: 66rpx;
height: 32rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 34rpx;
font-family: PingFang-SC-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
margin: 30rpx 0 0 29rpx;
}
.image_15 {
width: 100rpx;
height: 100rpx;
}
.text_13 {
height: 26rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 28rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 28rpx;
margin-top: 15rpx;
}

3
project.config.json

@ -55,5 +55,6 @@
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4
}
},
"simulatorPluginLibVersion": {}
}

32
project.private.config.json

@ -8,6 +8,31 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "工作2",
"pathName": "pages/work2/work2",
"query": "",
"launchMode": "default",
"scene": null,
"partialCompile": {
"enabled": true,
"pages": []
}
},
{
"name": "工作",
"pathName": "pages/work/work",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/index/index",
"pathName": "pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "subpages/statistics/pages/residentPortrait2/residentPortrait",
"pathName": "subpages/statistics/pages/residentPortrait2/residentPortrait",
@ -218,13 +243,6 @@
"launchMode": "default",
"scene": 1017
},
{
"name": "工作",
"pathName": "pages/work/work",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "新增居民",
"pathName": "subpages/addResi/pages/addResi/addResi",

Loading…
Cancel
Save