zs 3 gadi atpakaļ
vecāks
revīzija
d1d4b58908

+ 1 - 0
app.json

@@ -6,6 +6,7 @@
     "pages/search/index",
     "pages/administration/index",
     "pages/administration/detail",
+    "pages/administration/details",
     "pages/team/index",
     "pages/team/examine",
     "pages/list/index",

+ 5 - 5
pages/administration/detail.wxml

@@ -11,11 +11,11 @@
         <image style="width: 100%; height: 280px; background-color: #eeeeee;" src="{{src}}"></image>
       </view>
       <view class="one-2">
-        <image class="imgs" src="{{list.logo}}"></image>
+        <image class="imgs" src="{{list.logo[0].url}}"></image>
       </view>
       <view class="one-3">
-        <view class="group">{{list.name}}</view>
-        <view class="person">共{{item.menber.length||0}}人</view>
+        <view class="group textOver">{{list.name}}</view>
+        <view class="person">共{{list.members.length||0}}人</view>
       </view>
     </view>
     <view class="two">
@@ -43,9 +43,9 @@
       <view class="thr-1" wx:key="item" wx:for="{{list.members}}">
         <view class="thr1">
           <view class="thr-left">
-            <image class="img" src="{{item.logo}}"></image>
+            <image class="img" src="{{item.icon[0].url}}"></image>
           </view>
-          <view class="thr-right"><text class="name">{{item.name}}</text> </view>
+          <view class="thr-right"><text class="name">{{item.nickname}}</text> </view>
         </view>
       </view>
       <view class="thr-2">

+ 7 - 4
pages/administration/detail.wxss

@@ -33,8 +33,8 @@
 .one-3{
   position: absolute;
   top: 29%;
-  left: 42%;
-  width: 23%;
+  left: 43.5%;
+  width: 12%;
   height: 63.78px;
 }
 .imgs{
@@ -76,6 +76,8 @@
   margin-right: 2%;
 }
 .thr{
+  float: left;
+  width: 100%;
   padding-top: 15px;
   background-color: #ffffff;
 }
@@ -131,12 +133,13 @@
   margin-left: 23%;
 }
 .four{
+  float: left;
+  width: 100%;
   background-color: white;
 }
 .four-1{
   background-color: white;
   width: 100%;
-  height: 280px;
   margin-top: 10%;
 }
 .four1{
@@ -183,7 +186,7 @@
 .group{
   color: #ffffff;
   margin-top: 20%;
-  margin-left: 2%;
+  text-align: center;
   margin-bottom: 10%;
 }
 .person{

+ 124 - 0
pages/administration/details.js

@@ -0,0 +1,124 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    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 => {
+        //查询数据
+        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', })
+      }
+    })
+  },
+  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;
+    let client = app.globalData.client;
+    // 减去状态栏
+    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/administration/details.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/mobile-main"
+  }
+}

+ 70 - 0
pages/administration/details.wxml

@@ -0,0 +1,70 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <view class="one-1">
+        <view class="onea">
+          <cover-image src='/image/back.png' class="back" bindtap='back'></cover-image>
+        </view>
+        <view class="ones">
+          <text>团队信息</text>
+        </view>
+        <image style="width: 100%; height: 280px; background-color: #eeeeee;" src="{{src}}"></image>
+      </view>
+      <view class="one-2">
+        <image class="imgs" src="{{list.logo[0].url}}"></image>
+      </view>
+      <view class="one-3">
+        <view class="group textOver">{{list.name}}</view>
+        <view class="person">共{{list.members.length||0}}人</view>
+      </view>
+    </view>
+    <view class="two">
+      <view class="two-1">
+        <view class="two1">
+          <view class="two-left1">
+            <text class=" icon iconfont icon-dian"></text>
+          </view>
+          <view class="two-right1">
+            <view><text class="zi">创建人:</text>{{list.create_user}}</view>
+          </view>
+        </view>
+        <view class="two2">
+          <view class="two-left2">
+            <text class=" icon iconfont icon-dian"></text>
+          </view>
+          <view class="two-right2">
+            <view><text class="zi">创建时间:</text><text class="date">{{list.create_time}}</text></view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="thr">
+      <view><text class="tuan">队员信息</text></view>
+      <view class="thr-1" wx:key="item" wx:for="{{list.members}}">
+        <view class="thr1">
+          <view class="thr-left">
+            <image class="img" src="{{item.icon[0].url}}"></image>
+          </view>
+          <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>
+  </view>
+</mobile-main>

+ 197 - 0
pages/administration/details.wxss

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

+ 7 - 0
pages/manage/index.js

@@ -135,6 +135,13 @@ Page({
       url: '/pages/administration/detail?id='+id,
     })
   },
+  shens: function (e) {
+    let id= e.currentTarget.dataset.name;
+    console.log(id);
+    wx.navigateTo({
+      url: '/pages/administration/details?id='+id,
+    })
+  },
   out: function (e){
     debugger
     let id= e.currentTarget.dataset.name;

+ 1 - 1
pages/manage/index.wxml

@@ -4,7 +4,7 @@
       <van-tabs active="{{ active }}">
         <van-tab title="全部团队">
           <view>
-            <view class="list" wx:key="item" wx:for="{{list}}" data-name="{{item._id}}" bindtap='shen'>
+            <view class="list" wx:key="item" wx:for="{{list}}" data-name="{{item._id}}" bindtap='shens'>
               <view class="two">
                 <view class="left">
                   <image class="head" src="{{item.logo[0].url}}"></image>

+ 4 - 0
pages/manage/index.wxss

@@ -5,6 +5,10 @@
 .van-tabs__line {
   background-color: blue !important;
 }
+.one{
+  margin-top: -5px;
+}
+
 .list{
   margin-top: 5%;
 }

+ 88 - 46
pages/ranking/index.js

@@ -11,52 +11,92 @@ Page({
     frameStyle: { useTop: true, name: '团队排名', leftArrow: true, useBar: false },
     // 主体高度
     infoHeight: '',
-    list: [{
-      id: 1,
-      name: "哈拉海队幼儿组",
-      head: '/image/head2.png',
-      score1: "9",
-      score2: "0"
-    }, {
-      id: 2,
-      name: "哈拉海队幼儿组",
-      head: '/image/head2.png',
-      score1: "1",
-      score2: "0"
-    }, {
-      id: 3,
-      name: "哈拉海队幼儿组",
-      head: '/image/head2.png',
-      score1: "1",
-      score2: "0"
-    }, {
-      id: 4,
-      name: "哈拉海队幼儿组",
-      head: '/image/head2.png',
-      score1: "1",
-      score2: "1"
-    }],
-    lists: [{
-      id: 1,
-      name: "哈拉海队幼儿组",
-      head: '/image/head2.png',
-      score: "9",
-    }, {
-      id: 2,
-      name: "哈拉海队幼儿组",
-      head: '/image/head2.png',
-      score: "1",
-    }, {
-      id: 3,
-      name: "哈拉海队幼儿组",
-      head: '/image/head2.png',
-      score: "1",
-    }, {
-      id: 4,
-      name: "哈拉海队幼儿组",
-      head: '/image/head2.png',
-      score: "1",
-    }],
+    list: [
+    //   {
+    //   id: 1,
+    //   name: "哈拉海队幼儿组",
+    //   head: '/image/head2.png',
+    //   score1: "9",
+    //   score2: "0"
+    // }, {
+    //   id: 2,
+    //   name: "哈拉海队幼儿组",
+    //   head: '/image/head2.png',
+    //   score1: "1",
+    //   score2: "0"
+    // }, {
+    //   id: 3,
+    //   name: "哈拉海队幼儿组",
+    //   head: '/image/head2.png',
+    //   score1: "1",
+    //   score2: "0"
+    // }, {
+    //   id: 4,
+    //   name: "哈拉海队幼儿组",
+    //   head: '/image/head2.png',
+    //   score1: "1",
+    //   score2: "1"
+    // }
+  ],
+    lists: [
+    //   {
+    //   id: 1,
+    //   name: "哈拉海队幼儿组",
+    //   head: '/image/head2.png',
+    //   score: "9",
+    // }, {
+    //   id: 2,
+    //   name: "哈拉海队幼儿组",
+    //   head: '/image/head2.png',
+    //   score: "1",
+    // }, {
+    //   id: 3,
+    //   name: "哈拉海队幼儿组",
+    //   head: '/image/head2.png',
+    //   score: "1",
+    // }, {
+    //   id: 4,
+    //   name: "哈拉海队幼儿组",
+    //   head: '/image/head2.png',
+    //   score: "1",
+    // }
+  ],
+  },
+  // 监听用户是否登录
+  watchLogin: function () {
+    wx.getStorage({
+      key: 'token',
+      success: res => {
+        var that = this;
+        // var list = that.data.list;
+        // var match_id = that.ids;
+        // var match_name = list.name;
+        wx.request({
+          url: `${app.globalData.publicUrl}/courtAdmin/api/matchteam`, //接口地址
+          method: 'get',
+          data:'',
+          success(res) {
+            if (res.data.errcode == 0) {
+              let datacan = res.data.data
+              console.log('排名',datacan);
+              that.setData({
+                list: datacan,
+                lists: datacan,
+              });
+            } 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' })
@@ -65,6 +105,8 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    // 监听用户是否登录
+    this.watchLogin();
     // 计算高度
     this.searchHeight()
   },

+ 6 - 6
pages/ranking/index.wxml

@@ -11,12 +11,12 @@
           <view class="list {{index < 3 ? 'select-item' : 'dis-select-item'}}" wx:key="item" wx:for="{{list}}">
             <view class="item sortContent" v-for="(item,index) of list" :key="index">
               <view class="pai {{index < 3 ? 'pai1' : 'pai'}}">{{index+1}}</view>
-              <image class="headtou" src="{{item.head}}"></image>
+              <image class="headtou" src="{{item.logo}}"></image>
               <view class="dui">
-                {{item.name}}
+                {{item.team_name}}
               </view>
               <view class="fen">
-                <text class="score1 {{index < 3 ? 'scorea' : 'scoreb'}}">{{item.score1}}</text>/ <text>{{item.score2}}</text>
+                <text class="score1 {{index < 3 ? 'scorea' : 'scoreb'}}">{{item.win}}</text>/ <text>{{item.shu}}</text>
               </view>
             </view>
           </view>
@@ -30,12 +30,12 @@
           <view class="lists" wx:key="item" wx:for="{{lists}}">
             <view class="item sortContent" v-for="(item,index) of list" :key="index">
               <view class="pai">{{index+1}}</view>
-              <image class="headtou" src="{{item.head}}"></image>
+              <image class="headtou" src="{{item.logo}}"></image>
               <view class="dui">
-                {{item.name}}
+                {{item.team_name}}
               </view>
               <view class="fen">
-                <text class="score1">{{item.score}}</text>
+                <text class="score1">{{item.integral}}</text>
               </view>
             </view>
           </view>

+ 2 - 2
pages/search/index.wxss

@@ -122,7 +122,7 @@
 }
 
 button {
-  margin-top: 4px;
+  margin-top: 5px;
   background-color: rgb(238, 88, 28);
   border-radius: 15px;
   font-size: 13px !important;
@@ -130,7 +130,7 @@ button {
 }
 
 .buttonend {
-  margin-top: 4px;
+  margin-top: 5px;
   background-color: rgb(136, 136, 136);
   border-radius: 15px;
   font-size: 13px !important;

+ 27 - 3
pages/team/apply.js

@@ -8,6 +8,7 @@ Page({
    * 页面的初始数据
    */
   data: {
+    user_id:'',
     apply_time:'',
     ids: '',
     src: '/image/adimges.jpg',
@@ -25,6 +26,9 @@ Page({
     wx.getStorage({
       key: 'token',
       success: res => {
+        this.setData({
+          user_id: res.data.id,
+        })
         //查询数据
         wx.request({
           url: `${app.globalData.publicUrl}/courtAdmin/api/team/` + id, //接口地址
@@ -63,8 +67,8 @@ Page({
       team_name: obj.name,
       apply_time: this.data.apply_time,
       apply_user: obj.user,
-      apply_id: '1'
-      // apply_id: obj.cid
+      // apply_id: '1'
+      apply_id: obj.cid
     }
     // wx.navigateTo({
     //   url: '/pages/add/index?obj=' + decodeURIComponent(JSON.stringify(obj)),
@@ -105,7 +109,27 @@ Page({
       content: '是否确认退出团队',
       success(res) {
         if (res.confirm) {
-
+          var team_id =this.data.list.id;
+          var user_id =this.data.user_id;
+          wx.request({
+            url: `${app.globalData.publicUrl}/courtAdmin/api/team/leaves`, //接口地址
+            method: 'get',
+            data: {
+              "team_id":team_id,
+              "user_id":user_id
+            },
+            success(res) {
+              if (res.data.errcode == 0) {
+                wx.showToast({ title: `退出团队成功`, icon: 'success', duration: 2000 }) //创建成功提示
+              } else {
+                wx.showToast({
+                  title: res.data.errmsg,
+                  icon: 'none',
+                  duration: 2000
+                })
+              }
+            }
+          })
         } else if (res.cancel) {
           console.log('用户点击取消')
         }

+ 3 - 3
pages/team/apply.wxml

@@ -16,7 +16,7 @@
     </view>
     <view class="one-3">
       <view class="group">{{list.name}}<text class=" icon iconfont icon-C1" wx:if="{{list.type}}"></text></view>
-      <view class="person">共{{item.members.length||0}}人</view>
+      <view class="person">共{{list.members.length||0}}人</view>
     </view>
     <view class="two">
       <view class="two-1">
@@ -43,9 +43,9 @@
       <view class="thr-1" wx:key="item" wx:for="{{list.members}}">
         <view class="thr1">
           <view class="thr-left">
-            <image class="img" src="{{list.logo[0].url}}"></image>
+            <image class="img" src="{{item.icon[0].url}}"></image>
           </view>
-          <view class="thr-right"><text class="name">{{item.name}}</text> </view>
+          <view class="thr-right"><text class="name">{{item.nickname}}</text> </view>
         </view>
       </view>
     </view>

+ 1 - 1
pages/team/examine.js

@@ -103,7 +103,7 @@ Page({
           success(res) {
             if (res.data.errcode == 0) {
               let datas = res.data.data
-              console.log('团队详情', datas);
+              console.log('参赛历史', datas);
               that.setData({
                 listend: datas,
               });

+ 4 - 4
pages/team/examine.wxml

@@ -14,8 +14,8 @@
         <image class="imgs" src="{{list.logo[0].url}}"></image>
       </view>
       <view class="one-3">
-      <view class="group">{{list.name}}</view>
-      <view class="person">共{{item.members.length||0}}人</view>
+      <view class="group textOver">{{list.name}}</view>
+      <view class="person">共{{list.members.length||0}}人</view>
     </view>
     </view>
     <view class="two">
@@ -43,9 +43,9 @@
       <view class="thr-1" wx:key="item" wx:for="{{list.members}}">
         <view class="thr1">
           <view class="thr-left">
-            <image class="img" src="{{list.logo[0].url}}"></image>
+            <image class="img" src="{{item.icon[0].url}}"></image>
           </view>
-          <view class="thr-right"><text class="name">{{item.name}}</text> </view>
+          <view class="thr-right"><text class="name">{{item.nickname}}</text> </view>
         </view>
       </view>
       <view class="thr-2">

+ 1 - 1
pages/team/examine.wxss

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

+ 1 - 1
pages/team/index.wxml

@@ -16,7 +16,7 @@
     <view class="list" wx:key="item" wx:for="{{list}}">
       <view class="two">
         <view class="left">
-          <image class="head" src="{{item.logo}}"></image>
+          <image class="head" src="{{item.logo[0].url}}"></image>
           <text class="group">{{item.name}}</text>
           <text class="person">共{{item.members.length||0}}人</text>
           <view class="fou"><text>创建人:{{item.create_user}}</text></view>