Prechádzať zdrojové kódy

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

zs 3 rokov pred
rodič
commit
6b724bb4f9

+ 2 - 2
app.json

@@ -14,8 +14,8 @@
     "pages/me/index",
     "pages/me/index",
     "pages/createTeam/index",
     "pages/createTeam/index",
     "pages/information/index",
     "pages/information/index",
-    "pages/score/index",
     "pages/photo/index",
     "pages/photo/index",
+    "pages/score/index",
     "pages/add/index",
     "pages/add/index",
     "pages/password/index",
     "pages/password/index",
     "pages/auditTeam/index",
     "pages/auditTeam/index",
@@ -75,4 +75,4 @@
       "desc": "你的位置信息将用于小程序位置接口的效果展示"
       "desc": "你的位置信息将用于小程序位置接口的效果展示"
     }
     }
   }
   }
-}
+}

BIN
image/del.png


+ 2 - 2
pages/auditTeam/index.wxml

@@ -4,8 +4,8 @@
             <image class="logo" src="/image/logo1.png"></image>
             <image class="logo" src="/image/logo1.png"></image>
             <text class="text1">{{item.team}}</text>
             <text class="text1">{{item.team}}</text>
             <text class="text2">申请时间:{{item.time}}</text>
             <text class="text2">申请时间:{{item.time}}</text>
-       <button size="mini" class="btn1">驳回</button>
-        <button  size="mini" class="btn2">通过</button>
+            <button size="mini" class="btn1">驳回</button>
+            <button size="mini" class="btn2">通过</button>
         </view>
         </view>
     </view>
     </view>
 </mobile-main>
 </mobile-main>

+ 13 - 11
pages/createTeam/index.wxml

@@ -24,20 +24,22 @@
                         </picker>
                         </picker>
                     </view>
                     </view>
                 </view>
                 </view>
-                <view class="bottom" style="height:{{infoHeight-250}}px;">
+                <view class="bottom" style="height:{{infoHeight-270}}px;">
                     <view class="two">
                     <view class="two">
                         <view class="two_title"> 团队队员</view>
                         <view class="two_title"> 团队队员</view>
-                        <view class="two_1" wx:key="item" wx:for="{{lists}}">
-                            <view class="team_1">
-                                <image class="two_logo1" src="{{item.logo}}"></image>
-                                <image bindtap='delList' class="two_jian" src="{{item.jian}}"></image>
+                        <view class="two_main">
+                            <view class="two_1" wx:key="item" wx:for="{{lists}}">
+                                <view class="team_1">
+                                    <image class="two_logo1" src="{{item.logo}}"></image>
+                                    <image bindtap='delList' class="two_jian" src="{{item.jian}}"></image>
+                                </view>
+                                <view class="team_text">{{item.text}}</view>
                             </view>
                             </view>
-                            <view class="team_text">{{item.text}}</view>
-                        </view>
-                        <view class="two_1">
-                            <view class="team_1">
-                                <view class="tianjia">
-                                    <text bindtap='addList' class=" icon iconfont icon-jia"></text>
+                            <view class="two_1">
+                                <view class="team_1">
+                                    <view class="tianjia">
+                                        <text bindtap='addList' class=" icon iconfont icon-jia"></text>
+                                    </view>
                                 </view>
                                 </view>
                             </view>
                             </view>
                         </view>
                         </view>

+ 3 - 1
pages/createTeam/index.wxss

@@ -64,7 +64,9 @@
   font-size: 16px;
   font-size: 16px;
   padding: 20px 0 0 20px;
   padding: 20px 0 0 20px;
 }
 }
-
+.two_main{
+  padding: 0 20px;
+}
 .two_1 {
 .two_1 {
   padding: 10px 8px;
   padding: 10px 8px;
   width: 20%;
   width: 20%;

+ 42 - 10
pages/photo/index.js

@@ -1,6 +1,7 @@
 // pages/login/login.js
 // pages/login/login.js
 import WxValidate from '../../utils/wxValidate'
 import WxValidate from '../../utils/wxValidate'
 const app = getApp()
 const app = getApp()
+var isAll = false
 Page({
 Page({
 
 
     /**
     /**
@@ -11,20 +12,17 @@ Page({
         infoHeight: '',
         infoHeight: '',
         frameStyle: { useTop: true, name: '已上传图片', leftArrow: true, useBar: false },
         frameStyle: { useTop: true, name: '已上传图片', leftArrow: true, useBar: false },
         list: [
         list: [
+
             {
             {
-                id: '1', name: '朝阳沟第三节力气大赛', time: '2020.11.12', shop1: '/image/shop1.png', shop2: '/image/shop2.png', shop2: '/image/shop2.png',
+                id: '1', name: '朝阳沟第三节力气大赛', time: '2020.11.12', shop1: '/image/shop1.png', shop2: '/image/shop2.png', shop3: '/image/shop3.png',
+
             },
             },
             {
             {
-                id: '1', name: '朝阳沟第三节力气大赛', time: '2020.11.12', shop1: '/image/shop1.png', shop2: '/image/shop2.png', shop2: '/image/shop2.png',
+                id: '1', name: '朝阳沟第三节力气大赛', time: '2020.11.12', shop1: '/image/shop1.png', shop2: '/image/shop2.png', shop3: '/image/shop3.png',
+
             }
             }
-        ]
-    },
-    //选择
-    bindPickerChange: function (e) {
-        console.log('picker发送选择改变,携带值为', e.detail.value)
-        this.setData({
-            index: e.detail.value
-        })
+        ],
+
     },
     },
     back: function () {
     back: function () {
         wx.navigateBack({ url: '/pages/me/index' })
         wx.navigateBack({ url: '/pages/me/index' })
@@ -33,6 +31,40 @@ Page({
     formSubmit: function (e) {
     formSubmit: function (e) {
         console.log('form发生了submit事件,携带数据为:', e.detail.value)
         console.log('form发生了submit事件,携带数据为:', e.detail.value)
     },
     },
+
+    //实现全选的点击事件,首先要定义一个全局变量isAll=false,让复选框默认为不勾选状态
+    checkq: function () {
+        var list = this.data.list;
+        console.log(list);
+        isAll = !isAll;
+        if (isAll) {
+            for (var i = 0; i < list.length; i++) {
+                var item = list[i];
+                item.isCheck = true
+                list.splice(i, 1, item)
+            }
+        } else {
+            for (var i = 0; i < list.length; i++) {
+                var item = list[i];
+                item.isCheck = false
+                list.splice(i, 1, item)
+            }
+        }
+        this.setData({
+            list: list
+        })
+    },
+    //点击减号删除
+    delList: function () {
+        var list = this.data.list;
+        list.pop();      //实质是删除lists数组内容,使for循环少一次
+        this.setData({
+            list: list,
+        })
+    },
+    //删除图片
+    deleteImg: function (e) {
+    },
     /**
     /**
      * 生命周期函数--监听页面加载
      * 生命周期函数--监听页面加载
      */
      */

+ 18 - 7
pages/photo/index.wxml

@@ -1,19 +1,30 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="main" style="height:{{infoHeight}}px;">
     <view slot="info" class="main" style="height:{{infoHeight}}px;">
-
         <view class="one">
         <view class="one">
-            <text class="text1">多选</text>
-            <text class="text2">删除</text>
+            <text class="text1" bindtap="checkq" checked="{{isAll}}">多选</text>
+            <text class="text2" bindtap="delList">删除</text>
         </view>
         </view>
-        <view class="two" wx:key="item" wx:for="{{list}}">
+        <view class="two" wx:key="item" wx:for="{{list}}" bindtap="chlik">
             <view class="two_text">
             <view class="two_text">
                 <text class="text3">{{item.name}}</text>
                 <text class="text3">{{item.name}}</text>
                 <text class="text4">{{item.time}}</text>
                 <text class="text4">{{item.time}}</text>
             </view>
             </view>
             <view class="two_shop">
             <view class="two_shop">
-                <image class="shop1" src="{{item.shop1}}"></image>
-                <image class="shop2" src="{{item.shop2}}"></image>
-                <image class="shop3" src="{{item.shop2}}"></image>
+                <view class="photo1">
+                    <image class="shop" src="{{item.shop1}}"></image>
+                    <checkbox class="check" checked="{{item.isCheck}}"></checkbox>
+                    <image class="del" bindtap="deleteImg" src="/image/del.png"></image>
+                </view>
+                <view class="photo1">
+                    <image class="shop" src="{{item.shop2}}"></image>
+                    <checkbox class="check" checked="{{item.isCheck}}"></checkbox>
+                    <image class="del" bindtap="deleteImg" src="/image/del.png"></image>
+                </view>
+                <view class="photo1">
+                    <image class="shop" src="{{item.shop3}}"></image>
+                    <checkbox class="check" checked="{{item.isCheck}}"></checkbox>
+                    <image class="del" bindtap="deleteImg" src="/image/del.png"></image>
+                </view>
             </view>
             </view>
         </view>
         </view>
         <view class="btn-area">
         <view class="btn-area">

+ 51 - 12
pages/photo/index.wxss

@@ -35,32 +35,35 @@
 }
 }
 
 
 .two_shop {
 .two_shop {
+  width: 100%;
   background-color: #ffffff;
   background-color: #ffffff;
   padding: 10px 0;
   padding: 10px 0;
+  height: 170px;
 }
 }
 
 
-.shop1 {
-  width: 162px;
-  height: 80px;
-  margin: 0px 10px 10px 0;
+.photo1 {
+  width: 50%;
+  float: left;
+  height: 90px;
 }
 }
 
 
-.shop2 {
+.shop {
   width: 162px;
   width: 162px;
   height: 80px;
   height: 80px;
-  margin: 0px 0px 10px 0;
+  margin: 0px 5px 10px 0;
 }
 }
-
-.shop3 {
-  width: 162px;
-  height: 80px;
-  margin: 0px 10px 0px 0;
+.check {
+  position: relative;
+  left: 0px;
+  top: -97px;
+  z-index: 99999;
 }
 }
 
 
 .btn-area {
 .btn-area {
   position: relative;
   position: relative;
   top: 20px;
   top: 20px;
 }
 }
+
 .button {
 .button {
   width: 300px !important;
   width: 300px !important;
   background-image: linear-gradient(to right, #fd3c1e, #c74df0);
   background-image: linear-gradient(to right, #fd3c1e, #c74df0);
@@ -68,4 +71,40 @@
   color: #ffffff;
   color: #ffffff;
   text-align: center;
   text-align: center;
   font-size: small;
   font-size: small;
-}
+}
+
+.del {
+  width: 20px;
+  height: 20px;
+  position: relative;
+  top: -92px;
+  left: 112px;
+  background-color: #ffffff;
+  border-radius: 10px
+}
+
+/* 重写 checkbox 样式 */
+ /* 未选中的 背景样式 */
+ checkbox .wx-checkbox-input{
+  border-radius: 50%;/* 圆角 */
+  width: 46rpx; /* 背景的宽 */
+  height: 46rpx; /* 背景的高 */
+}
+/* 选中后的 背景样式*/
+checkbox .wx-checkbox-input.wx-checkbox-input-checked{
+  border: 1rpx solid #17c911;
+  background: #17c911;
+}
+/* 选中后的 对勾样式 */
+checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
+  border-radius: 50%; 
+  width: 40rpx;/* 选中后对勾大小,不要超过背景的尺寸 */
+  height: 40rpx;/* 选中后对勾大小,不要超过背景的尺寸 */
+  line-height: 40rpx;
+  text-align: center;
+  font-size:30rpx; /* 对勾大小 30rpx */
+  color:#fff; /* 对勾颜色 白色 */
+  background: transparent;
+  transform:translate(-50%, -50%) scale(1);
+  -webkit-transform:translate(-50%, -50%) scale(1);
+}

+ 31 - 24
pages/score/index.wxml

@@ -55,34 +55,41 @@
             <button class="button">上传比分</button>
             <button class="button">上传比分</button>
         </view>
         </view>
         <view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
         <view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
-      <view class="modal" wx:if="{{showModal}}">
-            <form catchsubmit="formSubmit" catchreset="formReset">
+        <view class="modal" wx:if="{{showModal}}">
+            <view class="title">
                 <view class="modal_title">上传比分</view>
                 <view class="modal_title">上传比分</view>
-              <view bindtap="go">  <image class="cuo" src="/image/cuo.png"></image></view>
-                <view class="modal_1">
-                    <view class="model_1l">
-                        <image class="two_logo1" src="{{form.logo1}}"></image>
-                        <view>{{form.team1}}</view>
-                    </view>
-                    <view class="model_1r">
-                        <input class="input" name="num1" type="number" value="{{form.num1}}" placeholder="" />
-                        <text class="model_text">积分</text>
-                        <input class="input" name="num2" type="number" value="{{form.num2}}" placeholder="" />
-                    </view>
+                <view class="go" bindtap="go">
+                    <image class="cuo" src="/image/cuo.png"></image>
                 </view>
                 </view>
-                <view class="modal_2">
-                    <view class="model_1l">
-                        <image class="two_logo1" src="{{form.logo2}}"></image>
-                        <view>{{form.team2}}</view>
+            </view>
+
+            <form catchsubmit="formSubmit" catchreset="formReset">
+                <view class="modal_main">
+                    <view class="modal_l">
+                        <view class="modal_l1">
+                            <image class="two_logo1" src="{{form.logo1}}"></image>
+                            <view>{{form.team1}}</view>
+                        </view>
+                        <view class="modal_l2">
+                            <image class="two_logo1" src="{{form.logo2}}"></image>
+                            <view>{{form.team2}}</view>
+                        </view>
                     </view>
                     </view>
-                    <view class="model_1r">
-                        <input class="input" name="num3" type="number" value="{{form.num3}}" placeholder="" />
-                        <text class="model_text">积分</text>
-                        <input class="input" name="num4" type="number" value="{{form.num4}}" placeholder="" />
+                    <view class="modal_r">
+                        <view class="modal_r1">
+                            <input class="input" name="num1" type="number" value="{{form.num1}}" placeholder="" />
+                            <text class="modal_text">积分</text>
+                            <input class="input" name="num2" type="number" value="{{form.num2}}" placeholder="" />
+                        </view>
+                        <view class="modal_r2">
+                            <input class="input" name="num3" type="number" value="{{form.num3}}" placeholder="" />
+                            <text class="modal_text">积分</text>
+                            <input class="input" name="num4" type="number" value="{{form.num4}}" placeholder="" />
+                        </view>
+                    </view>
+                    <view class="modal_btn">
+                        <button class="button" formType="submit">保存</button>
                     </view>
                     </view>
-                </view>
-                <view class="model_btn">
-                    <button class="button" formType="submit">保存</button>
                 </view>
                 </view>
             </form>
             </form>
         </view>
         </view>

+ 51 - 32
pages/score/index.wxss

@@ -221,51 +221,70 @@
   padding-top: 20rpx;
   padding-top: 20rpx;
 }
 }
 
 
+.title {
+  width: 100%;
+  padding: 20px;
+}
+
 .modal_title {
 .modal_title {
-  margin: 20px;
+  width: 40%;
+  float: left;
   font-size: 18px;
   font-size: 18px;
 }
 }
-.model_1{
-  width: 100%;
-  position: relative;
-  height: 70px;
+
+.go {
+  width: 50%;
+  float: left;
+  text-align: right;
 }
 }
-.model_2{
-  width: 100%;
-  position: relative;
-  top: 10px;
-  height: 70px;
+
+.cuo {
+  width: 20px;
+  height: 20px;
+}
+
+.modal_main {
+  padding: 20px;
 }
 }
-.model_1l{
+
+.modal_l {
   width: 30%;
   width: 30%;
   float: left;
   float: left;
-  height: 70px;
-  margin: 0 0 0 20px;
 }
 }
-.model_text{
+
+.modal_r {
+  width: 60%;
+  float: left;
+}
+
+.modal_l1 {
+  margin: 30px 0;
+}
+
+.modal_l2 {
+  margin: 30px 0;
+}
+
+.modal_r1 {
+  height: 60px;
+  padding: 0 0 0 0;
+  margin: 40px 20px;
+}
+
+.modal_r2 {
+  height: 60px;
+  padding: 0 0 0 0;
+  margin: 40px 20px;
+}
+
+.modal_text {
   font-size: 16px;
   font-size: 16px;
   float: left;
   float: left;
 }
 }
-.input{
+
+.input {
   width: 50px;
   width: 50px;
   float: left;
   float: left;
   text-align: center;
   text-align: center;
   border-bottom: 1px solid rgb(228, 228, 228);
   border-bottom: 1px solid rgb(228, 228, 228);
 }
 }
-.model_1r{
-  width: 60%;
-  height: 60px;
-  float: left;
-  padding: 35px 8px;
-}
-.model_btn {
-  height: 60px;
-  background-color: #fff;
-}
-.cuo{
-  width: 20px;
-  position: relative;
-  top: -50px;
-  left: 330px;
-  height: 20px;
-}