|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|