Parcourir la source

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

zs il y a 3 ans
Parent
commit
ced6385237

+ 66 - 0
pages/information/index.js

@@ -0,0 +1,66 @@
+//  pages/information/index.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 3 - 0
pages/information/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
pages/information/index.wxml

@@ -0,0 +1,2 @@
+<!-- pages/information/index.wxml-->
+<text> pages/information/index.wxml</text>

+ 1 - 0
pages/information/index.wxss

@@ -0,0 +1 @@
+/*  pages/information/index.wxss */

+ 2 - 0
app.json

@@ -12,6 +12,8 @@
     "pages/competition/index",
     "pages/competition/index",
     "pages/ranking/index",
     "pages/ranking/index",
     "pages/me/index",
     "pages/me/index",
+    "pages/information/index",
+    "pages/score/index",
     "pages/index/index",
     "pages/index/index",
     "pages/register/index",
     "pages/register/index",
     "pages/logs/logs"
     "pages/logs/logs"

BIN
image/head.jpg


BIN
image/logo1.png


BIN
image/logo2.png


+ 104 - 0
pages/information/index.js

@@ -0,0 +1,104 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '个人信息', leftArrow: true, useBar: false },
+        form: {
+            src: '/image/tou.png',
+            ranks: '比赛第一名队',
+            mechanism: '吉佳通达',
+            sex: ['男', '女'],
+            objectSex: [{ id: 0, name: '男' }, { id: 1, name: '女' },],
+           
+            post: '后勤部长',
+            phone: '12311111111',
+            email: '123@qq.com',
+        },
+         index: 0,
+    },
+    //选择
+    bindPickerChange: function (e) {
+        console.log('picker发送选择改变,携带值为', e.detail.value)
+        this.setData({
+            index: e.detail.value
+        })
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/me/index' })
+    },
+    //提交
+    formSubmit: function (e) {
+        console.log('form发生了submit事件,携带数据为:', e.detail.value)
+      },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    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 () {
+
+    }
+})

+ 6 - 0
pages/information/index.json

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

+ 41 - 0
pages/information/index.wxml

@@ -0,0 +1,41 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="main" style="height:{{infoHeight}}px;">
+        <form catchsubmit="formSubmit" catchreset="formReset">
+            <view class="form" style="height:{{infoHeight-140}}px;">
+                <view class="zero">
+                    <view class="text">头像</view>
+                    <image src="{{form.src}}" class="tou"></image>
+                </view>
+                <view class="one">
+                    <view class="text">昵称</view>
+                    <input class="input" name="ranks" value="{{form.ranks}}" placeholder="" />
+                </view>
+                <view class="one">
+                    <view class="text">机构</view>
+                    <input class="input" name="mechanism" value="{{form.mechanism}}" placeholder="" />
+                </view>
+                <view class="one">
+                    <view class="text">性别</view>
+                    <picker name="sex" bindchange="bindPickerChange" value="{{index}}" range="{{form.sex}}">
+                        <view class="input">{{form.sex[index]}}</view>
+                    </picker>
+                </view>
+                <view class="one">
+                    <view class="text">岗位</view>
+                    <input class="input" name="post" value="{{form.post}}" placeholder="" />
+                </view>
+                <view class="one">
+                    <view class="text">手机号</view>
+                    <input class="input" name="phone" value="{{form.phone}}" placeholder="" />
+                </view>
+                <view class="one">
+                    <view class="text">邮箱</view>
+                    <input class="input" name="email" value="{{form.email}}" placeholder="" />
+                </view>
+            </view>
+            <view class="btn-area">
+                <button class="button" formType="submit">保存</button>
+            </view>
+        </form>
+    </view>
+</mobile-main>

+ 49 - 0
pages/information/index.wxss

@@ -0,0 +1,49 @@
+.main {
+  position: relative;
+  width: 100%;
+  background-color: #ffffff;
+  padding: 20px 0 0 0;
+}
+
+.zero{
+  border-bottom: 1px solid #dddddd;
+  margin: 0 20px;
+  height: 50px;
+}
+.one {
+  border-bottom: 1px solid #dddddd;
+  margin: 0 20px;
+  height: 40px;
+}
+
+.text {
+  position: relative;
+  top: 10px;
+  width: 40%;
+}
+.tou{
+  width: 50px;
+  height: 50px;
+  position: relative;
+  left: 280px;
+  top: -30px;
+}
+
+.input {
+  position: relative;
+  text-align: right;
+  left: 130px;
+  top: -10px;
+  width: 60%;
+  font-size: 14px;
+}
+.button{
+  position: relative;
+  top: 50px;
+  width: 300px !important;
+  background-image: linear-gradient(to right, #fd3c1e , #c74df0);
+  border-radius: 30px; 
+  color:#ffffff; 
+  text-align: center;
+  font-size: small;
+}

+ 13 - 0
pages/me/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 url = app.globalData.url
 Page({
 Page({
 
 
   /**
   /**
@@ -52,6 +53,18 @@ Page({
       showMore: !this.data.showMore
       showMore: !this.data.showMore
     })
     })
   },
   },
+  //修改个人信息
+  modify:function(){
+    wx.navigateTo({
+      url: `/pages/information/index`,
+    })
+  },
+  //上传比分
+  upload:function(){
+    wx.navigateTo({
+      url: `/pages/score/index`,
+    })
+  },
   /**
   /**
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */

+ 3 - 3
pages/me/index.wxml

@@ -23,9 +23,9 @@
           <view class="biao">
           <view class="biao">
             <text class=" icon iconfont icon-qi"></text>
             <text class=" icon iconfont icon-qi"></text>
           </view>
           </view>
-          <view class="qian">
+          <view class="qian" bindtap="modify">
             <text class="text3">{{item.address}}</text>
             <text class="text3">{{item.address}}</text>
-            <van-icon name="arrow" color="rgb(177, 177, 177)" />
+            <van-icon  name="arrow" color="rgb(177, 177, 177)" />
           </view>
           </view>
         </view>
         </view>
       </view>
       </view>
@@ -34,7 +34,7 @@
       <view class="left2">
       <view class="left2">
         <text class="text4">可对正在进行的比赛上次比分</text>
         <text class="text4">可对正在进行的比赛上次比分</text>
       </view>
       </view>
-      <view class="right2">
+      <view class="right2"  bindtap="upload">
         <button class="buttons" size="mini">上传比分</button>
         <button class="buttons" size="mini">上传比分</button>
       </view>
       </view>
     </view>
     </view>

+ 90 - 0
pages/score/index.js

@@ -0,0 +1,90 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '比赛信息', leftArrow: true, useBar: false },
+        list: [
+            {
+                time: '1-15 15:00',
+                ranks1: '哈拉海队幼儿园组',
+                score1: '2',
+                score2: '1',
+                ranks2: '马尼拉老年组',
+                state: '未开始'
+            }
+        ]
+    },
+    back: function () {
+        wx.navigateBack({ url: '/pages/me/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 () {
+
+    }
+})

+ 6 - 0
pages/score/index.json

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

+ 115 - 0
pages/score/index.wxml

@@ -0,0 +1,115 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="main" style="height:{{infoHeight}}px;">
+        <view class="one" wx:key="item" wx:for="{{list}}">
+            <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 class="two" style="height:{{infoHeight-250}}px;">
+            <view class="two_title">参赛阵容</view>
+            <view class="two_1">
+                <view class="two_1_1">
+                    <image class="two_logo1" src="/image/logo1.png"></image>
+                    <text class="two_1_text">哈拉海队</text>
+                </view>
+                <view class="two_1_2">
+                    <image class="two_logo2" src="/image/head.png"></image>
+                    <text class="two_1_text">小孩1</text>
+                </view>
+                <view class="two_1_2">
+                    <image class="two_logo2" src="/image/head.png"></image>
+                    <text class="two_1_text">小孩1</text>
+                </view>
+                <view class="two_1_2">
+                    <image class="two_logo2" src="/image/head.png"></image>
+                    <text class="two_1_text">小孩1</text>
+                </view>
+                <view class="two_1_2">
+                    <image class="two_logo2" src="/image/head.png"></image>
+                    <text class="two_1_text">小孩1</text>
+                </view>
+                <view class="two_1_2">
+                    <image class="two_logo2" src="/image/head.png"></image>
+                    <text class="two_1_text">小孩1</text>
+                </view>
+            </view>
+            <view class="two_2">
+                <view class="two_2_1">
+                    <image class="two_logo1" src="/image/logo2.png"></image>
+                    <text class="two_2_text">哈拉海队</text>
+                </view>
+                <view class="two_2n1">
+                    <view class="two_2_2">
+                        <image class="two_logo2" src="/image/head.png"></image>
+                        <text class="two_2_text">老头1</text>
+                    </view>
+                    <view class="two_2_2">
+                        <image class="two_logo2" src="/image/head.png"></image>
+                        <text class="two_2_text">老头2</text>
+                    </view>
+                    <view class="two_2_2">
+                        <image class="two_logo2" src="/image/head.png"></image>
+                        <text class="two_2_text">老头3</text>
+                    </view>
+                    <view class="two_2_2">
+                        <image class="two_logo2" src="/image/head.png"></image>
+                        <text class="two_2_text">老头4</text>
+                    </view>
+                    <view class="two_2_2">
+                        <image class="two_logo2" src="/image/head.png"></image>
+                        <text class="two_2_text">老头5</text>
+                    </view>
+                </view>
+                <view class="two_2n2">
+                    <view class="two_2_2">
+                        <image class="two_logo2" src="/image/head.png"></image>
+                        <text class="two_2_text">老头6</text>
+                    </view>
+                    <view class="two_2_2">
+                        <image class="two_logo2" src="/image/head.png"></image>
+                        <text class="two_2_text">老头7</text>
+                    </view>
+                    <view class="two_2_2">
+                        <image class="two_logo2" src="/image/head.png"></image>
+                        <text class="two_2_text">老头8</text>
+                    </view>
+                    <view class="two_2_2">
+                        <image class="two_logo2" src="/image/head.png"></image>
+                        <text class="two_2_text">老头9</text>
+                    </view>
+                    <view class="two_2_2">
+                        <image class="two_logo2" src="/image/head.png"></image>
+                        <text class="two_2_text">老头10</text>
+                    </view>
+                </view>
+            </view>
+        </view>
+        <view class="btn">
+            <button class="button">上传比分</button>
+        </view>
+    </view>
+</mobile-main>

+ 164 - 0
pages/score/index.wxss

@@ -0,0 +1,164 @@
+.main {
+  position: relative;
+  width: 100%;
+  background-color: #f0f0f0;
+}
+.one {
+  position: relative;
+  background-color: #ffffff;
+  height: 140px;
+  margin-bottom: 10px;
+  padding: 10px 20px;
+}
+.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;
+}
+.one_2_2 {
+  text-align: center;
+}
+.text1 {
+  background-color: #999;
+  text-align: center;
+  color: #00427b;
+  font-size: 30px;
+  font-weight: bold;
+  text-decoration: line-through;
+  text-decoration-color: #fff;
+}
+.text2 {
+  font-size: 40px;
+  font-weight: bold;
+  margin: 0 5px;
+}
+.text {
+  font-size: 15px;
+  position: relative;
+  top: 9px;
+  text-align: center;
+}
+.text3 {
+  background-color: #999;
+  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 {
+  position: relative;
+  top: 10px;
+  height: 30px;
+  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;
+}
+.two {
+  position: relative;
+  background-color: #ffffff;
+  /* height: 320px; */
+  /* margin-bottom: 20px; */
+  padding: 10px 20px;
+}
+.two_title{
+  font-size: 18px;
+  margin: 0 0 8px 0;
+}
+.two_1{
+  margin: 10px 0 0px 0;
+  height: 70px;
+}
+.two_1_1{
+  width: 56px;
+  float: left;
+  margin: 0 4px 0 0;
+}
+.two_1_2{
+  text-align: center;
+  width: 47px;
+  float: left;
+  margin: 0 8px 0 0;
+}
+.two_logo1 {
+  align-items: center;
+  width: 50px;
+  height: 45px;
+}
+.two_logo2 {
+  align-items: center;
+  width: 45px;
+  height: 45px;
+  border: solid 1px #999;
+}
+.two_1_text{
+  font-size: 14px;
+}
+.two_2{
+  margin: 10px 0 0 0;
+}
+.two_2n2{
+  position: relative;
+  top:10px;
+  left: 60px;
+}
+.two_2_1{
+  width: 56px;
+  float: left;
+  margin: 0 4px 0 0;
+}
+.two_2_2{
+  text-align: center;
+  width: 47px;
+  float: left;
+  margin: 0 8px 0 0;
+}
+.two_2_text{
+  font-size: 14px;
+}
+.btn{
+  height: 60px;
+  background-color: #fff;
+}
+.button{
+  width: 300px !important;
+  background-color: #ff7815;
+  border-radius: 30px; 
+  color:#ffffff; 
+  text-align: center;
+}

+ 0 - 3
pages/ss/index.wxml

@@ -1,3 +0,0 @@
-<view>
-    <view>111</view>
-</view>

+ 37 - 37
project.config.json

@@ -1,40 +1,40 @@
 {
 {
-  "description": "项目配置文件",
-  "setting": {
-    "urlCheck": false,
-    "es6": false,
-    "enhance": true,
-    "postcss": true,
-    "preloadBackgroundData": false,
-    "minified": true,
-    "coverView": true,
-    "autoAudits": false,
-    "showShadowRootInWxmlPanel": true,
-    "uglifyFileName": false,
-    "checkInvalidKey": true,
-    "uploadWithSourceMap": true,
-    "compileHotReLoad": false,
-    "lazyloadPlaceholderEnable": false,
-    "useMultiFrameRuntime": true,
-    "useApiHook": true,
-    "useApiHostProcess": true,
-    "babelSetting": {
-      "ignore": [],
-      "disablePlugins": [],
-      "outputPath": ""
+    "description": "项目配置文件",
+    "setting": {
+        "urlCheck": false,
+        "es6": false,
+        "enhance": true,
+        "postcss": true,
+        "preloadBackgroundData": false,
+        "minified": true,
+        "coverView": true,
+        "autoAudits": false,
+        "showShadowRootInWxmlPanel": true,
+        "uglifyFileName": false,
+        "checkInvalidKey": true,
+        "uploadWithSourceMap": true,
+        "compileHotReLoad": false,
+        "lazyloadPlaceholderEnable": false,
+        "useMultiFrameRuntime": true,
+        "useApiHook": true,
+        "useApiHostProcess": true,
+        "babelSetting": {
+            "ignore": [],
+            "disablePlugins": [],
+            "outputPath": ""
+        },
+        "useIsolateContext": false,
+        "packNpmManually": false,
+        "packNpmRelationList": [],
+        "minifyWXSS": true,
+        "disableUseStrict": false,
+        "minifyWXML": true,
+        "showES6CompileOption": false,
+        "useCompilerPlugins": false
     },
     },
-    "useIsolateContext": false,
-    "packNpmManually": false,
-    "packNpmRelationList": [],
-    "minifyWXSS": true,
-    "disableUseStrict": false,
-    "minifyWXML": true,
-    "showES6CompileOption": false,
-    "useCompilerPlugins": false
-  },
-  "compileType": "miniprogram",
-  "libVersion": "2.23.0",
-  "appid": "wx0fd4b616bc7cf3bb",
-  "projectname": "%E8%B5%9B%E5%9C%BA",
-  "condition": {}
+    "compileType": "miniprogram",
+    "libVersion": "2.23.0",
+    "appid": "touristappid",
+    "projectname": "%E8%B5%9B%E5%9C%BA",
+    "condition": {}
 }
 }