|
@@ -25,53 +25,53 @@ Page({
|
|
|
const that = this;
|
|
|
let { id, status } = e.currentTarget.dataset;
|
|
|
wx.showModal({
|
|
|
- content: `您确定提交${status == '1' ? '通过' : '驳回'}操作吗?`,
|
|
|
- title: '提示',
|
|
|
- success(result) {
|
|
|
- if (result.confirm) {
|
|
|
- if (status == '1') {
|
|
|
- wx.request({
|
|
|
- url: `${app.globalData.publicUrl}/courtAdmin/api/team/${id}`,
|
|
|
- method: "post",
|
|
|
- data: { status: status },
|
|
|
- header: {},
|
|
|
- success: res => {
|
|
|
- console.log(res.data.data);
|
|
|
+ content: `您确定提交${status == '1' ? '通过' : '驳回'}操作吗?`,
|
|
|
+ title: '提示',
|
|
|
+ success(result) {
|
|
|
+ if (result.confirm) {
|
|
|
+ if (status == '1') {
|
|
|
+ wx.request({
|
|
|
+ url: `${app.globalData.publicUrl}/courtAdmin/api/team/${id}`,
|
|
|
+ method: "post",
|
|
|
+ data: { status: status },
|
|
|
+ header: {},
|
|
|
+ success: res => {
|
|
|
+ console.log(res.data.data);
|
|
|
|
|
|
- if (res.data.errcode === 0) {
|
|
|
- wx.showToast({ title: '审核成功', icon: 'success', duration: 2000 });
|
|
|
- that.watchLogin();
|
|
|
- } else {
|
|
|
- wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
|
|
|
- }
|
|
|
- },
|
|
|
- error: err => {
|
|
|
- }
|
|
|
- })
|
|
|
+ if (res.data.errcode === 0) {
|
|
|
+ wx.showToast({ title: '审核成功', icon: 'success', duration: 2000 });
|
|
|
+ that.watchLogin();
|
|
|
} else {
|
|
|
- wx.request({
|
|
|
- url: `${app.globalData.publicUrl}/courtAdmin/api/team/${id}`,
|
|
|
- method: "post",
|
|
|
- data: { status: status },
|
|
|
- header: {},
|
|
|
- success: res => {
|
|
|
- console.log(res.data.data);
|
|
|
- if (res.data.errcode === 0) {
|
|
|
- wx.showToast({ title: '审核成功', icon: 'success', duration: 2000 });
|
|
|
- that.watchLogin();
|
|
|
- } else {
|
|
|
- wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
|
|
|
- }
|
|
|
- },
|
|
|
- error: err => {
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
+ wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
|
|
|
}
|
|
|
- } else if (result.cancel) { }
|
|
|
- }
|
|
|
+ },
|
|
|
+ error: err => {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ wx.request({
|
|
|
+ url: `${app.globalData.publicUrl}/courtAdmin/api/team/${id}`,
|
|
|
+ method: "post",
|
|
|
+ data: { status: status },
|
|
|
+ header: {},
|
|
|
+ success: res => {
|
|
|
+ console.log(res.data.data);
|
|
|
+ if (res.data.errcode === 0) {
|
|
|
+ wx.showToast({ title: '审核成功', icon: 'success', duration: 2000 });
|
|
|
+ that.watchLogin();
|
|
|
+ } else {
|
|
|
+ wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: err => {
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ } else if (result.cancel) { }
|
|
|
+ }
|
|
|
})
|
|
|
-},
|
|
|
+ },
|
|
|
//查询解散或参赛团队详情
|
|
|
shen: function (e) {
|
|
|
let obj = e.currentTarget.dataset;
|
|
@@ -266,7 +266,8 @@ Page({
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
onShow: function () {
|
|
|
-
|
|
|
+ // 监听用户是否登录
|
|
|
+ this.watchLogin();
|
|
|
},
|
|
|
|
|
|
/**
|