|
@@ -12,7 +12,7 @@ Page({
|
|
|
infoHeight: '',
|
|
|
// 选项卡
|
|
|
tabs: {
|
|
|
- active: 'a',
|
|
|
+ active: 'c',
|
|
|
list: [
|
|
|
{ title: '系统团队', name: 'a' },
|
|
|
{ title: '解散团队', name: 'b' },
|
|
@@ -23,6 +23,8 @@ Page({
|
|
|
aList: [],
|
|
|
// 解散团队
|
|
|
bList: [],
|
|
|
+ // 参赛团队
|
|
|
+ cList: [],
|
|
|
// 弹框
|
|
|
dialog: { title: '信息审核', show: false, type: '1' },
|
|
|
form: {},
|
|
@@ -43,9 +45,16 @@ Page({
|
|
|
that.setData({ 'tabs.active': e.detail.name })
|
|
|
},
|
|
|
// 系统团队查看详情
|
|
|
- toView: function (e) {
|
|
|
- let { id } = e.currentTarget.dataset;
|
|
|
- wx.navigateTo({ url: `/pages/teamInfo/info?id=${id}` })
|
|
|
+ toView: async function (e) {
|
|
|
+ const that = this;
|
|
|
+ let { id, type } = e.currentTarget.dataset;
|
|
|
+ if (type == 'a') {
|
|
|
+ wx.navigateTo({ url: `/pages/teamInfo/info?id=${id}` })
|
|
|
+ } else if (type == 'c') {
|
|
|
+ const arr = await app.$get(`/courtAdmin/api/matchteam/${id}`);
|
|
|
+ if (arr.errcode == '0') that.setData({ form: arr.data });
|
|
|
+ that.setData({ dialog: { title: '团队信息', show: true, type: '2' } })
|
|
|
+ }
|
|
|
},
|
|
|
// 系统团队信息审核
|
|
|
toCheck: async function (e) {
|
|
@@ -54,6 +63,7 @@ Page({
|
|
|
let arr;
|
|
|
if (type == 'a') arr = await app.$get(`/courtAdmin/api/team/${id}`);
|
|
|
else if (type == 'b') arr = await app.$get(`/courtAdmin/api/dismissapply/${id}`);
|
|
|
+ else if (type == 'c') arr = await app.$get(`/courtAdmin/api/matchteam/${id}`);
|
|
|
if (arr.errcode == '0') {
|
|
|
let data = { tabs_type: type, ...arr.data };
|
|
|
that.setData({ form: data })
|
|
@@ -82,7 +92,7 @@ Page({
|
|
|
else if (data.tabs_type == 'b') {
|
|
|
arr = await app.$post(`/courtAdmin/api/dismissapply/${data.id}`, params);
|
|
|
if (arr.errcode == '0' && data.status == '1') arr = await app.$delete(`/courtAdmin/api/team/${data.team_id}`);
|
|
|
- }
|
|
|
+ } else if (data.tabs_type == 'c') arr = await app.$post(`/courtAdmin/api/matchteam/${data.id}`, params);
|
|
|
if (arr.errcode == '0') { wx.showToast({ title: `审核信息成功`, icon: 'error', duration: 2000 }); that.toClose(); }
|
|
|
else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
|
|
|
}
|
|
@@ -90,7 +100,7 @@ Page({
|
|
|
// 关闭弹框
|
|
|
toClose: function () {
|
|
|
const that = this;
|
|
|
- that.setData({ dialog: { title: '信息审核', show: false, type: '1' } })
|
|
|
+ that.setData({ dialog: { title: '信息审核', show: false, } })
|
|
|
that.watchLogin();
|
|
|
},
|
|
|
/**
|
|
@@ -117,7 +127,9 @@ Page({
|
|
|
// 解散团队
|
|
|
arr = await app.$get(`/courtAdmin/api/dismissapply`);
|
|
|
if (arr.errcode == '0') that.setData({ bList: arr.data });
|
|
|
-
|
|
|
+ // 参赛团队
|
|
|
+ arr = await app.$get(`/courtAdmin/api/matchteam`);
|
|
|
+ if (arr.errcode == '0') that.setData({ cList: arr.data });
|
|
|
},
|
|
|
fail: res => {
|
|
|
wx.redirectTo({ url: '/pages/index/index', })
|