Browse Source

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

YY 3 năm trước cách đây
mục cha
commit
9349fa569d

+ 1 - 1
pages/add/index.js

@@ -9,7 +9,7 @@ Page({
     frameStyle: { useTop: true, name: '申请加入', leftArrow: true, useBar: false },
     // 主体高度
     infoHeight: '',
-    singledate: '2018-09-01',
+    singledate: '2022-01-01',
     time: '12:01',
     form: {
       team_id: '1',// 团队id

+ 29 - 20
pages/administration/compete.js

@@ -23,22 +23,31 @@ Page({
   hui: function () {
     var that = this;
     let id = that.team_id
-    wx.request({
-      url: `${app.globalData.publicUrl}/courtAdmin/api/matchteam/` + id, //接口地址
-      method: 'post',
-      data: {
-        "status": "-1"
-      },
+    wx.showModal({
+      title: '',
+      content: '是否驳回',
       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
+        if (res.confirm) {
+          wx.request({
+            url: `${app.globalData.publicUrl}/courtAdmin/api/matchteam/` + id, //接口地址
+            method: 'post',
+            data: {
+              "status": "-1"
+            },
+            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) {
         }
       }
     })
@@ -49,7 +58,7 @@ Page({
     let id = that.team_id
     wx.showModal({
       title: '',
-      content: '是否确认解散团队',
+      content: '是否确认',
       success(res) {
         if (res.confirm) {
           wx.request({
@@ -88,8 +97,8 @@ Page({
     // 监听用户是否登录
     this.watchLogin();
   },
-   //验证用户是否登录
-   watchLogin: function () {
+  //验证用户是否登录
+  watchLogin: function () {
     var that = this;
     let ids = that.team_id;
     wx.getStorage({
@@ -121,8 +130,8 @@ Page({
       }
     })
   },
-   // 计算高度
-   searchHeight: function () {
+  // 计算高度
+  searchHeight: function () {
     let frameStyle = this.data.frameStyle;
     let client = app.globalData.client;
     let infoHeight = client.windowHeight;
@@ -131,7 +140,7 @@ Page({
     // 是否减去底部菜单
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
-},
+  },
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 3 - 4
pages/administration/compete.wxss

@@ -34,7 +34,7 @@
 
 .one-2 {
   position: absolute;
-  top: 18%;
+  top: 17%;
   left: 41%;
   width: 18%;
   height: 63.78px;
@@ -50,10 +50,9 @@
 }
 
 .imgs {
-  margin-top: 4px;
-  margin-left: 2px;
   width: 95%;
-  height: 51.58px;
+  height: 64.14px;
+  border-radius: 90px;
 }
 
 .two-1 {

+ 31 - 49
pages/administration/detail.js

@@ -23,36 +23,32 @@ Page({
   hui: function () {
     var that = this;
     let id = that.team_id
-    var from = that.data.from;
-    var team_id =from.team_id;
-    var team_name =from.team_name;
-    var create_user =from.create_user;
-    var create_id =from.create_id;
-    var apply_time =from.apply_time;
-    var resaon =from.resaon;
-    wx.request({
-      url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply/` + id, //接口地址
-      method: 'post',
-      data: {
-        "id": id,
-        "team_id": team_id,
-        "team_name": team_name,
-        "create_user": create_user,
-        "create_id": create_id,
-        "apply_time": apply_time,
-        "resaon": resaon,
-        "status": "-1"
-      },
+    wx.showModal({
+      title: '',
+      content: '是否驳回',
       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
+        if (res.confirm) {
+          wx.request({
+            url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply/${id}`, //接口地址
+            method: 'post',
+            data: {
+              "status": "-1"
+            },
+            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) {
         }
       }
     })
@@ -61,29 +57,15 @@ Page({
   out: function () {
     var that = this;
     let id = that.team_id
-    var from = that.data.from;
-    var team_id =from.team_id;
-    var team_name =from.team_name;
-    var create_user =from.create_user;
-    var create_id =from.create_id;
-    var apply_time =from.apply_time;
-    var resaon =from.resaon;
     wx.showModal({
       title: '',
-      content: '是否确认解散团队',
+      content: '是否确认',
       success(res) {
         if (res.confirm) {
           wx.request({
-            url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply/` + id, //接口地址
+            url: `${app.globalData.publicUrl}/courtAdmin/api/dismissapply/${id}`, //接口地址
             method: 'post',
             data: {
-              "id": id,
-              "team_id": team_id,
-              "team_name": team_name,
-              "create_user": create_user,
-              "create_id": create_id,
-              "apply_time": apply_time,
-              "resaon": resaon,
               "status": "1"
             },
             success(res) {
@@ -116,8 +98,8 @@ Page({
     // 监听用户是否登录
     this.watchLogin();
   },
-   //验证用户是否登录
-   watchLogin: function () {
+  //验证用户是否登录
+  watchLogin: function () {
     var that = this;
     let id = that.ids;
     let ids = that.team_id;
@@ -170,8 +152,8 @@ Page({
       }
     })
   },
-   // 计算高度
-   searchHeight: function () {
+  // 计算高度
+  searchHeight: function () {
     let frameStyle = this.data.frameStyle;
     let client = app.globalData.client;
     let infoHeight = client.windowHeight;
@@ -180,7 +162,7 @@ Page({
     // 是否减去底部菜单
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
-},
+  },
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 4 - 5
pages/administration/detail.wxss

@@ -34,7 +34,7 @@
 
 .one-2 {
   position: absolute;
-  top: 18%;
+  top: 17%;
   left: 41%;
   width: 18%;
   height: 63.78px;
@@ -50,10 +50,9 @@
 }
 
 .imgs {
-  margin-top: 4px;
-  margin-left: 2px;
   width: 95%;
-  height: 51.58px;
+  height: 64.14px;
+  border-radius: 90px;
 }
 
 .two-1 {
@@ -170,9 +169,9 @@
 }
 
 .four-1 {
+  float: left;
   background-color: white;
   width: 100%;
-  margin-top: 10%;
 }
 
 .four1 {

+ 3 - 4
pages/administration/details.wxss

@@ -34,7 +34,7 @@
 
 .one-2 {
   position: absolute;
-  top: 18%;
+  top: 17%;
   left: 41%;
   width: 18%;
   height: 63.78px;
@@ -50,10 +50,9 @@
 }
 
 .imgs {
-  margin-top: 4px;
-  margin-left: 2px;
   width: 95%;
-  height: 51.58px;
+  height: 64.14px;
+  border-radius: 90px;
 }
 
 .two-1 {

+ 7 - 17
pages/administration/index.js

@@ -19,6 +19,9 @@ Page({
     //已结束数据
     complete: [],
   },
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
+  },
   // 跳转菜单
   tabPath(e) {
     let { route } = e.detail.detail;
@@ -30,23 +33,10 @@ Page({
     if (type == 1) wx.navigateTo({ url: `/pages/list/index?id=${id}` })
     else wx.navigateTo({ url: `/pages/match/detail?id=${id}` })
   },
-  //创建比赛
-  jump: function () {
-    wx.navigateTo({
-      url: `/pages/competition/index`,
-    })
-  },
-  //团队排名
-  tuan: function () {
-    wx.navigateTo({
-      url: `/pages/ranking/index`,
-    })
-  },
-  //团队审批
-  shen: function () {
-    wx.navigateTo({
-      url: `/pages/manage/index`,
-    })
+  //跳转页面
+  jump(e) {
+    let { type } = e.currentTarget.dataset;
+    if (type) wx.navigateTo({ url: `/pages/${type}/index` })
   },
   /**
    * 生命周期函数--监听页面加载

+ 3 - 3
pages/administration/index.wxml

@@ -4,19 +4,19 @@
       <image src="{{background}}" class="images"></image>
     </view>
     <view class="two">
-      <text class="themes" bindtap='jump'>创建比赛</text>
+      <text class="themes" bindtap='jump' data-type="competition">创建比赛</text>
       <image class="imags" src="{{match}}"></image>
     </view>
     <view class="thr">
       <view class="left">
-        <text class="th" bindtap='tuan'>团队排名</text>
+        <text class="th"  bindtap='jump' data-type="ranking">团队排名</text>
         <view class="imagx">
           <text class="icon iconfont icon-paiming_paiming"></text>
         </view>
         <image class="imagh" src="{{black}}"></image>
       </view>
       <view class="right">
-        <text class="th" bindtap='shen'>团队审批</text>
+        <text class="th"  bindtap='jump' data-type="manage">团队审批</text>
         <view class="imagx">
           <text class="icon iconfont icon-shenpi"></text>
         </view>

+ 68 - 66
pages/competition/index.js

@@ -11,9 +11,9 @@ Page({
     infoHeight: '',
     names: '',
     address: '',
-    date: '2018-01-01',//默认起始时间  
-    date2: '2018-01-24',//默认结束时间 
-    singledate: '2018-09-01',
+    date: '2022-01-01',//默认起始时间  
+    date2: '2022-01-24',//默认结束时间 
+    singledate: '2022-01-01',
     time: '12:01',
     // 赛制信息
     // 默认值
@@ -29,49 +29,21 @@ Page({
     // 赛制储存信息
     szList: [],
   },
-  // 提交创建
-  onSubmit: function (e) {
-    var name = this.data.names;
-    var match_time = this.data.date + ' - ' + this.data.date2;
-    var single_time = this.data.singledate + ' ' + this.data.time;
-    var address = this.data.address;
-    var format = this.data.szList;
-    const params = {
-      "name": name,
-      "match_time": match_time,
-      "single_time": single_time,
-      "address": address,
-      "format": format,
-    };
-    if (!this.WxValidate.checkForm(params)) {
-      const error = this.WxValidate.errorList[0];
-      wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
-      return false
-    } else {
-      wx.request({
-        url: `${app.globalData.publicUrl}/courtAdmin/api/match`, //接口地址
-        method: 'post',
-        data: params,
-        success(res) {
-          if (res.data.errcode == 0) {
-            wx.showToast({ title: `创建比赛成功`, icon: 'success', duration: 2000 }) //创建成功提示
-            wx.navigateTo({ url: '/pages/administration/index' })// 跳转页面
-          } else {
-            wx.showToast({
-              title: res.data.errmsg,
-              icon: 'none',
-              duration: 2000
-            })
-          }
-        }
-      })
-    }
+  //验证是否输入
+  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)
   },
-  //input改变值
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
+  },
+  //比赛名称改变值
   onChangenames(e) {
     this.data.names = e.detail
   },
-  //input改变值
+  //地点改变值
   onChangeaddress(e) {
     this.data.address = e.detail
   },
@@ -107,11 +79,13 @@ Page({
     let data = list.filter((i, index) => index != value)
     this.setData({ szList: data })
   },
+  //日期选择器
   bindDateChange3: function (e) {
     this.setData({
       singledate: e.detail.value
     })
   },
+  //时间选择器
   bindTimeChange: function (e) {
     this.setData({
       time: e.detail.value
@@ -130,30 +104,58 @@ Page({
       date2: e.detail.value,
     })
   },
-  back: function () {
-    wx.navigateBack({ url: '/pages/home/index' })
+  // 提交创建
+  onSubmit: function (e) {
+    var name = this.data.names;
+    var match_time = this.data.date + ' - ' + this.data.date2;
+    var single_time = this.data.singledate + ' ' + this.data.time;
+    var address = this.data.address;
+    var format = this.data.szList;
+    const params = {
+      "name": name,
+      "match_time": match_time,
+      "single_time": single_time,
+      "address": address,
+      "format": format,
+    };
+    if (!this.WxValidate.checkForm(params)) {
+      const error = this.WxValidate.errorList[0];
+      wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+      return false
+    } else {
+      wx.request({
+        url: `${app.globalData.publicUrl}/courtAdmin/api/match`,
+        method: 'post',
+        data: params,
+        success(res) {
+          if (res.data.errcode == 0) {
+            wx.showToast({ title: `创建比赛成功`, icon: 'success', duration: 2000 })
+            wx.navigateTo({ url: '/pages/administration/index' })
+          } else {
+            wx.showToast({
+              title: res.data.errmsg,
+              icon: 'none',
+              duration: 2000
+            })
+          }
+        }
+      })
+    }
   },
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    // 监听用户是否登录
-    this.watchLogin();
     //验证规则函数
-    this.initValidate()
+    this.initValidate();
     // 计算高度
-    this.searchHeight()
+    this.searchHeight();
+    // 监听用户是否登录
+    this.watchLogin();
     const that = this;
     // 初始化数据
     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({
@@ -171,17 +173,17 @@ Page({
     let data = that.data.levelArray;
     that.setData({ valueList: [data[0], data[1]] })
   },
- // 计算高度
- 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 })
-},
+  // 计算高度
+  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 })
+  },
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 6 - 6
pages/competition/index.wxml

@@ -1,11 +1,11 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
   <view slot="info" class="main" style="height:{{infoHeight}}px;">
-    <view>
-      <van-cell-group>
-        <van-field value="{{names}}" bind:change="onChangenames" label="比赛名称" placeholder="请输入比赛名称" input-align="right" />
-      </van-cell-group>
-    </view>
     <view class="page">
+      <view class="name">
+        <van-cell-group>
+          <van-field value="{{ names }}" bind:change="onChangenames" label="比赛名称" placeholder="请输入比赛名称" input-align="right" />
+        </van-cell-group>
+      </view>
       <view class="page1"><text>时间</text></view>
       <view class="picker_group">
         <picker mode="date" value="{{date}}" end="{{date2}}" bindchange="bindDateChange">
@@ -35,7 +35,7 @@
       </view>
       <view class="adress">
         <van-cell-group>
-          <van-field value="{{ address }}"  bind:change="onChangeaddress" label="地点" placeholder="请输入地点" input-align="right" />
+          <van-field value="{{ address }}" bind:change="onChangeaddress" label="地点" placeholder="请输入地点" input-align="right" />
         </van-cell-group>
       </view>
       <view class="multone">

+ 4 - 0
pages/competition/index.wxss

@@ -41,6 +41,10 @@
   font-size: 14px;
   font-weight: 600;
 }
+.name {
+  font-size: 14px;
+  font-weight: 600;
+}
 
 .section {
   font-size: 14px;

+ 22 - 34
pages/manage/index.js

@@ -10,44 +10,43 @@ Page({
     ids: '',
     // 主体高度
     infoHeight: '',
+    //全部团队
     teamlist: [],
+    //参赛团队
     compete: [],
+    // 解散团队
     dissolution: [],
   },
   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)),
-    })
-  },
-  //查询参赛团队详情
-  canshen: function (e) {
-    let obj = e.currentTarget.dataset;
-    wx.navigateTo({
-      url: '/pages/administration/compete?obj=' + decodeURIComponent(JSON.stringify(obj)),
-    })
+    if (obj.route) {
+      wx.navigateTo
+        ({
+          url: `/pages/administration/${obj.route}?obj=${decodeURIComponent(JSON.stringify(obj))}`
+        })
+    }
   },
   //查询团队详情
   shens: function (e) {
-    let id = e.currentTarget.dataset.name;
+    let id = e.currentTarget.dataset.id;
     wx.navigateTo({
-      url: '/pages/administration/details?id=' + id,
+      url: `/pages/administration/details?id=${id}`
     })
   },
-   //参赛团队点击通过
-   cantong: function (e) {
-    let id = e.currentTarget.dataset.name;
+  //参赛团队点击通过
+  cantong: function (e) {
+    let id = e.currentTarget.dataset.id;
     wx.showModal({
       title: '',
       content: '是否通过参赛团队',
       success(res) {
         if (res.confirm) {
           wx.request({
-            url: `${app.globalData.publicUrl}/courtAdmin/api/matchteam/` + id, //接口地址
+            url: `${app.globalData.publicUrl}/courtAdmin/api/matchteam/${id}`, //接口地址
             method: 'post',
             data: {
               "status": "1"
@@ -104,10 +103,10 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    // 监听用户是否登录
-    this.watchLogin();
     // 计算高度
     this.searchHeight();
+    // 监听用户是否登录
+    this.watchLogin();
   },
   // 监听用户是否登录
   watchLogin: function () {
@@ -140,19 +139,8 @@ Page({
           method: 'get',
           data: '',
           success(res) {
-            let datas = res.data.data
             if (res.data.errcode == 0) {
-              for (let i = 0; i < datas.length; i++) {
-                if (datas[i].status == 0) {
-                  datas[i].status = '待比赛'
-                } else if (datas[i].status == 1) {
-                  datas[i].status = '进行中'
-                } else if (datas[i].status == 2) {
-                  datas[i].status = '报名中'
-                } else if (datas[i].status == 3) {
-                  datas[i].status = '已结束'
-                }
-              }
+              let datas = res.data.data
               that.setData({
                 teamlist: datas,
               });
@@ -191,8 +179,8 @@ Page({
       }
     })
   },
-   // 计算高度
-   searchHeight: function () {
+  // 计算高度
+  searchHeight: function () {
     let frameStyle = this.data.frameStyle;
     let client = app.globalData.client;
     let infoHeight = client.windowHeight;
@@ -201,7 +189,7 @@ Page({
     // 是否减去底部菜单
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
-},
+  },
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 4 - 4
pages/manage/index.wxml

@@ -4,7 +4,7 @@
       <van-tabs active="{{ active }}">
         <van-tab title="全部团队">
           <view>
-            <view class="list" wx:key="item" wx:for="{{teamlist}}" data-name="{{item._id}}" bindtap='shens'>
+            <view class="list" wx:key="item" wx:for="{{teamlist}}" data-id="{{item._id}}" bindtap='shens'>
               <view class="two">
                 <view class="left">
                   <image class="head" src="{{item.logo[0].url}}"></image>
@@ -23,13 +23,13 @@
               <view class="two">
                 <view class="left">
                   <image class="head" src="{{item.logo[0].url}}"></image>
-                  <text class="group" data-id="{{item._id}}" data-name="{{item._id}}" bindtap='canshen'>{{item.team_name}}</text>
+                  <text class="group" data-id="{{item._id}}" data-name="{{item._id}}" data-route="compete" bindtap='shen'>{{item.team_name}}</text>
                   <text class="person">共{{item.match_num}}人</text>
                   <view class="fou"><text>创建人:{{item.create_user}}</text></view>
                   <view class="time"><text class="date">{{item.create_time}}创建</text></view>
                 </view>
                 <view class="right">
-                  <button class="button" wx:if="{{item.status=='0'}}" data-name="{{item._id}}" bindtap='cantong'>通过</button>
+                  <button class="button" wx:if="{{item.status=='0'}}" data-id="{{item._id}}" bindtap='cantong'>通过</button>
                 </view>
               </view>
             </view>
@@ -40,7 +40,7 @@
             <view class="list" wx:key="item" wx:for="{{dissolution}}">
               <view class="two">
                 <view class="left">
-                  <text class="group" data-id="{{item._id}}" data-name="{{item.team_id}}" bindtap='shen'>{{item.team_name}}</text>
+                  <text class="group" data-id="{{item._id}}" data-name="{{item.team_id}}" bindtap='shen' data-route="detail" >{{item.team_name}}</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>

+ 2 - 1
pages/manage/index.wxss

@@ -63,8 +63,9 @@
   float: left;
   margin-left: 7px;
   width: 15%;
-  height: 31px;
+  height: 36.63px;
   overflow: hidden;
+  border-radius: 90px;
 }
 .group{
   font-size: 16px;

+ 3 - 5
pages/ranking/index.js

@@ -8,11 +8,10 @@ Page({
    */
   data: {
     frameStyle: { useTop: true, name: '团队排名', leftArrow: true, useBar: false },
-    hasindex: 3, //当前选择菜单的id
     // 主体高度
     infoHeight: '',
+    //团队排名
     ranking: [],
-    integral: [],
   },
   back: function () {
     wx.navigateBack({ url: '/pages/home/index' })
@@ -21,10 +20,10 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    // 计算高度
+    this.searchHeight();
     // 监听用户是否登录
     this.watchLogin();
-    // 计算高度
-    this.searchHeight()
   },
   // 监听用户是否登录
   watchLogin: function () {
@@ -41,7 +40,6 @@ Page({
               let datacan = res.data.data
               that.setData({
                 ranking: datacan,
-                integral: datacan,
               });
             } else {
               wx.showToast({

+ 1 - 1
pages/ranking/index.wxml

@@ -27,7 +27,7 @@
             <text class="integral2">队伍</text>
             <text class="integral3">总积分</text>
           </view>
-          <view class="lists" wx:key="item" wx:for="{{integral}}">
+          <view class="lists" wx:key="item" wx:for="{{ranking}}">
             <view class="item sortContent" v-for="(item,index) of list" :key="index">
               <view class="pai">{{index+1}}</view>
               <image class="headtou" src="{{item.logo[0].url}}"></image>

+ 2 - 1
pages/team/index.wxss

@@ -85,8 +85,9 @@
   float: left;
   margin-left: 7px;
   width: 15%;
-  height: 31px;
+  height: 36.63px;
   overflow: hidden;
+  border-radius: 90px;
 }
 .group{
   font-size: 16px;