| | |
| | | "van-notice-bar": "@vant/weapp/notice-bar/index", |
| | | "van-overlay": "@vant/weapp/overlay/index", |
| | | "van-image": "@vant/weapp/image/index", |
| | | "van-dialog": "@vant/weapp/dialog/index" |
| | | "van-dialog": "@vant/weapp/dialog/index", |
| | | "van-swipe-cell": "@vant/weapp/swipe-cell/index", |
| | | "van-action-sheet": "@vant/weapp/action-sheet/index" |
| | | |
| | | }, |
| | | "window": { |
| | | "backgroundTextStyle": "light", |
| | |
| | | |
| | | Page({ |
| | | data: { |
| | | inter:1, |
| | | overLayList:{}, |
| | | showOverlay:false, |
| | | messageId: '', |
| | | sheetShow: false, |
| | | actions: [ |
| | | { |
| | | name: '清除此条消息', |
| | | color: '#ee0a24', |
| | | }, |
| | | ], |
| | | inter: 1, |
| | | overLayList: {}, |
| | | showOverlay: false, |
| | | messageList: [], |
| | | isShow: false, |
| | | height: null, |
| | |
| | | scrollTop: 0, |
| | | isInput: 1, |
| | | value: "", |
| | | groupId:null, |
| | | groupId: null, |
| | | }, |
| | | // getDetail(e) { |
| | | // console.log(e) |
| | |
| | | // url: '../cause/detail/index?id=' + e.currentTarget.id, |
| | | // }) |
| | | // }, |
| | | |
| | | onClickHide(e){ |
| | | onCloseSheet() { |
| | | this.setData({ sheetShow: false }); |
| | | }, |
| | | onSelectSheet(event) { |
| | | console.log(this.data.messageId,event); |
| | | if (event.detail.name) { |
| | | wx.request({ |
| | | url: message.globalData.url +'/message/deleteById', |
| | | method: "GET", |
| | | header: { 'token': wx.getStorageSync('token') }, |
| | | data: {id:this.data.messageId}, |
| | | success: (res) => { |
| | | console.log(res); |
| | | this.getmessage() |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onSheetText(e) { |
| | | console.log(e); |
| | | this.setData({ sheetShow: true, |
| | | messageId:e.target.dataset.id |
| | | }) |
| | | this.data.messageId = e.target.dataset.id |
| | | this.onSelectSheet(e.target.dataset.id) |
| | | }, |
| | | onClickHide(e) { |
| | | console.log(e) |
| | | this.setData({ |
| | | showOverlay:false |
| | | showOverlay: false |
| | | }) |
| | | }, |
| | | onClickShow(e){ |
| | | onClickShow(e) { |
| | | console.log(e); |
| | | this.setData({ |
| | | overLayList:e |
| | | overLayList: e |
| | | }) |
| | | this.setData({ |
| | | showOverlay:true |
| | | showOverlay: true |
| | | }) |
| | | }, |
| | | groupMenber(){ |
| | | wx.navigateTo({ |
| | | url:'../message/member/index?id='+this.data.groupId |
| | | }) |
| | | }, |
| | | publicty(){ |
| | | wx.navigateTo({ |
| | | url:'../message/publicty/index?id='+this.data.groupId |
| | | }) |
| | | }, |
| | | banSpeech(){ |
| | | wx.navigateTo({ |
| | | url:'../message/Speech/index?id='+this.data.groupId |
| | | }) |
| | | }, |
| | | cause(){ |
| | | wx.navigateTo({ |
| | | url:'../message/cause/index?id='+this.data.groupId |
| | | }) |
| | | }, |
| | | chatRecords(){ |
| | | wx.navigateTo({ |
| | | url:'../message/records/index?id='+this.data.groupId |
| | | }) |
| | | }, |
| | | more() { |
| | | groupMenber() { |
| | | wx.navigateTo({ |
| | | url: '../message/member/index?id=' + this.data.groupId |
| | | }) |
| | | }, |
| | | publicty() { |
| | | wx.navigateTo({ |
| | | url: '../message/publicty/index?id=' + this.data.groupId |
| | | }) |
| | | }, |
| | | banSpeech() { |
| | | wx.navigateTo({ |
| | | url: '../message/Speech/index?id=' + this.data.groupId |
| | | }) |
| | | }, |
| | | cause() { |
| | | wx.navigateTo({ |
| | | url: '../message/cause/index?id=' + this.data.groupId |
| | | }) |
| | | }, |
| | | chatRecords() { |
| | | wx.navigateTo({ |
| | | url: '../message/records/index?id=' + this.data.groupId |
| | | }) |
| | | }, |
| | | more() { |
| | | console.log("进来了", this.data.scrollTop) |
| | | if (this.data.isShow == false) { |
| | | this.setData({ |
| | | isShow: true, |
| | | height: 110 |
| | | }) |
| | | |
| | | |
| | | } else { |
| | | this.setData({ |
| | | isShow: false, |
| | |
| | | } |
| | | |
| | | }, |
| | | sendMsg(){ |
| | | |
| | | sendMsg() { |
| | | |
| | | wx.request( |
| | | { |
| | | url: message.globalData.url + "/wx/group/manager/sendMsg", |
| | |
| | | header: { 'token': wx.getStorageSync('token') }, |
| | | data: { |
| | | groupId: this.data.groupId, |
| | | id:wx.getStorageSync("id"), |
| | | msg:this.data.value |
| | | id: wx.getStorageSync("id"), |
| | | msg: this.data.value |
| | | }, |
| | | success: (res) => { |
| | | wx.request( |
| | |
| | | } |
| | | this.setData({ |
| | | messageList: res.data.data, |
| | | value:"" |
| | | value: "" |
| | | }) |
| | | console.log(this.data.messageList) |
| | | try { |
| | | wx.setStorageSync('time', 'time') |
| | | } catch (e) { } |
| | | } catch (e) { } |
| | | // wx.setStorageSync('time','time') |
| | | this.setData({ |
| | | isInput : 1 |
| | | isInput: 1 |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | wx.createSelectorQuery().select('#chat') |
| | | |
| | | .boundingClientRect(function(rect){ |
| | | console.log('rectheight',rect); |
| | | |
| | | /* 将页面移动到最底部(用xxx的height定位) */ |
| | | wx.pageScrollTo({ |
| | | scrollTop: rect.height |
| | | }) |
| | | }).exec() |
| | | |
| | | .boundingClientRect(function (rect) { |
| | | console.log('rectheight', rect); |
| | | |
| | | /* 将页面移动到最底部(用xxx的height定位) */ |
| | | wx.pageScrollTo({ |
| | | scrollTop: rect.height |
| | | }) |
| | | }).exec() |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | inputWenzi: function (e) { |
| | | this.setData({ |
| | |
| | | }) |
| | | } |
| | | }, |
| | | getmessage(){ |
| | | getmessageList(){ |
| | | |
| | | }, |
| | | getmessage() { |
| | | wx.request( |
| | | { |
| | | url: message.globalData.url + "/wx/message", |
| | |
| | | } |
| | | this.setData({ |
| | | messageList: res.data.data, |
| | | |
| | | |
| | | }) |
| | | console.log(this.data.messageList) |
| | | try { |
| | | wx.setStorageSync('time', 'time') |
| | | } catch (e) { } |
| | | } catch (e) { } |
| | | // wx.setStorageSync('time','time') |
| | | this.setData({ |
| | | isInput : 2 |
| | | isInput: 2 |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | wx.createSelectorQuery().select('#chat') |
| | | |
| | | .boundingClientRect(function(rect){ |
| | | console.log('rectheight',rect); |
| | | |
| | | /* 将页面移动到最底部(用xxx的height定位) */ |
| | | wx.pageScrollTo({ |
| | | scrollTop: rect.height |
| | | }) |
| | | }).exec() |
| | | |
| | | .boundingClientRect(function (rect) { |
| | | console.log('rectheight', rect); |
| | | |
| | | /* 将页面移动到最底部(用xxx的height定位) */ |
| | | wx.pageScrollTo({ |
| | | scrollTop: rect.height |
| | | }) |
| | | }).exec() |
| | | } |
| | | }) |
| | | }, |
| | | endInter(){ |
| | | endInter() { |
| | | let thit = this |
| | | clearInterval(thit.data.inter) |
| | | }, |
| | | onUnload () { |
| | | }, |
| | | onUnload() { |
| | | console.log('清除定时器'); |
| | | |
| | | this.endInter() |
| | | }, |
| | | onHide(){ |
| | | }, |
| | | onHide() { |
| | | console.log('清除定时器'); |
| | | this.endInter() |
| | | }, |
| | | }, |
| | | onLoad(e) { |
| | | this.setData({ |
| | | uid:wx.getStorageSync('id') |
| | | uid: wx.getStorageSync('id') |
| | | }) |
| | | |
| | | |
| | | var date = new Date() |
| | | var month = date.getMonth() + 1 |
| | | var day = date.getDate() |
| | | var hours=date.getHours() |
| | | var minutes=date.getMinutes() |
| | | var secends=date.getSeconds() |
| | | var hours = date.getHours() |
| | | var minutes = date.getMinutes() |
| | | var secends = date.getSeconds() |
| | | var time |
| | | if (month < 10) { |
| | | month = "0" + month |
| | |
| | | if (secends < 10) { |
| | | secends = "0" + secends |
| | | } |
| | | time = date.getFullYear() + "-" + month + "-" + day + " " + hours+":"+minutes+":"+secends |
| | | wx.setStorageSync('time',time) |
| | | this.data.groupId=e.id |
| | | time = date.getFullYear() + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + secends |
| | | wx.setStorageSync('time', time) |
| | | this.data.groupId = e.id |
| | | wx.request( |
| | | { |
| | | url: message.globalData.url + "/wx/message", |
| | |
| | | }) |
| | | console.log(this.data.messageList) |
| | | wx.createSelectorQuery().select('#chat') |
| | | .boundingClientRect(function(rect){ |
| | | console.log('rectheight',rect); |
| | | /* 将页面移动到最底部(用xxx的height定位) */ |
| | | wx.pageScrollTo({ |
| | | scrollTop: rect.height |
| | | }) |
| | | }).exec() |
| | | .boundingClientRect(function (rect) { |
| | | console.log('rectheight', rect); |
| | | /* 将页面移动到最底部(用xxx的height定位) */ |
| | | wx.pageScrollTo({ |
| | | scrollTop: rect.height |
| | | }) |
| | | }).exec() |
| | | } |
| | | }) |
| | | let that = this |
| | | that.data.inter = setInterval(function(){ |
| | | that.getmessage() |
| | | },10000) |
| | | let that = this |
| | | that.data.inter = setInterval(function () { |
| | | that.getmessage() |
| | | }, 10000) |
| | | } |
| | | }) |
| | |
| | | </view> |
| | | </view> |
| | | </van-overlay> |
| | | <van-action-sheet |
| | | show="{{ sheetShow }}" |
| | | actions="{{ actions }}" |
| | | bind:close="onCloseSheet" |
| | | bind:select="onSelectSheet" |
| | | cancel-text="取消" |
| | | bind:cancel="onCloseSheet" |
| | | /> |
| | | <view class="chat-item" id="chat"> |
| | | <view wx:for="{{messageList}}" wx:key="index"> |
| | | |
| | |
| | | <image wx:if="{{item.pic&&item.sex=='女'}}" class="face" bindtap="onClickShow" data-smile='{{item}}' src="../../../../image/userlady.jpg"></image> |
| | | <image wx:if="{{item.pic==undefined}}" class="face" bindtap="onClickShow" data-smile='{{item}}' src="../../../../image/userman.jpg"></image> |
| | | <view class="chat-message-left">{{item.name}}-{{item.mobile}}</view> |
| | | <view class="chat-context-left">{{item.text}}</view> |
| | | <view class="chat-context-left" bindtap="onSheetText" data-id="{{item.messageId}}">{{item.text}}</view> |
| | | <view class="chat-site-left"></view> |
| | | </view> |
| | | <!--a - 自己的信息--> |
| | |
| | | // index.ts |
| | | // 获取应用实例 |
| | | const groupMember = getApp() |
| | | |
| | | import Dialog from '@vant/weapp/dialog/dialog'; |
| | | Page({ |
| | | data: { |
| | | managerCount: null, |
| | |
| | | url:'../member/detail/index?id='+e.currentTarget.id |
| | | }) |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e.id) |
| | | this.data.groupId=e.id |
| | | onClose(event) { |
| | | let that=this |
| | | const { position, instance } = event.detail; |
| | | switch (position) { |
| | | case 'left': |
| | | case 'cell': |
| | | instance.close(); |
| | | break; |
| | | case 'right': |
| | | Dialog.confirm({ |
| | | message: '确定删除吗?', |
| | | }).then(() => { |
| | | that.delMember(event) |
| | | instance.close(); |
| | | }).catch(() => { |
| | | instance.close(); |
| | | }); |
| | | break; |
| | | } |
| | | }, |
| | | delMember(event){ |
| | | console.log(event); |
| | | let id = event.target.dataset.id |
| | | wx.request({ |
| | | url: groupMember.globalData.url + "/report/deleteReporter?id="+id, |
| | | method:"DELETE", |
| | | data: { |
| | | id: id |
| | | }, |
| | | header: { 'token': wx.getStorageSync('token') }, |
| | | success:(res)=>{ |
| | | console.log(res); |
| | | this.getList() |
| | | } |
| | | }) |
| | | |
| | | |
| | | }, |
| | | getList(){ |
| | | wx.request( |
| | | { |
| | | url: groupMember.globalData.url + "/wx/group/member", |
| | | method: "GET", |
| | | data: { |
| | | id: e.id |
| | | id: this.data.groupId |
| | | }, |
| | | header: { 'token': wx.getStorageSync('token') }, |
| | | success: (res) => { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e.id) |
| | | this.data.groupId=e.id |
| | | this.getList(e) |
| | | |
| | | } |
| | | |
| | |
| | | <view> |
| | | <van-dialog id="van-dialog" /> |
| | | <view class="input-view"> |
| | | <input class="input" bindinput="seach" placeholder="🔍搜索" placeholder-class="center" /> |
| | | </view> |
| | |
| | | </view> |
| | | <view class="manager"> |
| | | <view class="wenzi">群成员 ({{memberConut}})人</view> |
| | | <view class="list" wx:for="{{memberList}}" wx:key="index" > |
| | | <view id="{{item.id}}" bindtap="memberDetail"> |
| | | <image class="managerIcon" src="../../../../../image/userman.jpg"></image> |
| | | <view class="name">{{item.realName}}</view> |
| | | </view> |
| | | <view wx:for="{{memberList}}" wx:key="index"> |
| | | <van-swipe-cell class="list-swipe" id="swipe-cell" right-width="{{ 65 }}" async-close bind:close="onClose" data-id="{{item.id}}"> |
| | | <!-- <view slot="left">选择</view> --> |
| | | <view class="list" id="{{item.id}}" bindtap="memberDetail"> |
| | | <image class="managerIcon" src="../../../../../image/userman.jpg"></image> |
| | | <view class="name">{{item.realName}}</view> |
| | | </view> |
| | | <view slot="right">删除</view> |
| | | </van-swipe-cell> |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | margin-left: 2%; |
| | | background-color: #F5F5F9; |
| | | height: 30px; |
| | | line-height: 30px; |
| | | font-weight: 900; |
| | | } |
| | | .name{ |
| | | font-size: 14px; |
| | | margin-left: 13%; |
| | | margin-top: -6%; |
| | | margin-left: 0.5rem; |
| | | } |
| | | .center{ |
| | | text-align:center; |
| | |
| | | background-color: #F5F5F9; |
| | | } */ |
| | | .list{ |
| | | margin-top: 2%; |
| | | margin-bottom: 2%; |
| | | display: flex; |
| | | padding: 0.5rem 1rem; |
| | | width: 100%; |
| | | height: 30px; |
| | | align-items: center; |
| | | } |
| | | .van-swipe-cell__right{ |
| | | padding: 0.7rem; |
| | | width: 100%; |
| | | background-color: red; |
| | | color: #FFF; |
| | | } |
| | |
| | | causeList:[], |
| | | isShow:false |
| | | }, |
| | | causeListAdd(){ |
| | | |
| | | }, |
| | | // 事件处理函数 |
| | | onLoad(e) { |
| | | wx.request( |
| | |
| | | <view class="content"> |
| | | <van-empty class="empty" description="暂无数据" wx:if="{{causeList.length === 0}}"></van-empty> |
| | | <view class="lists" wx:for="{{causeList}}" wx:key="id"> |
| | | <view class="item2"> |
| | | <image class="icon" src="../../../../icon/notice.png"></image> |
| | |
| | | </view> |
| | | |
| | | <view class="item3">{{item.text}}</view> |
| | | |
| | | <!-- <van-button type="info" bind:click="causeListAdd">添加</van-button> --> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | Page({ |
| | | data: { |
| | | role:'', |
| | | reportList:{}, |
| | | isShow:false |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | onLoad() { |
| | | this.setData({ |
| | | role:wx.getStorageSync('role') |
| | | }) |
| | | wx.request( |
| | | { |
| | | url:myself.globalData.url+ "/wx/manager/myself", |
| | |
| | | <view class="bg"> |
| | | </view> |
| | | <view class="icon"> |
| | | <image class="icon1" src="../../../image/7bedbaa41b1744fbfe0c55b507fd9e28.png"></image> |
| | | <image class="icon1" wx:if="{{role==1}}" src="../../../image/7bedbaa41b1744fbfe0c55b507fd9e28.png"></image> |
| | | <image class="icon1" wx:else src="../../../image/userman.jpg"></image> |
| | | </view> |
| | | <view class="span">{{reportList.name}} <view class="pNum">{{reportList.phoneNum}}</view> |
| | | <view class="span">{{reportList.name||"您好"}} <view class="pNum">{{reportList.phoneNum}}</view> |
| | | </view> |
| | | <view class="wenzi">青羊区公安分局经侦大队</view> |
| | | <view class="span2"> |
| | | <view class="wenzi" wx:if="{{role==1}}">青羊区公安分局经侦大队</view> |
| | | <view class="span2" wx:if="{{role==1}}"> |
| | | <view class="cNum">{{reportList.causeNum}} |
| | | <view class="wenzi-low">案件数</view> |
| | | </view> |
| | |
| | | toHome() { |
| | | wx.navigateBack() |
| | | }, |
| | | onTabItemTap() { |
| | | |
| | | this.getmessList() |
| | | }, |
| | | openGroup(e) { |
| | | if (wx.getStorageSync('role')==1) { |
| | | wx.navigateTo({ |
| | |
| | | |
| | | |
| | | }, |
| | | onLoad() { |
| | | getmessList(){ |
| | | var date = new Date() |
| | | var month = date.getMonth() + 1 |
| | | var day = date.getDate() |
| | |
| | | time = date.getFullYear() + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + secends |
| | | var lastTime = wx.getStorageSync('time') |
| | | console.log(wx.getStorageSync('role')); |
| | | |
| | | if (wx.getStorageSync('role')==1) { |
| | | wx.request( |
| | | { |
| | |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onLoad() { |
| | | |
| | | this.getmessList() |
| | | |
| | | |
| | | } |
| | | }) |
| | |
| | | clearInterval(thit.data.inter) |
| | | }, |
| | | onUnload () { |
| | | console.log('清除定时器'); |
| | | |
| | | this.endInter() |
| | | }, |
| | | onHide(){ |
| | | console.log('清除定时器'); |
| | | this.endInter() |
| | | }, |
| | | onLoad(e) { |
| | |
| | | |
| | | Page({ |
| | | data: { |
| | | role:'', |
| | | swcurrent: 0, |
| | | isShow: false, |
| | | userInfo: {}, |
| | |
| | | |
| | | |
| | | onLoad() { |
| | | this.setData({ |
| | | role:wx.getStorageSync('role') |
| | | }) |
| | | |
| | | wx.request({ |
| | | url: user.globalData.url+"/wx/login", |
| | | data: { |
| | |
| | | <view class="box2" bindtap="getReport"> |
| | | <text class="font-wenzi">受损人员信息登记</text> |
| | | </view> |
| | | <view class="box2 box3" bindtap="toDetailedInformation"> |
| | | <view wx:if="{{role==1}}" class="box2 box3" bindtap="toDetailedInformation"> |
| | | <text class="font-wenzi">报案详情</text> |
| | | </view> |
| | | <view class="box2" bindtap="toManage"> |
| | | <view wx:if="{{role==1}}" class="box2" bindtap="toManage"> |
| | | <text class="font-wenzi">案件管理</text> |
| | | </view> |
| | | </view> |
| | |
| | | } |
| | | |
| | | .list .font-wenzi1 { |
| | | font-size: 14px; |
| | | font-size: 17px; |
| | | margin-bottom: 4px; |
| | | margin-left: 0.5rem; |
| | | font-weight: 900; |
| | |
| | | .list .more { |
| | | margin-bottom: 4px; |
| | | float: right; |
| | | font-size: 14px; |
| | | font-size: 17px; |
| | | color: rgba(0, 0, 0, 0.7); |
| | | margin-right: 0.5rem; |
| | | font-weight: 900; |