Jelajahi Sumber

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

zs 3 tahun lalu
induk
melakukan
b5b4a703b1

+ 2 - 1
commpents/upload/index.js

@@ -7,7 +7,8 @@ Component({
   options: { multipleSlots: true },
   properties: {
     list: { type: 'array', value: [] },
-    count: { type: Number, value: 1 }
+    count: { type: Number, value: 1 },
+    previewSize: { type: String, value: '60' }
   },
 
   // 生命周期函数,可以为函数,或一个在methods段中定义的方法名

+ 1 - 1
commpents/upload/index.wxml

@@ -1 +1 @@
-<van-uploader file-list="{{list}}" max-count="{{count}}" bind:after-read="imgUpload" bind:delete="imgDel" />
+<van-uploader file-list="{{list}}" max-count="{{count}}" bind:after-read="imgUpload" bind:delete="imgDel" preview-size="{{previewSize}}" />

+ 1 - 0
commpents/upload/read.md

@@ -2,6 +2,7 @@
 ## 参数
 ### 图片存储列表:list
 ### 图片上传数量限制:count
+### 自定义预览大小:previewSize
 
 ## 方法
 ### 上传图片---imgUpload

+ 1 - 1
pages/createTeam/index.wxml

@@ -42,7 +42,7 @@
                                     <image bindtap='delList' class="two_jian" src="/image/jian.png"></image>
                                 </view>
                                 <view class="team_text">
-                                    <input class="input1" value="{{item.nickname}}" placeholder="队员名称" />
+                                    <text class="input1" value="{{item.nickname}}"></text>
                                 </view>
                             </view>
                             <view class="two_1">

+ 26 - 25
pages/me/index.wxml

@@ -19,12 +19,12 @@
         <view class="right1">
           <image src="{{icon}}" class="tou"></image>
         </view>
-        <view class="otherInfo textOver">
+        <view class="otherInfo1 textOver">
           <view class="biao">
-            <text class=" icon iconfont icon-qi"></text>
+            <text class=" icon iconfont icon-qi" wx:if="{{item1.name}}"></text>
           </view>
           <view class="qian">
-            <text class="text3" wx:if="{{item1.type=='2'||item1.type=='3'}}">{{item1.name}}</text>
+            <text class="text3" wx:if="{{item1.type=='1'||item1.type=='2'}}">{{item1.name}}</text>
           </view>
           <view class="icon_arrow" bindtap="modify">
             <van-icon name="arrow" color="rgb(177, 177, 177)" />
@@ -32,15 +32,16 @@
         </view>
       </view>
     </view>
-    <view class="thr">
-      <view class="left2">
-        <text class="text4">可对正在进行的比赛上次比分</text>
-      </view>
-      <view class="right2" bindtap="upload">
-        <button class="buttons" size="mini">上传比分</button>
+
+    <view class="four" wx:if="{{item1.type=='1'}}">
+      <view class="thr">
+        <view class="left2">
+          <text class="text4">可对正在进行的比赛上次比分</text>
+        </view>
+        <view class="right2" bindtap="upload">
+          <button class="buttons" size="mini">上传比分</button>
+        </view>
       </view>
-    </view>
-    <view class="four" wx:if="{{listbisai.length!=0}}">
       <image src="{{src3}}" class="huang"></image>
       <view class="list1">
         <view class="left3">
@@ -82,26 +83,26 @@
       </view>
     </view>
     <view class="five">
-      <view class="listtuan" wx:if="{{total!=''}}">
+      <view class="listtuan" wx:if="{{item1.type=='1'||item1.type=='2'}}">
         <view class="otherInfo">
-          <text class="tuan">我的团队</text>
-          <text class="total">共参加{{list3.length||0}}个队伍</text>
-          <text class="chuang" bindtap="create" wx:if="{{list3.length<1||item1.type=='1'}}">创建团队</text>
+          <view class="otherInfo_1">
+            <text class="tuan">我的团队</text>
+            <text class="total">共参加{{list3.length||0}}个队伍</text>
+            <text class="chuang" bindtap="create" wx:if="{{list3.length<1&&item1.type=='1'}}">创建团队</text>
+          </view>
         </view>
         <view class="weui-cells mgt-0 {{!showMore? 'hiddenmore' : 'showmore'}}">
-          <view wx:key="item" wx:for="{{list3}}" wx:for-index="idx" wx:key="key"  class="list3 {{idx>1 ? 'more-item' : ''}}">
+          <view wx:key="item" wx:for="{{list3}}" wx:for-index="idx" wx:key="key" class="list3 {{idx>1 ? 'more-item' : ''}}">
             <view class="dui-left">
               <view class="dui-left1">
                 <image src="{{item.logo[0].url}}" class="dui-image"></image>
               </view>
-              <view class="dui-right1 textOver" >
+              <view class="dui-right1 textOver">
                 <text class="group" bindtap="ToDetails" data-id="{{item._id}}">{{item.name}}</text>
               </view>
               <button class="ball" size="mini" wx:if="{{item.type=='0'}}" style="background-color:rgb(63, 127, 245);">乒乓球</button>
               <button class="ball" size="mini" wx:if="{{item.type=='1'}}" style="background-color:rgb(245, 172, 63);">足球</button>
               <button class="ball" size="mini" wx:if="{{item.type=='2'}}" style="background-color:rgb(241, 95, 127);">篮球</button>
-              <!-- <text class=" icon iconfont icon-C1" wx:if="{{item.grade}}"></text>
-              <button class="grade" size="mini">c</button> -->
             </view>
             <view class="dui-right"><text class="person">
                 共{{item.members.length||0}}人
@@ -120,14 +121,14 @@
         </view>
 
       </view>
-      <view class="list0" wx:if="{{total==''}}">
+      <view class="list0" wx:if="{{item1.type=='0'}}">
         <view class="otherInfo">
           <text class="tuan">我的团队</text>
           <text class="total1">暂无加入任何团队</text>
-          <text class="chuang">创建团队</text>
+          <!-- <text class="chuang">创建团队</text> -->
         </view>
         <view class="jian">
-          <view class="viewjian"><text class="jiantext">创建或加入一个团队进行比赛</text></view>
+          <view class="viewjian"><text class="jiantext">该账号无法加入或创建团队</text></view>
         </view>
       </view>
     </view>
@@ -149,7 +150,7 @@
           <text class="six-text">修改密码</text>
         </view>
       </view>
-      <view class="six-2" bindtap="examine">
+      <view class="six-2" bindtap="examine" wx:if="{{item1.type=='1'}}">
         <view class="six-left">
           <text class=" icon iconfont icon-shenhe"></text>
         </view>
@@ -157,7 +158,7 @@
           <text class="six-text">审核队员</text>
         </view>
       </view>
-      <view class="six-3" bindtap="clickme">
+      <view class="six-3" bindtap="clickme" wx:if="{{item1.type=='1'}}">
         <view class="six-left">
           <text class=" icon iconfont icon-ren_jiesantuandui_line"></text>
         </view>
@@ -186,7 +187,7 @@
         <text class="modal_text1">解散团队</text>
         <text class="modal_text2">{{list3[0].name}}</text>
         <text class="modal_text3">解散的团队不可恢复</text>
-        <button bindtap="apply" data-id="{{list3[0]._id}}"class="modal_button">解散申请</button>
+        <button bindtap="apply" data-id="{{list3[0]._id}}" class="modal_button">解散申请</button>
         <text bindtap="go" class="modal_text4">取消</text>
       </view>
     </view>

+ 52 - 27
pages/me/index.wxss

@@ -8,15 +8,18 @@
   float: left;
   width: 3%;
 }
-.qian{
+
+.qian {
   float: left;
   width: 80%;
 }
-.icon_arrow{
+
+.icon_arrow {
   float: right;
   width: 6%;
 
 }
+
 .theme {
   position: fixed;
   margin-top: 5.5%;
@@ -32,9 +35,9 @@
 }
 
 .two {
-  position: absolute;
-  top: 20%;
-  left: 3.5%;
+  position: relative;
+  top: -50px;
+  left: 12px;
   width: 93%;
   border-radius: 15px;
   background-color: #fff;
@@ -51,7 +54,7 @@
 .name {
   margin-top: 10px;
   float: left;
-  width: 20%;
+  width: 30%;
   font-size: 16px;
   font-weight: 600;
   text-align: center;
@@ -79,9 +82,20 @@
   margin-right: 185px;
 }
 
+.otherInfo1 {
+  text-align: left;
+  padding: 10px 10px 10px 5px;
+}
+
 .otherInfo {
   text-align: left;
   padding: 10px 10px 10px 5px;
+  height: 30px;
+}
+
+.otherInfo_1 {
+  position: relative;
+  top: -35px;
 }
 
 .buttons {
@@ -93,10 +107,9 @@
 }
 
 .thr {
-  width: 83%;
-  height: 38px;
-  margin-top: 13%;
-  margin-left: 10%;
+  width: 85%;
+  /* height: 38px; */
+  margin: -35px 30px 0 30px;
   background-color: rgb(217, 235, 250);
   border-radius: 7px;
 }
@@ -109,7 +122,7 @@
 
 .left2 {
   float: left;
-  width: 65%;
+  width: 75%;
   margin-top: 9px;
 }
 
@@ -118,9 +131,10 @@
 }
 
 .four {
-  position: relative;
+  /* position: relative;
+  top: -30px; */
   width: 100%;
-  height: 30px;
+  height: 105px;
 }
 
 .left3 {
@@ -134,9 +148,10 @@
 }
 
 .list1 {
-  position: absolute;
-  top: -2px;
-  left: 7%;
+  position: relative;
+  top: -76px;
+  left: 30px;
+  z-index: 1;
   z-index: 1;
   width: 91%;
 }
@@ -156,9 +171,7 @@
 }
 
 .huang {
-  position: relative;
-  top: -2px;
-  left: 20px;
+  margin: 0 0 0 20px;
   width: 90%;
   height: 70px;
 }
@@ -280,13 +293,13 @@
 }
 
 .five {
-  margin-top: 13%;
-  margin-left: 5%;
-  width: 91%;
+  margin: 13px 0 0 20px;
+  width: 90%;
   border-radius: 5px;
   background-color: #fff;
 }
 
+
 .tuan {
   margin-left: 11px;
   font-size: 16px;
@@ -382,6 +395,7 @@
 
 .list0 {
   height: 105px;
+  margin: -45px 0 0 0;
 }
 
 .group {
@@ -409,7 +423,7 @@
 
 .viewjian {
   margin-top: -4%;
-  line-height: 62px;
+  line-height: 45px;
 }
 
 .jiantext {
@@ -430,11 +444,11 @@
 .six {
   width: 91%;
   height: 132px;
-  margin-top: 6%;
+  margin-top: 15px;
   margin-left: 5%;
   border-radius: 5px;
   background-color: #fff;
-  margin-bottom: 15%;
+  margin-bottom: 15px;
   padding: 0 0 10px 0;
 }
 
@@ -448,24 +462,29 @@
 .six-0 {
   float: left;
   width: 24%;
+  margin-bottom: 5px;
 }
 
 .six-1 {
   float: left;
   width: 24%;
+  margin-bottom: 5px;
 }
 
 .six-2 {
   float: left;
   width: 24%;
+  margin-bottom: 5px;
 }
 
 .six-3 {
   float: left;
   width: 24%;
+  margin-bottom: 5px;
 }
+
 .six-4 {
-  margin-top: 2%;
+  margin-bottom: 5px;
   float: left;
   width: 24%;
 }
@@ -475,6 +494,7 @@
   width: 24%;
 }
 
+
 .six-left {
   text-align: center;
 }
@@ -495,6 +515,8 @@
   padding: 0 0 5px 0;
   padding-bottom: 5%;
 }
+
+
 .hiddenmore .more-item {
   display: none;
 }
@@ -534,15 +556,18 @@
   font-size: 18px;
   margin: 0px 0 10px 0;
 }
+
 .modal_text3 {
   font-size: 12px;
   color: #666;
   margin: 0 0 10px 0;
 }
+
 .modal_text4 {
   font-size: 12px;
   margin: 10px 0 0 0;
 }
+
 .modal_button {
   width: 120px !important;
   background-image: linear-gradient(to right, #fd3c1e, #c74df0);
@@ -550,4 +575,4 @@
   color: #ffffff;
   text-align: center;
   font-size: small;
-}
+}

+ 16 - 4
pages/teamDetails/detail.js

@@ -12,16 +12,28 @@ Page({
     frameStyle: { useTop: false, name: '团队详情', leftArrow: true, useBar: false },
     // 主体高度
     infoHeight: '',
-    list: [
-    ],
-    lists: [
-    ],
+    list: [],
     fileList: [],
     ids: ''
   },
   back: function () {
     wx.navigateBack({ url: '/pages/home/index' })
   },
+  //点击减号删除队员
+  delList: function () {
+    var list = this.data.list.members;
+    var that = this;
+    wx.showModal({
+      title: '是否删除该名队员',
+      success(res) {
+        if (res.confirm) {
+          list.pop();
+          that.setData({ ['list.members']: list, })
+        } else if (res.cancel) { }
+      }
+    })
+
+  },
   /**
    * 生命周期函数--监听页面加载
    */

+ 7 - 3
pages/teamDetails/detail.wxml

@@ -14,9 +14,9 @@
         <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 class="group textOver">{{list.name}}</view>
+        <view class="person">共{{list.members.length||0}}人</view>
+      </view>
     </view>
     <view class="two">
       <view class="two-1">
@@ -44,10 +44,14 @@
         <view class="thr1">
           <view class="thr-left">
             <image class="img" src="{{item.icon[0].url}}"></image>
+            <image bindtap='delList' class="two_jian" src="/image/jian.png"></image>
           </view>
           <view class="thr-right"><text class="name textOver">{{item.nickname}}</text> </view>
         </view>
       </view>
     </view>
+    <view class="four">
+      <button class="button" bindtap='out'>退出团队</button>
+    </view>
   </view>
 </mobile-main>

+ 27 - 8
pages/teamDetails/detail.wxss

@@ -104,7 +104,7 @@
 }
 
 .thr-left {
-  width: 79%;
+  width: 49px;
   height: 49px;
   background-color: #eeeeee;
   border-radius: 24.5px;
@@ -114,15 +114,24 @@
 }
 
 .img {
-  width: 100%;
+  width: 49px;
   height: 49px;
 }
 
+.two_jian {
+  position: relative;
+  top: -20px;
+  left: 35px;
+  width: 20px;
+  height: 20px;
+}
+
+
 .thr-1 {
   padding-top: 10px;
   padding-left: 10px;
   float: left;
-  width: 17.2%;
+  width: 18%;
   background-color: #ffffff;
   padding-bottom: 5px;
 }
@@ -173,9 +182,19 @@
   font-weight: 300;
 }
 
-.buttonend {
-  background-color: rgb(136, 136, 136);
-  border-radius: 15px;
-  font-size: 13px !important;
-  color: #fff;
+
+.button{
+  margin-top: 5px !important;
+  width: 300px !important;
+  height: 35px;
+  background-color: rgba(243, 32, 162,0.5);
+  background-image: linear-gradient(to right, rgb(247, 59, 69) , rgb(223, 41, 247));
+  border-radius: 30px; 
+  color:#ffffff; 
+  font-size: 13px;
+}
+.four{
+  background-color: white;
+  padding-top: 200px;
+  padding-bottom: 20px;
 }