zs 3 gadi atpakaļ
vecāks
revīzija
5c1b81715b

+ 13 - 12
pages/add/index.js

@@ -53,18 +53,6 @@ Page({
       }
     })
   },
-  // 监听用户是否登录
-  watchLogin: function () {
-    wx.getStorage({
-      key: 'token',
-      success: res => {
-        console.log(res);
-      },
-      fail: res => {
-        return wx.redirectTo({ url: '/pages/login/index', })
-      }
-    })
-  },
   //日期选择器
   bindDateChange3: function (e) {
     console.log('picker发送选择改变,携带值为', e.detail.value)
@@ -87,6 +75,7 @@ Page({
       date: e.detail.value,
     })
   },
+  // 时间段选择  
   bindDateChange2(e) {
     let that = this;
     that.setData({
@@ -123,6 +112,18 @@ Page({
       form: forms
     });
   },
+  // 监听用户是否登录
+  watchLogin: function () {
+    wx.getStorage({
+      key: 'token',
+      success: res => {
+        console.log(res);
+      },
+      fail: res => {
+        return wx.redirectTo({ url: '/pages/login/index', })
+      }
+    })
+  },
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 1 - 1
pages/add/index.wxml

@@ -17,7 +17,7 @@
           </view>
           <view class="one_list">
             <view class="text">申请时间</view>
-            <view class="text" style="display: flex;flex-wrap: wrap;">
+            <view class="text text1">
               <picker mode="date" value="{{ form.apply_time}}" start="2018-09-01" end="2150-09-01" bindchange="bindDateChange3">
                 <view class="picker1">
                   {{form.apply_time}}

+ 5 - 0
pages/add/index.wxss

@@ -4,6 +4,11 @@
   background-color: #ffffff;
 }
 
+.text1 {
+  display: flex;
+  flex-wrap: wrap;
+}
+
 .one_list {
   display: flex;
   justify-content: space-between;

+ 59 - 59
pages/administration/detail.js

@@ -6,73 +6,17 @@ Page({
    * 页面的初始数据
    */
   data: {
+    frameStyle: { useTop: false, name: '团队审核', leftArrow: true, useBar: false },
     idjie: '',
     ids: '',
     src: '/image/adimges.jpg',
     src1: '/image/head1.png',
-    frameStyle: { useTop: false, name: '团队审核', leftArrow: true, useBar: false },
     // 主体高度
     infoHeight: '',
     list: [],
     lists: [],
     from: [],
   },
-  //验证用户是否登录
-  watchLogin: function () {
-    var that = this;
-    let id = that.ids;
-    let ids = that.idjie;
-    wx.getStorage({
-      key: 'token',
-      success: res => {
-        //查询数据
-        wx.request({
-          url: `${app.globalData.publicUrl}/courtAdmin/api/team/` + id, //接口地址
-          method: 'get',
-          data: '',
-          success(res) {
-            if (res.data.errcode == 0) {
-              let datas = res.data.data
-              console.log('单解散', datas);
-              that.setData({
-                list: datas,
-              });
-            } else {
-              wx.showToast({
-                title: res.data.errmsg,
-                icon: 'none',
-                duration: 2000
-              })
-            }
-          }
-        })
-        //解散团队数据
-        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', })
-      }
-    })
-  },
   back: function () {
     wx.navigateBack({ url: '/pages/home/index' })
   },
@@ -102,7 +46,7 @@ Page({
       },
       success(res) {
         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 {
           wx.showToast({
@@ -145,7 +89,7 @@ Page({
             },
             success(res) {
               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 {
                 wx.showToast({
@@ -173,6 +117,62 @@ Page({
     this.searchHeight()
     // 监听用户是否登录
     this.watchLogin();
+  },
+   //验证用户是否登录
+   watchLogin: function () {
+    var that = this;
+    let id = that.ids;
+    let ids = that.idjie;
+    wx.getStorage({
+      key: 'token',
+      success: res => {
+        //查询数据
+        wx.request({
+          url: `${app.globalData.publicUrl}/courtAdmin/api/team/` + id, //接口地址
+          method: 'get',
+          data: '',
+          success(res) {
+            if (res.data.errcode == 0) {
+              let datas = res.data.data
+              console.log('单解散', datas);
+              that.setData({
+                list: datas,
+              });
+            } else {
+              wx.showToast({
+                title: res.data.errmsg,
+                icon: 'none',
+                duration: 2000
+              })
+            }
+          }
+        })
+        //解散团队数据
+        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', })
+      }
+    })
   },
   // 计算高度
   searchHeight: function () {

+ 1 - 8
pages/administration/detail.wxml

@@ -8,7 +8,7 @@
         <view class="ones">
           <text>团队信息</text>
         </view>
-        <image style="width: 100%; height: 280px; background-color: #eeeeee;" src="{{src}}"></image>
+        <image class="image" src="{{src}}"></image>
       </view>
       <view class="one-2">
         <image class="imgs" src="{{list.logo[0].url}}"></image>
@@ -48,13 +48,6 @@
           <view class="thr-right"><text class="name">{{item.nickname}}</text> </view>
         </view>
       </view>
-      <!-- <view class="thr-2">
-        <view class="thr2">
-          <view class="thr3">
-            <text class=" icon iconfont icon-jia"></text>
-          </view>
-        </view>
-      </view> -->
     </view>
     <view class="four">
       <view class="four-1">

+ 6 - 0
pages/administration/detail.wxss

@@ -3,6 +3,12 @@
   width: 100%;
 }
 
+.image {
+  width: 100%;
+  height: 280px;
+  background-color: #eeeeee;
+}
+
 .back {
   width: 40rpx;
   height: 40rpx;

+ 15 - 16
pages/administration/details.js

@@ -6,25 +6,37 @@ Page({
    * 页面的初始数据
    */
   data: {
+    frameStyle: { useTop: false, name: '团队审核', leftArrow: true, useBar: false },
     ids: '',
     src: '/image/adimges.jpg',
     src1: '/image/head1.png',
-    frameStyle: { useTop: false, name: '团队审核', leftArrow: true, useBar: false },
     // 主体高度
     infoHeight: '',
     list: [],
     lists: [],
   },
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    this.setData({ ids: options.id });
+    // 计算高度
+    this.searchHeight()
+    // 监听用户是否登录
+    this.watchLogin();
+  },
   //验证用户是否登录
   watchLogin: function () {
     var that = this;
-    let id = that.ids
     wx.getStorage({
       key: 'token',
       success: res => {
         //查询数据
         wx.request({
-          url: `${app.globalData.publicUrl}/courtAdmin/api/team/` + id, //接口地址
+          url: `${app.globalData.publicUrl}/courtAdmin/api/team/${this.data.ids}`, //接口地址
           method: 'get',
           data: '',
           success(res) {
@@ -49,19 +61,6 @@ Page({
       }
     })
   },
-  back: function () {
-    wx.navigateBack({ url: '/pages/home/index' })
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    this.ids = options.id;
-    // 计算高度
-    this.searchHeight()
-    // 监听用户是否登录
-    this.watchLogin();
-  },
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 1 - 10
pages/administration/details.wxml

@@ -8,7 +8,7 @@
         <view class="ones">
           <text>团队信息</text>
         </view>
-        <image style="width: 100%; height: 280px; background-color: #eeeeee;" src="{{src}}"></image>
+        <image class="image" src="{{src}}"></image>
       </view>
       <view class="one-2">
         <image class="imgs" src="{{list.logo[0].url}}"></image>
@@ -48,21 +48,12 @@
           <view class="thr-right"><text class="name">{{item.nickname}}</text> </view>
         </view>
       </view>
-      <!-- <view class="thr-2">
-        <view class="thr2">
-          <view class="thr3">
-            <text class=" icon iconfont icon-jia"></text>
-          </view>
-        </view>
-      </view> -->
     </view>
     <view class="four">
       <view class="four-1">
         <view class="four1">
-          <!-- <button class="button" form-type="submit">驳回</button> -->
         </view>
         <view class="four2">
-          <!-- <button class="buttons" form-type="submit">通过</button> -->
         </view>
       </view>
     </view>

+ 6 - 0
pages/administration/details.wxss

@@ -3,6 +3,12 @@
   width: 100%;
 }
 
+.image {
+  width: 100%;
+  height: 280px;
+  background-color: #eeeeee;
+}
+
 .back {
   width: 40rpx;
   height: 40rpx;

+ 2 - 0
pages/administration/index.js

@@ -37,8 +37,10 @@ Page({
               datastart.push(datas[i])
             } else if (datas[i].status == 1) {
               datas[i].status = '报名中'
+              datastart.push(datas[i])
             } else if (datas[i].status == 2) {
               datas[i].status = '待比赛'
+              datastart.push(datas[i])
             } else if (datas[i].status == 3) {
               datas[i].status = '进行中'
               datass.push(datas[i])

+ 12 - 2
pages/administration/index.wxml

@@ -24,7 +24,12 @@
         <van-tab title="进行中">
           <view class="list" wx:key="item" wx:for="{{list}}">
             <view class="name" data-name="{{item._id}}" bindtap="tiao">{{item.name}}</view>
-            <button class="button" size="mini">{{item.status}}</button>
+            <view class="listbut"> <button class="button" size="mini" style="background:rgb(238, 147, 28);" wx:if="{{item.status == '未开始'}}">{{item.status}}</button>
+              <button class="button" size="mini" style="background:rgb(238, 88, 28);" wx:if="{{item.status == '待比赛'}}">{{item.status}}</button>
+              <button class="button" size="mini" style="background:rgb(54, 233, 48)" wx:if="{{item.status == '报名中'}}">{{item.status}}</button>
+              <button class="button" size="mini" style="background:rgb(54, 233, 48)" wx:if="{{item.status == '进行中'}}">{{item.status}}</button>
+              <button class="button" size="mini" style="background:rgb(136, 136, 136);" wx:if="{{item.status == '已结束'}}">{{item.status}}</button>
+            </view>
             <view class="left1">
               <view class="otherInfos">
                 <text class="text1">{{item.single_time}}</text>
@@ -57,7 +62,12 @@
         <van-tab title="未开始">
           <view class="list" wx:key="item" wx:for="{{liststart}}">
             <view class="name" data-name="{{item._id}}" bindtap="tiao">{{item.name}}</view>
-            <button class="buttonstart" size="mini">{{item.status}}</button>
+            <view class="listbut"> <button class="button" size="mini" style="background:rgb(238, 147, 28);" wx:if="{{item.status == '未开始'}}">{{item.status}}</button>
+              <button class="button" size="mini" style="background:rgb(238, 88, 28);" wx:if="{{item.status == '待比赛'}}">{{item.status}}</button>
+              <button class="button" size="mini" style="background:rgb(54, 233, 48)" wx:if="{{item.status == '报名中'}}">{{item.status}}</button>
+              <button class="button" size="mini" style="background:rgb(54, 233, 48)" wx:if="{{item.status == '进行中'}}">{{item.status}}</button>
+              <button class="button" size="mini" style="background:rgb(136, 136, 136);" wx:if="{{item.status == '已结束'}}">{{item.status}}</button>
+            </view>
             <view class="left1">
               <view class="otherInfos">
                 <text class="text1">{{item.single_time}}</text>

+ 25 - 24
pages/competition/index.js

@@ -29,25 +29,6 @@ Page({
     // 赛制储存信息
     szList: [],
   },
-  //验证是否输入
-  initValidate() {
-    const rules = { name: { required: true }, match_time: { required: true, }, single_time: { required: true }, address: { required: true, }, format: { required: true } }
-    // 验证字段的提示信息,若不传则调用默认的信息
-    const messages = { name: { required: '请输入比赛名称', }, match_time: { required: '请输入时间', }, single_time: { required: '请输入单场时间', }, address: { required: '请输入地点', }, format: { required: '请选择赛制', } };
-    this.WxValidate = new WxValidate(rules, messages)
-  },
-  // 监听用户是否登录
-  watchLogin: function () {
-    wx.getStorage({
-      key: 'token',
-      success: res => {
-        console.log(res);
-      },
-      fail: res => {
-        return wx.redirectTo({ url: '/pages/login/index', })
-      }
-    })
-  },
   // 提交创建
   onSubmit: function (e) {
     var name = this.data.names;
@@ -127,11 +108,6 @@ Page({
     let data = list.filter((i, index) => index != value)
     this.setData({ szList: data })
   },
-  search: function () {
-    const that = this;
-    let data = that.data.levelArray;
-    that.setData({ valueList: [data[0], data[1]] })
-  },
   bindDateChange3: function (e) {
     console.log('picker发送选择改变,携带值为', e.detail.value)
     this.setData({
@@ -175,6 +151,31 @@ Page({
     // 初始化数据
     that.search();
   },
+  //验证是否输入
+  initValidate() {
+    const rules = { name: { required: true }, match_time: { required: true, }, single_time: { required: true }, address: { required: true, }, format: { required: true } }
+    // 验证字段的提示信息,若不传则调用默认的信息
+    const messages = { name: { required: '请输入比赛名称', }, match_time: { required: '请输入时间', }, single_time: { required: '请输入单场时间', }, address: { required: '请输入地点', }, format: { required: '请选择赛制', } };
+    this.WxValidate = new WxValidate(rules, messages)
+  },
+  // 监听用户是否登录
+  watchLogin: function () {
+    wx.getStorage({
+      key: 'token',
+      success: res => {
+        console.log(res);
+      },
+      fail: res => {
+        return wx.redirectTo({ url: '/pages/login/index', })
+      }
+    })
+  },
+  //查找选择器的值
+  search: function () {
+    const that = this;
+    let data = that.data.levelArray;
+    that.setData({ valueList: [data[0], data[1]] })
+  },
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 0 - 1
pages/competition/index.wxml

@@ -7,7 +7,6 @@
     </view>
     <view class="page">
       <view class="page1"><text>时间</text></view>
-      <!-- 时间段 -->
       <view class="picker_group">
         <picker mode="date" value="{{date}}" end="{{date2}}" bindchange="bindDateChange">
           <view class="picker">

+ 30 - 30
pages/home/index.js

@@ -6,14 +6,41 @@ Page({
    * 页面的初始数据
    */
   data: {
-    src: '/image/home.png',
     frameStyle: { useTop: false, name: '首页', leftArrow: false, useBar: true, tabSelectid: '0' },
+    src: '/image/home.png',
     // 主体高度
     infoHeight: '',
     list: [],
   },
-   // 查询数据
-   search: function () {
+  tiao: function (e) {
+    let id= e.currentTarget.dataset.name;
+    console.log(id);
+    wx.navigateTo({
+      url: '/pages/list/index?id='+id,
+    })
+  },
+  xun: function () {
+    wx.navigateTo({
+      url: '/pages/match/detail',
+    })
+  },
+  tabPath(e) {
+    let query = e.detail.detail;
+    if (query) wx.redirectTo({ url: `/pages/${query}/index` })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    // 监听用户是否登录
+    this.watchLogin();
+    // 计算高度
+    this.searchHeight();
+    // 查询数据
+    this.search();
+  },
+  // 查询数据
+  search: function () {
     var that = this;
     wx.request({
       url: `${app.globalData.publicUrl}/courtAdmin/api/match`, //接口地址
@@ -50,33 +77,6 @@ Page({
       }
     })
   },
-  tiao: function (e) {
-    let id= e.currentTarget.dataset.name;
-    console.log(id);
-    wx.navigateTo({
-      url: '/pages/list/index?id='+id,
-    })
-  },
-  xun: function () {
-    wx.navigateTo({
-      url: '/pages/match/detail',
-    })
-  },
-  tabPath(e) {
-    let query = e.detail.detail;
-    if (query) wx.redirectTo({ url: `/pages/${query}/index` })
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    // 监听用户是否登录
-    this.watchLogin();
-    // 计算高度
-    this.searchHeight();
-    // 查询数据
-    this.search();
-  },
   // 监听用户是否登录
   watchLogin: function () {
     wx.getStorage({

+ 1 - 3
pages/home/index.wxml

@@ -1,7 +1,7 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:tabPath="tabPath">
   <view slot="info" class="main" style="height:{{infoHeight}}px;">
     <view class="one">
-      <image style="width: 100%; height: 240px; background-color: #eeeeee;" src="{{src}}"></image>
+      <image class="image" src="{{src}}"></image>
     </view>
     <view class="two">
       <view class="list" wx:key="item" wx:for="{{list}}">
@@ -17,8 +17,6 @@
         <view class="left1">
           <view class="otherInfos">
             <text class="text1">{{item.single_time}}</text>
-            <!-- <text class="text1">{{item.week}}</text>
-            <text class="text1">{{item.time}}</text> -->
           </view>
           <view class="otherInfo textOver"><text class="text3">{{item.address}}</text></view>
         </view>

+ 12 - 2
pages/home/index.wxss

@@ -31,7 +31,8 @@
   color: #0034cf;
   font-weight: bold;
 }
-listbut{
+
+listbut {
   float: left;
   width: 30%;
 }
@@ -41,6 +42,12 @@ listbut{
   border-radius: 25px;
 }
 
+.image {
+  width: 100%;
+  height: 240px;
+  background-color: #eeeeee;
+}
+
 .text1 {
   font-weight: 500;
   margin-right: 3px;
@@ -94,11 +101,13 @@ listbut{
   margin-right: 5px;
   margin-left: 5px;
 }
+
 .otherInfo {
   text-align: left;
   padding: 0 0 15px 5px;
 }
-.otherInfos{
+
+.otherInfos {
   padding: 0 0 0px 5px;
 }
 
@@ -128,6 +137,7 @@ listbut{
   height: 33px;
   overflow: hidden;
 }
+
 .head2 {
   width: 89%;
   height: 36px;

+ 27 - 25
pages/list/index.js

@@ -6,9 +6,9 @@ Page({
    * 页面的初始数据
    */
   data: {
+    frameStyle: { useTop: false, name: '比赛列表', leftArrow: false, useBar: false, tabSelectid: '0' },
     ids: '',
     src: '/image/yun.jpg',
-    frameStyle: { useTop: false, name: '比赛列表', leftArrow: false, useBar: false, tabSelectid: '0' },
     // 主体高度
     infoHeight: '',
     active: 1,
@@ -17,15 +17,31 @@ Page({
     listbang: [],
     listbisai: [],
   },
-   // 监听用户是否登录
-   watchLogin: function () {
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
+  },
+  tabPath(e) {
+    let query = e.detail.detail;
+    if (query) wx.redirectTo({ url: `/pages/${query}/index` })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    this.setData({ids:options.id});
+    // 监听用户是否登录
+    this.watchLogin();
+    // 计算高度
+    this.searchHeight()
+  },
+  // 监听用户是否登录
+  watchLogin: function () {
     wx.getStorage({
       key: 'token',
       success: res => {
         var that = this;
-        let id = that.ids
         wx.request({
-          url: `${app.globalData.publicUrl}/courtAdmin/api/match/` + id, //接口地址
+          url: `${app.globalData.publicUrl}/courtAdmin/api/match/${this.data.ids}`, //接口地址
           method: 'get',
           // data: {},
           success(res) {
@@ -33,12 +49,14 @@ Page({
             if (res.data.errcode == 0) {
               let datas = res.data.data
               if (datas.status == 0) {
-                datas.status = '待比赛'
+                datas.status = '未开始'
               } else if (datas.status == 1) {
-                datas.status = '进行中'
-              } else if (datas.status == 2) {
                 datas.status = '报名中'
+              } else if (datas.status == 2) {
+                datas.status = '待比赛'
               } else if (datas.status == 3) {
+                datas.status = '进行中'
+              }else if (datas.status == 4) {
                 datas.status = '已结束'
               }
               that.setData({
@@ -124,23 +142,7 @@ Page({
       }
     })
   },
-  back: function () {
-    wx.navigateBack({ url: '/pages/home/index' })
-  },
-  tabPath(e) {
-    let query = e.detail.detail;
-    if (query) wx.redirectTo({ url: `/pages/${query}/index` })
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    // 监听用户是否登录
-    this.watchLogin();
-    // 计算高度
-    this.searchHeight()
-    this.ids = options.id;
-  },
+
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 3 - 3
pages/list/index.wxml

@@ -4,21 +4,21 @@
       <view class="onea">
         <cover-image src='/image/back.png' class="back" bindtap='back'></cover-image>
       </view>
-      <image style="width: 100%; height: 240px; background-color: #eeeeee;" src="{{src}}"></image>
+      <image class="image" src="{{src}}"></image>
     </view>
     <view class="two">
       <view class="list">
         <view class="listtou">
           <view class="name">{{list.name}}</view>
-          <view class="listbut"> <button class="button" size="mini" style="background:rgb(238, 147, 28);" wx:if="{{list.status == '进行中'}}">{{list.status}}</button>
+          <view class="listbut"> <button class="button" size="mini" style="background:rgb(238, 147, 28);" wx:if="{{list.status == '未开始'}}">{{list.status}}</button>
             <button class="button" size="mini" style="background:rgb(238, 88, 28);" wx:if="{{list.status == '待比赛'}}">{{list.status}}</button>
             <button class="button" size="mini" style="background:rgb(54, 233, 48)" wx:if="{{list.status == '报名中'}}">{{list.status}}</button>
+            <button class="button" size="mini" style="background:rgb(54, 233, 48)" wx:if="{{list.status == '进行中'}}">{{list.status}}</button>
             <button class="button" size="mini" style="background:rgb(136, 136, 136);" wx:if="{{list.status == '已结束'}}">{{list.status}}</button>
           </view>
         </view>
         <view class="left1">
           <view class="otherInfos">
-            <!-- <text class="text1">{{list.datestart}}</text> -->
             <text class="text1">{{list.match_time}}</text>
           </view>
           <view class="otherInfoq"><text class="text3">{{list.address}}</text></view>

+ 6 - 2
pages/list/index.wxss

@@ -43,7 +43,7 @@
 
 .name {
   float: left;
-  width: 38%;
+  /* width: 38%; */
   margin: 6px;
   margin-left: 10px;
   font-size: 16px;
@@ -388,7 +388,11 @@
   font-weight: 500;
   font-size: 14px;
 }
-
+.image {
+  width: 100%;
+  height: 240px;
+  background-color: #eeeeee;
+}
 .background-image {
   position: relative;
   width: 100%;

+ 6 - 6
pages/login/index.js

@@ -11,12 +11,6 @@ Page({
     infoHeight: '',
     from: {},
   },
-  initValidate() {
-    const rules = { phone: { required: true, tel: true }, password: { required: true, } }
-    // 验证字段的提示信息,若不传则调用默认的信息
-    const messages = { phone: { required: '请输入账号', }, password: { required: '请输入密码', } };
-    this.WxValidate = new WxValidate(rules, messages)
-  },
   // 提交登录
   onSubmit: function (e) {
     const params = e.detail.value;
@@ -64,6 +58,12 @@ Page({
     // 计算高度
     this.searchHeight()
   },
+  initValidate() {
+    const rules = { phone: { required: true, tel: true }, password: { required: true, } }
+    // 验证字段的提示信息,若不传则调用默认的信息
+    const messages = { phone: { required: '请输入账号', }, password: { required: '请输入密码', } };
+    this.WxValidate = new WxValidate(rules, messages)
+  },
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 60 - 64
pages/manage/index.js

@@ -6,22 +6,78 @@ Page({
    * 页面的初始数据
    */
   data: {
-    logo: '',
-    ids: '',
     frameStyle: { useTop: true, name: '团队管理', leftArrow: true, useBar: false },
+    ids: '',
     // 主体高度
     infoHeight: '',
     list: [],
     listbisai: [],
     lists: [],
   },
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
+  },
+  //查询解散团队 参赛团队详情
+  shen: function (e) {
+    let obj = e.currentTarget.dataset;
+    wx.navigateTo({
+      url: '/pages/administration/detail?obj=' + decodeURIComponent(JSON.stringify(obj)),
+    })
+  },
+  //查询团队详情
+  shens: function (e) {
+    let id = e.currentTarget.dataset.name;
+    console.log(id);
+    wx.navigateTo({
+      url: '/pages/administration/details?id=' + id,
+    })
+  },
+  //点击通过
+  out: function (e) {
+    let id = e.currentTarget.dataset.name;
+    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) {
+    // 监听用户是否登录
+    this.watchLogin();
+    // 计算高度
+    this.searchHeight();
+  },
   // 监听用户是否登录
   watchLogin: function () {
     var that = this;
     wx.getStorage({
       key: 'token',
       success: res => {
-        var that = this;
         var list = that.data.list;
         var match_id = that.ids;
         var match_name = list.name;
@@ -86,11 +142,7 @@ Page({
         wx.request({
           url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply`, //接口地址
           method: 'get',
-          data: {
-            // create_id
-            // apply_time
-            // status:that.data.list.status
-          },
+          data: {},
           success(res) {
             console.log('resdis', res.data);
             if (res.data.errcode == 0) {
@@ -124,62 +176,6 @@ Page({
       }
     })
   },
-  back: function () {
-    wx.navigateBack({ url: '/pages/home/index' })
-  },
-  shen: function (e) {
-    let obj = e.currentTarget.dataset;
-    wx.navigateTo({
-      url: '/pages/administration/detail?obj=' + decodeURIComponent(JSON.stringify(obj)),
-    })
-  },
-  shens: function (e) {
-    let id = e.currentTarget.dataset.name;
-    console.log(id);
-    wx.navigateTo({
-      url: '/pages/administration/details?id=' + id,
-    })
-  },
-  //点击通过
-  out: function (e) {
-    let id = e.currentTarget.dataset.name;
-    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) {
-    // 监听用户是否登录
-    this.watchLogin();
-    // 计算高度
-    this.searchHeight();
-  },
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 2 - 3
pages/manage/index.wxml

@@ -40,9 +40,8 @@
             <view class="list" wx:key="item" wx:for="{{lists}}">
               <view class="two">
                 <view class="left">
-                  <!-- <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="group" data-id="{{item._id}}" data-name="{{item.team_id}}" bindtap='shen'>{{item.team_name}}</text>
+                  <text class="person">共{{item.members.length||0}}人</text>
                   <view class="fou"><text>创建人:{{item.create_user}}</text></view>
                   <view class="time"><text class="date">申请时间:{{item.apply_time}}</text></view>
                   <view class="time"><text class="date">解散团队原因:{{item.resaon}}</text></view>

+ 1 - 1
pages/match/detail.js

@@ -7,11 +7,11 @@ Page({
    * 页面的初始数据
    */
   data: {
+    frameStyle: { useTop: true, name: '比赛信息', leftArrow: true, useBar: false },
     src: '/image/detail.jpg',
     src1: '/image/head1.png',
     // 上传图片
     fileList: [],
-    frameStyle: { useTop: true, name: '比赛信息', leftArrow: true, useBar: false },
     // 主体高度
     infoHeight: '',
     listb: [

+ 1 - 1
pages/match/index.wxml

@@ -4,7 +4,7 @@
       <view class="onea">
         <cover-image src='/image/back.png' class="back" bindtap='back'></cover-image>
       </view>
-      <image style="width: 100%; height: 250px; background-color: #eeeeee;" src="{{src}}"></image>
+      <image class="image" src="{{src}}"></image>
     </view>
     <view class="two">
       <view class="two1"><text class="twos">参赛阵容</text></view>

+ 5 - 0
pages/match/index.wxss

@@ -3,6 +3,11 @@
   width: 100%;
   background-color: #ffffff;
 }
+.image{
+  width: 100%; 
+  height: 250px; 
+  background-color: #eeeeee;
+}
 
 .two {
   background-color: #ffffff;

+ 1 - 1
pages/me/index.js

@@ -8,11 +8,11 @@ Page({
    * 页面的初始数据
    */
   data: {
+    frameStyle: { useTop: true, name: '我的', leftArrow: false, useBar: true },
     src: '/image/fen.jpg',
     src3: '/image/huang.png',
     src4: '/image/zan.png',
     showMore: false,
-    frameStyle: { useTop: true, name: '我的', leftArrow: false, useBar: true },
     // 主体高度
     infoHeight: '',
     total: '4',

+ 1 - 2
pages/me/index.wxss

@@ -350,7 +350,7 @@
   margin-top: 12px;
   margin-left: 3px;
   float: left;
-  width: 30%;
+  width: 35%;
 }
 
 .date {
@@ -489,7 +489,6 @@
   width: 24%;
 }
 .six-5 {
-  margin-top: 2%;
   float: left;
   width: 24%;
 }

+ 66 - 0
pages/meMatch/index.js

@@ -0,0 +1,66 @@
+// pages/meMatch/index.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/meMatch/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
pages/meMatch/index.wxml

@@ -0,0 +1,2 @@
+<!--pages/meMatch/index.wxml-->
+<text>pages/meMatch/index.wxml</text>

+ 1 - 0
pages/meMatch/index.wxss

@@ -0,0 +1 @@
+/* pages/meMatch/index.wxss */

+ 9 - 9
pages/register/index.js

@@ -15,15 +15,6 @@ Page({
       { id: '0', type: '管理用户' }, { id: '1', type: '团队创建人' }, { id: '2', type: '个人用户' }],
     cateIndex: 0,
   },
-  initValidate() {
-    //规则
-    const rules = { phone: { required: true, tel: true }, password: { required: true, minlength: 6, maxlength: 16, }, passagain: { required: true, equalTo: 'password', } }
-    const messages = {
-      phone: { required: '请输入账号' }, password: { required: '请输入密码', minlength: '密码长度不能少于6位', maxlength: '密码长度不能超过16位' },
-      passagain: { required: '请填写确认密码', equalTo: '两次密码不一致' }
-    };
-    this.WxValidate = new WxValidate(rules, messages)
-  },
   // 提交注册
   onSubmit: function (e) {
     const params = e.detail.value;
@@ -82,6 +73,15 @@ Page({
     var cindex = this.data.cateIndex
     type = this.data.cateArray[cindex].id
   },
+  initValidate() {
+    //规则
+    const rules = { phone: { required: true, tel: true }, password: { required: true, minlength: 6, maxlength: 16, }, passagain: { required: true, equalTo: 'password', } }
+    const messages = {
+      phone: { required: '请输入账号' }, password: { required: '请输入密码', minlength: '密码长度不能少于6位', maxlength: '密码长度不能超过16位' },
+      passagain: { required: '请填写确认密码', equalTo: '两次密码不一致' }
+    };
+    this.WxValidate = new WxValidate(rules, messages)
+  },
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 63 - 10
pages/search/index.js

@@ -7,13 +7,14 @@ Page({
    * 页面的初始数据
    */
   data: {
-    src: '/image/home.png',
     frameStyle: { useTop: true, name: '查询比赛', leftArrow: false, useBar: true },
+    src: '/image/home.png',
     // 主体高度
     infoHeight: '',
     list: [],
     listend: [],
   },
+  //跳转详情
   tiao: function (e) {
     let id = e.currentTarget.dataset.name;
     console.log(id);
@@ -30,6 +31,15 @@ Page({
     let query = e.detail.detail;
     if (query) wx.redirectTo({ url: `/pages/${query}/index` })
   },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    // 计算高度
+    this.searchHeight();
+    // 监听用户是否登录
+    this.watchLogin();
+  },
   // 监听用户是否登录
   watchLogin: function () {
     var that = this;
@@ -80,15 +90,58 @@ Page({
         return wx.redirectTo({ url: '/pages/login/index', })
       }
     })
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    // 计算高度
-    this.searchHeight();
-    // 监听用户是否登录
-    this.watchLogin();
+  },// 监听用户是否登录
+  watchLogin: function () {
+    var that = this;
+    wx.getStorage({
+      key: 'token',
+      success: res => {
+        wx.request({
+          url: `${app.globalData.publicUrl}/courtAdmin/api/match`, //接口地址
+          method: 'get',
+          data: {},
+          success(res) {
+            console.log('res', res.data);
+            if (res.data.errcode == 0) {
+              let datas = res.data.data
+              let datass = []
+              let datasss = []
+              for (let i = 0; i < datas.length; i++) {
+                if (datas[i].status == 0) {
+                  datas[i].status = '未开始'
+                  datass.push(datas[i])
+                } else if (datas[i].status == 1) {
+                  datas[i].status = '报名中'
+                  datass.push(datas[i])
+                } else if (datas[i].status == 2) {
+                  datas[i].status = '待比赛'
+                  datass.push(datas[i])
+                } else if (datas[i].status == 3) {
+                  datas[i].status = '进行中'
+                  datasss.push(datas[i])
+                }else if (datas[i].status == 4) {
+                  datas[i].status = '已结束'
+                  datasss.push(datas[i])
+                }
+              }
+              that.setData({
+                list: datass,
+                listend: datasss,
+              });
+            } else {
+              wx.showToast({
+                title: res.data.errmsg,
+                icon: 'none',
+                duration: 2000
+              })
+            }
+          }
+        })
+      },
+      fail: res => {
+        return wx.redirectTo({ url: '/pages/login/index', })
+      }
+    })
   },
   // 计算高度
   searchHeight: function () {

+ 9 - 4
pages/search/index.wxml

@@ -6,10 +6,15 @@
           <van-tab title="待参加" name="a" style="font-weight: 500;">
             <view class="beijing1" wx:key="item" wx:for="{{list}}">
               <view class="list1">
-              <view>
-               <view class="names" data-name="{{item._id}}" bindtap="tiao">{{item.name}}</view>
-                <button class="button" size="mini">{{item.status}}</button>
-              </view>
+                <view>
+                  <view class="names" data-name="{{item._id}}" bindtap="tiao">{{item.name}}</view>
+                  <view class="listbut"> <button class="button" size="mini" style="background:rgb(238, 147, 28);" wx:if="{{item.status == '未开始'}}">{{item.status}}</button>
+                    <button class="button" size="mini" style="background:rgb(238, 88, 28);" wx:if="{{item.status == '待比赛'}}">{{item.status}}</button>
+                    <button class="button" size="mini" style="background:rgb(54, 233, 48)" wx:if="{{item.status == '报名中'}}">{{item.status}}</button>
+                    <button class="button" size="mini" style="background:rgb(54, 233, 48)" wx:if="{{item.status == '进行中'}}">{{item.status}}</button>
+                    <button class="button" size="mini" style="background:rgb(136, 136, 136);" wx:if="{{item.status == '已结束'}}">{{item.status}}</button>
+                  </view>
+                </view>
                 <view class="leftmueen">
                   <view class="otherInfos">
                     <text class="text9">{{item.single_time}}</text>

+ 39 - 39
pages/team/apply.js

@@ -8,54 +8,17 @@ Page({
    * 页面的初始数据
    */
   data: {
+    frameStyle: { useTop: false, name: '团队审核', leftArrow: true, useBar: false },
     user_id: '',
     apply_time: '',
     ids: '',
     src: '/image/adimges.jpg',
     src1: '/image/head1.png',
-    frameStyle: { useTop: false, name: '团队审核', leftArrow: true, useBar: false },
     // 主体高度
     infoHeight: '',
     list: [],
     lists: [],
   },
-  // 监听用户是否登录
-  watchLogin: function () {
-    var that = this;
-    let id = that.ids
-    wx.getStorage({
-      key: 'token',
-      success: res => {
-        this.setData({
-          user_id: res.data.id,
-        })
-        //查询数据
-        wx.request({
-          url: `${app.globalData.publicUrl}/courtAdmin/api/team/` + id, //接口地址
-          method: 'get',
-          data: '',
-          success(res) {
-            if (res.data.errcode == 0) {
-              let datas = res.data.data
-              console.log('单', datas);
-              that.setData({
-                list: datas,
-              });
-            } else {
-              wx.showToast({
-                title: res.data.errmsg,
-                icon: 'none',
-                duration: 2000
-              })
-            }
-          }
-        })
-      },
-      fail: res => {
-        return wx.redirectTo({ url: '/pages/login/index', })
-      }
-    })
-  },
   tabPath(e) {
     let query = e.detail.detail;
     if (query) wx.redirectTo({ url: `/pages/${query}/index` })
@@ -145,10 +108,47 @@ Page({
     });
     // 计算高度
     this.searchHeight()
-    this.ids = options.id;
+    this.setData({ ids: options.id });
     // 监听用户是否登录
     this.watchLogin();
   },
+  // 监听用户是否登录
+  watchLogin: function () {
+    var that = this;
+    let id = that.ids
+    wx.getStorage({
+      key: 'token',
+      success: res => {
+        this.setData({
+          user_id: res.data.id,
+        })
+        //查询数据
+        wx.request({
+          url: `${app.globalData.publicUrl}/courtAdmin/api/team/` + id, //接口地址
+          method: 'get',
+          data: '',
+          success(res) {
+            if (res.data.errcode == 0) {
+              let datas = res.data.data
+              console.log('单', datas);
+              that.setData({
+                list: datas,
+              });
+            } else {
+              wx.showToast({
+                title: res.data.errmsg,
+                icon: 'none',
+                duration: 2000
+              })
+            }
+          }
+        })
+      },
+      fail: res => {
+        return wx.redirectTo({ url: '/pages/login/index', })
+      }
+    })
+  },
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 1 - 1
pages/team/apply.wxml

@@ -8,7 +8,7 @@
         <view class="ones">
           <text>团队信息</text>
         </view>
-        <image style="width: 100%; height: 280px; background-color: #eeeeee;" src="{{src}}"></image>
+        <image class="image" src="{{src}}"></image>
       </view>
       <view class="one-2">
         <image class="imgs" src="{{list.logo[0].url}}"></image>

+ 5 - 0
pages/team/apply.wxss

@@ -134,6 +134,11 @@
   padding-top: 180px;
   padding-bottom: 20px;
 }
+.image {
+  width: 100%;
+  height: 240px;
+  background-color: #eeeeee;
+}
 .button{
   margin-top: 5px !important;
   width: 300px !important;

+ 16 - 16
pages/team/examine.js

@@ -7,10 +7,10 @@ Page({
    * 页面的初始数据
    */
   data: {
+    frameStyle: { useTop: false, name: '团队详情', leftArrow: true, useBar: false },
     ids: '',
     src: '/image/adimges.jpg',
     src1: '/image/head1.png',
-    frameStyle: { useTop: false, name: '团队详情', leftArrow: true, useBar: false },
     // 主体高度
     infoHeight: '',
     list: [
@@ -60,8 +60,21 @@ Page({
       },
     ],
   },
-  // 监听用户是否登录
-  watchLogin: function () {
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    // 计算高度
+    this.searchHeight()
+    this.ids = options.id;
+    // 监听用户是否登录
+    this.watchLogin();
+  },
+   // 监听用户是否登录
+   watchLogin: function () {
     var that = this;
     let id = that.ids
     wx.getStorage({
@@ -122,19 +135,6 @@ Page({
       }
     })
   },
-  back: function () {
-    wx.navigateBack({ url: '/pages/home/index' })
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    // 计算高度
-    this.searchHeight()
-    this.ids = options.id;
-    // 监听用户是否登录
-    this.watchLogin();
-  },
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 1 - 8
pages/team/examine.wxml

@@ -8,7 +8,7 @@
         <view class="ones">
           <text>团队详情</text>
         </view>
-        <image style="width: 100%; height: 280px; background-color: #eeeeee;" src="{{src}}"></image>
+        <image class="image" src="{{src}}"></image>
       </view>
       <view class="one-2">
         <image class="imgs" src="{{list.logo[0].url}}"></image>
@@ -48,13 +48,6 @@
           <view class="thr-right"><text class="name textOver">{{item.nickname}}</text> </view>
         </view>
       </view>
-      <!-- <view class="thr-2">
-        <view class="thr2">
-          <view class="thr3">
-            <text class=" icon iconfont icon-jia"></text>
-          </view>
-        </view>
-      </view> -->
     </view>
     <view class="four">
       <view class="four1">

+ 6 - 2
pages/team/examine.wxss

@@ -102,6 +102,11 @@
   font-weight: 550;
   margin-right: 10px;
 }
+.image {
+  width: 100%;
+  height: 240px;
+  background-color: #eeeeee;
+}
 
 .thr-left {
   width: 79%;
@@ -161,8 +166,7 @@
 
 .group {
   color: #ffffff;
-  margin-top: 20%;
-  margin-left: 21%;
+  margin-top: 10%;
   margin-bottom: 10%;
 }
 

+ 14 - 12
pages/team/index.js

@@ -7,9 +7,9 @@ Page({
    * 页面的初始数据
    */
   data: {
+    frameStyle: { useTop: true, name: '我的团队', leftArrow: false, useBar: true },
     type: '',
     src: '/image/team.png',
-    frameStyle: { useTop: true, name: '我的团队', leftArrow: false, useBar: true },
     // 主体高度
     infoHeight: '',
     list: [],
@@ -18,20 +18,31 @@ Page({
     let query = e.detail.detail;
     if (query) wx.redirectTo({ url: `/pages/${query}/index` })
   },
+  //跳转查看
   tiao: function (e) {
     let id = e.currentTarget.dataset.name;
     wx.navigateTo({
       url: '/pages/team/examine?id=' + id,
     })
   },
+  //跳转加入
   jump: function (e) {
     let id = e.currentTarget.dataset.name;
     wx.navigateTo({
       url: '/pages/team/apply?id=' + id,
     })
   },
-  // 监听用户是否登录
-  watchLogin: function () {
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    // 计算高度
+    this.searchHeight()
+    // 监听用户是否登录
+    this.watchLogin();
+  },
+   // 监听用户是否登录
+   watchLogin: function () {
     var that = this;
     wx.getStorage({
       key: 'token',
@@ -77,15 +88,6 @@ Page({
       }
     })
   },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    // 计算高度
-    this.searchHeight()
-    // 监听用户是否登录
-    this.watchLogin();
-  },
   // 计算高度
   searchHeight: function () {
     let frameStyle = this.data.frameStyle;

+ 1 - 2
pages/teamDetails/detail.wxss

@@ -170,8 +170,7 @@
 
 .group {
   color: #ffffff;
-  margin-top: 20%;
-  margin-left: 21%;
+  margin-top: 10%;
   margin-bottom: 10%;
 }