YY 3 년 전
부모
커밋
7e4a294bee
8개의 변경된 파일31개의 추가작업 그리고 68개의 파일을 삭제
  1. 8 9
      pages/createTeam/index.js
  2. 3 3
      pages/createTeam/index.wxml
  3. 8 8
      pages/dissolution/index.js
  4. 4 14
      pages/me/index.js
  5. 2 1
      pages/me/index.wxml
  6. 5 26
      pages/password/index.js
  7. 1 1
      pages/password/index.wxml
  8. 0 6
      pages/score/index.js

+ 8 - 9
pages/createTeam/index.js

@@ -20,26 +20,26 @@ Page({
         lists: [],
         index: 0,
         item: [],
-        check: [],
+        menbers: [],
         // 上传图片
         fileList: [],
     },
     apply: function (e) {
-        // this.setData({ showModal: false })
-        console.log(this.data.check);
+        this.setData({ showModal: false })
+        console.log(this.data.menbers);
     },
     //选择队员
     checkboxChange: function (e) {
         const that = this;
         let data = e.detail.value;
-        let _id = [];
         let item = that.data.item;
-        let check = [];
-        for (const val of _id) {
+        let menbers = [];
+        for (const val of data) {
             let arr = item.find((i) => i._id == val);
-            if (arr) check.push({ id: arr._id, nickname: arr.nickname, icon: arr.icon })
+            console.log(arr);
+            if (arr) menbers.push({ id: arr._id, nickname: arr.nickname, icon: arr.icon })
         }
-        that.setData({ check: check })
+        that.setData({ menbers: menbers })
     },
     //显示对话框
     clickme: function () {
@@ -181,7 +181,6 @@ Page({
                     data: {},
                     header: {},
                     success: res => {
-                        console.log(res);
                         that.setData({ item: res.data.data })
                     },
                     error: err => {

+ 3 - 3
pages/createTeam/index.wxml

@@ -38,11 +38,11 @@
                         <view class="two_main">
                             <view class="two_1" wx:key="item1" wx:for="{{menbers}}">
                                 <view class="team_1">
-                                    <image class="two_logo1" src="{{item1.icon}}"></image>
+                                    <image class="two_logo1" src="{{item1.icon[0].url}}"></image>
                                     <image bindtap='delList' class="two_jian" src="/image/jian.png"></image>
                                 </view>
                                 <view class="team_text">
-                                    <input class="input1" name="menbers" value="{{item1.nickname}}" placeholder="队员名称" />
+                                    <input class="input1" name="nickname" value="{{item1.nickname}}" placeholder="队员名称" />
                                 </view>
                             </view>
                             <view class="two_1">
@@ -62,7 +62,7 @@
                     <checkbox-group bindchange="checkboxChange">
                         <label class="checkbox" wx:key="item" wx:for="{{item}}">
                             <text class="modal_box">{{item.nickname}}</text>
-                            <checkbox class="box" value="{{item.nickname}},{{item._id}},{{item.icon}}" checked="{{item.checked}}" />
+                            <checkbox class="box" value="{{item._id}}" checked="{{item.checked}}" />
                         </label>
                     </checkbox-group>
                     <button bindtap="apply" class="modal_button">确定</button>

+ 8 - 8
pages/dissolution/index.js

@@ -11,12 +11,12 @@ Page({
         infoHeight: '',
         frameStyle: { useTop: true, name: '解散申请', leftArrow: true, useBar: false },
         form: {
-            team_id: '234', // 团队id
-            team_name: '我是第一队', // 团队名称
-            create_user: '李铁蛋', // 团队创建人
-            create_id: '23455', // 团队创建人id
-            apply_time: '', // 申请时间
-            resaon: '', // 解散团队原因
+            // team_id: '234', // 团队id
+            // team_name: '我是第一队', // 团队名称
+            // create_user: '李铁蛋', // 团队创建人
+            // create_id: '23455', // 团队创建人id
+            // apply_time: '', // 申请时间
+            // resaon: '', // 解散团队原因
         },
     },
     back: function () {
@@ -31,7 +31,7 @@ Page({
      */
     onLoad: function (options) {
         // 计算高度
-        this.searchHeight()
+        this.searchHeight();
     },
     // 计算高度
     searchHeight: function () {
@@ -92,4 +92,4 @@ Page({
     onShareAppMessage: function () {
 
     }
-})
+})

+ 4 - 14
pages/me/index.js

@@ -16,13 +16,10 @@ Page({
     // 主体高度
     infoHeight: '',
     total: '4',
-    listbisai: [
-      {
-        id: '1', head2: '/image/head2.png', head1: '/image/head1.png', fraction2: '0', groupname2: '马尼拉组', fraction1: '0', site: '第一场', groupname1: '哈拉海组', week: '星期五', time: '13:00',
-        state: '已结束', date: '01.15', start: '未开始'
-      }
-    ],
-    // list: [{ src: '/image/tou.png', },],
+    item:{
+      id: '1', head2: '/image/head2.png', head1: '/image/head1.png', fraction2: '0', groupname2: '马尼拉组', fraction1: '0', site: '第一场', groupname1: '哈拉海组', week: '星期五', time: '13:00',
+      state: '已结束', date: '01.15', start: '未开始'
+    },
     item1: {},
     list3: [],
     //头像
@@ -177,49 +174,42 @@ Page({
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
   },
-
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
   onReady: function () {
 
   },
-
   /**
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
 
   },
-
   /**
    * 生命周期函数--监听页面隐藏
    */
   onHide: function () {
 
   },
-
   /**
    * 生命周期函数--监听页面卸载
    */
   onUnload: function () {
 
   },
-
   /**
    * 页面相关事件处理函数--监听用户下拉动作
    */
   onPullDownRefresh: function () {
 
   },
-
   /**
    * 页面上拉触底事件的处理函数
    */
   onReachBottom: function () {
 
   },
-
   /**
    * 用户点击右上角分享
    */

+ 2 - 1
pages/me/index.wxml

@@ -40,7 +40,7 @@
         <button class="buttons" size="mini">上传比分</button>
       </view>
     </view>
-    <view class="four" wx:if="{{listbisai.length!=0}}" wx:key="item" wx:for="{{listbisai}}">
+    <view class="four" wx:if="{{listbisai.length!=0}}">
       <image src="{{src3}}" class="huang"></image>
       <view class="list1">
         <view class="left3">
@@ -87,6 +87,7 @@
           <text class="tuan">我的团队</text>
           <text class="total">共参加{{list3.length||0}}个队伍</text>
           <text class="chuang" bindtap="create">创建团队</text>
+          <!-- <text class="chuang" bindtap="create" wx:if="{{list3.length<1}}">创建团队</text> -->
         </view>
         <view class="weui-cells mgt-0 {{!showMore? 'hiddenmore' : 'showmore'}}">
           <view wx:key="item" wx:for="{{list3}}" wx:for-index="idx" wx:key="key" bindtap="ToDetails" class="list3 {{idx>1 ? 'more-item' : ''}}">

+ 5 - 26
pages/password/index.js

@@ -10,40 +10,19 @@ Page({
         // 主体高度
         infoHeight: '',
         frameStyle: { useTop: true, name: '修改密码', leftArrow: true, useBar: false },
-        form: {}
+        form: {
+        }
     },
     back: function () {
         wx.navigateBack({ url: '/pages/me/index' })
     },
-    //提交
-    formSubmit: function (e) {
-        console.log('form发生了submit事件,携带数据为:', e.detail.value)
-    },
+
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (e) {
+    onLoad: function (options) {
         // 计算高度
-        this.searchHeight()
-        const that = this;
-        // 获取用户信息
-        wx.getStorage({
-            key: 'token',
-            success: function (res) {
-                wx.request({
-                    url: `${app.globalData.publicUrl}/courtAdmin/api/user/updatePwd`, //接口地址
-                    method: "post",
-                    data: { "password": "" },
-                    header: {},
-                    success: res => {
-                        console.log(res);
-                    },
-                    error: err => {
-                        console.log(err);
-                    }
-                })
-            }
-        })
+        this.searchHeight();
     },
     // 计算高度
     searchHeight: function () {

+ 1 - 1
pages/password/index.wxml

@@ -3,7 +3,7 @@
         <form catchsubmit="formSubmit" catchreset="formReset">
             <view class="one">
                 <view class="text">输入新密码</view>
-                <input class="input" name="password" value="{{form.password}}" placeholder="{{password}}" />
+                <input class="input" name="password" value="{{form.password}}" placeholder="请输入新密码" />
             </view>
             <view class="btn-area">
                 <button class="button" formType="submit">保存</button>

+ 0 - 6
pages/score/index.js

@@ -68,13 +68,7 @@ Page({
   back: function () {
     wx.navigateBack({ url: '/pages/me/index' })
   },
-  //点击我显示底部弹出框
-  clickme: function () {
-    this.showModal();
-  },
-
   //显示对话框
-
   clickme: function () {
     this.setData({
       showModal: true