guhongwei 2 years ago
parent
commit
178a5caa46

+ 4 - 1
app.json

@@ -2,9 +2,12 @@
     "pages": [
         "pages/index/index",
         "pages/register/index",
+        "pages/school/index",
+        "pages/club/index",
+        "pages/match/index",
+        "pages/other/agree",
         "pages/home/index",
         "pages/test/index",
-        "pages/other/agree",
         "pages/logs/logs"
     ],
     "usingComponents": {

BIN
image/tabs/club.png


BIN
image/tabs/club_1.png


BIN
image/tabs/contact.png


BIN
image/tabs/contact_1.png


BIN
image/tabs/find.png


BIN
image/tabs/find_1.png


BIN
image/tabs/home.png


BIN
image/tabs/home_1.png


BIN
image/tabs/match.png


BIN
image/tabs/match_1.png


BIN
image/tabs/my.png


BIN
image/tabs/my_1.png


BIN
image/tabs/news.png


BIN
image/tabs/news_1.png


BIN
image/tabs/school.png


BIN
image/tabs/school_1.png


BIN
image/tabs/topic.png


BIN
image/tabs/topic_1.png


+ 68 - 0
pages/club/index.js

@@ -0,0 +1,68 @@
+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) { },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => { },
+            fail: async res => {
+                // wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/club/index.json

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

+ 35 - 0
pages/club/index.less

@@ -0,0 +1,35 @@
+.main {
+    height: var(--thrHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        display: flex;
+        flex-direction: row;
+        padding: 2vw;
+        border-bottom: 1px solid var(--f1Color);
+
+        .one_1 {
+            flex-grow: 1;
+
+            input {
+                padding: 1vw 0 2vw 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+        .one_2 {
+            width: 20vw;
+
+            button {
+                width: 100%;
+                padding: 2vw;
+                font-size: var(--font14Size);
+            }
+        }
+    }
+
+    .two {
+        background-color: #0000ff;
+    }
+}

+ 15 - 0
pages/club/index.wxml

@@ -0,0 +1,15 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+            <view class="one_2">
+                <button type="primary">进入系统</button>
+            </view>
+        </view>
+        <view class="two">
+            俱乐部
+        </view>
+    </view>
+</mobile-main>

+ 29 - 0
pages/club/index.wxss

@@ -0,0 +1,29 @@
+.main {
+  height: var(--thrHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  display: flex;
+  flex-direction: row;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .one_1 {
+  flex-grow: 1;
+}
+.main .one .one_1 input {
+  padding: 1vw 0 2vw 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .one .one_2 {
+  width: 20vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+}
+.main .two {
+  background-color: #0000ff;
+}

+ 1 - 1
pages/home/index.js

@@ -1,7 +1,7 @@
 const app = getApp()
 Page({
     data: {
-        frameStyle: { useTop: true, name: '首页', leftArrow: false, useBar: false },
+        frameStyle: { useTop: true, name: '首页', leftArrow: false, useBar: true },
     },
     /**
      * 生命周期函数--监听页面加载

+ 1 - 1
pages/home/index.less

@@ -1,4 +1,4 @@
 .main {
-    height: var(--twoHeight);
+    height: var(--thrHeight);
     background-color: var(--mainColor);
 }

+ 1 - 1
pages/home/index.wxss

@@ -1,4 +1,4 @@
 .main {
-  height: var(--twoHeight);
+  height: var(--thrHeight);
   background-color: var(--mainColor);
 }

+ 2 - 2
pages/index/index.js

@@ -17,7 +17,7 @@ Page({
         wx.getStorage({
             key: 'user',
             success: async res => {
-                if (res.data) wx.redirectTo({ url: '/pages/home/index' })
+                if (res.data) wx.redirectTo({ url: '/pages/school/index' })
             },
             fail: async res => {
                 wx.login({
@@ -45,7 +45,7 @@ Page({
             // 没有用户,去注册
             if (!data) wx.redirectTo({ url: '/pages/register/index' });
             // 有用户,存起来,跳转
-            else { wx.setStorageSync('user', data); wx.redirectTo({ url: '/pages/home/index' }); }
+            else { wx.setStorageSync('user', data); wx.redirectTo({ url: '/pages/school/index' }); }
         }
     },
     /**

+ 68 - 0
pages/match/index.js

@@ -0,0 +1,68 @@
+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) { },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => { },
+            fail: async res => {
+                // wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/match/index.json

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

+ 35 - 0
pages/match/index.less

@@ -0,0 +1,35 @@
+.main {
+    height: var(--thrHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        display: flex;
+        flex-direction: row;
+        padding: 2vw;
+        border-bottom: 1px solid var(--f1Color);
+
+        .one_1 {
+            flex-grow: 1;
+
+            input {
+                padding: 1vw 0 2vw 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+        .one_2 {
+            width: 20vw;
+
+            button {
+                width: 100%;
+                padding: 2vw;
+                font-size: var(--font14Size);
+            }
+        }
+    }
+
+    .two {
+        background-color: #0000ff;
+    }
+}

+ 15 - 0
pages/match/index.wxml

@@ -0,0 +1,15 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+            <view class="one_2">
+                <button type="primary">进入系统</button>
+            </view>
+        </view>
+        <view class="two">
+            比赛管理
+        </view>
+    </view>
+</mobile-main>

+ 29 - 0
pages/match/index.wxss

@@ -0,0 +1,29 @@
+.main {
+  height: var(--thrHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  display: flex;
+  flex-direction: row;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .one_1 {
+  flex-grow: 1;
+}
+.main .one .one_1 input {
+  padding: 1vw 0 2vw 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .one .one_2 {
+  width: 20vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+}
+.main .two {
+  background-color: #0000ff;
+}

+ 68 - 0
pages/school/index.js

@@ -0,0 +1,68 @@
+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) { },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => { },
+            fail: async res => {
+                // wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/school/index.json

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

+ 35 - 0
pages/school/index.less

@@ -0,0 +1,35 @@
+.main {
+    height: var(--thrHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        display: flex;
+        flex-direction: row;
+        padding: 2vw;
+        border-bottom: 1px solid var(--f1Color);
+
+        .one_1 {
+            flex-grow: 1;
+
+            input {
+                padding: 1vw 0 2vw 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+        .one_2 {
+            width: 20vw;
+
+            button {
+                width: 100%;
+                padding: 2vw;
+                font-size: var(--font14Size);
+            }
+        }
+    }
+
+    .two {
+        background-color: #0000ff;
+    }
+}

+ 15 - 0
pages/school/index.wxml

@@ -0,0 +1,15 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+            <view class="one_2">
+                <button type="primary">进入系统</button>
+            </view>
+        </view>
+        <view class="two">
+            学校
+        </view>
+    </view>
+</mobile-main>

+ 29 - 0
pages/school/index.wxss

@@ -0,0 +1,29 @@
+.main {
+  height: var(--thrHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  display: flex;
+  flex-direction: row;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .one_1 {
+  flex-grow: 1;
+}
+.main .one .one_1 input {
+  padding: 1vw 0 2vw 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .one .one_2 {
+  width: 20vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+}
+.main .two {
+  background-color: #0000ff;
+}

+ 1 - 1
project.private.config.json

@@ -1,7 +1,7 @@
 {
     "projectname": "%E7%BE%BD%E6%A0%A1%E7%AE%A1%E7%90%86%E5%B9%B3%E5%8F%B0",
     "setting": {
-        "compileHotReLoad": true
+        "compileHotReLoad": false
     },
     "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
 }

+ 6 - 0
utils/dict.js

@@ -1,3 +1,9 @@
+// 菜单
+export const system = [
+    { title: '羽校', normal: '/image/tabs/school.png', active: '/image/tabs/school_1.png', route: 'pages/school/index', type: '0' },
+    { title: '俱乐部', normal: '/image/tabs/club.png', active: '/image/tabs/club_1.png', route: 'pages/club/index', type: '0' },
+    { title: '比赛管理', normal: '/image/tabs/match.png', active: '/image/tabs/match_1.png', route: 'pages/match/index', type: '0' },
+]
 // 性别
 export const gender = [
     { label: '男', value: '0' },