Browse Source

演示环境,消息列表清空

jw-featrue-zhanlibiao
mk 2 years ago
parent
commit
9e48536a89
  1. 7
      app.json
  2. 20
      pages/index/index.js
  3. 4
      pages/index/index.wxml
  4. 16
      pages/login/login.js
  5. 5
      pages/work/work.js
  6. 8
      pages/work/work.wxml
  7. 9
      pages/work/work.wxss
  8. 9
      subpages/addResi/pages/addResi/addResi.js
  9. 2
      subpages/addResi/pages/addResi/addResi.json
  10. 2
      subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml
  11. 5
      subpages/searchResult/pages/searchRecords/searchRecords.js
  12. 6
      utils/api.js
  13. 2
      utils/config.js

7
app.json

@ -64,12 +64,7 @@
"iconPath": "images/home/work.png",
"selectedIconPath": "images/home/workSelected.png"
},
{
"pagePath": "pages/information/information",
"text": "数据",
"iconPath": "images/home/information.png",
"selectedIconPath": "images/home/informationSelected.png"
},
{
"pagePath": "pages/mine/mine",
"text": "我的",

20
pages/index/index.js

@ -1,7 +1,7 @@
// index.js
// 获取应用实例
const app = getApp()
import {getIntelligentMessage,getToken,getStaffbasicinfo} from "../../utils/api"
import {getIntelligentMessage,getToken,getStaffbasicinfo,clearMessage} from "../../utils/api"
Page({
data: {
selectList:['全部信息','居民信息采集','房屋信息采集','社区满意度自查'],
@ -26,7 +26,9 @@ Page({
await this.getIntelligentMessage()
await this.getStaffbasicinfo()
},
onShow(){
this.getStaffbasicinfo()
},
onScrollToLower(e){
if (this.data.loadMoreType === 'more') {
this.setData({
@ -44,7 +46,6 @@ onScrollToLower(e){
})
const parm = {
type:this.data.selectValue == 0? null :this.data.selectValue - 1,
readFlag:0,
limit:this.data.pageSize,
page:this.data.pageNo
}
@ -102,6 +103,9 @@ onScrollToLower(e){
app.globalData.user = res.data
}).catch(err=>{
console.log(err);
wx.navigateTo({
url: '/pages/login/login',
})
})
},
handleChangeFilter(e){
@ -110,5 +114,15 @@ onScrollToLower(e){
tableData:[],
})
this.getIntelligentMessage()
},
handelClickClear(){
clearMessage().then(res=>{
this.setData({
tableData:[]
})
this.getIntelligentMessage()
}).catch(err=>{
console.log(err);
})
}
})

4
pages/index/index.wxml

@ -14,12 +14,12 @@
<view >{{selectValue == 1?'居民信息采集':selectValue == 2?'房屋信息采集':selectValue == 3?'社区满意度自查':'全部信息'}}</view>
</picker>
<image src="../../images/select.png" mode=""/></view>
<view class="delete"> <image src="../../images/delete.png" mode=""/> 全部已读</view>
<view class="delete" bind:tap="handelClickClear"> <image src="../../images/delete.png" mode="" /> 全部已读</view>
</view>
<view class="content">
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="card" wx:for="{{tableData}}" wx:key="index" >
<view class="title {{item.delFlag == '1'?'gray':''}}" >{{item.content}}</view>
<view class="title {{item.readFlag != '1'?'':'gray'}}" >{{item.content}}</view>
<view class="type">
<image src="../../images/resi.png" wx:if="{{item.msgType == 'resident_base_info'}}" mode=""/>
<image src="../../images/house.png" wx:if="{{item.msgType == 'community_house'}}" mode=""/>

16
pages/login/login.js

@ -90,9 +90,6 @@ Page({
})
return
}
wx.showLoading({
title:"登录中..."
})
const parm = {
wxCode :'',
...this.data.formData
@ -102,22 +99,19 @@ Page({
parm.wxCode = res.code
console.log(parm.wxCode);
userLoginlog(parm).then((res)=>{
wx.hideLoading()
console.log(res);
if(res.code == 0){
wx.switchTab({
url: '/pages/index/index',
})
wx.setStorageSync('token', res.data.token)
}else{
wx.showToast({
title: res.msg,
icon:'none',
duration:2000
})
}
}).catch(err=>{
wx.hideLoading()
wx.showToast({
title: res.msg,
icon:'none',
duration:3000
})
console.log(err);
})
},

5
pages/work/work.js

@ -138,5 +138,10 @@ Page({
wx.navigateTo({
url: '/subpages/searchResult/pages/searchRecords/searchRecords',
})
},
toGatherInformation(){
wx.navigateTo({
url: '/subpages/gatherInformation/pages/gatherInformation/gatherInformation',
})
}
})

8
pages/work/work.wxml

@ -12,7 +12,7 @@
<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 class="btn_box" bind:tap="handelClickSearch"><text>搜索</text></view>
</view>
<view class="jump" wx:if="{{setlectVal == 'resi'}}">
<image style="height: 50rpx;width: 50rpx; margin-right: 11rpx;" src="../../images/work/card.png" mode=""/>
@ -32,7 +32,7 @@
<view class="top">
<view class="title">
<view>信息采集</view>
<text>采集记录></text>
<text bind:tap="toGatherInformation">采集记录 ></text>
</view>
<view class="tip ">
<image src="../../images/work/tx.png" mode=""/><view >关注官方公众号,可接受重要消息提醒。</view>
@ -57,7 +57,7 @@
<image src="../../images/work/center.png" mode="" class="center_image"/>
</view>
</view>
<view class="bto">
<!-- <view class="bto">
<view class="title">
<view>满意度自查</view>
<text>历史自查></text>
@ -96,5 +96,5 @@
</view>
</view>
</view>
</view>
</view> -->
</view>

9
pages/work/work.wxss

@ -111,12 +111,17 @@ page {
}
.header .content .inout_box .btn_box{
width: 69rpx;
height: 30rpx;
line-height: 30rpx;
height: 50rpx;
position: absolute;
top: 24rpx;
right:30rpx;
}
.header .content .inout_box .btn_box text{
width: 69rpx;
height: 30rpx;
line-height: 30rpx;
font-size: 28rpx;
box-sizing: border-box;
color:#3A80E7;
padding-left: 15rpx;
border-left:2rpx #3A80E7 solid ;

9
subpages/addResi/pages/addResi/addResi.js

@ -386,7 +386,14 @@ Page({
if (this.data.isFirstLoadGrid) {
// 编辑回填逻辑
const id = this.data.form.gridId;
const gridName = this.data.gridList.filter(item => item.value == id)[0].label;
const temp = this.data.gridList.filter(item => item.value == id);
const gridName = ''
if(temp.length != 0){
gridName = temp[0].label
}else{
this.showToast('网格信息有误')
return
}
this.setData({
'form.gridName': gridName,
"form.gridId": id

2
subpages/addResi/pages/addResi/addResi.json

@ -1,7 +1,5 @@
{
"usingComponents": {
"wux-cell-group": "../../../../components/dist/cell-group",
"wux-cell": "../../../../components/dist/cell",
"wux-select": "../../../../components/dist/select"
},
"navigationStyle": "custom"

2
subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml

@ -11,7 +11,7 @@
<text wx:else>请选择时间</text>
</view>
<image src="../images/down.png" mode="" wx:if="{{!form.collectEndDate}}"/>
<image src="../images/del.png" bind:tap="handelDel" style="width: 35rpx;height: 35rpx;" mode="" wx:else />
<image src="../images/del.png" catch:tap="handelDel" style="width: 35rpx;height: 35rpx;" mode="" wx:else />
</view>
</view>
<view class="btn" bind:tap="handleClickfilter">筛选</view>

5
subpages/searchResult/pages/searchRecords/searchRecords.js

@ -113,5 +113,10 @@ Page({
this.setData({
SearchRecordsList:[]
})
},
back(){
wx.navigateBack({
delta: 1
})
}
})

6
utils/api.js

@ -26,12 +26,16 @@ module.exports = {
saveCommunityHouse,
updateCommunityHouse,
getClearHouseDeatilById,
getCollect
getCollect,
clearMessage
}
// 消息列表
function getIntelligentMessage(param){
return fly.get(`message/intelligentMessage/page`,param)
}
function clearMessage () {
return fly.post('message/intelligentMessage/msg/clear')
}
/**
*小程序用户登录
*/

2
utils/config.js

@ -7,7 +7,7 @@ module.exports = {
function BASEURL() {
// return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 正式环境
return 'http://192.168.1.144/api/' // 测试环境
return 'https://epmet-preview.elinkservice.cn/api/' // 测试环境
}
function WEBROOT() {

Loading…
Cancel
Save