zs 3 år sedan
förälder
incheckning
fa9d03f123

+ 3 - 1
app.js

@@ -23,7 +23,9 @@ App({
     // 微信用户openid,sessionKey
     wxInfo: {},
     client: {},
-    publicUrl: '', //
+    // 图片api
+    imageUrl:'http://broadcast.waityou24.cn',
+    publicUrl: 'http://broadcast.waityou24.cn', 
   },
   // 微信openid回调
   toLogin: login.toLogin,

+ 4 - 1
app.json

@@ -1,5 +1,6 @@
 {
   "pages": [
+  
     "pages/home/index",
     "pages/login/index",
     "pages/search/index",
@@ -7,6 +8,7 @@
     "pages/administration/detail",
     "pages/team/index",
     "pages/team/examine",
+    "pages/list/index",
     "pages/team/apply",
     "pages/competition/index",
     "pages/ranking/index",
@@ -49,7 +51,8 @@
     "van-nav-bar": "/miniprogram_npm/vant-weapp/nav-bar/index",
     "van-tabbar": "/miniprogram_npm/vant-weapp/tabbar/index",
     "van-tabbar-item": "/miniprogram_npm/vant-weapp/tabbar-item/index",
-    "van-rate": "/miniprogram_npm/vant-weapp/rate/index"
+    "van-rate": "/miniprogram_npm/vant-weapp/rate/index",
+    "van-uploader": "@vant/weapp/uploader/index"
   },
   "window": {
     "backgroundTextStyle": "light",

BIN
image/yun.jpg


+ 5 - 5
pages/administration/index.js

@@ -64,6 +64,11 @@ Page({
     if (query) wx.redirectTo({ url: `/pages/${query}/index` })
   },
   tiao: function () {
+    wx.navigateTo({
+      url: '/pages/list/index',
+    })
+  },
+  xun: function () {
     wx.navigateTo({
       url: '/pages/match/index',
     })
@@ -73,11 +78,6 @@ Page({
      url: `/pages/competition/index`,
     })
    },
-   xun:function(){
-    wx.navigateTo({
-     url: `/pages/match/detail`,
-    })
-   },
    tuan:function(){
     wx.navigateTo({
      url: `/pages/ranking/index`,

+ 2 - 2
pages/competition/index.wxml

@@ -48,9 +48,9 @@
         </view>
       </view>
       <view class="multone">
-        <view class="mult1" wx:for="{{szList}}" wx:key="item">
+        <view class="mult1">
           <view class="mult11">赛制</view>
-          <view class="mults">
+          <view class="mults" wx:for="{{szList}}" wx:key="item">
             <text>{{item.type}}-{{item.name}}</text>
             <text class=" icon iconfont icon-jianhao" bindtap="toDel" data-index="{{index}}"></text>
           </view>

+ 0 - 167
pages/competition/match/detail.js

@@ -1,167 +0,0 @@
-// pages/login/login.js
-import WxValidate from '../../utils/wxValidate'
-const app = getApp()
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    src: '/image/detail.jpg',
-    src1: '/image/head1.png',
-    fileList: '',
-    frameStyle: { useTop: true, name: '比赛信息', leftArrow: true, useBar: false },
-    // 主体高度
-    infoHeight: '',
-    listb: [
-      {
-          time: '1-15 15:00',
-          ranks1: '哈拉海队幼儿园组',
-          score1: '2',
-          score2: '1',
-          ranks2: '马尼拉老年组',
-          state: '未开始'
-      }
-  ],
-    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', 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'
-      },
-      {
-        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', name: '老头9', head: '/image/tou.png'
-      },
-      {
-        id: '1', name: '老头10', head: '/image/tou.png'
-      }
-    ],
-  },
-   //上传图片
-  afterRead: function (event) {
-    const { file } = event.detail;
-    // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式app.globalData.fileUrl:
-    wx.uploadFile({
-      url: "http://broadcast.waityou24.cn/files" + '/baoan/elimg/upload',
-      filePath: file.url,
-      name: 'file',
-      formData: {},
-      success: (res) => {
-        console.log(res);
-        if (res.statusCode == '200') {
-          this.setData({ 'el_img': JSON.parse(res.data).uri })
-          let data = [{ name: JSON.parse(res.data).name, url: `${app.globalData.imageUrl}` + JSON.parse(res.data).uri }]
-          this.setData({ fileList: data })
-        } else {
-          wx.showToast({ title: `${res.data.errmsg}`, icon: 'fail', duration: 2000 })
-        }
-      },
-    });
-  },
-  back: function () {
-    wx.navigateBack({ url: '/pages/home/index' })
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    // 计算高度
-    this.searchHeight()
-  },
-  // 计算高度
-  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 () {
-
-  }
-})

+ 0 - 6
pages/competition/match/detail.json

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

+ 0 - 72
pages/competition/match/detail.wxml

@@ -1,72 +0,0 @@
-<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
-  <view slot="info" class="main" style="height:{{infoHeight}}px;">
-    <view class="ones">
-      <view class="one" wx:key="item" wx:for="{{listb}}">
-        <view class="one_1">
-          <view class="one_1_img">
-            <image class="one_logo1" src="/image/logo1.png"></image>
-          </view>
-          <view class="one_1_text">{{item.ranks1}}</view>
-        </view>
-        <view class="one_2">
-          <view class="one_2_1">
-            <text class="time">{{item.time}}</text>
-          </view>
-          <view class="one_2_2">
-            <text class="text1">{{item.score1}}</text>
-            <text class="text2">:</text>
-            <text class="text3">{{item.score2}}</text>
-          </view>
-          <view class="one_2_2">
-            <text class="text">{{item.state}}</text>
-          </view>
-        </view>
-        <view class="one_3">
-          <view class="one_3_img">
-            <image class="one_logo2" src="/image/logo2.png"></image>
-          </view>
-          <view class="one_3_text">{{item.ranks2}}</view>
-        </view>
-        <view class="one_4">第二届老年组小区板王比赛</view>
-      </view>
-    </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 class="thr">
-      <view class="thrright">
-        <view class="thrleft"><text class="thrss">马尼拉队</text></view>
-        <view class="thr-1" wx:key="item" wx:for="{{list}}">
-          <view class="thr1">
-            <view class="thr-left">
-              <image class="img" src="{{item.head}}"></image>
-            </view>
-            <view class="thr-right"><text class="names">{{item.name}}</text> </view>
-          </view>
-        </view>
-      </view>
-
-    </view>
-    <view class="four">
-      <view class="four1"><text class="fours">现场照片</text>
-        <van-uploader file-list="{{fileList}}" bind:after-read="afterRead" />
-      </view>
-    </view>
-    <view class="five">
-      <button class="button" form-type="submit">待通过</button>
-    </view>
-  </view>
-</mobile-main>

+ 0 - 244
pages/competition/match/detail.wxss

@@ -1,244 +0,0 @@
-.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;
-  margin-bottom: 0.5%;
-}
-.two-left{
-  width: 90%;
-  height: 50.64px;
-  background-color: #eeeeee;
-}
-.imgs{
-  width: 85%;
-  height: 40.83px; 
-}
-.img{
-  width: 100%;
-  height: 50.64px; 
-}
-.two-1{
-  padding-top: 17px;
-  padding-left: 5px;
-  float: left;
-  width: 15%;
-  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;
-}
-.thr-left{
-  width: 90%;
-  height: 50.64px;
-  background-color: #eeeeee;
-}
-.img{
-  width: 100%;
-  height: 50.64px; 
-}
-.thr{
-  background-color: #ffffff;
-}
-.thrright{
-  background-color: #ffffff;
-  margin-bottom: 2%;
-}
-.thr-1{
-  padding-top: 10px;
-  padding-left: 6.5px;
-  float: left;
-  width: 14.5%;
-  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;
-}
-.names{
-  margin-left: 7px;
-  font-size: 13px;
-  color: #727272;
-}
-.thrss{
-  font-size: 14px;
-  font-weight: 500;
-}
-.thrleft{
-  float: left;
-  height: 100px;
-  padding-top: 73px;
-  padding-left: 10px;
-  padding-right: 2px;
-  background-color: #ffffff;
-  margin-bottom: 2%;
-}
-.one {
-  position: relative;
-  background-color: #ffffff;
-  height: 150px;
-  margin-bottom: 5%;
-  padding: 10px 20px;
-}
-.onea{
-  font-weight: 600;
-  position: absolute;
-  top: 5%;
-  left: 2%;
-}
-.back {
-  width: 40rpx;
-  height: 40rpx;
-  left: 15px;
-  width: 40rpx;
-  height: 40rpx;
-}
-.four{
-  position: absolute;
-  bottom: 12%;
-  left: 2%;
-  font-weight: 550;
-  font-size: 15px;
-  background-color: #ffffff;
-}
-.five{
-  position: absolute;
-  bottom: 3%;
-  left: 10%;
-  font-weight: 550;
-  font-size: 15px;
-  background-color: #ffffff;
-}
-.button{
-  margin-top: 5px !important;
-  width: 300px !important;
-  height: 35px;
-  background-color: rgb(247, 89, 16);
-  background-image: linear-gradient(to right, rgb(245, 122, 65) , rgb(247, 89, 41));
-  border-radius: 30px; 
-  color:#ffffff; 
-  font-size: 13px;
-}
-.one_1 {
-  position: relative;
-  width: 35%;
-  float: left;
-}
-.one_1_text {
-  text-align: center;
-  font-size: 14px;
-}
-.one_3_text {
-  text-align: center;
-  font-size: 14px;
-}
-.one_2 {
-  position: relative;
-  width: 30%;
-  float: left;
-  height: 102px;
-}
-.one_2_1 {
-  text-align: center;
-  margin-bottom: 5px;
-}
-.one_2_2 {
-  text-align: center;
-}
-.text1 {
-  background-color: rgb(209, 209, 209);
-  text-align: center;
-  color: #00427b;
-  font-size: 30px;
-  font-weight: bold;
-  text-decoration: line-through;
-  text-decoration-color: #fff;
-}
-.text2 {
-  font-size: 25px;
-  font-weight: bold;
-  margin: 0 5px;
-}
-.text {
-  font-size: 15px;
-  position: relative;
-  top: 9px;
-  text-align: center;
-}
-.text3 {
-  background-color: rgb(209, 209, 209);
-  text-align: center;
-  color: #e70000;
-  font-size: 30px;
-  font-weight: bold;
-  text-decoration: line-through;
-  text-decoration-color: #fff;
-}
-.one_3 {
-  position: relative;
-  width: 35%;
-  float: right;
-}
-.one_4 {
-  margin-top: 4%;
-  float: left;
-  width: 100%;
-  font-size: 14px;
-  color: #999;
-  text-align: center;
-}
-.one_logo1 {
-  width: 90px;
-  height: 80px;
-}
-.one_3_img{
-    padding: 0 15px;
-}
-.one_logo2 {
-  align-items: center;
-  width: 90px;
-  height: 80px;
-}

+ 0 - 159
pages/competition/match/index.js

@@ -1,159 +0,0 @@
-// pages/login/login.js
-import WxValidate from '../../utils/wxValidate'
-const app = getApp()
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    frameStyle: { useTop: false, name: '参赛阵容', leftArrow: false, useBar: false },
-    // 主体高度
-    infoHeight: '',
-    src: '/image/detail.jpg',
-    src1: '/image/head1.png',
-    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', 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'
-      },
-      {
-        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', name: '老头9', head: '/image/tou.png'
-      },
-      {
-        id: '1', name: '老头10', head: '/image/tou.png'
-      }
-    ],
-    // 上传图片
-    fileList: [],
-  },
-  //上传图片
-  afterRead: function (event) {
-    const { file } = event.detail;
-    // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式app.globalData.fileUrl:
-    console.log(file);
-    // wx.uploadFile({
-    //   url: "http://broadcast.waityou24.cn/files" + '/baoan/elimg/upload',
-    //   filePath: file.url,
-    //   name: 'file',
-    //   formData: {},
-    //   success: (res) => {
-    //     console.log(res);
-    //     if (res.statusCode == '200') {
-    //       this.setData({ 'el_img': JSON.parse(res.data).uri })
-    //       let data = [{ name: JSON.parse(res.data).name, url: `${app.globalData.imageUrl}` + JSON.parse(res.data).uri }]
-    //       this.setData({ fileList: data })
-    //     } else {
-    //       wx.showToast({ title: `${res.data.errmsg}`, icon: 'fail', duration: 2000 })
-    //     }
-    //   },
-    // });
-  },
-  back: function () {
-    wx.navigateBack({ url: '/pages/home/index' })
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    // 计算高度
-    this.searchHeight()
-  },
-  // 计算高度
-  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 () {
-
-  }
-})

+ 0 - 56
pages/competition/match/index.wxml

@@ -1,56 +0,0 @@
-<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
-  <view slot="info" class="main" style="height:{{infoHeight}}px;">
-    <view class="one">
-      <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>
-    </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 class="thr">
-      <view class="thrright">
-        <view class="thrleft"><text class="thrss">马尼拉队</text></view>
-        <view class="thr-1" wx:key="item" wx:for="{{list}}">
-          <view class="thr1">
-            <view class="thr-left">
-              <image class="img" src="{{item.head}}"></image>
-            </view>
-            <view class="thr-right"><text class="names">{{item.name}}</text> </view>
-          </view>
-        </view>
-      </view>
-
-    </view>
-    <view class="four">
-      <view class="four1">
-        <text class="fours">现场照片</text>
-        测试
-      </view>
-    </view>
-    <view class="upload">
-      <text>上传图片1</text>
-      <view class="upload_1">
-        <van-uploader file-list="{{fileList}}" bind:after-read="afterRead" />
-      </view>
-    </view>
-    <view class="five">
-      <button class="button" form-type="submit">待通过</button>
-    </view>
-
-  </view>
-</mobile-main>

+ 0 - 205
pages/competition/match/index.wxss

@@ -1,205 +0,0 @@
-.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;
-  margin-bottom: 0.5%;
-}
-
-.two-left {
-  width: 90%;
-  height: 50.64px;
-  background-color: #eeeeee;
-}
-
-.imgs {
-  width: 85%;
-  height: 40.83px;
-}
-
-.img {
-  width: 100%;
-  height: 50.64px;
-}
-
-.two-1 {
-  padding-top: 17px;
-  padding-left: 5px;
-  float: left;
-  width: 15%;
-  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;
-}
-
-.thr-left {
-  width: 90%;
-  height: 50.64px;
-  background-color: #eeeeee;
-}
-
-.img {
-  width: 100%;
-  height: 50.64px;
-}
-
-.thr {
-  background-color: #ffffff;
-}
-
-.thrright {
-  background-color: #ffffff;
-  margin-bottom: 2%;
-}
-
-.thr-1 {
-  padding-top: 10px;
-  padding-left: 6.5px;
-  float: left;
-  width: 14.5%;
-  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;
-}
-
-.names {
-  margin-left: 7px;
-  font-size: 13px;
-  color: #727272;
-}
-
-.thrss {
-  font-size: 14px;
-  font-weight: 500;
-}
-
-.thrleft {
-  float: left;
-  height: 105px;
-  padding-top: 68px;
-  padding-left: 10px;
-  padding-right: 2px;
-  background-color: #ffffff;
-  margin-bottom: 2%;
-}
-
-.onea {
-  font-weight: 600;
-  position: absolute;
-  top: 5%;
-  left: 2%;
-}
-
-.back {
-  width: 40rpx;
-  height: 40rpx;
-  left: 15px;
-  width: 40rpx;
-  height: 40rpx;
-}
-
-.four {
-  font-weight: 550;
-  font-size: 15px;
-  background-color: #ffffff;
-}
-
-.five {
-  float: left;
-  width: 100%;
-  font-weight: 550;
-  font-size: 15px;
-  background-color: #ffffff;
-}
-
-.button {
-  margin-top: 5px !important;
-  width: 300px !important;
-  height: 35px;
-  background-color: rgb(247, 89, 16);
-  background-image: linear-gradient(to right, rgb(245, 122, 65), rgb(247, 89, 41));
-  border-radius: 30px;
-  color: #ffffff;
-  font-size: 13px;
-}
-
-.upload {
-  float: left;
-  width: 100%;
-}
-
-.upload .upload_1 {
-  width: 100px;
-  height: 100px;
-}
-.one{
-  float: left;
-  width: 100%;
-}
-.two{
-  float: left;
-  width: 100%;
-}
-.thr{
-  float: left;
-  width: 100%;
-}
-.four{
-  float: left;
-  width: 100%;
-}

+ 2 - 2
pages/home/index.js

@@ -36,12 +36,12 @@ Page({
   },
   tiao: function () {
     wx.navigateTo({
-      url: '/pages/match/index',
+      url: '/pages/list/index',
     })
   },
   xun: function () {
     wx.navigateTo({
-      url: '/pages/match/detail',
+      url: '/pages/match/index',
     })
   },
   tabPath(e) {

+ 1 - 1
pages/home/index.wxml

@@ -21,7 +21,7 @@
           </view>
           <view class="otherInfo textOver"><text class="text3">{{item.address}}</text></view>
         </view>
-        <view class="right1" wx:if="{{item.listbisai}}" wx:for="{{item.listbisai}}" wx:for-item="items">
+        <view class="right1" wx:if="{{item.listbisai}}" wx:for="{{item.listbisai}}" wx:for-item="items" wx:key="key" >
           <view class="right1_1" bindtap="xun">
             <text class="text4">{{items.match}}</text>
             <text class="text4">{{items.group}}</text>

+ 105 - 0
pages/list/index.js

@@ -0,0 +1,105 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    src: '/image/yun.jpg',
+    frameStyle: { useTop: false, name: '比赛列表', leftArrow: false, useBar: true, tabSelectid: '0' },
+    // 主体高度
+    infoHeight: '',
+    active: 1,
+    list: [
+      {
+        id: '1', name: '经开区足球比赛', fraction2: '1', groupname2: '马尼拉老年组', group: '第二组', fraction1: '2', groupname1: '哈拉海队幼儿园', match: '循环淘汰赛', listbisai: [], head2: '/image/head2.png', head1: '/image/head1.png', state: '报名中', datestart: '2022.01.20',dateend: '2022.01.22', address: '吉林省长春市远创国际A座'
+      }
+    ],
+  },
+  tiao: function () {
+    wx.navigateTo({
+      url: '/pages/match/index',
+    })
+  },
+  xun: function () {
+    wx.navigateTo({
+      url: '/pages/match/detail',
+    })
+  },
+  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.searchHeight()
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    let infoHeight = client.windowHeight;
+    // 减去状态栏
+    if (frameStyle.useTop) infoHeight = infoHeight - (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 () {
+
+  }
+})

pages/competition/match/index.json → pages/list/index.json


+ 60 - 0
pages/list/index.wxml

@@ -0,0 +1,60 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:tabPath="tabPath">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <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>
+    </view>
+    <view class="two">
+      <view class="list" wx:key="item" wx:for="{{list}}">
+        <view class="listtou">
+          <view class="name" bindtap="tiao">{{item.name}}</view>
+          <view class="listbut"> <button class="button" size="mini" style="background:rgb(238, 147, 28);" wx:if="{{item.state == '进行中'}}">{{item.state}}</button>
+            <button class="button" size="mini" style="background:rgb(238, 88, 28);" wx:if="{{item.state == '待比赛'}}">{{item.state}}</button>
+            <button class="button" size="mini" style="background:rgb(54, 233, 48)" wx:if="{{item.state == '报名中'}}">{{item.state}}</button>
+            <button class="button" size="mini" style="background:rgb(136, 136, 136);" wx:if="{{item.state == '已结束'}}">{{item.state}}</button>
+          </view>
+        </view>
+        <view class="left1">
+          <view class="otherInfos">
+            <text class="text1">{{item.datestart}}</text>
+             -
+            <text class="text1">{{item.dateend}}</text>
+          </view>
+          <view class="otherInfoq"><text class="text3">{{item.address}}</text></view>
+          <view class="otherInfo"><text class="text3">{{item.match}}</text></view>
+        </view>
+        <view class="right1" wx:if="{{item.listbisai}}" wx:for="{{item.listbisai}}" wx:for-item="items" wx:key="key" >
+          <view class="right1_1" bindtap="xun">
+            <text class="text4">{{items.match}}</text>
+            <text class="text4">{{items.group}}</text>
+          </view>
+          <view class="right1_2">
+            <view class="right1_2o">
+              <image class="head1" src="{{items.head1}}"></image>
+            </view>
+            <view class="right1_2t"><text>{{items.groupname1}}</text></view>
+            <view class="right1_2i">
+              <text class="text6">{{items.fraction1}}</text>
+              <text class="text8">:</text>
+              <text class="text7">{{items.fraction2}}</text>
+            </view>
+            <view class="right1_2t"><text>{{items.groupname2}}</text></view>
+            <view class="right1_2o">
+              <image class="head2" src="{{items.head2}}"></image>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="thr">
+      <van-tabs active="{{ active }}">
+  <van-tab title="赛制信息">内容 1</van-tab>
+  <van-tab title="参赛队伍">内容 2</van-tab>
+  <van-tab title="赛程列表">内容 3</van-tab>
+  <van-tab title="队伍榜单">内容 4</van-tab>
+</van-tabs>
+    </view>
+  </view>
+</mobile-main>

+ 175 - 0
pages/list/index.wxss

@@ -0,0 +1,175 @@
+.main {
+  position: relative;
+  width: 100%;
+  background-color: #f1f1f1;
+  overflow-y: auto;
+}
+.back {
+  width: 40rpx;
+  height: 40rpx;
+  left: 15px;
+  width: 40rpx;
+  height: 40rpx;
+}
+.onea{
+  font-weight: 600;
+  position: absolute;
+  top: 5%;
+  left: 2%;
+}
+
+.biao {
+  float: left;
+  width: 10%;
+}
+
+.two {
+  position: absolute;
+  top: 28%;
+  left: 2.5%;
+  width: 95%;
+}
+
+.otherInfo {
+  text-align: left;
+  padding: 0 0 10px 5px;
+}
+.otherInfoq{
+  padding: 0 0 0 5px;
+}
+
+.name {
+  float: left;
+  width: 38%;
+  margin: 6px;
+  margin-left: 10px;
+  font-size: 16px;
+  color: #0034cf;
+  font-weight: bold;
+}
+
+.left1 {
+  margin: 5px;
+  border-radius: 25px;
+}
+
+.text1 {
+  margin-right: 3px;
+  font-size: 14px;
+  color: #5e5e5e;
+}
+
+.button {
+  margin-top: 4px;
+  /* background-color: rgb(238, 147, 28); */
+  border-radius: 15px;
+  font-size: 13px !important;
+  color: #fff;
+}
+
+.list {
+  background-color: #fff;
+  margin-bottom: 10px;
+  border-radius: 8px;
+  padding-top: 5px;
+}
+
+.text3 {
+  font-size: 13px;
+  color: #adadad;
+}
+
+.text4 {
+  font-size: 14px;
+  margin: 5px;
+  color: #868686;
+  font-weight: 600;
+}
+
+.text6 {
+  font-size: 23px;
+  color: rgb(46, 46, 245);
+  font-weight: 500;
+}
+
+.text7 {
+  font-size: 23px;
+  color: rgb(243, 19, 19);
+  font-weight: 500;
+}
+
+.text8 {
+  font-size: 23px;
+  font-weight: 500;
+  margin-right: 5px;
+  margin-left: 5px;
+}
+.otherInfo {
+  text-align: left;
+  padding: 0 0 15px 5px;
+}
+.otherInfos{
+  padding: 0 0 0px 5px;
+}
+
+.right1 {
+  border-radius: 5px;
+  position: relative;
+  width: 100%;
+  height: 80px;
+  background-color: #e9e9e9;
+}
+
+.right1_2 {
+  float: left;
+  width: 101%
+}
+
+.right1_2 .right1_2o {
+  float: left;
+  width: 11%;
+  height: 40px;
+  overflow: hidden;
+}
+
+.head1 {
+  width: 100%;
+  height: 33px;
+  overflow: hidden;
+}
+.head2 {
+  width: 89%;
+  height: 36px;
+  overflow: hidden;
+}
+
+.right1_2 .right1_2t {
+  float: left;
+  width: 33%;
+  text-align: center;
+  padding: 10px 0;
+}
+
+.right1_2 .right1_2t text {
+  font-size: 14px;
+}
+
+.right1_2 .right1_2i {
+  float: left;
+  width: 10%;
+  text-align: center;
+  padding: 6px 0;
+}
+
+.right1_1 {
+  text-align: center;
+}
+.thr{
+  float: left;
+  width: 95%;
+  margin-top: 15%;
+  margin-left: 2.5%;
+}
+.van-tabs__wrap {
+  background-color: #f1f1f1 !important;
+}

+ 15 - 16
pages/match/index.js

@@ -70,22 +70,21 @@ Page({
     const { file } = event.detail;
     // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式app.globalData.fileUrl:
     console.log(file);
-    // wx.uploadFile({
-    //   url: "http://broadcast.waityou24.cn/files" + '/baoan/elimg/upload',
-    //   filePath: file.url,
-    //   name: 'file',
-    //   formData: {},
-    //   success: (res) => {
-    //     console.log(res);
-    //     if (res.statusCode == '200') {
-    //       this.setData({ 'el_img': JSON.parse(res.data).uri })
-    //       let data = [{ name: JSON.parse(res.data).name, url: `${app.globalData.imageUrl}` + JSON.parse(res.data).uri }]
-    //       this.setData({ fileList: data })
-    //     } else {
-    //       wx.showToast({ title: `${res.data.errmsg}`, icon: 'fail', duration: 2000 })
-    //     }
-    //   },
-    // });
+    wx.uploadFile({
+      url:`${app.globalData.imageUrl}/files/court/elimg/upload`,
+      filePath: file.url,
+      name: 'file',
+      formData: {},
+      success: (res) => {
+        console.log(res);
+        if (res.statusCode == '200') {
+          let data = [{ name: JSON.parse(res.data).name, url: `${app.globalData.imageUrl}` + JSON.parse(res.data).uri }]
+          this.setData({ fileList: data })
+        } else {
+          wx.showToast({ title: `${res.data.errmsg}`, icon: 'fail', duration: 2000 })
+        }
+      },
+    });
   },
   back: function () {
     wx.navigateBack({ url: '/pages/home/index' })

+ 1 - 3
pages/match/index.wxml

@@ -39,13 +39,11 @@
     <view class="four">
       <view class="four1">
         <text class="fours">现场照片</text>
-        测试
       </view>
     </view>
     <view class="upload">
-      <text>上传图片1</text>
       <view class="upload_1">
-        <van-uploader file-list="{{fileList}}" bind:after-read="afterRead" />
+        <van-uploader  file-list="{{fileList}}"  max-count="4" bind:after-read="afterRead" />
       </view>
     </view>
     <view class="five">

+ 5 - 0
pages/match/index.wxss

@@ -1,6 +1,7 @@
 .main {
   position: relative;
   width: 100%;
+  background-color: #ffffff;
 }
 
 .two {
@@ -164,6 +165,7 @@
   width: 100%;
   font-weight: 550;
   font-size: 15px;
+  margin-bottom: 10%;
   background-color: #ffffff;
 }
 
@@ -181,9 +183,11 @@
 .upload {
   float: left;
   width: 100%;
+  background-color: #ffffff;
 }
 
 .upload .upload_1 {
+  margin-left: 5%;
   width: 100px;
   height: 100px;
 }
@@ -202,4 +206,5 @@
 .four{
   float: left;
   width: 100%;
+  margin-left: 5%;
 }

+ 1 - 1
pages/search/index.js

@@ -26,7 +26,7 @@ Page({
   },
   tiao: function () {
     wx.navigateTo({
-      url: '/pages/match/index',
+      url: '/pages/list/index',
     })
   },
   //标签页