Browse Source

首页图标替换,警民群加群逻辑修改

feature/style
liushaowen 5 years ago
parent
commit
7b6b8dd5cc
  1. BIN
      epdc-resident-mp-yushan/images/home/association.png
  2. BIN
      epdc-resident-mp-yushan/images/home/discussion.png
  3. BIN
      epdc-resident-mp-yushan/images/home/edu.png
  4. BIN
      epdc-resident-mp-yushan/images/home/heart.png
  5. BIN
      epdc-resident-mp-yushan/images/home/policy.png
  6. BIN
      epdc-resident-mp-yushan/images/home/property.png
  7. BIN
      epdc-resident-mp-yushan/images/home/safe.png
  8. BIN
      epdc-resident-mp-yushan/images/home/synthetical-service.png
  9. 1
      epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.wxss
  10. 12
      epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.js
  11. 4
      epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.wxml
  12. 7
      epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.wxss
  13. 45
      epdc-resident-mp-yushan/subpages/safety/pages/index/index.js

BIN
epdc-resident-mp-yushan/images/home/association.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 15 KiB

BIN
epdc-resident-mp-yushan/images/home/discussion.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
epdc-resident-mp-yushan/images/home/edu.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
epdc-resident-mp-yushan/images/home/heart.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 15 KiB

BIN
epdc-resident-mp-yushan/images/home/policy.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
epdc-resident-mp-yushan/images/home/property.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 15 KiB

BIN
epdc-resident-mp-yushan/images/home/safe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 14 KiB

BIN
epdc-resident-mp-yushan/images/home/synthetical-service.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 10 KiB

1
epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.wxss

@ -24,6 +24,7 @@
.item .name {
font-size: 28rpx;
color: #3f3f3f;
margin-top: 10rpx;
}
.sudoku .hover-sudoku {
background: rgba(0,0,0,0.1);

12
epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.js

@ -85,12 +85,12 @@ Page({
})
},
joinGroup(e){
// if (app.globalData.infoCompleted == 0) {
// this.setData({
// completeInfoDialogVisible: !this.data.completeInfoDialogVisible
// })
// return false
// }
if (app.globalData.infoCompleted == 0) {
this.setData({
completeInfoDialogVisible: !this.data.completeInfoDialogVisible
})
return false
}
const { joinstatus, groupid, groupname,state,index } = e.currentTarget.dataset
console.log( e.currentTarget.dataset)
if(joinstatus == '0'){

4
epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.wxml

@ -2,7 +2,7 @@
<view class="sudoku">
<view class="myPolice">
<view class="info-police" wx:for='{{policeInfo.policeList}}' wx:for-item="item" wx:for-index="index" wx:key="index">
<image src="{{item.policeAvatar}}" class="group-pic"></image>
<image src="{{item.policeAvatar}}" class="police-pic"></image>
<view class="police-detail">
<view class="police-name" style="border-bottom:0.5px solid #E7EEEE;">
<image src="../../images/name.png" class="info-img"></image>
@ -23,7 +23,7 @@
<view class="group-join">
<!-- <image src="../../images/property/red-join.png" class="join-button"></image> -->
<!-- <view class="join-text">加入</view> -->
<view class="join-button" data-joinStatus="{{policeInfo.groupMemberFlag}}" data-groupName="{{policeInfo.groupName}}" data-state="{{policeInfo.groupState}}" data-groupId="{{policeInfo.groupId}}" bindtap="joinGroup">{{policeInfo.groupMemberFlag=='0'?'加入':policeInfo.groupMemberFlag=='1'?'待审核':'进入'}}</view>
<view class="join-button" data-joinStatus="{{policeInfo.groupMemberFlag}}" data-groupName="{{policeInfo.groupName}}" data-state="{{policeInfo.groupState}}" data-groupId="{{policeInfo.groupId}}" bindtap="joinGroup">进入</view>
</view>
</view>
</view>

7
epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.wxss

@ -33,9 +33,9 @@
line-height: 100rpx;
padding-top: 20rpx;
}
.group-pic{
width: 120rpx;
height: 120rpx;
.police-pic{
width: 100rpx;
height: 140rpx;
border-radius: 60px;
padding: 20rpx;
}
@ -97,6 +97,7 @@
padding-left: 40rpx;
height: 120rpx;
width: 70%;
margin-top: 20rpx;
}
.police-name{
font-size: 30rpx;

45
epdc-resident-mp-yushan/subpages/safety/pages/index/index.js

@ -79,45 +79,16 @@ Page({
}
const { groupMemberFlag, groupId, groupName,groupState } = this.data.policeInfo
if(groupMemberFlag == '0'){
wx.showModal({
title:'提示',
content:'尚未加入群组,是否申请加入?',
confirmText:'申请',
cancelColor: 'cancelColor',
success:(res)=>{
if(res.cancel){
}else{
api.applyForGroup(groupId).then(res=>{
if(res.code == '0'){
wx.showToast({
title: '申请成功'
})
let info = this.data.policeInfo;
info.groupMemberFlag = '1';
this.setData({
policeInfo:info
})
}else{
wx.showToast({
title: '申请失败',
icon:"none"
})
}
}).catch(err=>{
})
}
}
})
}else if(groupMemberFlag == '1'){
wx.showToast({
title: '您已申请过加入该社群,请等待群主审核',
icon:"none"
api.joinGroup({groupId:groupId}).then(res=>{
wx.navigateTo({
url: `/subpages/property/pages/topicList/topicList?groupId=${groupId}&groupName=${groupName}&state=${groupState}&from=hobby`
})
}).catch(err=>{
})
}else if(groupMemberFlag == '2'){
}else{
wx.navigateTo({
url: `/subpages/property/pages/topicList/topicList?groupId=${groupId}&groupName=${groupName}&state=${groupState}`
url: `/subpages/property/pages/topicList/topicList?groupId=${groupId}&groupName=${groupName}&state=${groupState}&from=hobby`
})
}
},

Loading…
Cancel
Save