ソースを参照

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

lrf 2 年 前
コミット
afb6cef43f

+ 6 - 2
app.json

@@ -2,12 +2,15 @@
     "pages": [
         "pages/index/index",
         "pages/login/index",
+        "pages/register/index",
         "pages/home/index",
         "pages/news/index",
         "pages/topic/index",
         "pages/my/index",
-        "pages/test/index",
-        "pages/register/index"
+        "pages/my/userInfo",
+        "pages/usermymatch/index",
+        "pages/setting/index",
+        "pages/test/index"
     ],
     "usingComponents": {
         "van-sidebar": "@vant/weapp/sidebar/index",
@@ -24,6 +27,7 @@
         "van-tabbar": "@vant/weapp/tabbar/index",
         "van-tabbar-item": "@vant/weapp/tabbar-item/index",
         "van-uploader": "@vant/weapp/uploader/index",
+        "van-popup": "@vant/weapp/popup/index",
         "van-picker": "@vant/weapp/picker/index"
     },
     "window": {

+ 1 - 1
commpents/mobile-frame/index.wxml

@@ -1,5 +1,5 @@
 <view class="body">
-    <view class="head" wx:if="{{frameStyle.useTop}}" style="background:{{frameStyle.topBg||'#EDEDED'}};">
+    <view class="head" wx:if="{{frameStyle.useTop}}" style="background:{{frameStyle.topBg||'#F5F5F9'}};">
         <top frameStyle="{{frameStyle}}" bind:back="back"></top>
     </view>
     <view class="info">

BIN
image/ceshi.jpg


BIN
image/icon.jpg


+ 85 - 25
pages/home/index.js

@@ -1,4 +1,5 @@
 const app = getApp()
+import { match_status } from '../../utils/dict';
 Page({
 
     /**
@@ -6,32 +7,36 @@ Page({
      */
     data: {
         frameStyle: { useTop: true, name: '首页', leftArrow: false, useBar: true },
+        //查询条件
         searchInfo: {
             name: '',
-            type: ''
+            type: '',
+            city_type: '',
+            match_type: '',
+            type_name: '',
+            match_name: '',
+            city_name: ''
         },
-        // 查询选项
-        searchType: '0',
-        btnList: [
-            {
-                title: '运动类型',
-                icon: 'arrow-down',
-                value: '0'
-            }, {
-                title: '城市',
-                icon: 'arrow-down',
-                value: '1'
-            }, {
-                title: '比赛状态',
-                icon: 'arrow-down',
-                value: '2'
-            }
+        //是否显示
+        show: false,
+        //按钮类型
+        btntype: '',
+        list: [
+            { id: "1", src: "/image/ceshi.jpg", name: "2021南宁·LYB李永波全球业余羽毛球锦标赛-南宁分站赛", status: '0', time: '2021/10/12-2022/07/15', match_time: '2021/10/12-2022/07/15', address: '广西壮族自治区南宁市李宁体育园羽毛球馆' },
+            { id: "2", src: "/image/ceshi.jpg", name: "李宁·谌龙杯羽毛球单打公开赛【厦门站团体赛】", status: '1', time: '2021/10/12-2022/07/15', match_time: '2021/10/12-2022/07/15', address: '福建省厦门市工人体育馆一楼羽毛球馆' },
+            { id: "3", src: "/image/ceshi.jpg", name: "李宁·谌龙杯羽毛球单打公开赛【厦门站单项赛】", status: '2', time: '2021/10/12-2022/07/15', match_time: '2021/10/12-2022/07/15', address: '福建省厦门市工人体育馆一楼羽毛球馆' },
+            { id: "3", src: "/image/ceshi.jpg", name: "李宁·谌龙杯羽毛球单打公开赛【厦门站单项赛】", status: '3', time: '2021/10/12-2022/07/15', match_time: '2021/10/12-2022/07/15', address: '福建省厦门市工人体育馆一楼羽毛球馆' },
+            { id: "3", src: "/image/ceshi.jpg", name: "李宁·谌龙杯羽毛球单打公开赛【厦门站单项赛】", status: '4', time: '2021/10/12-2022/07/15', match_time: '2021/10/12-2022/07/15', address: '福建省厦门市工人体育馆一楼羽毛球馆' }
         ],
-        typeList:[
-            {
-                
-            }
-        ]
+        typeList: [
+            { label: '', value: '全部' },
+            { label: '1', value: '羽毛球' },
+        ],
+        cityList: [
+            { label: '0', value: '吉林省' },
+            { label: '1', value: '长春市' },
+        ],
+        matchList: match_status
     },
     // 跳转菜单
     tabPath(e) {
@@ -42,14 +47,69 @@ Page({
     onSearch() {
         console.log("搜索");
     },
+    //按钮类型
+    btnChange: function (e) {
+        const that = this;
+        const { value } = e.currentTarget.dataset;
+        that.setData({ btntype: value })
+
+    },
+    //显示弹框
+    showPopup() {
+        this.setData({ show: true });
+    },
+    //关闭弹框
+    onClose() {
+        this.setData({ show: false });
+    },
+    //运动类型选择
+    ontypeConfirm(event) {
+        const that = this;
+        const { value } = event.detail;
+        that.setData({ "searchInfo.type_name": value.value })
+        that.setData({ "searchInfo.type": '0' })
+        this.setData({ show: false });
+    },
+    //城市选择
+    oncityConfirm(event) {
+        const that = this;
+        const { value } = event.detail;
+        that.setData({ "searchInfo.city_name": value.value })
+        that.setData({ "searchInfo.city_type": '1' })
+        this.setData({ show: false });
+    },
+    //比赛状态选择
+    onmatchConfirm(event) {
+        const that = this;
+        const { value } = event.detail;
+        that.setData({ "searchInfo.match_name": value.value })
+        that.setData({ "searchInfo.match_type": '2' })
+        this.setData({ show: false });
+    },
+    //取消类型选择
+    onCancel() {
+        const that = this;
+        console.log('取消');
+        that.setData({ btntype: '' })
+        this.setData({ show: false });
+
+    },
     searchChange: function (e) {
         const that = this;
         const { value } = e.currentTarget.dataset;
         that.setData({ searchType: value })
     },
-    // 值选择
-    changeValue: function (e) {
-        console.log(e);
+    // 运动类型选择
+    typeChange: function (e) {
+        const that = this;
+        let data = that.data.typeList.find((i) => i.label == e.detail.value);
+        if (data) { that.setData({ 'searchInfo.type': data.label }); that.setData({ 'searchInfo.type_name': data.value }); }
+    },
+    // 城市選擇
+    cityChange: function (e) {
+        const that = this;
+        let data = that.data.cityList.find((i) => i.label == e.detail.value);
+        if (data) { that.setData({ 'searchInfo.city': data.label }); that.setData({ 'searchInfo.city_name': data.value }); }
     },
     /**
      * 生命周期函数--监听页面加载

+ 127 - 4
pages/home/index.less

@@ -1,6 +1,6 @@
 .main {
     height: 80.8vh;
-    background-color: #ff0000;
+    // background-color: red;
 
     .one {
         width: 100%;
@@ -11,10 +11,133 @@
         flex-direction: row;
         justify-content: space-around;
         width: 96vw;
-        background-color: #00ffff;
+        background-color: #ffffff;
+        margin-bottom: 1px;
+        padding: 10px 0;
 
-        .list {
-            padding: 2vw 0;
+        text {
+            font-size: 14px;
+        }
+    }
+
+    .thr {
+        width: 96vw;
+        flex-grow: 1;
+        position: relative;
+        background-color: #ffffff;
+
+        .scroll-view {
+            position: absolute;
+            top: 0;
+            left: 0;
+            right: 0;
+            bottom: 0;
+
+            .list-scroll-view {
+                display: flex;
+                flex-wrap: wrap;
+                align-content: flex-start;
+                justify-content: space-between;
+
+                .list {
+                    display: flex;
+                    width: 96vw;
+                    margin: 10px 0;
+                    border-bottom: 0.1px solid #D1CFCF;
+
+                    .image {
+                        display: flex;
+                        justify-content: center;
+                        align-items: center;
+                        width: 30vw;
+
+                        image {
+                            width: 20vw;
+                            height: 20vw;
+                            border-radius: 5px;
+                        }
+                    }
+
+                    .content {
+                        padding: 5px;
+
+                        .name {
+                            font-size: 14px;
+                            font-weight: bold;
+                            padding: 2px 0;
+
+                            .color {
+                                font-size: 11px;
+                                color: #FFFFFF;
+                                border-radius: 2px;
+                                background-color: #b3ab3c;
+                                padding: 0 5px;
+                                margin-right: 2px;
+                            }
+
+                            .color0 {
+                                font-size: 11px;
+                                color: #FFFFFF;
+                                border-radius: 2px;
+                                background-color: #da2525;
+                                padding: 0 5px;
+                                margin-right: 2px;
+                            }
+
+                            .color1 {
+                                font-size: 11px;
+                                color: #FFFFFF;
+                                border-radius: 2px;
+                                background-color: #3c87b3;
+                                padding: 0 5px;
+                                margin-right: 2px;
+                            }
+
+                            .color2 {
+                                font-size: 11px;
+                                color: #FFFFFF;
+                                border-radius: 2px;
+                                background-color: #b33c6e;
+                                padding: 0 5px;
+                                margin-right: 2px;
+                            }
+
+                            .color3 {
+                                font-size: 11px;
+                                color: #FFFFFF;
+                                border-radius: 2px;
+                                background-color: #3cb3b3;
+                                padding: 0 5px;
+                                margin-right: 2px;
+                            }
+
+                            .color4 {
+                                font-size: 11px;
+                                color: #FFFFFF;
+                                border-radius: 2px;
+                                background-color: #3CB371;
+                                padding: 0 5px;
+                                margin-right: 2px;
+                            }
+
+                            .color5 {
+                                font-size: 11px;
+                                color: #FFFFFF;
+                                border-radius: 2px;
+                                background-color: #DA70D6;
+                                padding: 0 5px;
+                                margin-right: 2px;
+                            }
+                        }
+
+                        .title {
+                            font-size: 12px;
+                            color: #666;
+                            padding: 2px 0;
+                        }
+                    }
+                }
+            }
         }
     }
 }

+ 39 - 23
pages/home/index.wxml

@@ -4,31 +4,47 @@
             <van-search value="{{ searchInfo.name }}" placeholder="请输入搜索关键词" show-action bind:search="onSearch" bind:cancel="onCancel" />
         </view>
         <view class="two">
-            <view class="list" wx:for="{{btnList}}" wx:key="item" bindtap="searchChange" data-value="{{item.value}}">
-                <view wx:if="{{searchType=='0'}}">
-                    <picker mode="selector" bindchange="typeChange" range="{{typeList}}" range-key="value">
-                        <view class="picker">
-                            <text>{{searchInfo.type||item.title}}</text>
-                            <van-icon name="{{item.icon}}" />
-                        </view>
-                    </picker>
-                </view>
-                <view wx:elif="{{searchType=='1'}}">
-                    1
-                </view>
-                <view wx:elif="{{searchType=='2'}}">
-                    2
-                </view>
+            <view bindtap="btnChange" data-value="0">
+                <text wx:if="{{ searchInfo.type=='' }}">运动类型</text>
+                <text wx:if="{{ searchInfo.type=='0' }}">{{searchInfo.type_name||"运动类型"}}</text>
+                <van-icon bind:click="showPopup" name="arrow-down" />
+                <van-popup wx:if="{{btntype=='0'}}" position="bottom" custom-style="height: 46%;" show="{{ show }}" bind:close="onClose">
+                    <van-picker show-toolbar title="运动类型" value-key="value" columns="{{ typeList }}" bind:cancel="onCancel" bind:confirm="ontypeConfirm" />
+                </van-popup>
+            </view>
+            <view bindtap="btnChange" data-value="1">
+                <text wx:if="{{ searchInfo.city_type=='' }}">城市</text>
+                <text wx:if="{{ searchInfo.city_type=='1' }}">{{searchInfo.city_name||"城市"}}</text>
+                <van-icon bind:click="showPopup" name="arrow-down" />
+                <van-popup wx:if="{{btntype=='1'}}" position="bottom" custom-style="height: 46%;" show="{{ show }}" bind:close="onClose">
+                    <van-picker show-toolbar title="城市" value-key="value" columns="{{ cityList }}" bind:cancel="onCancel" bind:confirm="oncityConfirm" />
+                </van-popup>
             </view>
-            <!-- <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
-                <view class="picker">
-                    运动类型
+            <view bindtap="btnChange" data-value="2">
+                <text wx:if="{{ searchInfo.match_type=='' }}">比赛状态</text>
+                <text wx:if="{{ searchInfo.match_type=='2' }}">{{searchInfo.match_name||"比赛状态"}}</text>
+                <van-icon bind:click="showPopup" name="arrow-down" />
+                <van-popup wx:if="{{btntype=='2'}}" position="bottom" custom-style="height: 46%;" show="{{ show }}" bind:close="onClose">
+                    <van-picker show-toolbar title="比赛状态" value-key="value" columns="{{ matchList }}" bind:cancel="onCancel" bind:confirm="onmatchConfirm" />
+                </van-popup>
+            </view>
+        </view>
+        <view class="thr">
+            <scroll-view scroll-y="true" class="scroll-view">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="image">
+                            <image src="{{item.src}}"></image>
+                        </view>
+                        <view class="content">
+                            <view class="name"><text class="color{{item.status}}">{{item.status=='0'?'报名中':item.status=='1'?'报名截止':item.status=='2'?'报名结束':item.status=='3'?'发布秩序册':item.status=='4'?'比赛中':item.status=='5'?'比赛结束':'全部'}}</text>{{item.name}}</view>
+                            <view class="title">报名时间:{{item.time}}</view>
+                            <view class="title">比赛时间:{{item.match_time}}</view>
+                            <view class="title">比赛地址:{{item.address}}</view>
+                        </view>
+                    </view>
                 </view>
-            </picker> -->
-            <!-- <view class="list" wx:for="{{btnList}}" wx:key="item" bindtap="searchChange" data-value="{{item.value}}">
-                <text>{{item.title}}</text>
-                <van-icon name="{{item.icon}}" />
-            </view> -->
+            </scroll-view>
         </view>
     </view>
 </mobile-main>

+ 110 - 4
pages/home/index.wxss

@@ -1,6 +1,5 @@
 .main {
   height: 80.8vh;
-  background-color: #ff0000;
 }
 .main .one {
   width: 100%;
@@ -10,8 +9,115 @@
   flex-direction: row;
   justify-content: space-around;
   width: 96vw;
-  background-color: #00ffff;
+  background-color: #ffffff;
+  margin-bottom: 1px;
+  padding: 10px 0;
 }
-.main .two .list {
-  padding: 2vw 0;
+.main .two text {
+  font-size: 14px;
+}
+.main .thr {
+  width: 96vw;
+  flex-grow: 1;
+  position: relative;
+  background-color: #ffffff;
+}
+.main .thr .scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.main .thr .scroll-view .list-scroll-view {
+  display: flex;
+  flex-wrap: wrap;
+  align-content: flex-start;
+  justify-content: space-between;
+}
+.main .thr .scroll-view .list-scroll-view .list {
+  display: flex;
+  width: 96vw;
+  margin: 10px 0;
+  border-bottom: 0.1px solid #D1CFCF;
+}
+.main .thr .scroll-view .list-scroll-view .list .image {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 30vw;
+}
+.main .thr .scroll-view .list-scroll-view .list .image image {
+  width: 20vw;
+  height: 20vw;
+  border-radius: 5px;
+}
+.main .thr .scroll-view .list-scroll-view .list .content {
+  padding: 5px;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .name {
+  font-size: 14px;
+  font-weight: bold;
+  padding: 2px 0;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .name .color {
+  font-size: 11px;
+  color: #FFFFFF;
+  border-radius: 2px;
+  background-color: #b3ab3c;
+  padding: 0 5px;
+  margin-right: 2px;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .name .color0 {
+  font-size: 11px;
+  color: #FFFFFF;
+  border-radius: 2px;
+  background-color: #da2525;
+  padding: 0 5px;
+  margin-right: 2px;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .name .color1 {
+  font-size: 11px;
+  color: #FFFFFF;
+  border-radius: 2px;
+  background-color: #3c87b3;
+  padding: 0 5px;
+  margin-right: 2px;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .name .color2 {
+  font-size: 11px;
+  color: #FFFFFF;
+  border-radius: 2px;
+  background-color: #b33c6e;
+  padding: 0 5px;
+  margin-right: 2px;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .name .color3 {
+  font-size: 11px;
+  color: #FFFFFF;
+  border-radius: 2px;
+  background-color: #3cb3b3;
+  padding: 0 5px;
+  margin-right: 2px;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .name .color4 {
+  font-size: 11px;
+  color: #FFFFFF;
+  border-radius: 2px;
+  background-color: #3CB371;
+  padding: 0 5px;
+  margin-right: 2px;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .name .color5 {
+  font-size: 11px;
+  color: #FFFFFF;
+  border-radius: 2px;
+  background-color: #DA70D6;
+  padding: 0 5px;
+  margin-right: 2px;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .title {
+  font-size: 12px;
+  color: #666;
+  padding: 2px 0;
 }

+ 12 - 0
pages/my/index.js

@@ -6,12 +6,24 @@ Page({
      */
     data: {
         frameStyle: { useTop: true, name: '我的', leftArrow: false, useBar: true },
+        icon: '/image/icon.jpg',
+        btnList: [
+            { title: '我的赛事', route: 'usermymatch' },
+            { title: '账号设置', route: 'setting' }
+        ]
     },
     // 跳转菜单
     tabPath(e) {
         let { route } = e.detail.detail;
         if (route) wx.redirectTo({ url: `/${route}` })
     },
+    toCommon: function (e) {
+        const { route, type } = e.currentTarget.dataset;
+        // 自定义路径
+        if (type == '0') { wx.navigateTo({ url: `${route}` }) }
+        // 默认路径
+        else if (type == '1') { wx.navigateTo({ url: `/pages/${route}/index` }) }
+    },
     /**
      * 生命周期函数--监听页面加载
      */

+ 103 - 1
pages/my/index.less

@@ -1,4 +1,106 @@
 .main {
     height: 80.8vh;
-    background-color: #ff0000;
+
+    .zero {
+        width: 96vw;
+        margin: 0 0 2vw 0;
+    }
+
+    .one {
+        position: relative;
+        width: 96vw;
+        height: 120px;
+
+        .one_1 {
+            height: 80px;
+            background-color: #216EC7;
+            border-bottom-left-radius: 10px;
+            border-bottom-right-radius: 10px;
+            color: transparent;
+        }
+
+        .one_2 {
+            position: absolute;
+            top: 5vw;
+            width: 86vw;
+            height: 86px;
+            margin: 0 2vw;
+            padding: 2vw;
+            background-color: #ffffff;
+            display: flex;
+            justify-content: space-between;
+
+            .l {
+                display: flex;
+                justify-content: start;
+                width: 72vw;
+
+                .l_1 {
+                    padding: 3vw 0;
+
+                    .icon {
+                        width: 60px;
+                        height: 60px;
+                        border-radius: 90px;
+                    }
+                }
+
+                .l_2 {
+                    width: 56vw;
+                    padding: 4vw 0 0 0;
+
+                    .info {
+                        margin: 0 0 2vw 0;
+                        padding: 0 2vw;
+                        font-size: 15px;
+                    }
+
+                    .info:nth-child(1) {
+                        font-weight: bold;
+                    }
+
+                    .info:nth-child(2) {
+                        color: #858585;
+                        font-size: 12px;
+                    }
+                }
+            }
+
+            .r {
+                padding: 8vw 0;
+                font-size: 14px;
+                color: #858585;
+            }
+        }
+    }
+
+    .two {
+        display: flex;
+        flex-direction: column;
+
+        .list {
+            display: flex;
+            flex-direction: row;
+            justify-content: space-between;
+            background-color: #fff;
+            margin: 0 0 2vw 0;
+            border-bottom: 1px solid #858585;
+            padding: 2vw;
+
+            .list_1 {
+                .icon {
+                    margin: 0 2vw 0 0;
+                }
+
+                .title {
+                    font-size: 14px;
+                }
+            }
+
+            .list_2 {
+                color: #858585;
+            }
+        }
+    }
+
 }

+ 28 - 1
pages/my/index.wxml

@@ -1,5 +1,32 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
     <view slot="info" class="container main">
-        我的
+        <view class="zero one">
+            <view class="one_1">1</view>
+            <view class="one_2">
+                <view class="l">
+                    <view class="l_1">
+                        <image class="icon" src="{{icon}}"></image>
+                    </view>
+                    <view class="l_2">
+                        <view class="info textOver">顾红伟</view>
+                        <view class="info textOver">13174420325</view>
+                    </view>
+                </view>
+                <view class="r">
+                    <text bindtap="toCommon" data-route="/pages/my/userInfo" data-type="0">详细</text>
+                    <van-icon name="arrow" />
+                </view>
+            </view>
+        </view>
+        <view class="zero two">
+            <view class="list" wx:for="{{btnList}}" wx:key="item" bindtap="toCommon" data-route="{{item.route}}" data-type="1">
+                <view class="list_1 textOver">
+                    <van-icon class="icon" name="like-o" /><text class="title">{{item.title}}</text>
+                </view>
+                <view class="list_2">
+                    <van-icon name="arrow" />
+                </view>
+            </view>
+        </view>
     </view>
 </mobile-main>

+ 83 - 1
pages/my/index.wxss

@@ -1,4 +1,86 @@
 .main {
   height: 80.8vh;
-  background-color: #ff0000;
+}
+.main .zero {
+  width: 96vw;
+  margin: 0 0 2vw 0;
+}
+.main .one {
+  position: relative;
+  width: 96vw;
+  height: 120px;
+}
+.main .one .one_1 {
+  height: 80px;
+  background-color: #216EC7;
+  border-bottom-left-radius: 10px;
+  border-bottom-right-radius: 10px;
+  color: transparent;
+}
+.main .one .one_2 {
+  position: absolute;
+  top: 5vw;
+  width: 86vw;
+  height: 86px;
+  margin: 0 2vw;
+  padding: 2vw;
+  background-color: #ffffff;
+  display: flex;
+  justify-content: space-between;
+}
+.main .one .one_2 .l {
+  display: flex;
+  justify-content: start;
+  width: 72vw;
+}
+.main .one .one_2 .l .l_1 {
+  padding: 3vw 0;
+}
+.main .one .one_2 .l .l_1 .icon {
+  width: 60px;
+  height: 60px;
+  border-radius: 90px;
+}
+.main .one .one_2 .l .l_2 {
+  width: 56vw;
+  padding: 4vw 0 0 0;
+}
+.main .one .one_2 .l .l_2 .info {
+  margin: 0 0 2vw 0;
+  padding: 0 2vw;
+  font-size: 15px;
+}
+.main .one .one_2 .l .l_2 .info:nth-child(1) {
+  font-weight: bold;
+}
+.main .one .one_2 .l .l_2 .info:nth-child(2) {
+  color: #858585;
+  font-size: 12px;
+}
+.main .one .one_2 .r {
+  padding: 8vw 0;
+  font-size: 14px;
+  color: #858585;
+}
+.main .two {
+  display: flex;
+  flex-direction: column;
+}
+.main .two .list {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  background-color: #fff;
+  margin: 0 0 2vw 0;
+  border-bottom: 1px solid #858585;
+  padding: 2vw;
+}
+.main .two .list .list_1 .icon {
+  margin: 0 2vw 0 0;
+}
+.main .two .list .list_1 .title {
+  font-size: 14px;
+}
+.main .two .list .list_2 {
+  color: #858585;
 }

+ 71 - 0
pages/my/userInfo.js

@@ -0,0 +1,71 @@
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '个人信息', leftArrow: true, useBar: false },
+        icon: '/image/icon.jpg',
+        form: { id: "1", img_url: "/image/icon.jpg", name: "测试", gender: '男', phone: '13174420325', email: '' },
+    },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        const that = this;
+
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/my/userInfo.json

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

+ 32 - 0
pages/my/userInfo.less

@@ -0,0 +1,32 @@
+.main {
+    height: 88vh;
+    background: #ffffff;
+
+    .one {
+        width: 96vw;
+        .content {
+            display: flex;
+            flex-direction: row;
+            justify-content: space-between;
+            align-items: center;
+            margin: 0 10px;
+            padding: 10px 5px;
+            border-bottom: 1px solid #cccccc;
+
+            .label {
+                font-size: 14px;
+            }
+
+            .value {
+                color: #666;
+                font-size: 12px;
+
+                .img {
+                    height: 10vw;
+                    width: 10vw;
+                    // border-radius: 5px;
+                }
+            }
+        }
+    }
+}

+ 30 - 0
pages/my/userInfo.wxml

@@ -0,0 +1,30 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">用户名</view>
+                    <view class="value">{{form.name||'未知'}}</view>
+                </view>
+                <view class="content">
+                    <view class="label">用户头像</view>
+                    <view class="value">
+                        <image class="img" src="{{form.img_url||icon}}"></image>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">性别</view>
+                    <view class="value">{{form.gender||'未知'}}</view>
+                </view>
+                <view class="content">
+                    <view class="label">手机号</view>
+                    <view class="value">{{form.phone||'未知'}}</view>
+                </view>
+                <view class="content">
+                    <view class="label">邮箱</view>
+                    <view class="value">{{form.email||'--'}}</view>
+                </view>
+            </form>
+        </view>
+    </view>
+</mobile-main>

+ 27 - 0
pages/my/userInfo.wxss

@@ -0,0 +1,27 @@
+.main {
+  height: 88vh;
+  background: #ffffff;
+}
+.main .one {
+  width: 96vw;
+}
+.main .one .content {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+  margin: 0 10px;
+  padding: 10px 5px;
+  border-bottom: 1px solid #cccccc;
+}
+.main .one .content .label {
+  font-size: 14px;
+}
+.main .one .content .value {
+  color: #666;
+  font-size: 12px;
+}
+.main .one .content .value .img {
+  height: 10vw;
+  width: 10vw;
+}

ファイルの差分が大きいため隠しています
+ 34 - 0
pages/news/index.js


+ 2 - 1
pages/news/index.json

@@ -1,6 +1,7 @@
 {
   "component": true,
   "usingComponents": {
-    "mobile-main": "/commpents/mobile-frame/index"
+    "mobile-main": "/commpents/mobile-frame/index",
+    "e-tabs": "/commpents/tabs/index"
   }
 }

+ 76 - 1
pages/news/index.less

@@ -1,4 +1,79 @@
 .main {
     height: 80.8vh;
-    background-color: #ff0000;
+
+    .one {
+        width: 100%;
+    }
+
+    .two {
+        width: 100%;
+        margin-top: 2px;
+    }
+
+    .thr {
+        width: 96vw;
+        flex-grow: 1;
+        position: relative;
+        background-color: #ffffff;
+
+        .scroll-view {
+            position: absolute;
+            top: 0;
+            left: 0;
+            right: 0;
+            bottom: 0;
+
+            .list-scroll-view {
+                display: flex;
+                flex-wrap: wrap;
+                align-content: flex-start;
+                justify-content: space-between;
+
+                .list {
+                    display: flex;
+                    width: 96vw;
+                    margin: 10px 0;
+                    border-bottom: 0.1px solid #D1CFCF;
+
+                    .image {
+                        display: flex;
+                        justify-content: center;
+                        align-items: center;
+                        width: 30vw;
+
+                        image {
+                            width: 20vw;
+                            height: 20vw;
+                            border-radius: 5px;
+                        }
+                    }
+
+                    .content {
+                        padding: 5px;
+
+                        .name {
+                            font-size: 14px;
+                            font-weight: bold;
+                            padding: 2px 0;
+                            list-style: disc;
+                        }
+
+                        .title {
+                            font-size: 12px;
+                            color: #666;
+                            padding: 2px 0;
+                            display: -webkit-box;
+                            overflow: hidden;
+                            -webkit-line-clamp: 3;
+                            -webkit-box-orient: vertical;
+
+                            text {
+                                padding: 0 10px;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
 }

+ 96 - 1
pages/news/index.wxml

@@ -1,5 +1,100 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
     <view slot="info" class="container main">
-        资讯
+        <view class="one">
+            <e-tabs tabs="{{tabs}}" bind:tabsChange="tabsChange"></e-tabs>
+        </view>
+        <view class="two">
+            <van-search value="{{ searchInfo.name }}" input-align="center" bind:search="onSearch" placeholder="请输入咨询标题" />
+        </view>
+        <view class="thr">
+            <scroll-view scroll-y="true" class="scroll-view">
+                <view class="list-scroll-view">
+                    <view wx:if="{{tabs.active=='a'}}">
+                        <view class="list" wx:for="{{list}}" wx:key="item">
+                            <view class="content">
+                                <view class="name">
+                                    <van-icon name="stop" size="10px" />{{item.name}}
+                                </view>
+                                <view class="title">{{item.content}}</view>
+                                <view class="title">{{item.status=='0'?'其他':'原创'}}<text>来源:{{item.source}}</text></view>
+                            </view>
+                            <view class="image" wx:if="{{item.src}}">
+                                <image src="{{item.src}}"></image>
+                            </view>
+                        </view>
+                    </view>
+                    <view wx:if="{{tabs.active=='b'}}">
+                        <view class="list" wx:for="{{list}}" wx:key="item">
+                            <view class="content">
+                                <view class="name">
+                                    <van-icon name="stop" size="10px" />{{item.name}}
+                                </view>
+                                <view class="title">{{item.content}}</view>
+                                <view class="title">{{item.status=='0'?'其他':'原创'}}<text>来源:{{item.source}}</text></view>
+                            </view>
+                            <view class="image" wx:if="{{item.src}}">
+                                <image src="{{item.src}}"></image>
+                            </view>
+                        </view>
+                    </view>
+                    <view wx:if="{{tabs.active=='c'}}">
+                        <view class="list" wx:for="{{list}}" wx:key="item">
+                            <view class="content">
+                                <view class="name">
+                                    <van-icon name="stop" size="10px" />{{item.name}}
+                                </view>
+                                <view class="title">{{item.content}}</view>
+                                <view class="title">{{item.status=='0'?'其他':'原创'}}<text>来源:{{item.source}}</text></view>
+                            </view>
+                            <view class="image" wx:if="{{item.src}}">
+                                <image src="{{item.src}}"></image>
+                            </view>
+                        </view>
+                    </view>
+                    <view wx:if="{{tabs.active=='d'}}">
+                        <view class="list" wx:for="{{list}}" wx:key="item">
+                            <view class="content">
+                                <view class="name">
+                                    <van-icon name="stop" size="10px" />{{item.name}}
+                                </view>
+                                <view class="title">{{item.content}}</view>
+                                <view class="title">{{item.status=='0'?'其他':'原创'}}<text>来源:{{item.source}}</text></view>
+                            </view>
+                            <view class="image" wx:if="{{item.src}}">
+                                <image src="{{item.src}}"></image>
+                            </view>
+                        </view>
+                    </view>
+                    <view wx:if="{{tabs.active=='e'}}">
+                        <view class="list" wx:for="{{list}}" wx:key="item">
+                            <view class="content">
+                                <view class="name">
+                                    <van-icon name="stop" size="10px" />{{item.name}}
+                                </view>
+                                <view class="title">{{item.content}}</view>
+                                <view class="title">{{item.status=='0'?'其他':'原创'}}<text>来源:{{item.source}}</text></view>
+                            </view>
+                            <view class="image" wx:if="{{item.src}}">
+                                <image src="{{item.src}}"></image>
+                            </view>
+                        </view>
+                    </view>
+                    <view wx:if="{{tabs.active=='f'}}">
+                        <view class="list" wx:for="{{list}}" wx:key="item">
+                            <view class="content">
+                                <view class="name">
+                                    <van-icon name="stop" size="10px" />{{item.name}}
+                                </view>
+                                <view class="title">{{item.content}}</view>
+                                <view class="title">{{item.status=='0'?'其他':'原创'}}<text>来源:{{item.source}}</text></view>
+                            </view>
+                            <view class="image" wx:if="{{item.src}}">
+                                <image src="{{item.src}}"></image>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
     </view>
 </mobile-main>

+ 64 - 1
pages/news/index.wxss

@@ -1,4 +1,67 @@
 .main {
   height: 80.8vh;
-  background-color: #ff0000;
+}
+.main .one {
+  width: 100%;
+}
+.main .two {
+  width: 100%;
+  margin-top: 2px;
+}
+.main .thr {
+  width: 96vw;
+  flex-grow: 1;
+  position: relative;
+  background-color: #ffffff;
+}
+.main .thr .scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.main .thr .scroll-view .list-scroll-view {
+  display: flex;
+  flex-wrap: wrap;
+  align-content: flex-start;
+  justify-content: space-between;
+}
+.main .thr .scroll-view .list-scroll-view .list {
+  display: flex;
+  width: 96vw;
+  margin: 10px 0;
+  border-bottom: 0.1px solid #D1CFCF;
+}
+.main .thr .scroll-view .list-scroll-view .list .image {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 30vw;
+}
+.main .thr .scroll-view .list-scroll-view .list .image image {
+  width: 20vw;
+  height: 20vw;
+  border-radius: 5px;
+}
+.main .thr .scroll-view .list-scroll-view .list .content {
+  padding: 5px;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .name {
+  font-size: 14px;
+  font-weight: bold;
+  padding: 2px 0;
+  list-style: disc;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .title {
+  font-size: 12px;
+  color: #666;
+  padding: 2px 0;
+  display: -webkit-box;
+  overflow: hidden;
+  -webkit-line-clamp: 3;
+  -webkit-box-orient: vertical;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .title text {
+  padding: 0 10px;
 }

+ 80 - 0
pages/setting/index.js

@@ -0,0 +1,80 @@
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '账号设置', leftArrow: true, useBar: false },
+        btnList: [
+            { title: '资料修改', route: 'basic' },
+            // { title: '意见反馈', route: 'opinion' },
+            { title: '联系我们', route: 'contact' },
+            { title: '解除绑定', route: 'unbind' },
+            // { title: '关于我们', route: 'about' },
+        ]
+    },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
+    },
+    toCommon: function (e) {
+        const { route } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/pages/setting/${route}` })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        const that = this;
+
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/setting/index.json

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

+ 29 - 0
pages/setting/index.less

@@ -0,0 +1,29 @@
+.main {
+    height: 88vh;
+
+    .one {
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+        width: 96vw;
+
+        .list {
+            display: flex;
+            flex-direction: row;
+            justify-content: space-between;
+            background-color: #ffffff;
+            border-bottom: 1px solid #858585;
+            padding: 2vw;
+
+            .list_1 {
+                text {
+                    font-size: 14px;
+                }
+            }
+
+            .list_2 {
+                color: #858585;
+            }
+        }
+    }
+}

+ 14 - 0
pages/setting/index.wxml

@@ -0,0 +1,14 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="list" wx:for="{{btnList}}" wx:key="item" bindtap="toCommon" data-route="{{item.route}}">
+                <view class="list_1">
+                    <text>{{item.title}}</text>
+                </view>
+                <view class="list_2">
+                    <van-icon name="arrow" />
+                </view>
+            </view>
+        </view>
+    </view>
+</mobile-main>

+ 23 - 0
pages/setting/index.wxss

@@ -0,0 +1,23 @@
+.main {
+  height: 88vh;
+}
+.main .one {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  width: 96vw;
+}
+.main .one .list {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  background-color: #ffffff;
+  border-bottom: 1px solid #858585;
+  padding: 2vw;
+}
+.main .one .list .list_1 text {
+  font-size: 14px;
+}
+.main .one .list .list_2 {
+  color: #858585;
+}

+ 70 - 0
pages/topic copy/index.js

@@ -0,0 +1,70 @@
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '话题', leftArrow: false, useBar: true },
+    },
+    // 跳转菜单
+    tabPath(e) {
+        let { route } = e.detail.detail;
+        if (route) wx.redirectTo({ url: `/${route}` })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        const that = this;
+
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/topic copy/index.json

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

+ 4 - 0
pages/topic copy/index.less

@@ -0,0 +1,4 @@
+.main {
+    height: 80.8vh;
+    background-color: #ff0000;
+}

+ 5 - 0
pages/topic copy/index.wxml

@@ -0,0 +1,5 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        话题
+    </view>
+</mobile-main>

+ 4 - 0
pages/topic copy/index.wxss

@@ -0,0 +1,4 @@
+.main {
+  height: 80.8vh;
+  background-color: #ff0000;
+}

+ 68 - 0
pages/usermymatch/index.js

@@ -0,0 +1,68 @@
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '我的赛事', leftArrow: true, useBar: false },
+    },
+    back: function () {
+        wx.navigateBack({ delta: 1 })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        const that = this;
+
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/usermymatch/index.json

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

+ 4 - 0
pages/usermymatch/index.less

@@ -0,0 +1,4 @@
+.main {
+    height: 88vh;
+    background-color: #ff0000;
+}

+ 5 - 0
pages/usermymatch/index.wxml

@@ -0,0 +1,5 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        我的赛事
+    </view>
+</mobile-main>

+ 4 - 0
pages/usermymatch/index.wxss

@@ -0,0 +1,4 @@
+.main {
+  height: 88vh;
+  background-color: #ff0000;
+}