YY 3 лет назад
Родитель
Сommit
c18b33dc04
2 измененных файлов с 17 добавлено и 30 удалено
  1. 9 9
      pages/dissolution/detail.js
  2. 8 21
      pages/dissolution/index.js

+ 9 - 9
pages/dissolution/detail.js

@@ -10,13 +10,13 @@ Page({
     frameStyle: { useTop: true, name: '申请解散', leftArrow: true, useBar: false },
     frameStyle: { useTop: true, name: '申请解散', leftArrow: true, useBar: false },
     // 主体高度
     // 主体高度
     infoHeight: '',
     infoHeight: '',
-    ids:'',
+    ids: '',
     jslist: []
     jslist: []
   },
   },
   //解散申请
   //解散申请
   apply: function () {
   apply: function () {
     wx.navigateTo({
     wx.navigateTo({
-      url: `/pages/dissolution/index?id=` + this.ids,
+      url: `/pages/dissolution/index?id=` + this.data.ids,
     })
     })
   },
   },
 
 
@@ -28,7 +28,7 @@ Page({
 * 生命周期函数--监听页面加载
 * 生命周期函数--监听页面加载
 */
 */
   onLoad: function (options) {
   onLoad: function (options) {
-    this.ids =options.id;
+    this.setData({ ids: options.id })
     // 计算高度
     // 计算高度
     this.searchHeight();
     this.searchHeight();
     // 监听用户是否登录
     // 监听用户是否登录
@@ -37,16 +37,16 @@ Page({
   // 监听用户是否登录
   // 监听用户是否登录
   watchLogin: function () {
   watchLogin: function () {
     const that = this;
     const that = this;
-    var team_id = that.ids;
+    var team_id = that.data.ids;
     wx.getStorage({
     wx.getStorage({
       key: 'token',
       key: 'token',
       success: res => {
       success: res => {
         //解散团队数据
         //解散团队数据
         wx.request({
         wx.request({
-          url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply`, //接口地址
+          url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply`,
           method: 'get',
           method: 'get',
           data: {
           data: {
-            "team_id":team_id
+            "team_id": team_id
           },
           },
           success(res) {
           success(res) {
             if (res.data.errcode == 0) {
             if (res.data.errcode == 0) {
@@ -78,8 +78,8 @@ Page({
       }
       }
     })
     })
   },
   },
-   // 计算高度
-   searchHeight: function () {
+  // 计算高度
+  searchHeight: function () {
     let frameStyle = this.data.frameStyle;
     let frameStyle = this.data.frameStyle;
     let client = app.globalData.client;
     let client = app.globalData.client;
     let infoHeight = client.windowHeight;
     let infoHeight = client.windowHeight;
@@ -88,7 +88,7 @@ Page({
     // 是否减去底部菜单
     // 是否减去底部菜单
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
     if (infoHeight) this.setData({ infoHeight: infoHeight })
-},
+  },
   /**
   /**
    * 生命周期函数--监听页面初次渲染完成
    * 生命周期函数--监听页面初次渲染完成
    */
    */

+ 8 - 21
pages/dissolution/index.js

@@ -13,14 +13,7 @@ Page({
         apply_time: '',
         apply_time: '',
         // 主体高度
         // 主体高度
         infoHeight: '',
         infoHeight: '',
-        form: {
-            // team_id: '234', // 团队id
-            // team_name: '我是第一队', // 团队名称
-            // create_user: '李铁蛋', // 团队创建人
-            // create_id: '23455', // 团队创建人id
-            // apply_time: '', // 申请时间
-            // resaon: '', // 解散团队原因
-        },
+        form: {},
     },
     },
     back: function () {
     back: function () {
         wx.navigateBack({ url: '/pages/me/index' })
         wx.navigateBack({ url: '/pages/me/index' })
@@ -43,13 +36,13 @@ Page({
             return false
             return false
         } else {
         } else {
             wx.request({
             wx.request({
-                url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply`, //接口地址
+                url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply`, 
                 method: 'post',
                 method: 'post',
                 data: form,
                 data: form,
                 success(res) {
                 success(res) {
                     if (res.data.errcode == 0) {
                     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 {
                     } else {
                         wx.showToast({
                         wx.showToast({
                             title: res.data.errmsg,
                             title: res.data.errmsg,
@@ -65,14 +58,10 @@ Page({
      * 生命周期函数--监听页面加载
      * 生命周期函数--监听页面加载
      */
      */
     onLoad: function (options) {
     onLoad: function (options) {
-        this.setData({
-            ids: options.id,
-        });
+        this.setData({ids: options.id,});
         //获取当前时间
         //获取当前时间
         let apply_time = moment().format('YYYY-MM-DD HH:mm:ss');
         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();
         this.searchHeight();
         // 监听用户是否登录
         // 监听用户是否登录
@@ -93,15 +82,13 @@ Page({
             success: res => {
             success: res => {
                 var that = this;
                 var that = this;
                 wx.request({
                 wx.request({
-                    url: `${app.globalData.publicUrl}/courtAdmin/api/team/` + that.data.ids, //接口地址
+                    url: `${app.globalData.publicUrl}/courtAdmin/api/team/` + that.data.ids, 
                     method: 'get',
                     method: 'get',
                     data: '',
                     data: '',
                     success(res) {
                     success(res) {
                         if (res.data.errcode == 0) {
                         if (res.data.errcode == 0) {
                             let datas = res.data.data
                             let datas = res.data.data
-                            that.setData({
-                                form: datas,
-                            });
+                            that.setData({ form: datas,});
                         } else {
                         } else {
                             wx.showToast({
                             wx.showToast({
                                 title: res.data.errmsg,
                                 title: res.data.errmsg,