zs hace 3 años
padre
commit
80f93f1a25

+ 3 - 3
app.json

@@ -1,15 +1,15 @@
 {
   "pages": [
-    "pages/login/index",
+    "pages/match/index",
     "pages/home/index",
+    "pages/login/index",
     "pages/search/index",
     "pages/administration/index",
     "pages/administration/detail",
-    "pages/competition/index",
     "pages/team/index",
-    "pages/team/detail",
     "pages/team/examine",
     "pages/team/apply",
+    "pages/competition/index",
     "pages/ranking/index",
     "pages/me/index",
     "pages/index/index",

+ 8 - 3
icon/icon.wxss

@@ -1,9 +1,9 @@
 @font-face {
   font-family: "iconfont";
   /* Project id 3244772 */
-  src: url('//at.alicdn.com/t/font_3244772_uub65pm4ndp.woff2?t=1647601849963') format('woff2'),
-    url('//at.alicdn.com/t/font_3244772_uub65pm4ndp.woff?t=1647601849963') format('woff'),
-    url('//at.alicdn.com/t/font_3244772_uub65pm4ndp.ttf?t=1647601849963') format('truetype');
+  src: url('//at.alicdn.com/t/font_3244772_zz1ijhtxj2o.woff2?t=1647846813638') format('woff2'),
+    url('//at.alicdn.com/t/font_3244772_zz1ijhtxj2o.woff?t=1647846813638') format('woff'),
+    url('//at.alicdn.com/t/font_3244772_zz1ijhtxj2o.ttf?t=1647846813638') format('truetype');
 }
 
 .iconfont {
@@ -14,6 +14,11 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-jianhao:before {
+  content: "\e61b";
+  color: #fa1818;
+}
+
 .icon-jian-:before {
   content: "\e72c";
   font-size: 25px;

BIN
image/detail.jpg


+ 42 - 13
pages/competition/index.js

@@ -10,35 +10,60 @@ Page({
     frameStyle: { useTop: true, name: '创建比赛', leftArrow: true, useBar: false },
     // 主体高度
     infoHeight: '',
+    value: [],
+    list: [],
+    // 原数据
+    levelArray: [
+      ['淘汰制', '循环制'],
+      ['单败淘汰', '双败淘汰', '交叉淘汰'],
+      ['单循环', '双循环', '四循环']
+    ],
     date: '2018-01-01',//默认起始时间  
     date2: '2018-01-24',//默认结束时间 
     singledate: '2018-09-01',
     time: '12:01',
-    multiIndex: [0,0],
-    multiIndex1: [0,0],
-    multiArray: [['循环制',''], ['单循环', '双循环', '四循环','']],
-    multiArray1: [['淘汰制',''], ['单败淘汰', '双败淘汰', '交叉淘汰','']],
+    datas:''
   },
-  bindMultiPickerChange: function (e) {
-    console.log('picker发送选择改变,携带值为', e.detail.value)
-    this.setData({
-      multiIndex: e.detail.value
-    })
+  // 确定选择
+  szChange: function (e) {
+    const that = this;
+    let value = e.detail.value;
+    let list = that.data.list;
+    let data = []
+    for (let [index, val] of value.entries()) {
+      if (list[index][val]) data.push(list[index][val])
+      else data.push(list[index][0])
+    }
+    that.setData({ value: data })
+    that.search();
+  },
+  // 列值改变时
+  columnChange: function (e) {
+    const that = this;
+    let array = that.data.levelArray;
+    let list = that.data.list;
+    if (e.detail.column == '0') list[1] = array[parseInt(e.detail.value) + 1];
+    that.setData({ list: list });
+  },
+  search: function () {
+    const that = this;
+    let data = that.data.levelArray;
+    that.setData({ list: [data[0], data[1]] })
   },
-  bindDateChange3: function(e) {
+  bindDateChange3: function (e) {
     console.log('picker发送选择改变,携带值为', e.detail.value)
     this.setData({
       singledate: e.detail.value
     })
   },
-  bindTimeChange: function(e) {
+  bindTimeChange: function (e) {
     console.log('picker发送选择改变,携带值为', e.detail.value)
     this.setData({
       time: e.detail.value
     })
   },
-   // 时间段选择  
-   bindDateChange(e) {
+  // 时间段选择  
+  bindDateChange(e) {
     let that = this;
     console.log(e.detail.value)
     that.setData({
@@ -60,6 +85,10 @@ Page({
   onLoad: function (options) {
     // 计算高度
     this.searchHeight()
+    const that = this;
+    // 初始化数据
+    console.log(that.data.value);
+    that.search();
   },
   // 计算高度
   searchHeight: function () {

+ 9 - 11
pages/competition/index.wxml

@@ -34,31 +34,29 @@
           </view>
         </picker>
       </view>
-      <view  class="adress">
+      <view class="adress">
         <van-cell-group>
           <van-field value="{{ address }}" label="地点" placeholder="请输入地点" input-align="right" />
         </van-cell-group>
       </view>
       <view class="multone">
         <view class="mult1">
-          <view class="mult">赛制</view>
-          <picker mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{multiArray}}">
-            <view class="mults">
-              {{multiArray[0][multiIndex[0]]}},{{multiArray[1][multiIndex[1]]}}
-            </view>
+          <view class="mult">选择赛制</view>
+          <picker mode="multiSelector" bindchange="szChange" bindcolumnchange="columnChange" value="{{value}}" range="{{list}}">
+            <view class="mults">{{value.length>0?value:'请选择'}}</view>
           </picker>
         </view>
       </view>
       <view class="multone">
         <view class="mult1">
           <view class="mult">赛制</view>
-          <picker mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex1}}" range="{{multiArray1}}">
-            <view class="mults">
-              {{multiArray1[0][multiIndex1[0]]}},{{multiArray1[1][multiIndex1[1]]}}
-            </view>
-          </picker>
+          <view class="mults">{{datas}}
+            <text class=" icon iconfont icon-jianhao"></text>
+          </view>
         </view>
       </view>
+      <view>
+      </view>
     </view>
     <view class="team">
       <view class="two">

+ 1 - 0
pages/competition/index.wxss

@@ -97,6 +97,7 @@
   margin-top: -1px;
   background-color: white;
   line-height: 80rpx;
+  text-align: center;
 }
 .multone{
   margin-bottom: 1.8px;

+ 42 - 8
pages/team/detail.js

@@ -7,27 +7,61 @@ Page({
    * 页面的初始数据
    */
   data: {
-    frameStyle: { useTop: true, name: '我的团队', leftArrow: false, useBar: true },
+    src: '/image/detail.jpg',
+    src1: '/image/head1.png',
+    frameStyle: { useTop: false, name: '参赛阵容', leftArrow: false, useBar: false },
     // 主体高度
     infoHeight: '',
+    lists: [
+      {
+        id: '1',name:'老头1',head:'/image/tou.png'
+      },
+      {
+        id: '1',name:'老头2',head:'/image/tou.png'
+      },
+      {
+        id: '1',name:'老头3',head:'/image/tou.png'
+      },
+      {
+        id: '1',name:'老头4',head:'/image/tou.png'
+      },
+      {
+        id: '1',name:'老头5',head:'/image/tou.png'
+      }
+    ],
     list: [
       {
-        id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', date: '2022.01.15', person: '10',Founder:'XXX'
+        id: '1',name:'老头1',head:'/image/tou.png'
       },
       {
-        id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', date: '2022.01.15', person: '10',Founder:'XXX'
+        id: '1',name:'老头2',head:'/image/tou.png'
       },
       {
-        id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', date: '2022.01.15', person: '10',Founder:'XXX'
+        id: '1',name:'老头3',head:'/image/tou.png'
+      },
+      {
+        id: '1',name:'老头4',head:'/image/tou.png'
+      },
+      {
+        id: '1',name:'老头5',head:'/image/tou.png'
+      },
+      {
+        id: '1',name:'老头6',head:'/image/tou.png'
+      },
+      {
+        id: '1',name:'老头7',head:'/image/tou.png'
+      },
+
+      {
+        id: '1',name:'老头8',head:'/image/tou.png'
       },
       {
-        id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', date: '2022.01.15', person: '10',Founder:'XXX'
+        id: '1',name:'老头9',head:'/image/tou.png'
       },
     ],
   },
-  tabPath(e) {
-    let query = e.detail.detail;
-    if (query) wx.redirectTo({ url: `/pages/${query}/index` })
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
   },
   /**
    * 生命周期函数--监听页面加载

pages/team/detail.json → pages/match/index.json


+ 23 - 0
pages/match/index.wxml

@@ -0,0 +1,23 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <image style="width: 100%; height: 250px; background-color: #eeeeee;" src="{{src}}"></image>
+    </view>
+    <view class="two">
+      <view class="two1"><text class="twos">参赛阵容</text></view>
+      <view class="tworight">
+      <view class="two-1">
+        <image class="imgs" src="{{src1}}"></image>
+      </view>
+        <view class="two-2" wx:key="item" wx:for="{{lists}}">
+          <view class="two2">
+            <view class="two-left">
+              <image class="img" src="{{item.head}}"></image>
+            </view>
+            <view class="two-right"><text class="name">{{item.name}}</text> </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</mobile-main>

+ 57 - 0
pages/match/index.wxss

@@ -0,0 +1,57 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+.two{
+  background-color: #ffffff;
+  padding-top: 15px;
+}
+.two1{
+  width: 100%;
+  margin-left: 3%;
+  font-size: 15px;
+  font-weight: 550;
+}
+.tworight{
+  width: 100%;
+  float: left;
+  padding: 2%;
+  background-color: #ffffff;
+}
+.two-left{
+  width: 90%;
+  height: 50.64px;
+  background-color: #eeeeee;
+}
+.imgs{
+  width: 100%;
+  height: 37.51px; 
+}
+.img{
+  width: 100%;
+  height: 50.64px; 
+}
+.two-1{
+  padding-top: 15px;
+  padding-left: 5px;
+  float: left;
+  width: 11%;
+  background-color: #ffffff;
+}
+.two2{
+  background-color: #ffffff;
+}
+.two-2{
+  padding-top: 10px;
+  padding-left: 5px;
+  float: left;
+  width: 15%;
+  height: 75px;
+  background-color: #ffffff;
+  /* border: 1px solid red; */
+}
+.name{
+  margin-left: 10px;
+  font-size: 13px;
+  color: #727272;
+}

+ 0 - 19
pages/team/detail.wxml

@@ -1,19 +0,0 @@
-<mobile-main frameStyle="{{frameStyle}}" bind:tabPath="tabPath">
-  <view slot="info" class="main" style="height:{{infoHeight}}px;">
-    <view class="one"><text>请加入一个团队</text></view>
-    <view class="list" wx:key="item" wx:for="{{list}}">
-      <view class="two">
-        <view class="left">
-          <image class="head" src="{{item.head}}"></image>
-          <text class="group">{{item.group}}</text>
-          <text class="person">共{{item.person}}人</text>
-          <view class="fou"><text>创建人:{{item.Founder}}</text></view>
-          <view class="time"><text class="date">{{item.date}}</text><text>{{item.time}}创建</text></view>
-        </view>
-        <view class="right">
-          <button class="button" form-type="submit">加入</button>
-        </view>
-      </view>
-    </view>
-  </view>
-</mobile-main>

+ 0 - 77
pages/team/detail.wxss

@@ -1,77 +0,0 @@
-.main {
-  position: relative;
-  width: 100%;
-}
-.one{
-  text-align: center;
-  margin-top: 3%;
-  margin-bottom: 3%;
-  color: #9b9b9b;
-  font-size: 15px;
-}
-.two{
-  width: 93%;
-  float: left;
-  margin-left: 3%;
-}
-.left{
-  float: left;
-  width: 70%;
-  padding-top: 10px;
-  padding-left: 10px;
-  padding-bottom: 10px;
-}
-.two{
-  background-color: white;
-  margin-bottom: 3%;
-  border-radius: 8px;
-}
-.right{
-  float: left;
-  width: 20%;
-  margin-top: 9%;
-}
-.button{
-  margin-top: 0 !important;
-  width: 77px !important;
-  height: 30px;
-  background-color: rgba(243, 32, 162,0.5);
-  background-image: linear-gradient(to right, rgb(236, 75, 83) , rgb(247, 41, 230));
-  border-radius: 30px; 
-  color:#ffffff; 
-  font-size: 13px;
-}
-.head {
-  float: left;
-  margin-left: 7px;
-  width: 15%;
-  height: 31px;
-  overflow: hidden;
-}
-.group{
-  font-size: 16px;
-  line-height: 30px;
-  font-weight: 500;
-  margin-left: 4%;
-  margin-right: 8%;
-}
-.fou{
-  font-size: 13px;
-  color: #9e9e9e;
-  margin: 2%;
-  margin-left: 10px;
-  float: left;
-  width: 100%;
-}
-.person{
-  font-size: 13px;
-  color: #9e9e9e;
-}
-.time{
-  margin-left: 10px;
-  font-size: 13px;
-  color: #9e9e9e;
-}
-.date{
-  margin-right: 5px;
-}

+ 15 - 1
pages/team/index.js

@@ -7,10 +7,24 @@ Page({
    * 页面的初始数据
    */
   data: {
+    src: '/image/team.png',
     frameStyle: { useTop: true, name: '我的团队', leftArrow: false, useBar: true },
     // 主体高度
     infoHeight: '',
-    src: '/image/team.png',
+    list: [
+      {
+        id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', date: '2022.01.15', person: '10',Founder:'XXX'
+      },
+      {
+        id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', date: '2022.01.15', person: '10',Founder:'XXX'
+      },
+      {
+        id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', date: '2022.01.15', person: '10',Founder:'XXX'
+      },
+      {
+        id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', date: '2022.01.15', person: '10',Founder:'XXX'
+      },
+    ],
   },
   tabPath(e) {
     let query = e.detail.detail;

+ 25 - 6
pages/team/index.wxml

@@ -1,13 +1,32 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:tabPath="tabPath">
   <view slot="info" class="main" style="height:{{infoHeight}}px;">
-    <view class="two">
-      <van-search v-model="value" placeholder="搜索团队名称" />
+    <view wx:if="{{list.length==0}}">
+      <view class="two1">
+        <van-search v-model="value" placeholder="搜索团队名称" />
+      </view>
+      <view class="thr1">
+        <image src="{{src}}" class="images1"></image>
+      </view>
+      <view class="four1">
+        <text class="th1">暂未任何团队发布</text>
+      </view>
     </view>
-    <view class="thr">
-      <image src="{{src}}" class="images"></image>
+    <view wx:if="{{list.length!=0}}">
+    <view class="one"><text>请加入一个团队</text></view>
+    <view class="list" wx:key="item" wx:for="{{list}}">
+      <view class="two">
+        <view class="left">
+          <image class="head" src="{{item.head}}"></image>
+          <text class="group">{{item.group}}</text>
+          <text class="person">共{{item.person}}人</text>
+          <view class="fou"><text>创建人:{{item.Founder}}</text></view>
+          <view class="time"><text class="date">{{item.date}}</text><text>{{item.time}}创建</text></view>
+        </view>
+        <view class="right">
+          <button class="button" form-type="submit">加入</button>
+        </view>
+      </view>
     </view>
-    <view class="four">
-      <text class="th">暂未任何团队发布</text>
     </view>
   </view>
 </mobile-main>

+ 79 - 8
pages/team/index.wxss

@@ -1,10 +1,8 @@
 .main {
   position: relative;
   width: 100%;
-  background-color: #ffffff;
 }
-
-.theme {
+.theme1 {
   position: absolute;
   margin-top: 13%;
   text-align: center;
@@ -12,33 +10,106 @@
   width: 100%;
 }
 
-.two {
+.two1 {
   position: absolute;
   width: 100%;
 }
 
-.thr {
+.thr1 {
   position: absolute;
   top: 35%;
   width: 100%;
   text-align: center;
 }
 
-.images {
+.images1 {
   width: 50%;
   height: 180px;
 }
-.th {
+.th1{
   position: absolute;
   margin-top: 13%;
   text-align: center;
   font-weight: 500;
   width: 100%;
 }
-.four{
+.four1{
   margin-top: 34%;
   position: absolute;
   top: 40%;
   width: 100%;
   color: rgb(105, 105, 105);
+}
+.one{
+  text-align: center;
+  margin-top: 3%;
+  margin-bottom: 3%;
+  color: #9b9b9b;
+  font-size: 15px;
+}
+.two{
+  width: 93%;
+  float: left;
+  margin-left: 3%;
+}
+.left{
+  float: left;
+  width: 70%;
+  padding-top: 10px;
+  padding-left: 10px;
+  padding-bottom: 10px;
+}
+.two{
+  background-color: white;
+  margin-bottom: 3%;
+  border-radius: 8px;
+}
+.right{
+  float: left;
+  width: 20%;
+  margin-top: 9%;
+}
+.button{
+  margin-top: 0 !important;
+  width: 77px !important;
+  height: 30px;
+  background-color: rgba(243, 32, 162,0.5);
+  background-image: linear-gradient(to right, rgb(236, 75, 83) , rgb(247, 41, 230));
+  border-radius: 30px; 
+  color:#ffffff; 
+  font-size: 13px;
+}
+.head {
+  float: left;
+  margin-left: 7px;
+  width: 15%;
+  height: 31px;
+  overflow: hidden;
+}
+.group{
+  font-size: 16px;
+  line-height: 30px;
+  font-weight: 500;
+  margin-left: 4%;
+  margin-right: 8%;
+}
+.fou{
+  font-size: 13px;
+  color: #9e9e9e;
+  margin: 2%;
+  margin-left: 10px;
+  float: left;
+  width: 100%;
+}
+.person{
+  font-size: 13px;
+  color: #9e9e9e;
+}
+.time{
+  margin-left: 10px;
+  font-size: 13px;
+  color: #9e9e9e;
+}
+.date{
+  margin-right: 5px;
 }