新增邀请功能
parent
7cf8871cef
commit
6d26d1f3d7
|
|
@ -147,13 +147,22 @@ export default {
|
||||||
{
|
{
|
||||||
text: '重命名',
|
text: '重命名',
|
||||||
style: {
|
style: {
|
||||||
backgroundColor: '#2d56d8'
|
backgroundColor: 'rgba(45,86,216,0.12)',
|
||||||
|
color: '#2d56d8'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '邀请用户',
|
||||||
|
style: {
|
||||||
|
backgroundColor: 'rgba(27,209,167,0.12)',
|
||||||
|
color: '#1bd1a7'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '删除',
|
text: '删除',
|
||||||
style: {
|
style: {
|
||||||
backgroundColor: '#E83A30'
|
backgroundColor: 'rgba(232,58,48,0.12)',
|
||||||
|
color: "#E83A30"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -341,12 +350,10 @@ export default {
|
||||||
},
|
},
|
||||||
onDeleteItem(e, item) {
|
onDeleteItem(e, item) {
|
||||||
if (e.content.text === '重命名') { // 通过事件对象的 content.text 判断
|
if (e.content.text === '重命名') { // 通过事件对象的 content.text 判断
|
||||||
setTimeout(() => {
|
this.agriId = item.id;
|
||||||
this.agriId = item.id;
|
this.agriName = item.agriName;
|
||||||
this.agriName = item.agriName;
|
this.imei = item.imei;
|
||||||
this.imei = item.imei;
|
this.$refs.renameAgri.open();
|
||||||
this.$refs.renameAgri.open();
|
|
||||||
}, 300)
|
|
||||||
} else if (e.content.text === '删除') { // 删除操作
|
} else if (e.content.text === '删除') { // 删除操作
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '操作提示:',
|
title: '操作提示:',
|
||||||
|
|
@ -370,6 +377,8 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else if (e.content.text === '邀请用户') {
|
||||||
|
this.$refs.fab.close()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 点击列表项
|
// 点击列表项
|
||||||
|
|
@ -519,6 +528,10 @@ export default {
|
||||||
this.$modal.msgError("请输入新名称!");
|
this.$modal.msgError("请输入新名称!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (this.newAgriName.length > 10) {
|
||||||
|
this.$modal.msgError("新名称长度不能超过10个字符!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '操作提示:',
|
title: '操作提示:',
|
||||||
content: `确定将大棚【${this.agriName}】重命名为【${this.newAgriName}】?`,
|
content: `确定将大棚【${this.agriName}】重命名为【${this.newAgriName}】?`,
|
||||||
|
|
@ -605,9 +618,6 @@ page {
|
||||||
box-shadow: 8rpx 5rpx 10rpx #999;
|
box-shadow: 8rpx 5rpx 10rpx #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .uni-swipe_button:nth-child(even) {
|
|
||||||
margin-right: 10rpx
|
|
||||||
}
|
|
||||||
.list-item,/deep/.tn-swipe-action-item {
|
.list-item,/deep/.tn-swipe-action-item {
|
||||||
height: 190rpx !important;
|
height: 190rpx !important;
|
||||||
/* 移除border-bottom,改为margin-top,并且把列表项背景设为半透明白色 */
|
/* 移除border-bottom,改为margin-top,并且把列表项背景设为半透明白色 */
|
||||||
|
|
@ -622,15 +632,6 @@ page {
|
||||||
pointer-events: auto !important;
|
pointer-events: auto !important;
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
.list-item:active {
|
|
||||||
transform: scale(0.98);
|
|
||||||
}
|
|
||||||
.item-card:active {
|
|
||||||
background-color: #F5F5F5;
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
transform: scale(0.98);
|
|
||||||
// #endif
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-title {
|
.item-title {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue