6 changed files with 177 additions and 3 deletions
@ -0,0 +1,106 @@ |
|||||
|
Component({ |
||||
|
data: { |
||||
|
}, |
||||
|
properties: { |
||||
|
currentUser: { |
||||
|
type: Object, |
||||
|
value: {} |
||||
|
}, |
||||
|
gMembersList: { |
||||
|
type: Array, |
||||
|
value: [], |
||||
|
observer: function (value) { |
||||
|
if (value.length > 0) { |
||||
|
console.log(value) |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
gOfficialsList: { |
||||
|
type: Array, |
||||
|
value: [], |
||||
|
observer: function (value) { |
||||
|
if (value.length > 0) { |
||||
|
console.log(value) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
onNoSpeak (e) { |
||||
|
var _this = this; |
||||
|
wx.showActionSheet({ |
||||
|
itemList: ['取消禁言','禁言1天', '禁言1周', '禁言1月', '永久禁言'], |
||||
|
success (res) { |
||||
|
// console.log(e.currentTarget.dataset.groupUserId,res.tapIndex)
|
||||
|
let data = { |
||||
|
groupUserId: e.currentTarget.dataset.groupUserId, |
||||
|
bannedFlag: res.tapIndex.toString() |
||||
|
} |
||||
|
_this.triggerEvent('bannedChange',data) |
||||
|
}, |
||||
|
fail (res) { |
||||
|
console.log(e.currentTarget.dataset.groupUserId,res.errMsg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
onPhone (e) { |
||||
|
if (this.getSysInfo()){ |
||||
|
wx.showModal({ |
||||
|
title: '拨打电话', |
||||
|
content: `您确定拨打${e.currentTarget.dataset.number}`, |
||||
|
cancelColor: '#29B9A5', |
||||
|
confirmColor: '#29B9A5', |
||||
|
success: (res) => { |
||||
|
if (res.confirm) { |
||||
|
console.log('用户点击确定') |
||||
|
wx.makePhoneCall({ |
||||
|
phoneNumber: e.currentTarget.dataset.number |
||||
|
}) |
||||
|
} else if (res.cancel) { |
||||
|
console.log('用户点击取消') |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} else { |
||||
|
wx.makePhoneCall({ |
||||
|
phoneNumber: e.currentTarget.dataset.number |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
getSysInfo () { |
||||
|
wx.getSystemInfo({ |
||||
|
success:function(res){ |
||||
|
if(res.platform == "devtools"){ |
||||
|
return false |
||||
|
}else if(res.platform == "ios"){ |
||||
|
return false |
||||
|
}else if(res.platform == "android"){ |
||||
|
return true |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
gLevelUp (e) { |
||||
|
console.log(e.currentTarget.dataset.groupUserId) |
||||
|
let parm = { |
||||
|
groupUserId: e.currentTarget.dataset.groupUserId, |
||||
|
identityFlag: '1' |
||||
|
} |
||||
|
this.triggerEvent('modifyIdentity',parm) |
||||
|
}, |
||||
|
gLevelDown (e) { |
||||
|
console.log(e.currentTarget.dataset.groupUserId) |
||||
|
let parm = { |
||||
|
groupUserId: e.currentTarget.dataset.groupUserId, |
||||
|
identityFlag: '2' |
||||
|
} |
||||
|
this.triggerEvent('modifyIdentity',parm) |
||||
|
}, |
||||
|
preViewImage(e) { |
||||
|
wx.previewImage({ |
||||
|
urls: [e.currentTarget.dataset.src], |
||||
|
current: e.currentTarget.dataset.src |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
@ -0,0 +1,4 @@ |
|||||
|
{ |
||||
|
"component": true, |
||||
|
"usingComponents": {} |
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
<view class="volunteer-box"> |
||||
|
<view class="item" |
||||
|
wx:for="{{gOfficialsList}}" |
||||
|
wx:for-index="index" |
||||
|
wx:for-item="item" |
||||
|
wx:key="index"> |
||||
|
<image data-src="{{item.faceImg}}" bindtap="preViewImage" src="{{item.faceImg}}" /> |
||||
|
<view class="name">{{item.name}}</view> |
||||
|
<view class="autograph">{{item.motto}}</view> |
||||
|
|
||||
|
<view bindtap="onPhone" data-number="{{item.mobile}}" class="autograph">{{item.mobile}}</view> |
||||
|
</view> |
||||
|
</view> |
@ -0,0 +1,49 @@ |
|||||
|
|
||||
|
.item { |
||||
|
width: 320rpx; |
||||
|
height: 318rpx; |
||||
|
margin-top: 20rpx; |
||||
|
background: #fff; |
||||
|
border-radius: 20rpx; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.item image { |
||||
|
width: 110rpx; |
||||
|
height: 110rpx; |
||||
|
border-radius: 50%; |
||||
|
margin-top: 40rpx; |
||||
|
} |
||||
|
|
||||
|
.item .name { |
||||
|
margin-top: 11rpx; |
||||
|
font-size: 30rpx; |
||||
|
font-weight: bold; |
||||
|
color: rgba(51, 51, 51, 1); |
||||
|
} |
||||
|
|
||||
|
.item .autograph { |
||||
|
margin-top: 10rpx; |
||||
|
font-size:26rpx; |
||||
|
font-weight:500; |
||||
|
color:rgba(193,193,193,1); |
||||
|
padding: 0 20rpx; |
||||
|
} |
||||
|
|
||||
|
.show { |
||||
|
padding: 0rpx 40rpx; |
||||
|
height: 24rpx; |
||||
|
font-size: 24rpx; |
||||
|
line-height: 24rpx; |
||||
|
font-weight: 500; |
||||
|
color: #C5C5C5; |
||||
|
} |
||||
|
.volunteer-box { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
flex-wrap: wrap; |
||||
|
padding: 0rpx 40rpx 19rpx 40rpx; |
||||
|
} |
Loading…
Reference in new issue