Преглед изворни кода

Merge branch 'master' of http://git.cc-lotus.info/ball-court/court-mobile

YY пре 3 година
родитељ
комит
269c133c24

+ 1 - 0
app.json

@@ -23,6 +23,7 @@
     "pages/password/index",
     "pages/password/index",
     "pages/auditTeam/index",
     "pages/auditTeam/index",
     "pages/match/index",
     "pages/match/index",
+    "pages/dissolution/index",
     "pages/match/detail",
     "pages/match/detail",
     "pages/register/index",
     "pages/register/index",
     "pages/logs/logs"
     "pages/logs/logs"

+ 39 - 1
pages/administration/detail.js

@@ -7,6 +7,7 @@ Page({
    * 页面的初始数据
    * 页面的初始数据
    */
    */
   data: {
   data: {
+    idjie: '',
     ids: '',
     ids: '',
     src: '/image/adimges.jpg',
     src: '/image/adimges.jpg',
     src1: '/image/head1.png',
     src1: '/image/head1.png',
@@ -52,11 +53,48 @@ Page({
   back: function () {
   back: function () {
     wx.navigateBack({ url: '/pages/home/index' })
     wx.navigateBack({ url: '/pages/home/index' })
   },
   },
+  hui: function () {
+    wx.navigateBack({ url: '/pages/manage/index' })
+  },
+  out: function () {
+    var that = this;
+    let id = that.idjie
+    debugger
+    wx.showModal({
+      title: '',
+      content: '是否确认解散团队',
+      success(res) {
+        if (res.confirm) {
+          wx.request({
+            url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply/` + id, //接口地址
+            method: 'DELETE',
+            data: '',
+            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
+                })
+              }
+            }
+          })
+        } else if (res.cancel) {
+          console.log('用户点击取消')
+        }
+      }
+    })
+  },
   /**
   /**
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
-    this.ids = options.id;
+    var myObject = JSON.parse(decodeURIComponent(options.obj));
+    this.ids = myObject.name;
+    this.idjie = myObject.id;
     // 计算高度
     // 计算高度
     this.searchHeight()
     this.searchHeight()
     // 监听用户是否登录
     // 监听用户是否登录

+ 4 - 4
pages/administration/detail.wxml

@@ -48,21 +48,21 @@
           <view class="thr-right"><text class="name">{{item.nickname}}</text> </view>
           <view class="thr-right"><text class="name">{{item.nickname}}</text> </view>
         </view>
         </view>
       </view>
       </view>
-      <view class="thr-2">
+      <!-- <view class="thr-2">
         <view class="thr2">
         <view class="thr2">
           <view class="thr3">
           <view class="thr3">
             <text class=" icon iconfont icon-jia"></text>
             <text class=" icon iconfont icon-jia"></text>
           </view>
           </view>
         </view>
         </view>
-      </view>
+      </view> -->
     </view>
     </view>
     <view class="four">
     <view class="four">
       <view class="four-1">
       <view class="four-1">
         <view class="four1">
         <view class="four1">
-          <button class="button" form-type="submit">驳回</button>
+          <button class="button" bindtap="hui">驳回</button>
         </view>
         </view>
         <view class="four2">
         <view class="four2">
-          <button class="buttons" form-type="submit">通过</button>
+          <button class="buttons" data-name="{{list._id}}" bindtap='out'>通过</button>
         </view>
         </view>
       </view>
       </view>
     </view>
     </view>

+ 71 - 39
pages/administration/detail.wxss

@@ -2,6 +2,7 @@
   position: relative;
   position: relative;
   width: 100%;
   width: 100%;
 }
 }
+
 .back {
 .back {
   width: 40rpx;
   width: 40rpx;
   height: 40rpx;
   height: 40rpx;
@@ -9,95 +10,113 @@
   width: 40rpx;
   width: 40rpx;
   height: 40rpx;
   height: 40rpx;
 }
 }
-.onea{
+
+.onea {
   font-weight: 600;
   font-weight: 600;
   position: absolute;
   position: absolute;
   top: 5%;
   top: 5%;
   left: 2%;
   left: 2%;
 }
 }
-.ones{
+
+.ones {
   font-weight: 600;
   font-weight: 600;
   position: absolute;
   position: absolute;
   top: 5%;
   top: 5%;
   left: 42%;
   left: 42%;
   color: #ffffff;
   color: #ffffff;
 }
 }
-.one-2{
+
+.one-2 {
   position: absolute;
   position: absolute;
   top: 18%;
   top: 18%;
   left: 41%;
   left: 41%;
   width: 18%;
   width: 18%;
   height: 63.78px;
   height: 63.78px;
-  border-radius: 50%; 
+  border-radius: 50%;
 }
 }
-.one-3{
+
+.one-3 {
   position: absolute;
   position: absolute;
   top: 29%;
   top: 29%;
-  left: 43.5%;
-  width: 12%;
+  left: 37.5%;
+  width: 26%;
   height: 63.78px;
   height: 63.78px;
 }
 }
-.imgs{
+
+.imgs {
   margin-top: 4px;
   margin-top: 4px;
   margin-left: 2px;
   margin-left: 2px;
   width: 95%;
   width: 95%;
-  height: 51.58px; 
+  height: 51.58px;
 }
 }
-.two-1{
+
+.two-1 {
   margin-top: -4px;
   margin-top: -4px;
   background-color: #ffffff;
   background-color: #ffffff;
   font-size: 15px;
   font-size: 15px;
   margin-bottom: 6%;
   margin-bottom: 6%;
 }
 }
-.two{
+
+.two {
   background-color: #ffffff;
   background-color: #ffffff;
 }
 }
-.two1{
+
+.two1 {
   padding-top: 30px;
   padding-top: 30px;
   padding-bottom: 10px;
   padding-bottom: 10px;
 }
 }
-.two2{
+
+.two2 {
   padding-bottom: 20px;
   padding-bottom: 20px;
 }
 }
-.two-left1{
+
+.two-left1 {
   float: left;
   float: left;
   margin-top: -3px;
   margin-top: -3px;
   width: 10%;
   width: 10%;
 }
 }
-.two-left2{
+
+.two-left2 {
   margin-top: -3px;
   margin-top: -3px;
   float: left;
   float: left;
   width: 10%;
   width: 10%;
 }
 }
-.zi{
+
+.zi {
   color: #9e9e9e;
   color: #9e9e9e;
 }
 }
-.date{
+
+.date {
   margin-right: 2%;
   margin-right: 2%;
 }
 }
-.thr{
+
+.thr {
   float: left;
   float: left;
   width: 100%;
   width: 100%;
   padding-top: 15px;
   padding-top: 15px;
   background-color: #ffffff;
   background-color: #ffffff;
 }
 }
+
 .tuan {
 .tuan {
   margin-left: 11px;
   margin-left: 11px;
   font-size: 16px;
   font-size: 16px;
   font-weight: 500;
   font-weight: 500;
   margin-right: 10px;
   margin-right: 10px;
 }
 }
-.thr-left{
+
+.thr-left {
   width: 79%;
   width: 79%;
   height: 49px;
   height: 49px;
   background-color: #eeeeee;
   background-color: #eeeeee;
   border-radius: 24.5px;
   border-radius: 24.5px;
 }
 }
-.img{
+
+.img {
   width: 100%;
   width: 100%;
-  height: 49px; 
+  height: 49px;
 }
 }
-.thr-1{
+
+.thr-1 {
   padding-top: 10px;
   padding-top: 10px;
   padding-left: 10px;
   padding-left: 10px;
   float: left;
   float: left;
@@ -105,10 +124,12 @@
   background-color: #ffffff;
   background-color: #ffffff;
   padding-bottom: 5px;
   padding-bottom: 5px;
 }
 }
-.thr1{
+
+.thr1 {
   background-color: #ffffff;
   background-color: #ffffff;
 }
 }
-.thr-2{
+
+.thr-2 {
   padding-top: 10px;
   padding-top: 10px;
   padding-left: 8px;
   padding-left: 8px;
   float: left;
   float: left;
@@ -117,32 +138,38 @@
   background-color: #ffffff;
   background-color: #ffffff;
   /* border: 1px solid red; */
   /* border: 1px solid red; */
 }
 }
-.thr2{
+
+.thr2 {
   float: left;
   float: left;
   width: 50px;
   width: 50px;
   height: 50px;
   height: 50px;
   border: 2px solid #dddcdc;
   border: 2px solid #dddcdc;
 }
 }
-.name{
+
+.name {
   margin-left: 10px;
   margin-left: 10px;
   font-size: 13px;
   font-size: 13px;
   color: #727272;
   color: #727272;
 }
 }
-.thr3{
+
+.thr3 {
   margin-top: 22%;
   margin-top: 22%;
   margin-left: 23%;
   margin-left: 23%;
 }
 }
-.four{
+
+.four {
   float: left;
   float: left;
   width: 100%;
   width: 100%;
   background-color: white;
   background-color: white;
 }
 }
-.four-1{
+
+.four-1 {
   background-color: white;
   background-color: white;
   width: 100%;
   width: 100%;
   margin-top: 10%;
   margin-top: 10%;
 }
 }
-.four1{
+
+.four1 {
   background-color: white;
   background-color: white;
   margin-top: 15%;
   margin-top: 15%;
   margin-bottom: 15%;
   margin-bottom: 15%;
@@ -150,14 +177,16 @@
   float: left;
   float: left;
   width: 37%;
   width: 37%;
 }
 }
-.four2{
+
+.four2 {
   background-color: white;
   background-color: white;
   margin-top: 15%;
   margin-top: 15%;
   margin-bottom: 15%;
   margin-bottom: 15%;
   float: left;
   float: left;
   width: 30%;
   width: 30%;
 }
 }
-.button{
+
+.button {
   margin-top: 0 !important;
   margin-top: 0 !important;
   width: 140px !important;
   width: 140px !important;
   height: 35px;
   height: 35px;
@@ -167,30 +196,33 @@
   border-top-right-radius: 0em;
   border-top-right-radius: 0em;
   border-bottom-right-radius: 0em;
   border-bottom-right-radius: 0em;
   border-bottom-left-radius: 1.5em;
   border-bottom-left-radius: 1.5em;
-  color:#777777; 
+  color: #777777;
   font-size: 14px;
   font-size: 14px;
 }
 }
-.buttons{
+
+.buttons {
   margin-top: 0 !important;
   margin-top: 0 !important;
   width: 140px !important;
   width: 140px !important;
   height: 35px;
   height: 35px;
   background-color: rgba(32, 88, 243, 0.5);
   background-color: rgba(32, 88, 243, 0.5);
-  background-image: linear-gradient(to right, rgb(75, 113, 236) , rgb(203, 97, 245));
+  background-image: linear-gradient(to right, rgb(75, 113, 236), rgb(203, 97, 245));
   border-top-left-radius: 0em;
   border-top-left-radius: 0em;
   border-top-right-radius: 1.5em;
   border-top-right-radius: 1.5em;
   border-bottom-right-radius: 1.5em;
   border-bottom-right-radius: 1.5em;
   border-bottom-left-radius: 0em;
   border-bottom-left-radius: 0em;
-  color:#ffffff; 
+  color: #ffffff;
   font-size: 14px;
   font-size: 14px;
 }
 }
-.group{
+
+.group {
   color: #ffffff;
   color: #ffffff;
   margin-top: 20%;
   margin-top: 20%;
   text-align: center;
   text-align: center;
   margin-bottom: 10%;
   margin-bottom: 10%;
 }
 }
-.person{
-  margin-left: 18%;
+
+.person {
+  margin-left: 30%;
   font-size: 13px;
   font-size: 13px;
   color: #ffffff;
   color: #ffffff;
   font-weight: 300;
   font-weight: 300;

+ 2 - 2
pages/administration/details.wxml

@@ -48,13 +48,13 @@
           <view class="thr-right"><text class="name">{{item.nickname}}</text> </view>
           <view class="thr-right"><text class="name">{{item.nickname}}</text> </view>
         </view>
         </view>
       </view>
       </view>
-      <view class="thr-2">
+      <!-- <view class="thr-2">
         <view class="thr2">
         <view class="thr2">
           <view class="thr3">
           <view class="thr3">
             <text class=" icon iconfont icon-jia"></text>
             <text class=" icon iconfont icon-jia"></text>
           </view>
           </view>
         </view>
         </view>
-      </view>
+      </view> -->
     </view>
     </view>
     <view class="four">
     <view class="four">
       <view class="four-1">
       <view class="four-1">

+ 71 - 39
pages/administration/details.wxss

@@ -2,6 +2,7 @@
   position: relative;
   position: relative;
   width: 100%;
   width: 100%;
 }
 }
+
 .back {
 .back {
   width: 40rpx;
   width: 40rpx;
   height: 40rpx;
   height: 40rpx;
@@ -9,95 +10,113 @@
   width: 40rpx;
   width: 40rpx;
   height: 40rpx;
   height: 40rpx;
 }
 }
-.onea{
+
+.onea {
   font-weight: 600;
   font-weight: 600;
   position: absolute;
   position: absolute;
   top: 5%;
   top: 5%;
   left: 2%;
   left: 2%;
 }
 }
-.ones{
+
+.ones {
   font-weight: 600;
   font-weight: 600;
   position: absolute;
   position: absolute;
   top: 5%;
   top: 5%;
   left: 42%;
   left: 42%;
   color: #ffffff;
   color: #ffffff;
 }
 }
-.one-2{
+
+.one-2 {
   position: absolute;
   position: absolute;
   top: 18%;
   top: 18%;
   left: 41%;
   left: 41%;
   width: 18%;
   width: 18%;
   height: 63.78px;
   height: 63.78px;
-  border-radius: 50%; 
+  border-radius: 50%;
 }
 }
-.one-3{
+
+.one-3 {
   position: absolute;
   position: absolute;
   top: 29%;
   top: 29%;
-  left: 43.5%;
-  width: 12%;
+  left: 37.5%;
+  width: 26%;
   height: 63.78px;
   height: 63.78px;
 }
 }
-.imgs{
+
+.imgs {
   margin-top: 4px;
   margin-top: 4px;
   margin-left: 2px;
   margin-left: 2px;
   width: 95%;
   width: 95%;
-  height: 51.58px; 
+  height: 51.58px;
 }
 }
-.two-1{
+
+.two-1 {
   margin-top: -4px;
   margin-top: -4px;
   background-color: #ffffff;
   background-color: #ffffff;
   font-size: 15px;
   font-size: 15px;
   margin-bottom: 6%;
   margin-bottom: 6%;
 }
 }
-.two{
+
+.two {
   background-color: #ffffff;
   background-color: #ffffff;
 }
 }
-.two1{
+
+.two1 {
   padding-top: 30px;
   padding-top: 30px;
   padding-bottom: 10px;
   padding-bottom: 10px;
 }
 }
-.two2{
+
+.two2 {
   padding-bottom: 20px;
   padding-bottom: 20px;
 }
 }
-.two-left1{
+
+.two-left1 {
   float: left;
   float: left;
   margin-top: -3px;
   margin-top: -3px;
   width: 10%;
   width: 10%;
 }
 }
-.two-left2{
+
+.two-left2 {
   margin-top: -3px;
   margin-top: -3px;
   float: left;
   float: left;
   width: 10%;
   width: 10%;
 }
 }
-.zi{
+
+.zi {
   color: #9e9e9e;
   color: #9e9e9e;
 }
 }
-.date{
+
+.date {
   margin-right: 2%;
   margin-right: 2%;
 }
 }
-.thr{
+
+.thr {
   float: left;
   float: left;
   width: 100%;
   width: 100%;
   padding-top: 15px;
   padding-top: 15px;
   background-color: #ffffff;
   background-color: #ffffff;
 }
 }
+
 .tuan {
 .tuan {
   margin-left: 11px;
   margin-left: 11px;
   font-size: 16px;
   font-size: 16px;
   font-weight: 500;
   font-weight: 500;
   margin-right: 10px;
   margin-right: 10px;
 }
 }
-.thr-left{
+
+.thr-left {
   width: 79%;
   width: 79%;
   height: 49px;
   height: 49px;
   background-color: #eeeeee;
   background-color: #eeeeee;
   border-radius: 24.5px;
   border-radius: 24.5px;
 }
 }
-.img{
+
+.img {
   width: 100%;
   width: 100%;
-  height: 49px; 
+  height: 49px;
 }
 }
-.thr-1{
+
+.thr-1 {
   padding-top: 10px;
   padding-top: 10px;
   padding-left: 10px;
   padding-left: 10px;
   float: left;
   float: left;
@@ -105,10 +124,12 @@
   background-color: #ffffff;
   background-color: #ffffff;
   padding-bottom: 5px;
   padding-bottom: 5px;
 }
 }
-.thr1{
+
+.thr1 {
   background-color: #ffffff;
   background-color: #ffffff;
 }
 }
-.thr-2{
+
+.thr-2 {
   padding-top: 10px;
   padding-top: 10px;
   padding-left: 8px;
   padding-left: 8px;
   float: left;
   float: left;
@@ -117,32 +138,38 @@
   background-color: #ffffff;
   background-color: #ffffff;
   /* border: 1px solid red; */
   /* border: 1px solid red; */
 }
 }
-.thr2{
+
+.thr2 {
   float: left;
   float: left;
   width: 50px;
   width: 50px;
   height: 50px;
   height: 50px;
   border: 2px solid #dddcdc;
   border: 2px solid #dddcdc;
 }
 }
-.name{
+
+.name {
   margin-left: 10px;
   margin-left: 10px;
   font-size: 13px;
   font-size: 13px;
   color: #727272;
   color: #727272;
 }
 }
-.thr3{
+
+.thr3 {
   margin-top: 22%;
   margin-top: 22%;
   margin-left: 23%;
   margin-left: 23%;
 }
 }
-.four{
+
+.four {
   float: left;
   float: left;
   width: 100%;
   width: 100%;
   background-color: white;
   background-color: white;
 }
 }
-.four-1{
+
+.four-1 {
   background-color: white;
   background-color: white;
   width: 100%;
   width: 100%;
   margin-top: 10%;
   margin-top: 10%;
 }
 }
-.four1{
+
+.four1 {
   background-color: white;
   background-color: white;
   margin-top: 15%;
   margin-top: 15%;
   margin-bottom: 15%;
   margin-bottom: 15%;
@@ -150,14 +177,16 @@
   float: left;
   float: left;
   width: 37%;
   width: 37%;
 }
 }
-.four2{
+
+.four2 {
   background-color: white;
   background-color: white;
   margin-top: 15%;
   margin-top: 15%;
   margin-bottom: 15%;
   margin-bottom: 15%;
   float: left;
   float: left;
   width: 30%;
   width: 30%;
 }
 }
-.button{
+
+.button {
   margin-top: 0 !important;
   margin-top: 0 !important;
   width: 140px !important;
   width: 140px !important;
   height: 35px;
   height: 35px;
@@ -167,30 +196,33 @@
   border-top-right-radius: 0em;
   border-top-right-radius: 0em;
   border-bottom-right-radius: 0em;
   border-bottom-right-radius: 0em;
   border-bottom-left-radius: 1.5em;
   border-bottom-left-radius: 1.5em;
-  color:#777777; 
+  color: #777777;
   font-size: 14px;
   font-size: 14px;
 }
 }
-.buttons{
+
+.buttons {
   margin-top: 0 !important;
   margin-top: 0 !important;
   width: 140px !important;
   width: 140px !important;
   height: 35px;
   height: 35px;
   background-color: rgba(32, 88, 243, 0.5);
   background-color: rgba(32, 88, 243, 0.5);
-  background-image: linear-gradient(to right, rgb(75, 113, 236) , rgb(203, 97, 245));
+  background-image: linear-gradient(to right, rgb(75, 113, 236), rgb(203, 97, 245));
   border-top-left-radius: 0em;
   border-top-left-radius: 0em;
   border-top-right-radius: 1.5em;
   border-top-right-radius: 1.5em;
   border-bottom-right-radius: 1.5em;
   border-bottom-right-radius: 1.5em;
   border-bottom-left-radius: 0em;
   border-bottom-left-radius: 0em;
-  color:#ffffff; 
+  color: #ffffff;
   font-size: 14px;
   font-size: 14px;
 }
 }
-.group{
+
+.group {
   color: #ffffff;
   color: #ffffff;
   margin-top: 20%;
   margin-top: 20%;
   text-align: center;
   text-align: center;
   margin-bottom: 10%;
   margin-bottom: 10%;
 }
 }
-.person{
-  margin-left: 18%;
+
+.person {
+  margin-left: 30%;
   font-size: 13px;
   font-size: 13px;
   color: #ffffff;
   color: #ffffff;
   font-weight: 300;
   font-weight: 300;

+ 85 - 0
pages/dissolution/index.js

@@ -1,12 +1,15 @@
 // pages/login/login.js
 // pages/login/login.js
 import WxValidate from '../../utils/wxValidate'
 import WxValidate from '../../utils/wxValidate'
 const app = getApp()
 const app = getApp()
+const moment = require("../../utils/moment.min")
 Page({
 Page({
 
 
     /**
     /**
      * 页面的初始数据
      * 页面的初始数据
      */
      */
     data: {
     data: {
+        ids: '',
+        apply_time: '',
         // 主体高度
         // 主体高度
         infoHeight: '',
         infoHeight: '',
         frameStyle: { useTop: true, name: '解散申请', leftArrow: true, useBar: false },
         frameStyle: { useTop: true, name: '解散申请', leftArrow: true, useBar: false },
@@ -19,19 +22,101 @@ Page({
             // resaon: '', // 解散团队原因
             // resaon: '', // 解散团队原因
         },
         },
     },
     },
+    // 监听用户是否登录
+    watchLogin: function () {
+        wx.getStorage({
+            key: 'token',
+            success: res => {
+                var that = this;
+                wx.request({
+                    url: `${app.globalData.publicUrl}/courtAdmin/api/team/` + that.data.ids, //接口地址
+                    method: 'get',
+                    data: '',
+                    success(res) {
+                        console.log('解散团队', res.data);
+                        if (res.data.errcode == 0) {
+                            let datas = res.data.data
+                            that.setData({
+                                form: datas,
+                            });
+                        } else {
+                            wx.showToast({
+                                title: res.data.errmsg,
+                                icon: 'none',
+                                duration: 2000
+                            })
+                        }
+                    }
+                })
+            },
+            fail: res => {
+                return wx.redirectTo({ url: '/pages/login/index', })
+            }
+        })
+    },
     back: function () {
     back: function () {
         wx.navigateBack({ url: '/pages/me/index' })
         wx.navigateBack({ url: '/pages/me/index' })
     },
     },
+    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)
+    },
     //提交
     //提交
     formSubmit: function (e) {
     formSubmit: function (e) {
         console.log('form发生了submit事件,携带数据为:', e.detail.value)
         console.log('form发生了submit事件,携带数据为:', e.detail.value)
+        const params = e.detail.value;
+        var apply_time = this.data.apply_time;
+        var form = {
+            "team_id": params.team_id,
+            "team_name": params.team_name,
+            "create_user": params.create_user,
+            "create_id": params.create_id,
+            "apply_time": apply_time,
+            "resaon": params.resaon
+        }
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            wx.request({
+                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' })// 跳转页面
+                    } else {
+                        wx.showToast({
+                            title: res.data.errmsg,
+                            icon: 'none',
+                            duration: 2000
+                        })
+                    }
+                }
+            })
+        }
     },
     },
     /**
     /**
      * 生命周期函数--监听页面加载
      * 生命周期函数--监听页面加载
      */
      */
     onLoad: function (options) {
     onLoad: function (options) {
+        this.setData({
+            ids: options.id,
+        });
+        let apply_time = moment().format('YYYY-MM-DD HH:mm:ss');
+        this.setData({
+            apply_time: apply_time,
+        });
         // 计算高度
         // 计算高度
         this.searchHeight();
         this.searchHeight();
+        // 监听用户是否登录
+        this.watchLogin();
+        //验证规则函数
+        this.initValidate()
     },
     },
     // 计算高度
     // 计算高度
     searchHeight: function () {
     searchHeight: function () {

+ 4 - 4
pages/dissolution/index.wxml

@@ -4,11 +4,11 @@
             <view class="form" style="height:{{infoHeight-140}}px;">
             <view class="form" style="height:{{infoHeight-140}}px;">
                 <view class="one">
                 <view class="one">
                     <view class="text">团队id</view>
                     <view class="text">团队id</view>
-                    <input class="input" name="team_id" disabled="true" value="{{form.team_id}}" placeholder="" />
+                    <input class="input" name="team_id" disabled="true" value="{{form.id}}" placeholder="" />
                 </view>
                 </view>
                 <view class="one">
                 <view class="one">
                     <view class="text">团队名称</view>
                     <view class="text">团队名称</view>
-                    <input class="input" name="team_name" disabled="true" value="{{form.team_name}}" placeholder="" />
+                    <input class="input" name="team_name" disabled="true" value="{{form.name}}" placeholder="" />
                 </view>
                 </view>
                 <view class="one">
                 <view class="one">
                     <view class="text">团队创建人</view>
                     <view class="text">团队创建人</view>
@@ -18,10 +18,10 @@
                     <view class="text">团队创建人id</view>
                     <view class="text">团队创建人id</view>
                     <input class="input" name="create_id" disabled="true" value="{{form.create_id}}" placeholder="" />
                     <input class="input" name="create_id" disabled="true" value="{{form.create_id}}" placeholder="" />
                 </view>
                 </view>
-                <view class="one">
+                <!-- <view class="one">
                     <view class="text">申请时间</view>
                     <view class="text">申请时间</view>
                     <input class="input" name="apply_time" value="{{form.apply_time}}" placeholder="请输入申请时间" />
                     <input class="input" name="apply_time" value="{{form.apply_time}}" placeholder="请输入申请时间" />
-                </view>
+                </view> -->
                 <view class="one">
                 <view class="one">
                     <view class="text">解散团队原因</view>
                     <view class="text">解散团队原因</view>
                     <input class="input" name="resaon" value="{{form.resaon}}" placeholder="请输入解散原因" />
                     <input class="input" name="resaon" value="{{form.resaon}}" placeholder="请输入解散原因" />

+ 5 - 6
pages/manage/index.js

@@ -90,7 +90,7 @@ Page({
           data: {
           data: {
             // create_id
             // create_id
             // apply_time
             // apply_time
-            status:that.data.list.status
+            // status:that.data.list.status
           },
           },
           success(res) {
           success(res) {
             console.log('resdis', res.data);
             console.log('resdis', res.data);
@@ -129,10 +129,9 @@ Page({
     wx.navigateBack({ url: '/pages/home/index' })
     wx.navigateBack({ url: '/pages/home/index' })
   },
   },
   shen: function (e) {
   shen: function (e) {
-    let id= e.currentTarget.dataset.name;
-    console.log(id);
+    let obj= e.currentTarget.dataset;
     wx.navigateTo({
     wx.navigateTo({
-      url: '/pages/administration/detail?id='+id,
+      url: '/pages/administration/detail?obj=' + decodeURIComponent(JSON.stringify(obj)),
     })
     })
   },
   },
   shens: function (e) {
   shens: function (e) {
@@ -143,7 +142,6 @@ Page({
     })
     })
   },
   },
   out: function (e){
   out: function (e){
-    debugger
     let id= e.currentTarget.dataset.name;
     let id= e.currentTarget.dataset.name;
     wx.showModal({
     wx.showModal({
       title: '',
       title: '',
@@ -152,11 +150,12 @@ Page({
         if (res.confirm) {
         if (res.confirm) {
           wx.request({
           wx.request({
             url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply/`+id, //接口地址
             url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply/`+id, //接口地址
-            method: 'get',
+            method: 'DELETE',
             data: '',
             data: '',
             success(res) {
             success(res) {
               if (res.data.errcode == 0) {
               if (res.data.errcode == 0) {
                 wx.showToast({ title: `解散团队成功`, icon: 'success', duration: 2000 }) //创建成功提示
                 wx.showToast({ title: `解散团队成功`, icon: 'success', duration: 2000 }) //创建成功提示
+                return wx.redirectTo({ url: '/pages/manage/index' })// 跳转页面
               } else {
               } else {
                 wx.showToast({
                 wx.showToast({
                   title: res.data.errmsg,
                   title: res.data.errmsg,

+ 5 - 4
pages/manage/index.wxml

@@ -35,16 +35,17 @@
             </view>
             </view>
           </view>
           </view>
         </van-tab>
         </van-tab>
-        <van-tab title="解散团队" data-name="{{item._id}}" bindtap='shen'>
+        <van-tab title="解散团队">
           <view>
           <view>
             <view class="list" wx:key="item" wx:for="{{lists}}">
             <view class="list" wx:key="item" wx:for="{{lists}}">
               <view class="two">
               <view class="two">
                 <view class="left">
                 <view class="left">
-                  <image class="head" src="{{item.logo[0].url}}"></image>
-                  <text class="group" bindtap="tiao">{{item.team_name}} <text class="resaon">{{item.status}}</text> </text>
+                  <!-- <image class="head" src="{{list.logo[0].url}}"></image> -->
+                  <text class="group" data-id="{{item._id}}" data-name="{{item.team_id}}" bindtap='shen'>{{item.team_name}} <text class="resaon">{{item.status}}</text> </text>
                   <text class="person" wx:if="{{!item.status}}">共{{item.members.length||0}}人</text>
                   <text class="person" wx:if="{{!item.status}}">共{{item.members.length||0}}人</text>
                   <view class="fou"><text>创建人:{{item.create_user}}</text></view>
                   <view class="fou"><text>创建人:{{item.create_user}}</text></view>
-                  <view class="time"><text class="date">{{item.create_time}}创建</text></view>
+                  <view class="time"><text class="date">申请时间:{{item.apply_time}}</text></view>
+                  <view class="time"><text class="date">解散团队原因:{{item.resaon}}</text></view>
                 </view>
                 </view>
                 <view class="right">
                 <view class="right">
                   <button class="{{item.status == '解散团队' ? 'button' : 'buttons'}}" data-name="{{item._id}}" bindtap='out'>通过</button>
                   <button class="{{item.status == '解散团队' ? 'button' : 'buttons'}}" data-name="{{item._id}}" bindtap='out'>通过</button>

+ 1 - 0
pages/manage/index.wxss

@@ -87,6 +87,7 @@
 }
 }
 .time{
 .time{
   margin-left: 10px;
   margin-left: 10px;
+  margin-bottom: 1.5%;
   font-size: 13px;
   font-size: 13px;
   color: #9e9e9e;
   color: #9e9e9e;
 }
 }

+ 22 - 3
pages/me/index.js

@@ -16,7 +16,7 @@ Page({
     // 主体高度
     // 主体高度
     infoHeight: '',
     infoHeight: '',
     total: '4',
     total: '4',
-    item:{
+    item: {
       id: '1', head2: '/image/head2.png', head1: '/image/head1.png', fraction2: '0', groupname2: '马尼拉组', fraction1: '0', site: '第一场', groupname1: '哈拉海组', week: '星期五', time: '13:00',
       id: '1', head2: '/image/head2.png', head1: '/image/head1.png', fraction2: '0', groupname2: '马尼拉组', fraction1: '0', site: '第一场', groupname1: '哈拉海组', week: '星期五', time: '13:00',
       state: '已结束', date: '01.15', start: '未开始'
       state: '已结束', date: '01.15', start: '未开始'
     },
     },
@@ -79,9 +79,10 @@ Page({
     })
     })
   },
   },
   //解散申请
   //解散申请
-  apply: function () {
+  apply: function (e) {
+    let id= e.currentTarget.dataset.id;
     wx.navigateTo({
     wx.navigateTo({
-      url: `/pages/dissolution/index`,
+      url: `/pages/dissolution/index?id=`+id,
     })
     })
   },
   },
   //解散团队弹窗
   //解散团队弹窗
@@ -164,6 +165,24 @@ Page({
       }
       }
     })
     })
   },
   },
+  tui() {
+    wx.showModal({
+      title: '',
+      content: '是否确认退出登录',
+      success(res) {
+        if (res.confirm) {
+          wx.removeStorage({
+            key: 'token',
+            success (res) {
+              return wx.redirectTo({ url: '/pages/index/index', })
+            }
+          })
+        } else if (res.cancel) {
+          console.log('用户点击取消')
+        }
+      }
+    })
+  },
   // 计算高度
   // 计算高度
   searchHeight: function () {
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;
     let frameStyle = this.data.frameStyle;

+ 3 - 3
pages/me/index.wxml

@@ -165,7 +165,7 @@
           <text class="six-text">解散团队</text>
           <text class="six-text">解散团队</text>
         </view>
         </view>
       </view>
       </view>
-      <view class="six-4">
+      <view class="six-4" bindtap="tui">
         <view class="six-left">
         <view class="six-left">
           <text class=" icon iconfont icon-tuichudenglu"></text>
           <text class=" icon iconfont icon-tuichudenglu"></text>
         </view>
         </view>
@@ -176,9 +176,9 @@
       <view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
       <view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
       <view class="modalDlg" wx:if="{{showModal}}">
       <view class="modalDlg" wx:if="{{showModal}}">
         <text class="modal_text1">解散团队</text>
         <text class="modal_text1">解散团队</text>
-        <text class="modal_text2">成双成队成双成队</text>
+        <text class="modal_text2">{{list3[0].name}}</text>
         <text class="modal_text3">解散的团队不可恢复</text>
         <text class="modal_text3">解散的团队不可恢复</text>
-        <button bindtap="apply" class="modal_button">解散申请</button>
+        <button bindtap="apply" data-id="{{list3[0]._id}}"class="modal_button">解散申请</button>
         <text bindtap="go" class="modal_text4">取消</text>
         <text bindtap="go" class="modal_text4">取消</text>
       </view>
       </view>
     </view>
     </view>

+ 2 - 2
pages/me/index.wxss

@@ -488,8 +488,8 @@
   background-color: white;
   background-color: white;
   border-radius: 5%;
   border-radius: 5%;
   padding: 0 0 5px 0;
   padding: 0 0 5px 0;
+  padding-bottom: 5%;
 }
 }
-
 .hiddenmore .more-item {
 .hiddenmore .more-item {
   display: none;
   display: none;
 }
 }
@@ -545,4 +545,4 @@
   color: #ffffff;
   color: #ffffff;
   text-align: center;
   text-align: center;
   font-size: small;
   font-size: small;
-}
+}

+ 0 - 3
pages/team/apply.js

@@ -70,9 +70,6 @@ Page({
       // apply_id: '1'
       // apply_id: '1'
       apply_id: obj.cid
       apply_id: obj.cid
     }
     }
-    // wx.navigateTo({
-    //   url: '/pages/add/index?obj=' + decodeURIComponent(JSON.stringify(obj)),
-    // })
     wx.showModal({
     wx.showModal({
       title: '',
       title: '',
       content: '是否申请加入',
       content: '是否申请加入',

+ 2 - 2
pages/team/examine.wxml

@@ -48,13 +48,13 @@
           <view class="thr-right"><text class="name">{{item.nickname}}</text> </view>
           <view class="thr-right"><text class="name">{{item.nickname}}</text> </view>
         </view>
         </view>
       </view>
       </view>
-      <view class="thr-2">
+      <!-- <view class="thr-2">
         <view class="thr2">
         <view class="thr2">
           <view class="thr3">
           <view class="thr3">
             <text class=" icon iconfont icon-jia"></text>
             <text class=" icon iconfont icon-jia"></text>
           </view>
           </view>
         </view>
         </view>
-      </view>
+      </view> -->
     </view>
     </view>
     <view class="four">
     <view class="four">
       <view class="four1">
       <view class="four1">

+ 2 - 2
pages/team/examine.wxss

@@ -37,7 +37,7 @@
 .one-3{
 .one-3{
   position: absolute;
   position: absolute;
   top: 29%;
   top: 29%;
-  left: 41.5%;
+  left: 37.5%;
   width: 23%;
   width: 23%;
   height: 63.78px;
   height: 63.78px;
 }
 }
@@ -164,7 +164,7 @@
 }
 }
 
 
 .person {
 .person {
-  margin-left: 18%;
+  margin-left: 30%;
   font-size: 13px;
   font-size: 13px;
   color: #ffffff;
   color: #ffffff;
   font-weight: 300;
   font-weight: 300;