|
@@ -2,7 +2,6 @@
|
|
|
import WxValidate from '../../utils/wxValidate'
|
|
|
const app = getApp()
|
|
|
Page({
|
|
|
-
|
|
|
/**
|
|
|
* 页面的初始数据
|
|
|
*/
|
|
@@ -16,10 +15,13 @@ Page({
|
|
|
infoHeight: '',
|
|
|
list: [],
|
|
|
lists: [],
|
|
|
+ from: [],
|
|
|
},
|
|
|
+ //验证用户是否登录
|
|
|
watchLogin: function () {
|
|
|
var that = this;
|
|
|
- let id = that.ids
|
|
|
+ let id = that.ids;
|
|
|
+ let ids = that.idjie;
|
|
|
wx.getStorage({
|
|
|
key: 'token',
|
|
|
success: res => {
|
|
@@ -31,7 +33,7 @@ Page({
|
|
|
success(res) {
|
|
|
if (res.data.errcode == 0) {
|
|
|
let datas = res.data.data
|
|
|
- console.log('单', datas);
|
|
|
+ console.log('单解散', datas);
|
|
|
that.setData({
|
|
|
list: datas,
|
|
|
});
|
|
@@ -44,6 +46,27 @@ Page({
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+ //解散团队数据
|
|
|
+ wx.request({
|
|
|
+ url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply/` + ids, //接口地址
|
|
|
+ method: 'get',
|
|
|
+ data: {},
|
|
|
+ success(res) {
|
|
|
+ console.log('resdis', res.data);
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
+ let datas = res.data.data
|
|
|
+ that.setData({
|
|
|
+ from: datas,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ wx.showToast({
|
|
|
+ title: res.data.errmsg,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
fail: res => {
|
|
|
return wx.redirectTo({ url: '/pages/login/index', })
|
|
@@ -53,13 +76,55 @@ Page({
|
|
|
back: function () {
|
|
|
wx.navigateBack({ url: '/pages/home/index' })
|
|
|
},
|
|
|
+ //点击驳回
|
|
|
hui: function () {
|
|
|
- wx.navigateBack({ url: '/pages/manage/index' })
|
|
|
+ var that = this;
|
|
|
+ let id = that.idjie
|
|
|
+ var from = that.data.from;
|
|
|
+ var team_id =from.team_id;
|
|
|
+ var team_name =from.team_name;
|
|
|
+ var create_user =from.create_user;
|
|
|
+ var create_id =from.create_id;
|
|
|
+ var apply_time =from.apply_time;
|
|
|
+ var resaon =from.resaon;
|
|
|
+ wx.request({
|
|
|
+ url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply/` + id, //接口地址
|
|
|
+ method: 'post',
|
|
|
+ data: {
|
|
|
+ "id": id,
|
|
|
+ "team_id": team_id,
|
|
|
+ "team_name": team_name,
|
|
|
+ "create_user": create_user,
|
|
|
+ "create_id": create_id,
|
|
|
+ "apply_time": apply_time,
|
|
|
+ "resaon": resaon,
|
|
|
+ "status": "-1"
|
|
|
+ },
|
|
|
+ success(res) {
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
+ wx.showToast({ title: `修改团队状态拒绝成功`, icon: 'success', duration: 2000 }) //创建成功提示
|
|
|
+ // return wx.redirectTo({ url: '/pages/manage/index' })// 跳转页面
|
|
|
+ } else {
|
|
|
+ wx.showToast({
|
|
|
+ title: res.data.errmsg,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
+ //点击通过
|
|
|
out: function () {
|
|
|
var that = this;
|
|
|
let id = that.idjie
|
|
|
- debugger
|
|
|
+ var from = that.data.from;
|
|
|
+ var team_id =from.team_id;
|
|
|
+ var team_name =from.team_name;
|
|
|
+ var create_user =from.create_user;
|
|
|
+ var create_id =from.create_id;
|
|
|
+ var apply_time =from.apply_time;
|
|
|
+ var resaon =from.resaon;
|
|
|
wx.showModal({
|
|
|
title: '',
|
|
|
content: '是否确认解散团队',
|
|
@@ -67,12 +132,21 @@ Page({
|
|
|
if (res.confirm) {
|
|
|
wx.request({
|
|
|
url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply/` + id, //接口地址
|
|
|
- method: 'DELETE',
|
|
|
- data: '',
|
|
|
+ method: 'post',
|
|
|
+ data: {
|
|
|
+ "id": id,
|
|
|
+ "team_id": team_id,
|
|
|
+ "team_name": team_name,
|
|
|
+ "create_user": create_user,
|
|
|
+ "create_id": create_id,
|
|
|
+ "apply_time": apply_time,
|
|
|
+ "resaon": resaon,
|
|
|
+ "status": "1"
|
|
|
+ },
|
|
|
success(res) {
|
|
|
if (res.data.errcode == 0) {
|
|
|
- wx.showToast({ title: `解散团队成功`, icon: 'success', duration: 2000 }) //创建成功提示
|
|
|
- return wx.redirectTo({ url: '/pages/manage/index' })// 跳转页面
|
|
|
+ wx.showToast({ title: `修改团队状态通过成功`, icon: 'success', duration: 2000 }) //创建成功提示
|
|
|
+ // return wx.redirectTo({ url: '/pages/manage/index' })// 跳转页面
|
|
|
} else {
|
|
|
wx.showToast({
|
|
|
title: res.data.errmsg,
|