Browse Source

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

guhongwei 2 năm trước cách đây
mục cha
commit
d5a56e1ae7
36 tập tin đã thay đổi với 889 bổ sung231 xóa
  1. 80 27
      pagesMatch/matchAdmin/address/add.js
  2. 5 2
      pagesMatch/matchAdmin/address/add.json
  3. 35 0
      pagesMatch/matchAdmin/address/add.less
  4. 31 2
      pagesMatch/matchAdmin/address/add.wxml
  5. 27 1
      pagesMatch/matchAdmin/address/add.wxss
  6. 90 29
      pagesMatch/matchAdmin/address/list.js
  7. 5 2
      pagesMatch/matchAdmin/address/list.json
  8. 90 0
      pagesMatch/matchAdmin/address/list.less
  9. 39 2
      pagesMatch/matchAdmin/address/list.wxml
  10. 73 1
      pagesMatch/matchAdmin/address/list.wxss
  11. 28 28
      pagesMatch/matchAdmin/mtgroup/add.js
  12. 5 2
      pagesMatch/matchAdmin/mtgroup/add.json
  13. 23 0
      pagesMatch/matchAdmin/mtgroup/add.less
  14. 7 2
      pagesMatch/matchAdmin/mtgroup/add.wxml
  15. 19 1
      pagesMatch/matchAdmin/mtgroup/add.wxss
  16. 28 28
      pagesMatch/matchAdmin/mtgroup/auto.js
  17. 5 2
      pagesMatch/matchAdmin/mtgroup/auto.json
  18. 23 0
      pagesMatch/matchAdmin/mtgroup/auto.less
  19. 7 2
      pagesMatch/matchAdmin/mtgroup/auto.wxml
  20. 19 1
      pagesMatch/matchAdmin/mtgroup/auto.wxss
  21. 28 28
      pagesMatch/matchAdmin/mtgroup/list.js
  22. 5 2
      pagesMatch/matchAdmin/mtgroup/list.json
  23. 23 0
      pagesMatch/matchAdmin/mtgroup/list.less
  24. 7 2
      pagesMatch/matchAdmin/mtgroup/list.wxml
  25. 19 1
      pagesMatch/matchAdmin/mtgroup/list.wxss
  26. 28 28
      pagesMatch/matchAdmin/mtschedule/add.js
  27. 5 2
      pagesMatch/matchAdmin/mtschedule/add.json
  28. 23 0
      pagesMatch/matchAdmin/mtschedule/add.less
  29. 7 2
      pagesMatch/matchAdmin/mtschedule/add.wxml
  30. 19 1
      pagesMatch/matchAdmin/mtschedule/add.wxss
  31. 28 28
      pagesMatch/matchAdmin/mtschedule/list.js
  32. 5 2
      pagesMatch/matchAdmin/mtschedule/list.json
  33. 23 0
      pagesMatch/matchAdmin/mtschedule/list.less
  34. 7 2
      pagesMatch/matchAdmin/mtschedule/list.wxml
  35. 19 1
      pagesMatch/matchAdmin/mtschedule/list.wxss
  36. 4 0
      utils/dict.js

+ 80 - 27
pagesMatch/matchAdmin/address/add.js

@@ -1,66 +1,119 @@
-// pagesMatch/matchAdmin/address/add.js
-Page({
+const app = getApp();
+import WxValidate from '../../../utils/wxValidate';
+import { is_use } from '../../../utils/dict';
 
-    /**
-     * 页面的初始数据
-     */
+Page({
     data: {
-
+        frameStyle: { useTop: true, name: '基本页面', leftArrow: true, useBar: false },
+        id: '',
+        // 所属id
+        belong_id: '',
+        form: {},
+        is_useList: is_use,
+    },
+    // 返回
+    back: function () { wx.navigateBack({ delta: 1 }) },
+    initValidate() {
+        const rules = { name: { required: true }, remark: { required: true }, is_use: { required: true } }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { name: { required: '请输入场地名称', }, remark: { required: '请输入备注', }, is_use: { required: '请选择是否使用' } };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+    // 是否使用
+    is_useChange: function (e) {
+        const that = this;
+        let data = that.data.is_useList[e.detail.value];
+        if (data) { that.setData({ 'form.is_use': data.value, 'form.zhIs_use': data.label }); }
+    },
+    // 提交登录
+    onSubmit: async function (e) {
+        const that = this;
+        let params = e.detail.value;
+        const form = that.data.form;
+        params = { ...params, belong_id: that.data.belong_id }
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            let arr;
+            if (form._id) arr = await app.$post(`/matchAddress/${form._id}`, params, 'race');
+            else arr = await app.$post(`/matchAddress`, params, 'race');
+            if (arr.errcode == '0') { wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back(); }
+            else wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+        }
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) {
+        const that = this;
+        that.setData({ id: options.id || '' })
+        //验证规则函数
+        that.initValidate();
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
+    onShow: function () {
 
     },
-
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'raceuser',
+            success: async res => {
+                that.setData({ belong_id: res.data._id })
+                if (that.data.id) {
+                    const arr = await app.$get(`/matchAddress/${that.data.id}`, {}, 'race');
+                    if (arr.errcode == '0') {
+                        let is_use = that.data.is_useList.find(i => i.value == arr.data.is_use)
+                        if (is_use) arr.data.zhIs_use = is_use.label;
+                        that.setData({ form: arr.data });
+                    }
+                }
+
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pagesMatch/matchAdmin/address/add.json

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

+ 35 - 0
pagesMatch/matchAdmin/address/add.less

@@ -0,0 +1,35 @@
+@import (css) "/app.wxss";
+
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--f1Color);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--blackColor);
+
+                textarea {
+                    position: static;
+                    width: 72vw;
+                }
+            }
+        }
+
+        .btn {
+            text-align: center;
+            margin: 3vw 0;
+
+            button {
+                margin: 0 2vw;
+            }
+        }
+    }
+}

+ 31 - 2
pagesMatch/matchAdmin/address/add.wxml

@@ -1,2 +1,31 @@
-<!--pagesMatch/matchAdmin/address/add.wxml-->
-<text>pagesMatch/matchAdmin/address/add.wxml</text>
+<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">
+                        <input name="name" value="{{form.name}}" placeholder="请输入比赛场地名称" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">备注:</view>
+                    <view class="value">
+                        <textarea maxlength="500" name="remark" value="{{form.remark}}" placeholder="请输入备注" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">是否使用:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="is_useChange" name="is_use" value="{{form.is_use}}" range="{{is_useList}}" range-key="label">
+                            <view class="picker">{{form.zhIs_use||'请选择是否使用'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交保存</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</mobile-main>

+ 27 - 1
pagesMatch/matchAdmin/address/add.wxss

@@ -1 +1,27 @@
-/* pagesMatch/matchAdmin/address/add.wxss */
+@import "/app.wxss";
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .one .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.main .one .content .value textarea {
+  position: static;
+  width: 72vw;
+}
+.main .one .btn {
+  text-align: center;
+  margin: 3vw 0;
+}
+.main .one .btn button {
+  margin: 0 2vw;
+}

+ 90 - 29
pagesMatch/matchAdmin/address/list.js

@@ -1,66 +1,127 @@
-// pagesMatch/matchAdmin/address/list.js
-Page({
+const app = getApp();
+import { is_use } from '../../../utils/dict';
 
-    /**
-     * 页面的初始数据
-     */
+Page({
     data: {
-
+        frameStyle: { useTop: true, name: '场地设置', leftArrow: true, useBar: false },
+        list: [],
+        is_useList: is_use,
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
+    },
+    // 返回
+    back: function () { wx.navigateBack({ delta: 1 }) },
+    //添加信息,信息维护
+    toCommon: function (e) {
+        const that = this;
+        const { item, route } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] });
+        wx.navigateTo({ url: `/pagesMatch/${route}?id=${item && item._id ? item._id : ''}` })
+    },
+    // 删除
+    toDel: async function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除该条数据?',
+            async success(res) {
+                if (res.confirm) {
+                    const arr = await app.$delete(`/matchAddress/${item._id}`, {}, 'race');
+                    if (arr.errcode == '0') {
+                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.setData({ skip: 0, page: 0, list: [] });
+                        that.watchLogin()
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                    }
+                }
+            }
+        })
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.watchLogin();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
-    },
-
+    onLoad: function (options) { },
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'raceuser',
+            success: async res => {
+                let info = { skip: that.data.skip, limit: that.data.limit, belong_id: res.data._id };
+                let arr = await app.$get(`/matchAddress`, { ...info }, 'race');
+                if (arr.errcode == '0') {
+                    for (const val of arr.data) {
+                        let is_use = that.data.is_useList.find(i => i.value == val.is_use)
+                        if (is_use) val.zhIs_use = is_use.label;
+                    }
+                    that.setData({ list: [...that.data.list, ...arr.data] })
+                    that.setData({ total: arr.total })
+                } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pagesMatch/matchAdmin/address/list.json

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

+ 90 - 0
pagesMatch/matchAdmin/address/list.less

@@ -0,0 +1,90 @@
+@import (css) "/app.wxss";
+
+.main {
+    height: var(--twoHeight);
+    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 {
+        position: relative;
+        flex-grow: 1;
+        background-color: var(--whiteColor);
+        padding: 0 2vw;
+
+        .list {
+            background-color: var(--f9Color);
+            margin: 0 0 2vw 0;
+            padding: 2vw;
+            margin: 0 2vw 2vw 2vw;
+            border-radius: 5px;
+
+            .name {
+                font-size: var(--font16Szie);
+                font-weight: bold;
+                margin: 0 0 1vw 0;
+            }
+
+            .other {
+                margin: 0 0 1vw 0;
+
+                .other_1 {
+                    margin: 0 0 1vw 0;
+                    font-size: var(--font14Size);
+
+                    text:first-child {
+                        color: var(--f85Color);
+                    }
+                }
+            }
+
+            .btn {
+                text-align: center;
+
+                button {
+                    margin: 0 2vw;
+                    font-size: var(--font14Size);
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 39 - 2
pagesMatch/matchAdmin/address/list.wxml

@@ -1,2 +1,39 @@
-<!--pagesMatch/matchAdmin/address/list.wxml-->
-<text>pagesMatch/matchAdmin/address/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <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" bindtap="toCommon" data-route="matchAdmin/address/add">添加</button>
+            </view>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="name">{{item.name||'暂无'}}</view>
+                        <view class="other">
+                            <view class="other_1">
+                                <text>比赛场地名称:</text>
+                                <text>{{item.name||'暂无'}}</text>
+                            </view>
+                            <view class="other_1">
+                                <text>是否使用:</text>
+                                <text>{{item.zhIs_use||'暂无'}}</text>
+                            </view>
+                            <view class="other_1">
+                                <text>备注:</text>
+                                <text>{{item.remark||'暂无'}}</text>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button type="primary" size="mini" bindtap="toCommon" data-route="matchAdmin/address/add" data-item="{{item}}">信息维护</button>
+                            <button type="warn" size="mini" bindtap="toDel" data-item="{{item}}">信息删除</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 73 - 1
pagesMatch/matchAdmin/address/list.wxss

@@ -1 +1,73 @@
-/* pagesMatch/matchAdmin/address/list.wxss */
+@import "/app.wxss";
+.main {
+  height: var(--twoHeight);
+  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 {
+  position: relative;
+  flex-grow: 1;
+  background-color: var(--whiteColor);
+  padding: 0 2vw;
+}
+.main .two .list {
+  background-color: var(--f9Color);
+  margin: 0 0 2vw 0;
+  padding: 2vw;
+  margin: 0 2vw 2vw 2vw;
+  border-radius: 5px;
+}
+.main .two .list .name {
+  font-size: var(--font16Szie);
+  font-weight: bold;
+  margin: 0 0 1vw 0;
+}
+.main .two .list .other {
+  margin: 0 0 1vw 0;
+}
+.main .two .list .other .other_1 {
+  margin: 0 0 1vw 0;
+  font-size: var(--font14Size);
+}
+.main .two .list .other .other_1 text:first-child {
+  color: var(--f85Color);
+}
+.main .two .list .btn {
+  text-align: center;
+}
+.main .two .list .btn button {
+  margin: 0 2vw;
+  font-size: var(--font14Size);
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 28 - 28
pagesMatch/matchAdmin/mtgroup/add.js

@@ -1,66 +1,66 @@
-// pagesMatch/matchAdmin/mtgroup/add.js
+const app = getApp();
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '基本页面', leftArrow: true, useBar: false },
     },
+    // 返回
+    back: function () { wx.navigateBack({ delta: 1 }) },
 
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
-    },
-
+    onLoad: function (options) { },
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'raceuser',
+            success: async res => { },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pagesMatch/matchAdmin/mtgroup/add.json

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

+ 23 - 0
pagesMatch/matchAdmin/mtgroup/add.less

@@ -0,0 +1,23 @@
+@import (css) "/app.wxss";
+
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        width: 100vw;
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 7 - 2
pagesMatch/matchAdmin/mtgroup/add.wxml

@@ -1,2 +1,7 @@
-<!--pagesMatch/matchAdmin/mtgroup/add.wxml-->
-<text>pagesMatch/matchAdmin/mtgroup/add.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            基本页面
+        </view>
+    </view>
+</mobile-main>

+ 19 - 1
pagesMatch/matchAdmin/mtgroup/add.wxss

@@ -1 +1,19 @@
-/* pagesMatch/matchAdmin/mtgroup/add.wxss */
+@import "/app.wxss";
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  width: 100vw;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 28 - 28
pagesMatch/matchAdmin/mtgroup/auto.js

@@ -1,66 +1,66 @@
-// pagesMatch/matchAdmin/mtgroup/auto.js
+const app = getApp();
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '基本页面', leftArrow: true, useBar: false },
     },
+    // 返回
+    back: function () { wx.navigateBack({ delta: 1 }) },
 
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
-    },
-
+    onLoad: function (options) { },
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'raceuser',
+            success: async res => { },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pagesMatch/matchAdmin/mtgroup/auto.json

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

+ 23 - 0
pagesMatch/matchAdmin/mtgroup/auto.less

@@ -0,0 +1,23 @@
+@import (css) "/app.wxss";
+
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        width: 100vw;
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 7 - 2
pagesMatch/matchAdmin/mtgroup/auto.wxml

@@ -1,2 +1,7 @@
-<!--pagesMatch/matchAdmin/mtgroup/auto.wxml-->
-<text>pagesMatch/matchAdmin/mtgroup/auto.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            基本页面
+        </view>
+    </view>
+</mobile-main>

+ 19 - 1
pagesMatch/matchAdmin/mtgroup/auto.wxss

@@ -1 +1,19 @@
-/* pagesMatch/matchAdmin/mtgroup/auto.wxss */
+@import "/app.wxss";
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  width: 100vw;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 28 - 28
pagesMatch/matchAdmin/mtgroup/list.js

@@ -1,66 +1,66 @@
-// pagesMatch/matchAdmin/mtgroup/list.js
+const app = getApp();
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '基本页面', leftArrow: true, useBar: false },
     },
+    // 返回
+    back: function () { wx.navigateBack({ delta: 1 }) },
 
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
-    },
-
+    onLoad: function (options) { },
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'raceuser',
+            success: async res => { },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pagesMatch/matchAdmin/mtgroup/list.json

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

+ 23 - 0
pagesMatch/matchAdmin/mtgroup/list.less

@@ -0,0 +1,23 @@
+@import (css) "/app.wxss";
+
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        width: 100vw;
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 7 - 2
pagesMatch/matchAdmin/mtgroup/list.wxml

@@ -1,2 +1,7 @@
-<!--pagesMatch/matchAdmin/mtgroup/list.wxml-->
-<text>pagesMatch/matchAdmin/mtgroup/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            基本页面
+        </view>
+    </view>
+</mobile-main>

+ 19 - 1
pagesMatch/matchAdmin/mtgroup/list.wxss

@@ -1 +1,19 @@
-/* pagesMatch/matchAdmin/mtgroup/list.wxss */
+@import "/app.wxss";
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  width: 100vw;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 28 - 28
pagesMatch/matchAdmin/mtschedule/add.js

@@ -1,66 +1,66 @@
-// pagesMatch/matchAdmin/mtschedule/add.js
+const app = getApp();
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '基本页面', leftArrow: true, useBar: false },
     },
+    // 返回
+    back: function () { wx.navigateBack({ delta: 1 }) },
 
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
-    },
-
+    onLoad: function (options) { },
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'raceuser',
+            success: async res => { },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pagesMatch/matchAdmin/mtschedule/add.json

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

+ 23 - 0
pagesMatch/matchAdmin/mtschedule/add.less

@@ -0,0 +1,23 @@
+@import (css) "/app.wxss";
+
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        width: 100vw;
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 7 - 2
pagesMatch/matchAdmin/mtschedule/add.wxml

@@ -1,2 +1,7 @@
-<!--pagesMatch/matchAdmin/mtschedule/add.wxml-->
-<text>pagesMatch/matchAdmin/mtschedule/add.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            基本页面
+        </view>
+    </view>
+</mobile-main>

+ 19 - 1
pagesMatch/matchAdmin/mtschedule/add.wxss

@@ -1 +1,19 @@
-/* pagesMatch/matchAdmin/mtschedule/add.wxss */
+@import "/app.wxss";
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  width: 100vw;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 28 - 28
pagesMatch/matchAdmin/mtschedule/list.js

@@ -1,66 +1,66 @@
-// pagesMatch/matchAdmin/mtschedule/list.js
+const app = getApp();
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '基本页面', leftArrow: true, useBar: false },
     },
+    // 返回
+    back: function () { wx.navigateBack({ delta: 1 }) },
 
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
-    },
-
+    onLoad: function (options) { },
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'raceuser',
+            success: async res => { },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pagesMatch/matchAdmin/mtschedule/list.json

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

+ 23 - 0
pagesMatch/matchAdmin/mtschedule/list.less

@@ -0,0 +1,23 @@
+@import (css) "/app.wxss";
+
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        width: 100vw;
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 7 - 2
pagesMatch/matchAdmin/mtschedule/list.wxml

@@ -1,2 +1,7 @@
-<!--pagesMatch/matchAdmin/mtschedule/list.wxml-->
-<text>pagesMatch/matchAdmin/mtschedule/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            基本页面
+        </view>
+    </view>
+</mobile-main>

+ 19 - 1
pagesMatch/matchAdmin/mtschedule/list.wxss

@@ -1 +1,19 @@
-/* pagesMatch/matchAdmin/mtschedule/list.wxss */
+@import "/app.wxss";
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  width: 100vw;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 4 - 0
utils/dict.js

@@ -216,4 +216,8 @@ export const pay_status = [
     { value: '-1', label: '支付失败' },
     { value: '-2', label: '申请退款' },
     { value: '-3', label: '退款成功' },
+]
+export const is_use = [
+    { label: '启用', value: '0' },
+    { label: '禁用', value: '1' },
 ]