Commit 73566559 authored by lvtz's avatar lvtz

fix

parent 91c80846
......@@ -267,7 +267,6 @@ Page({
'Authorization': `bearer ${res2.data.token}`,
},
success(res4) {
console.log('list',res4.data.data)
if (res4.data.code != 200) { // 失败的处理
} else {
......@@ -276,15 +275,16 @@ Page({
invitationList: res4.data.data.inviate_teacher
},()=>{
if(that.data.invitationList.length==0){
wx.showModal({
title: '提示',
content: '加入成功,请重新登录',
showCancel: false,
confirmColor: '#65B8F4',
})
// wx.showModal({
// title: '提示',
// content: '加入成功,请重新登录',
// showCancel: false,
// confirmColor: '#65B8F4',
// })
}
})
// 弹框去加入
}else{
// 没有未处理的邀请
if (res3.data.data.total > 0 ){
......@@ -442,7 +442,7 @@ Page({
})
},
toJoin(e){
const {status,id,index} = e.currentTarget.dataset;
const {status,id,index,sid} = e.currentTarget.dataset;
let that = this;
let invitationList = that.data.invitationList
......@@ -464,6 +464,11 @@ Page({
that.setData({
invitationList: invitationList.filter(ele => ele.id != id)
})
if(that.data.invitationList.length==0){
wx.redirectTo({
url: `/business/pages/classservice/tindex?sid=${sid}`
})
}
}
})
}else{
......
......@@ -37,7 +37,7 @@
<view class="content">{{item.school.title}}</view>
<view class="button-box">
<view class="btn" bindtap="toJoin" data-status="3" data-id="{{item.id}}" data-index='{{index}}'>拒绝</view>
<view class="btn btn-primary" bindtap="toJoin" data-status="2" data-id="{{item.id}}" data-index='{{index}}'>加入</view>
<view class="btn btn-primary" bindtap="toJoin" data-status="2" data-id="{{item.id}}" data-index='{{index}}' data-sid="{{item.school_id}}">加入</view>
</view>
</view>
</view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment