|
@@ -13,14 +13,13 @@ Page({
|
|
|
apply_time: '',
|
|
|
// 主体高度
|
|
|
infoHeight: '',
|
|
|
- form: {
|
|
|
- // team_id: '234', // 团队id
|
|
|
- // team_name: '我是第一队', // 团队名称
|
|
|
- // create_user: '李铁蛋', // 团队创建人
|
|
|
- // create_id: '23455', // 团队创建人id
|
|
|
- // apply_time: '', // 申请时间
|
|
|
- // resaon: '', // 解散团队原因
|
|
|
- },
|
|
|
+ form: {},
|
|
|
+ },
|
|
|
+ initValidate() {
|
|
|
+ const rules = { team_id: { required: true }, team_name: { required: true, }, create_user: { required: true }, create_id: { required: true, }, resaon: { required: true, } }
|
|
|
+ // 验证字段的提示信息,若不传则调用默认的信息
|
|
|
+ const messages = { team_id: { required: '请输入团队id', }, team_name: { required: '请输入团队名称', }, create_user: { required: '请输入团队创建人', }, create_id: { required: '请输入团队创建人id', }, resaon: { required: '请输入解散团队原因', } };
|
|
|
+ this.WxValidate = new WxValidate(rules, messages)
|
|
|
},
|
|
|
back: function () {
|
|
|
wx.navigateBack({ url: '/pages/me/index' })
|
|
@@ -43,13 +42,13 @@ Page({
|
|
|
return false
|
|
|
} else {
|
|
|
wx.request({
|
|
|
- url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply`, //接口地址
|
|
|
+ url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply`,
|
|
|
method: 'post',
|
|
|
data: form,
|
|
|
success(res) {
|
|
|
if (res.data.errcode == 0) {
|
|
|
- wx.showToast({ title: `解散审核提交成功`, icon: 'success', duration: 2000 }) //登录成功提示
|
|
|
- wx.navigateTo({ url: '/pages/me/index' })// 跳转页面
|
|
|
+ wx.showToast({ title: `解散审核提交成功`, icon: 'success', duration: 2000 })
|
|
|
+ wx.navigateTo({ url: '/pages/me/index' })
|
|
|
} else {
|
|
|
wx.showToast({
|
|
|
title: res.data.errmsg,
|
|
@@ -65,14 +64,10 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
- this.setData({
|
|
|
- ids: options.id,
|
|
|
- });
|
|
|
+ this.setData({ids: options.id,});
|
|
|
//获取当前时间
|
|
|
let apply_time = moment().format('YYYY-MM-DD HH:mm:ss');
|
|
|
- this.setData({
|
|
|
- apply_time: apply_time,
|
|
|
- });
|
|
|
+ this.setData({apply_time: apply_time,});
|
|
|
// 计算高度
|
|
|
this.searchHeight();
|
|
|
// 监听用户是否登录
|
|
@@ -80,12 +75,6 @@ Page({
|
|
|
//验证规则函数
|
|
|
this.initValidate()
|
|
|
},
|
|
|
- initValidate() {
|
|
|
- const rules = { team_id: { required: true }, team_name: { required: true, }, create_user: { required: true }, create_id: { required: true, }, resaon: { required: true, } }
|
|
|
- // 验证字段的提示信息,若不传则调用默认的信息
|
|
|
- const messages = { team_id: { required: '请输入团队id', }, team_name: { required: '请输入团队名称', }, create_user: { required: '请输入团队创建人', }, create_id: { required: '请输入团队创建人id', }, resaon: { required: '请输入解散团队原因', } };
|
|
|
- this.WxValidate = new WxValidate(rules, messages)
|
|
|
- },
|
|
|
// 监听用户是否登录
|
|
|
watchLogin: function () {
|
|
|
wx.getStorage({
|
|
@@ -93,15 +82,13 @@ Page({
|
|
|
success: res => {
|
|
|
var that = this;
|
|
|
wx.request({
|
|
|
- url: `${app.globalData.publicUrl}/courtAdmin/api/team/` + that.data.ids, //接口地址
|
|
|
+ url: `${app.globalData.publicUrl}/courtAdmin/api/team/` + that.data.ids,
|
|
|
method: 'get',
|
|
|
data: '',
|
|
|
success(res) {
|
|
|
if (res.data.errcode == 0) {
|
|
|
let datas = res.data.data
|
|
|
- that.setData({
|
|
|
- form: datas,
|
|
|
- });
|
|
|
+ that.setData({ form: datas,});
|
|
|
} else {
|
|
|
wx.showToast({
|
|
|
title: res.data.errmsg,
|