|
@@ -163,6 +163,7 @@
|
|
|
@tap.stop="toShare(item)">分享</button>
|
|
|
<button type="default" v-if="item.status=='0'||item.status=='1'"
|
|
|
size="mini" @tap.stop="toHandle(item)">团处理</button>
|
|
|
+ <button type="default" size="mini" @tap.stop="toSet(item)">设置状态</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -661,6 +662,37 @@
|
|
|
url: `/pagesMy/dough/handle?id=${e._id}`
|
|
|
})
|
|
|
},
|
|
|
+ // 设置状态
|
|
|
+ toSet(e){
|
|
|
+ const that = this;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: e.status != '2'?'确定将该团改为准备中吗?':'确定解散该团吗?',
|
|
|
+ success: async function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ let status='';
|
|
|
+ if(e.status=='2')status='-1'
|
|
|
+ else status='2'
|
|
|
+ let arr = await that.$api(`/group/${e._id}`, 'POST', {
|
|
|
+ status: status
|
|
|
+ }, 'group')
|
|
|
+ if (arr.errcode == '0') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '修改状态成功',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ that.clearPage();
|
|
|
+ that.search();
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: arr.errmsg,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// 分页
|
|
|
toPage(e) {
|
|
|
const that = this;
|