zs 1 năm trước cách đây
commit
71bca8db07
68 tập tin đã thay đổi với 1790 bổ sung0 xóa
  1. 31 0
      .eslintrc.js
  2. 31 0
      app.js
  3. 61 0
      app.json
  4. 33 0
      app.wxss
  5. 57 0
      components/common/home-frame.js
  6. 4 0
      components/common/home-frame.json
  7. 12 0
      components/common/home-frame.wxml
  8. 34 0
      components/common/home-frame.wxss
  9. 39 0
      icon/icon.wxss
  10. BIN
      image/tabs/home.png
  11. BIN
      image/tabs/home_1.png
  12. BIN
      image/tabs/match.png
  13. BIN
      image/tabs/match_1.png
  14. BIN
      image/tabs/my.png
  15. BIN
      image/tabs/my_1.png
  16. BIN
      image/tabs/team.png
  17. BIN
      image/tabs/team_1.png
  18. 109 0
      pages/index/index.js
  19. 3 0
      pages/index/index.json
  20. 6 0
      pages/index/index.wxml
  21. 10 0
      pages/index/index.wxss
  22. 66 0
      pagesCommon/agree/index.js
  23. 3 0
      pagesCommon/agree/index.json
  24. 2 0
      pagesCommon/agree/index.wxml
  25. 1 0
      pagesCommon/agree/index.wxss
  26. 77 0
      pagesHome/home/index.js
  27. 7 0
      pagesHome/home/index.json
  28. 5 0
      pagesHome/home/index.wxml
  29. 3 0
      pagesHome/home/index.wxss
  30. 77 0
      pagesMatch/home/index.js
  31. 7 0
      pagesMatch/home/index.json
  32. 5 0
      pagesMatch/home/index.wxml
  33. 3 0
      pagesMatch/home/index.wxss
  34. 66 0
      pagesMy/basic/index.js
  35. 3 0
      pagesMy/basic/index.json
  36. 2 0
      pagesMy/basic/index.wxml
  37. 1 0
      pagesMy/basic/index.wxss
  38. 66 0
      pagesMy/exit/index.js
  39. 3 0
      pagesMy/exit/index.json
  40. 2 0
      pagesMy/exit/index.wxml
  41. 1 0
      pagesMy/exit/index.wxss
  42. 77 0
      pagesMy/home/index.js
  43. 7 0
      pagesMy/home/index.json
  44. 5 0
      pagesMy/home/index.wxml
  45. 3 0
      pagesMy/home/index.wxss
  46. 66 0
      pagesMy/match/index.js
  47. 3 0
      pagesMy/match/index.json
  48. 2 0
      pagesMy/match/index.wxml
  49. 1 0
      pagesMy/match/index.wxss
  50. 66 0
      pagesMy/team/index.js
  51. 3 0
      pagesMy/team/index.json
  52. 2 0
      pagesMy/team/index.wxml
  53. 1 0
      pagesMy/team/index.wxss
  54. 66 0
      pagesMy/update/index.js
  55. 3 0
      pagesMy/update/index.json
  56. 2 0
      pagesMy/update/index.wxml
  57. 1 0
      pagesMy/update/index.wxss
  58. 77 0
      pagesTeam/home/index.js
  59. 7 0
      pagesTeam/home/index.json
  60. 5 0
      pagesTeam/home/index.wxml
  61. 3 0
      pagesTeam/home/index.wxss
  62. 52 0
      project.config.json
  63. 7 0
      project.private.config.json
  64. 7 0
      sitemap.json
  65. 62 0
      utils/httpUtil.js
  66. 1 0
      utils/moment.min.js
  67. 13 0
      utils/site.js
  68. 418 0
      utils/wxValidate.js

+ 31 - 0
.eslintrc.js

@@ -0,0 +1,31 @@
+/*
+ * Eslint config file
+ * Documentation: https://eslint.org/docs/user-guide/configuring/
+ * Install the Eslint extension before using this feature.
+ */
+module.exports = {
+  env: {
+    es6: true,
+    browser: true,
+    node: true,
+  },
+  ecmaFeatures: {
+    modules: true,
+  },
+  parserOptions: {
+    ecmaVersion: 2018,
+    sourceType: 'module',
+  },
+  globals: {
+    wx: true,
+    App: true,
+    Page: true,
+    getCurrentPages: true,
+    getApp: true,
+    Component: true,
+    requirePlugin: true,
+    requireMiniProgram: true,
+  },
+  // extends: 'eslint:recommended',
+  rules: {},
+}

+ 31 - 0
app.js

@@ -0,0 +1,31 @@
+import * as httpUtil from "./utils/httpUtil";
+App({
+    onLaunch() {
+        // 登录
+        wx.login({
+            success: res => {
+                // console.log(res);
+            }
+        })
+        //获取设备顶部窗口的高度(不同设备窗口高度不一样,根据这个来设置自定义导航栏的高度
+        wx.getSystemInfo({
+            success: (res) => {
+                let data = res;
+                data.getMenu = wx.getMenuButtonBoundingClientRect();
+                this.globalData.client = data;
+            }
+        })
+    },
+    globalData: {
+        // 接口地址
+        serverUrl: "http://192.168.1.113:13005", //https://broadcast.waityou24.cn   http://192.168.1.113:13005
+        fileserverUrl: 'https://broadcast.waityou24.cn',
+        // 当前设备信息
+        client: {},
+        // 微信openid获取基本设置
+        wx_config: {
+            config: 'BallApp'
+        }
+    },
+    ...httpUtil,
+})

+ 61 - 0
app.json

@@ -0,0 +1,61 @@
+{
+    "pages": [
+        "pages/index/index"
+    ],
+    "subPackages": [
+        {
+            "root": "pagesTeam",
+            "independent": true,
+            "pages": [
+                "home/index"
+            ]
+        },
+        {
+            "root": "pagesHome",
+            "independent": true,
+            "pages": [
+                "home/index"
+            ]
+        },
+        {
+            "root": "pagesMatch",
+            "independent": true,
+            "pages": [
+                "home/index"
+            ]
+        },
+        {
+            "root": "pagesMy",
+            "independent": true,
+            "pages": [
+                "home/index",
+                "basic/index",
+                "exit/index",
+                "match/index",
+                "team/index",
+                "update/index"
+            ]
+        },
+        {
+            "root": "pagesCommon",
+            "independent": true,
+            "pages": [
+                "agree/index"
+            ]
+        }
+    ],
+    "lazyCodeLoading": "requiredComponents",
+    "window": {
+        "backgroundTextStyle": "dark",
+        "navigationBarBackgroundColor": "#000000",
+        "navigationBarTitleText": "羽毛球比赛",
+        "navigationBarTextStyle": "white"
+    },
+    "style": "v2",
+    "sitemapLocation": "sitemap.json",
+    "permission": {
+        "scope.userLocation": {
+            "desc": "你的位置信息将用于小程序位置接口的效果展示"
+        }
+    }
+}

+ 33 - 0
app.wxss

@@ -0,0 +1,33 @@
+.content {
+    display: flex;
+    flex-direction: column;
+    box-sizing: border-box;
+    width: 100vw;
+    height: 100vh;
+}
+
+.textOver {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
+/* 图标 */
+@import "/icon/icon.wxss";
+
+page {
+    /* 主要背景色 */
+    --rgb000: #000000;
+    --rgb111: #111111;
+    --rgbfff: #ffffff;
+    --rgbf1f: #f1f1f1;
+    --rgb161: #161616;
+    --rgbfa4: #FA4343;
+    --rgb67c: #67c23a;
+    --rgb313: #31312e;
+    --rgbffd: #FFD700;
+    --rgbff0: #ff0000;
+    --rgb314: #31479C;
+    --rgb8B0: #8B0000;
+    --rgb466: #46679F;
+}

+ 57 - 0
components/common/home-frame.js

@@ -0,0 +1,57 @@
+const app = getApp()
+import { menu } from "../../utils/site";
+Component({
+    /**
+     * 组件的属性列表
+     */
+    options: { multipleSlots: true },
+    properties: {
+
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+        // 平台信息
+        basicInfo: {},
+        list: [],
+        active: 0
+    },
+    pageLifetimes: {
+        show: function () {
+            const that = this;
+            that.search()
+        },
+        hide: function () { },
+        resize: function () { },
+    },
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        // 查询基本信息
+        async search() {
+            const that = this;
+            // 获取当前路由地址
+            let pages = getCurrentPages();
+            let currentPage = pages[pages.length - 1];
+            let list = menu.sort((a, b) => {
+                return a.sort - b.sort
+            });
+            that.setData({ list })
+            let routeInfo = list.find((i) => i.route == currentPage.route);
+            if (routeInfo) {
+                let index = list.findIndex((i) => i.route == currentPage.route);
+                that.setData({ active: index })
+            }
+        },
+        toPath(index) {
+            const that = this;
+            let active = index.currentTarget.dataset.index;
+            that.setData({ active });
+            let route = that.data.list[active];
+            if (route) that.triggerEvent('toPath', route)
+        }
+    }
+})

+ 4 - 0
components/common/home-frame.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 12 - 0
components/common/home-frame.wxml

@@ -0,0 +1,12 @@
+<view class="content">
+    <view class="info">
+        <slot></slot>
+    </view>
+    <view class="foot">
+        <view class="list" wx:for="{{list}}" wx:if="{{item.is_use=='0'}}" wx:key="item" wx:for-index="index" bindtap="toPath" data-index="{{index}}">
+            <image class="image" src="{{item.normal}}" mode="" wx:if="{{active!=index}}" />
+            <image class="image" src="{{item.active}}" mode="" wx:else />
+            <view class="name" style="color:{{active==index?'var(--rgb67c)':''}}">{{item.title}}</view>
+        </view>
+    </view>
+</view>

+ 34 - 0
components/common/home-frame.wxss

@@ -0,0 +1,34 @@
+@import '/app.wxss';
+
+.content .info {
+    width: 100vw;
+    height: 92vh;
+    overflow: auto;
+}
+
+.content .foot {
+    position: absolute;
+    bottom: 0;
+    width: 100vw;
+    height: 8vh;
+    overflow: hidden;
+    background-color: #000000;
+    color: #ffffff;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-around;
+}
+
+.content .foot .list {
+    padding: 1vw 0;
+    text-align: center;
+}
+
+.content .foot .list .image {
+    width: 6vw;
+    height: 6vw;
+}
+
+.content .foot .list .name {
+    font-size: 12px;
+}

+ 39 - 0
icon/icon.wxss

@@ -0,0 +1,39 @@
+@font-face {
+    font-family: "iconfont"; /* Project id 4108322 */
+    src: url('//at.alicdn.com/t/c/font_4108322_xvelu4o729h.woff2?t=1686103833230') format('woff2'),
+         url('//at.alicdn.com/t/c/font_4108322_xvelu4o729h.woff?t=1686103833230') format('woff'),
+         url('//at.alicdn.com/t/c/font_4108322_xvelu4o729h.ttf?t=1686103833230') format('truetype');
+  }
+  
+  .iconfont {
+    font-family: "iconfont" !important;
+    font-size: 16px;
+    font-style: normal;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+  }
+  
+  .icon-xiugaimima:before {
+    content: "\e66f";
+  }
+  
+  .icon-tuandui:before {
+    content: "\e68c";
+  }
+  
+  .icon-bisai:before {
+    content: "\e644";
+  }
+  
+  .icon-jibenxinxi:before {
+    content: "\e67c";
+  }
+  
+  .icon-tuichudenglu:before {
+    content: "\e70b";
+  }
+  
+  .icon-bisai1:before {
+    content: "\e60f";
+  }
+  

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/team.png


BIN
image/tabs/team_1.png


+ 109 - 0
pages/index/index.js

@@ -0,0 +1,109 @@
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        basicInfo: {},
+        logo: '',
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    async onShow() {
+        const that = this;
+        wx.showLoading({ title: '加载中', mask: true })
+        await this.searchConfig()
+        await that.search();
+        wx.hideLoading()
+    },
+    async searchConfig() {
+        const that = this;
+        // const res = await app.$api('config', 'GET', {});
+        // if (res.errcode == '0') {
+        //     // index,长图。
+        //     if (res.data && res.data.longlogo_url && res.data.longlogo_url.length > 0) {
+        //         let logo = res.data.longlogo_url[0].url
+        //         that.setData({ logo })
+        //     }
+        //     wx.setStorage({ key: "config", data: res.data })
+        // }
+    },
+    async search() {
+        let url = '/pagesHome/home/index';
+        wx.redirectTo({ url })
+        // wx.login({
+        //     success: async (arr) => {
+        //         const { code: js_code } = arr;
+        //         const { wx_config } = app.globalData;
+        //         wx.getStorage({
+        //             key: 'openid',
+        //             success(res) {
+        //                 if (res.data) wx.redirectTo({ url })
+        //             },
+        //             async fail(err) {
+        //                 const aee = await app.$api('token/app', 'GET', { js_code: js_code, config: wx_config.config });
+        //                 if (aee.errcode == '0') {
+        //                     wx.setStorage({ key: "openid", data: aee.data.openid })
+        //                     wx.redirectTo({ url })
+        //                 } else {
+        //                     wx.showToast({ title: `${aee.errmsg}`, icon: 'fail' });
+        //                 }
+        //             }
+        //         })
+
+        //     },
+        // });
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 3 - 0
pages/index/index.json

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

+ 6 - 0
pages/index/index.wxml

@@ -0,0 +1,6 @@
+<view class="main content">
+    <view class="one">
+        <!-- aspectFit -->
+        <image class="image" src="{{logo}}" mode="" />
+    </view>
+</view>

+ 10 - 0
pages/index/index.wxss

@@ -0,0 +1,10 @@
+.main .one {
+    width: 100%;
+    height: 100vh;
+    overflow: hidden;
+}
+
+.main .one .image {
+    width: 100%;
+    height: 100%;
+}

+ 66 - 0
pagesCommon/agree/index.js

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

+ 3 - 0
pagesCommon/agree/index.json

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

+ 2 - 0
pagesCommon/agree/index.wxml

@@ -0,0 +1,2 @@
+<!--pagesCommon/agree/index.wxml-->
+<text>pagesCommon/agree/index.wxml</text>

+ 1 - 0
pagesCommon/agree/index.wxss

@@ -0,0 +1 @@
+/* pagesCommon/agree/index.wxss */

+ 77 - 0
pagesHome/home/index.js

@@ -0,0 +1,77 @@
+const app = getApp()
+Page({
+    data: {
+        info: {}
+    },
+    toPath(e) {
+        let data = e.detail;
+        let url = `/${data.route}`;
+        if (data.type == '0') wx.navigateTo({ url })
+        else if (data.type == '1') wx.redirectTo({ url })
+        else if (data.type == '2') wx.relaunch({ url })
+        else if (data.type == '3') wx.switchTab({ url })
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+        const that = this;
+        wx.showLoading({ title: '加载中', mask: true })
+        that.search()
+        wx.hideLoading()
+    },
+    // 查询通知
+    async search() {
+        const that = this;
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 7 - 0
pagesHome/home/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents": {
+        "home-frame": "/components/common/home-frame"
+    },
+    "navigationBarTitleText": "首页"
+}

+ 5 - 0
pagesHome/home/index.wxml

@@ -0,0 +1,5 @@
+<home-frame bind:toPath="toPath">
+    <view class="main">
+       首页
+    </view>
+</home-frame>

+ 3 - 0
pagesHome/home/index.wxss

@@ -0,0 +1,3 @@
+.main {
+    padding: 1vw;
+}

+ 77 - 0
pagesMatch/home/index.js

@@ -0,0 +1,77 @@
+const app = getApp()
+Page({
+    data: {
+        info: {}
+    },
+    toPath(e) {
+        let data = e.detail;
+        let url = `/${data.route}`;
+        if (data.type == '0') wx.navigateTo({ url })
+        else if (data.type == '1') wx.redirectTo({ url })
+        else if (data.type == '2') wx.relaunch({ url })
+        else if (data.type == '3') wx.switchTab({ url })
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+        const that = this;
+        wx.showLoading({ title: '加载中', mask: true })
+        that.search()
+        wx.hideLoading()
+    },
+    // 查询通知
+    async search() {
+        const that = this;
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 7 - 0
pagesMatch/home/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents": {
+        "home-frame": "/components/common/home-frame"
+    },
+    "navigationBarTitleText": "比赛"
+}

+ 5 - 0
pagesMatch/home/index.wxml

@@ -0,0 +1,5 @@
+<home-frame bind:toPath="toPath">
+    <view class="main">
+        比赛
+    </view>
+</home-frame>

+ 3 - 0
pagesMatch/home/index.wxss

@@ -0,0 +1,3 @@
+.main {
+    padding: 1vw;
+}

+ 66 - 0
pagesMy/basic/index.js

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

+ 3 - 0
pagesMy/basic/index.json

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

+ 2 - 0
pagesMy/basic/index.wxml

@@ -0,0 +1,2 @@
+<!--pagesMy/basic/index.wxml-->
+<text>pagesMy/basic/index.wxml</text>

+ 1 - 0
pagesMy/basic/index.wxss

@@ -0,0 +1 @@
+/* pagesMy/basic/index.wxss */

+ 66 - 0
pagesMy/exit/index.js

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

+ 3 - 0
pagesMy/exit/index.json

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

+ 2 - 0
pagesMy/exit/index.wxml

@@ -0,0 +1,2 @@
+<!--pagesMy/byFollow/index.wxml-->
+<text>pagesMy/byFollow/index.wxml</text>

+ 1 - 0
pagesMy/exit/index.wxss

@@ -0,0 +1 @@
+/* pagesMy/byFollow/index.wxss */

+ 77 - 0
pagesMy/home/index.js

@@ -0,0 +1,77 @@
+const app = getApp()
+Page({
+    data: {
+        info: {}
+    },
+    toPath(e) {
+        let data = e.detail;
+        let url = `/${data.route}`;
+        if (data.type == '0') wx.navigateTo({ url })
+        else if (data.type == '1') wx.redirectTo({ url })
+        else if (data.type == '2') wx.relaunch({ url })
+        else if (data.type == '3') wx.switchTab({ url })
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+        const that = this;
+        wx.showLoading({ title: '加载中', mask: true })
+        that.search()
+        wx.hideLoading()
+    },
+    // 查询通知
+    async search() {
+        const that = this;
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 7 - 0
pagesMy/home/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents": {
+        "home-frame": "/components/common/home-frame"
+    },
+    "navigationBarTitleText": "我的"
+}

+ 5 - 0
pagesMy/home/index.wxml

@@ -0,0 +1,5 @@
+<home-frame bind:toPath="toPath">
+    <view class="main">
+        我的
+    </view>
+</home-frame>

+ 3 - 0
pagesMy/home/index.wxss

@@ -0,0 +1,3 @@
+.main {
+    padding: 1vw;
+}

+ 66 - 0
pagesMy/match/index.js

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

+ 3 - 0
pagesMy/match/index.json

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

+ 2 - 0
pagesMy/match/index.wxml

@@ -0,0 +1,2 @@
+<!--pagesMy/follow/index.wxml-->
+<text>pagesMy/follow/index.wxml</text>

+ 1 - 0
pagesMy/match/index.wxss

@@ -0,0 +1 @@
+/* pagesMy/follow/index.wxss */

+ 66 - 0
pagesMy/team/index.js

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

+ 3 - 0
pagesMy/team/index.json

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

+ 2 - 0
pagesMy/team/index.wxml

@@ -0,0 +1,2 @@
+<!--pagesMy/admin/index.wxml-->
+<text>pagesMy/admin/index.wxml</text>

+ 1 - 0
pagesMy/team/index.wxss

@@ -0,0 +1 @@
+/* pagesMy/admin/index.wxss */

+ 66 - 0
pagesMy/update/index.js

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

+ 3 - 0
pagesMy/update/index.json

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

+ 2 - 0
pagesMy/update/index.wxml

@@ -0,0 +1,2 @@
+<!--pagesMy/file/index.wxml-->
+<text>pagesMy/file/index.wxml</text>

+ 1 - 0
pagesMy/update/index.wxss

@@ -0,0 +1 @@
+/* pagesMy/file/index.wxss */

+ 77 - 0
pagesTeam/home/index.js

@@ -0,0 +1,77 @@
+const app = getApp()
+Page({
+    data: {
+        info: {}
+    },
+    toPath(e) {
+        let data = e.detail;
+        let url = `/${data.route}`;
+        if (data.type == '0') wx.navigateTo({ url })
+        else if (data.type == '1') wx.redirectTo({ url })
+        else if (data.type == '2') wx.relaunch({ url })
+        else if (data.type == '3') wx.switchTab({ url })
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+        const that = this;
+        wx.showLoading({ title: '加载中', mask: true })
+        that.search()
+        wx.hideLoading()
+    },
+    // 查询通知
+    async search() {
+        const that = this;
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 7 - 0
pagesTeam/home/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents": {
+        "home-frame": "/components/common/home-frame"
+    },
+    "navigationBarTitleText": "团队"
+}

+ 5 - 0
pagesTeam/home/index.wxml

@@ -0,0 +1,5 @@
+<home-frame bind:toPath="toPath">
+    <view class="main">
+        团队
+    </view>
+</home-frame>

+ 3 - 0
pagesTeam/home/index.wxss

@@ -0,0 +1,3 @@
+.main {
+    padding: 1vw;
+}

+ 52 - 0
project.config.json

@@ -0,0 +1,52 @@
+{
+    "description": "项目配置文件",
+    "packOptions": {
+        "ignore": [],
+        "include": []
+    },
+    "setting": {
+        "bundle": false,
+        "userConfirmedBundleSwitch": false,
+        "urlCheck": true,
+        "scopeDataCheck": false,
+        "coverView": true,
+        "es6": true,
+        "postcss": true,
+        "compileHotReLoad": false,
+        "lazyloadPlaceholderEnable": false,
+        "preloadBackgroundData": false,
+        "minified": true,
+        "autoAudits": false,
+        "newFeature": false,
+        "uglifyFileName": false,
+        "uploadWithSourceMap": true,
+        "useIsolateContext": true,
+        "nodeModules": false,
+        "enhance": true,
+        "useMultiFrameRuntime": true,
+        "useApiHook": true,
+        "useApiHostProcess": true,
+        "showShadowRootInWxmlPanel": true,
+        "packNpmManually": false,
+        "enableEngineNative": false,
+        "packNpmRelationList": [],
+        "minifyWXSS": true,
+        "showES6CompileOption": false,
+        "minifyWXML": true,
+        "babelSetting": {
+            "ignore": [],
+            "disablePlugins": [],
+            "outputPath": ""
+        },
+        "condition": false
+    },
+    "compileType": "miniprogram",
+    "libVersion": "2.19.4",
+    "appid": "wx8cdd28824dfcdf19",
+    "projectname": "miniprogram-92",
+    "condition": {},
+    "editorSetting": {
+        "tabIndent": "insertSpaces",
+        "tabSize": 4
+    }
+}

+ 7 - 0
project.private.config.json

@@ -0,0 +1,7 @@
+{
+    "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+    "projectname": "applet",
+    "setting": {
+        "compileHotReLoad": true
+    }
+}

+ 7 - 0
sitemap.json

@@ -0,0 +1,7 @@
+{
+  "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+  "rules": [{
+  "action": "allow",
+  "page": "*"
+  }]
+}

+ 62 - 0
utils/httpUtil.js

@@ -0,0 +1,62 @@
+// 请求地址
+const getDomain = (uri, type) => {
+    const app = getApp();
+    const { serverUrl, fileserverUrl, wechatUrl } = app.globalData;
+    // 自定义
+    if (uri.includes("http")) return uri;
+    // 微信
+    if (uri.startsWith("/wechat/api")) return wechatUrl + uri;
+    // 地址前缀
+    else if (type) return serverUrl + `/ball/${type}/api/` + uri;
+    // 常规
+    return serverUrl + "/ball/v1/api/" + uri;
+}
+export const $api = async (uri, method = 'GET', data, type) => {
+    // 请求地址
+    let baseUrl = getDomain(uri, type);
+    // 处理空数据
+    data = getFilterNull(data)
+    return new Promise((resolve, reject) => {
+        wx.request({
+            url: `${baseUrl}`,
+            method,
+            data,
+            header: { 'Content-Type': 'application/json' },
+            success: (res) => toResolve(resolve, res),
+            error: (e) => toReject(reject, e),
+        });
+    });
+}
+export const $apifile = async (uri, method, data, type) => {
+    const app = getApp();
+    const { fileserverUrl, } = app.globalData;
+    // 请求地址
+    // let baseUrl = getDomain(uri, type);
+    return new Promise((resolve, reject) => {
+        wx.uploadFile({
+            url: `${fileserverUrl}/${uri}`,
+            filePath: data,
+            name: 'file',
+            formData: {},
+            success: (res) => toResolve(resolve, res),
+            error: (err) => toReject(reject, err),
+        })
+    });
+}
+const toResolve = (resolve, result) => {
+    if (result.statusCode === 200) resolve(result.data);
+    else {
+        console.error("请求失败");
+    }
+};
+const toReject = (reject, result) => {
+    console.error(result);
+    reject(result);
+};
+const getFilterNull = (data) => {
+    for (const key in data) {
+        //data[key] == null || data[key] == ''
+        if (data[key] == null) delete data[key]
+    }
+    return data;
+}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
utils/moment.min.js


+ 13 - 0
utils/site.js

@@ -0,0 +1,13 @@
+export const menu = [
+    { title: '首页', normal: '/image/tabs/home.png', active: '/image/tabs/home_1.png', route: 'pagesHome/home/index', is_use: '0', type: '1' },
+    { title: '比赛', normal: '/image/tabs/match.png', active: '/image/tabs/match_1.png', route: 'pagesMatch/home/index', is_use: '0', type: '1' },
+    { title: '团队', normal: '/image/tabs/team.png', active: '/image/tabs/team_1.png', route: 'pagesTeam/home/index', is_use: '0', type: '1' },
+    { title: '我的', normal: '/image/tabs/my.png', active: '/image/tabs/my_1.png', route: 'pagesMy/home/index', is_use: '0', type: '1' },
+]
+export const my_menu = [
+    { title: "基本信息", icon: 'icon-jibenxinxi', you: 'icon-youjiantou-copy', route: "pagesMy/basic/index" },
+    { title: "我的团队", icon: 'icon-tupianshangchuan', you: 'icon-youjiantou-copy', route: "pagesMy/team/index" },
+    { title: "我的比赛", icon: 'icon-wodeguanzhu', you: 'icon-youjiantou-copy', route: "pagesMy/match/index" },
+    { title: "修改密码", icon: 'icon-iocn_be_concern', you: 'icon-youjiantou-copy', route: "pagesMy/update/index" },
+    { title: "退出登录", icon: 'icon-lianxiguanliyuan', you: 'icon-youjiantou-copy', route: "pagesMy/exit/index" }
+]

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 418 - 0
utils/wxValidate.js