Ver código fonte

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

guhongwei 2 anos atrás
pai
commit
d5f7186a32

+ 4 - 0
app.json

@@ -4,7 +4,11 @@
         "pages/register/index",
         "pages/home/index",
         "pages/news/index",
+        "pages/news/mess",
+        "pages/news/add",
         "pages/topic/index",
+        "pages/topic/mess",
+        "pages/topic/add",
         "pages/my/index",
         "pages/my/userInfo",
         "pages/matchInfo/index",

+ 146 - 0
pages/news/add.js

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

+ 6 - 0
pages/news/add.json

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

+ 42 - 0
pages/news/add.less

@@ -0,0 +1,42 @@
+.main {
+    height: 88.8vh;
+
+    .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: 15px;
+            }
+
+            .value {
+                color: #666;
+                font-size: 16px;
+                text-align: right;
+
+                textarea {
+                    max-width: 220px;
+                }
+            }
+        }
+
+        .btn {
+            width: 96vw;
+            margin: 2vw 0 0 0;
+            text-align: center;
+
+            button {
+                font-size: 14px;
+            }
+        }
+    }
+
+}

+ 35 - 0
pages/news/add.wxml

@@ -0,0 +1,35 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="one">
+            <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">场地名称</view>
+                    <view class="value">
+                        <view class="value"><input name="name" value="{{form.name}}" placeholder="请输入比赛场地名称" /></view>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">裁判:</view>
+                    <picker name="referee_id" bindchange="referee_idChange" value="{{form.referee_id}}" range-key='name' range="{{referee_idList}}">
+                        <view class="input">{{form.referee_name||'请选择裁判'}}</view>
+                    </picker>
+                </view>
+                <view class="content">
+                    <view class="label">备注:</view>
+                    <view class="value">
+                        <view class="value"><input name="remark" value="{{form.remark}}" placeholder="请输入备注" /></view>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">是否使用:</view>
+                    <picker name="is_use" bindchange="is_useChange" value="{{form.is_use}}" range-key='label' range="{{is_useList}}">
+                        <view class="input">{{form.is_use=='0'?'启用':form.is_use=='1'?'禁用':'选择是否使用'}}</view>
+                    </picker>
+                </view>
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交保存</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</mobile-main>

+ 34 - 0
pages/news/add.wxss

@@ -0,0 +1,34 @@
+.main {
+  height: 88.8vh;
+}
+.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: 15px;
+}
+.main .one .content .value {
+  color: #666;
+  font-size: 16px;
+  text-align: right;
+}
+.main .one .content .value textarea {
+  max-width: 220px;
+}
+.main .one .btn {
+  width: 96vw;
+  margin: 2vw 0 0 0;
+  text-align: center;
+}
+.main .one .btn button {
+  font-size: 14px;
+}

+ 125 - 0
pages/news/mess.js

@@ -0,0 +1,125 @@
+const app = getApp()
+
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '资讯信息管理', leftArrow: true, useBar: false },
+        searchInfo: {},
+        list: [],
+    },
+    // 跳转菜单
+    back(e) {
+        wx.navigateBack({ delta: 1 });
+    },
+    search: function (e) {
+        const that = this;
+        that.setData({ 'searchInfo.name': e.detail.value });
+        that.watchLogin()
+    },
+    // 添加
+    toAdd() {
+        wx.navigateTo({ url: '/pages/news/add' })
+    },
+    // 修改
+    toEdit: function (e) {
+        let { id } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/pages/news/add?id=${id}` })
+    },
+    // 删除
+    toDel: async function (e) {
+        const that = this;
+        const { id } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除该条数据?',
+            async success(res) {
+                if (res.confirm) {
+                    const arr = await app.$delete(`/newCourt/api/ground/${id}`);
+                    if (arr.errcode == '0') {
+                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.watchLogin()
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                    }
+                }
+            }
+        })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        const that = this;
+        // 监听用户是否登录
+        // that.watchLogin();
+    },
+    watchLogin: function () {
+        const that = this;
+        let searchInfo = that.data.searchInfo;
+        wx.getStorage({
+            key: 'user',
+            success: async (res) => {
+                let info = { skip: 0, limit: 1000 };
+                if (searchInfo && searchInfo.name) info.name = searchInfo.name;
+                const arr = await app.$get(`/newCourt/api/ground`, { ...info });
+                if (arr.errcode == '0') {
+                    that.setData({ list: arr.data })
+                } else { wx.showToast({ title: `${res.errMsg}`, icon: 'fail', duration: 2000 }); }
+            },
+            fail: async (res) => {
+                wx.redirectTo({ url: '/pages/index/index' });
+            },
+        });
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        this.watchLogin();
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/news/mess.json

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

+ 114 - 0
pages/news/mess.less

@@ -0,0 +1,114 @@
+.main {
+    height: 88.8vh;
+
+    .zero {
+        width: 96vw;
+        margin: 0 0 2vw 0;
+        // background-color: #fff;
+    }
+
+    .zero:last-child {
+        margin: 0;
+    }
+
+    .one {
+        display: flex;
+        flex-direction: row;
+        border-radius: 5px;
+        background-color: #f1f1f1;
+
+        .one_1 {
+            width: 80vw;
+
+            input {
+                width: 100%;
+                font-size: 15px;
+                margin: 5px;
+            }
+        }
+
+        .one_2 {
+            width: 16vw;
+
+            button {
+                width: 100%;
+                font-size: 14px;
+                padding: 2vw 0;
+            }
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        width: 100%;
+        position: relative;
+
+        .scroll-view {
+            position: absolute;
+            top: 0;
+            left: 0;
+            right: 0;
+            bottom: 0;
+
+            .list-scroll-view {
+                display: flex;
+                flex-direction: column;
+
+                .list {
+                    background-color: #ffffff;
+                    border-bottom: 1px solid #cccccc;
+                    padding: 2vw 0;
+                    display: flex;
+                    flex-direction: column;
+
+                    .info {
+                        display: flex;
+                        flex-direction: row;
+                        margin: 0 0 2vw 0;
+
+                        .list_2 {
+                            padding: 0 0 0 2vw;
+
+                            .name {
+                                font-size: 18px;
+                                font-weight: bold;
+                                margin: 0 0 1vw 0;
+                                overflow: hidden;
+                                text-overflow: ellipsis;
+                                -webkit-line-clamp: 2;
+                                word-break: break-all;
+                                display: -webkit-box;
+                                -webkit-box-orient: vertical;
+                            }
+
+                            .other {
+                                .other_1 {
+                                    margin: 0 0 1vw 0;
+                                    color: #000000a6;
+                                    font-size: 15px;
+                                    overflow: hidden;
+                                    text-overflow: ellipsis;
+                                    -webkit-line-clamp: 4;
+                                    word-break: break-all;
+                                    display: -webkit-box;
+                                    -webkit-box-orient: vertical;
+                                }
+                            }
+                        }
+                    }
+
+                    .btn {
+                        text-align: center;
+
+                        button {
+                            margin: 0 2vw;
+                            font-size: 14px;
+                        }
+                    }
+
+                }
+            }
+        }
+    }
+
+}

+ 46 - 0
pages/news/mess.wxml

@@ -0,0 +1,46 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="zero one">
+            <view class="one_1">
+                <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入资讯名称" />
+            </view>
+            <view class="one_2">
+                <button type="primary" bindtap="toAdd">添加</button>
+            </view>
+        </view>
+        <view class="zero two">
+            <scroll-view scroll-y="true" class="scroll-view">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="info">
+                            <view class="list_2">
+                                <view class="other">
+                                    <view class="other_1">
+                                        <text>比赛场地名称:</text>
+                                        <text>{{item.name||'暂无'}}</text>
+                                    </view>
+                                    <view class="other_1">
+                                        <text>裁判:</text>
+                                        <text>{{item.referee_name||'暂无'}}</text>
+                                    </view>
+                                    <view class="other_1">
+                                        <text>备注:</text>
+                                        <text>{{item.remark||'暂无'}}</text>
+                                    </view>
+                                    <view class="other_1">
+                                        <text>是否使用:</text>
+                                        <text>{{item.is_use=='0'?'启用':'禁用'}}</text>
+                                    </view>
+                                </view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button type="primary" bindtap="toEdit" data-id="{{item._id}}" size="mini">信息维护</button>
+                            <button size="mini" type="warn" bindtap="toDel" data-id="{{item._id}}">信息删除</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 92 - 0
pages/news/mess.wxss

@@ -0,0 +1,92 @@
+.main {
+  height: 88.8vh;
+}
+.main .zero {
+  width: 96vw;
+  margin: 0 0 2vw 0;
+}
+.main .zero:last-child {
+  margin: 0;
+}
+.main .one {
+  display: flex;
+  flex-direction: row;
+  border-radius: 5px;
+  background-color: #f1f1f1;
+}
+.main .one .one_1 {
+  width: 80vw;
+}
+.main .one .one_1 input {
+  width: 100%;
+  font-size: 15px;
+  margin: 5px;
+}
+.main .one .one_2 {
+  width: 16vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  font-size: 14px;
+  padding: 2vw 0;
+}
+.main .two {
+  flex-grow: 1;
+  width: 100%;
+  position: relative;
+}
+.main .two .scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.main .two .scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.main .two .scroll-view .list-scroll-view .list {
+  background-color: #ffffff;
+  border-bottom: 1px solid #cccccc;
+  padding: 2vw 0;
+  display: flex;
+  flex-direction: column;
+}
+.main .two .scroll-view .list-scroll-view .list .info {
+  display: flex;
+  flex-direction: row;
+  margin: 0 0 2vw 0;
+}
+.main .two .scroll-view .list-scroll-view .list .info .list_2 {
+  padding: 0 0 0 2vw;
+}
+.main .two .scroll-view .list-scroll-view .list .info .list_2 .name {
+  font-size: 18px;
+  font-weight: bold;
+  margin: 0 0 1vw 0;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  -webkit-line-clamp: 2;
+  word-break: break-all;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+}
+.main .two .scroll-view .list-scroll-view .list .info .list_2 .other .other_1 {
+  margin: 0 0 1vw 0;
+  color: #000000a6;
+  font-size: 15px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  -webkit-line-clamp: 4;
+  word-break: break-all;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+}
+.main .two .scroll-view .list-scroll-view .list .btn {
+  text-align: center;
+}
+.main .two .scroll-view .list-scroll-view .list .btn button {
+  margin: 0 2vw;
+  font-size: 14px;
+}

+ 19 - 13
pages/openMatch/index.less

@@ -167,12 +167,10 @@
 
                     .c_1 {
                         width: 96vw;
-                        // height: 61vh;
 
                         .c_top {
                             display: flex;
                             flex-direction: row;
-                            // background-color: #009cd8;
                             padding: 3px;
                             height: 34px;
                             width: 94vw;
@@ -180,13 +178,13 @@
                             button {
                                 background-color: #328d26;
                                 color: #fff;
-                                font-size: 12px;
+                                font-size: 14px;
                                 height: 34px;
                                 padding: 4px 12px;
                             }
 
                             .c_top_2 {
-                                width: 70vw;
+                                width: 68vw;
 
                                 input {
                                     margin: 0 0 0 5px;
@@ -232,6 +230,7 @@
                                                 background-color: #328d26;
                                                 padding: 5px 3px;
                                                 color: #fff;
+                                                font-size: 15px;
 
                                                 text {
                                                     margin: 0 5px;
@@ -244,17 +243,21 @@
                                                 border-radius: 3px;
 
                                                 .one {
-                                                    width: 33vw;
+                                                    width: 32.5vw;
                                                     display: flex;
                                                     flex-direction: row;
-                                                    font-size: 14px;
-                                                    text-align: center;
+                                                    font-size: 15px;
                                                     padding: 8px 0;
 
-                                                    image {
-                                                        border-radius: 50%;
-                                                        width: 40px;
-                                                        height: 40px;
+                                                    .person {
+                                                        width: 70vw;
+                                                        text-align: center;
+
+                                                        image {
+                                                            border-radius: 50%;
+                                                            width: 40px;
+                                                            height: 40px;
+                                                        }
                                                     }
                                                 }
 
@@ -274,11 +277,11 @@
                                                         border-radius: 0 0 5px 5px;
                                                         color: #fff;
                                                         padding: 3px;
-                                                        font-size: 14px;
+                                                        font-size: 15px;
                                                     }
 
                                                     .branch {
-                                                        font-size: 22px;
+                                                        font-size: 18px;
                                                         padding: 2px 0 0 0;
                                                         font-weight: 700;
 
@@ -304,12 +307,15 @@
 
                                             .one_1 {
                                                 color: rgb(63, 63, 63);
+                                                font-size: 15px;
                                             }
 
                                             .one_2 {
                                                 color: rgb(63, 63, 63);
                                                 flex-grow: 1;
                                                 text-align: right;
+                                                font-size: 15px;
+
                                             }
                                         }
                                     }

+ 6 - 4
pages/openMatch/index.wxml

@@ -118,8 +118,9 @@
                                                 </view>
                                                 <view class="list_2">
                                                     <view class="one">
-                                                        <view class="list" wx:for="{{item.person}}" wx:key="item">
-                                                            <image class="img" src="{{item.icon[0].url}}"></image>
+                                                        <view class="person" wx:for="{{item.person}}" wx:key="item">
+                                                            <!-- <image class="img" src="{{item.icon[0].url}}"></image> -->
+                                                            <image class="img" src="/image/icon.jpg"></image>
                                                             <view class="name">{{item.name}}</view>
                                                         </view>
                                                     </view>
@@ -135,8 +136,9 @@
                                                         </view>
                                                     </view>
                                                     <view class="one">
-                                                        <view class="list" wx:for="{{item.red_members}}" wx:key="item">
-                                                            <image class="img" src="{{item.icon[0].url}}"></image>
+                                                        <view class="person" wx:for="{{item.red_members}}" wx:key="item">
+                                                            <!-- <image class="img" src="{{item.icon[0].url}}"></image> -->
+                                                            <image class="img" src="/image/icon.jpg"></image>
                                                             <view class="name">{{item.name}}</view>
                                                         </view>
                                                     </view>

+ 14 - 8
pages/openMatch/index.wxss

@@ -145,12 +145,12 @@
 .main .zero .a .scroll-view .list-scroll-view .c_1 .c_top button {
   background-color: #328d26;
   color: #fff;
-  font-size: 12px;
+  font-size: 14px;
   height: 34px;
   padding: 4px 12px;
 }
 .main .zero .a .scroll-view .list-scroll-view .c_1 .c_top .c_top_2 {
-  width: 70vw;
+  width: 68vw;
 }
 .main .zero .a .scroll-view .list-scroll-view .c_1 .c_top .c_top_2 input {
   margin: 0 0 0 5px;
@@ -193,6 +193,7 @@
   background-color: #328d26;
   padding: 5px 3px;
   color: #fff;
+  font-size: 15px;
 }
 .main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_1 text {
   margin: 0 5px;
@@ -203,14 +204,17 @@
   border-radius: 3px;
 }
 .main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_2 .one {
-  width: 33vw;
+  width: 32.5vw;
   display: flex;
   flex-direction: row;
-  font-size: 14px;
-  text-align: center;
+  font-size: 15px;
   padding: 8px 0;
 }
-.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_2 .one image {
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_2 .one .person {
+  width: 70vw;
+  text-align: center;
+}
+.main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_2 .one .person image {
   border-radius: 50%;
   width: 40px;
   height: 40px;
@@ -230,10 +234,10 @@
   border-radius: 0 0 5px 5px;
   color: #fff;
   padding: 3px;
-  font-size: 14px;
+  font-size: 15px;
 }
 .main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list .lists .list_2 .two .branch {
-  font-size: 22px;
+  font-size: 18px;
   padding: 2px 0 0 0;
   font-weight: 700;
 }
@@ -253,11 +257,13 @@
 }
 .main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list_2 .lists .one_1 {
   color: #3f3f3f;
+  font-size: 15px;
 }
 .main .zero .a .scroll-view .list-scroll-view .c_1 .c_buttom .scroll-view .list-scroll-view .list_2 .lists .one_2 {
   color: #3f3f3f;
   flex-grow: 1;
   text-align: right;
+  font-size: 15px;
 }
 .main .zero .d_1 {
   width: 96vw;

+ 146 - 0
pages/topic/add.js

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

+ 6 - 0
pages/topic/add.json

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

+ 42 - 0
pages/topic/add.less

@@ -0,0 +1,42 @@
+.main {
+    height: 88.8vh;
+
+    .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: 15px;
+            }
+
+            .value {
+                color: #666;
+                font-size: 16px;
+                text-align: right;
+
+                textarea {
+                    max-width: 220px;
+                }
+            }
+        }
+
+        .btn {
+            width: 96vw;
+            margin: 2vw 0 0 0;
+            text-align: center;
+
+            button {
+                font-size: 14px;
+            }
+        }
+    }
+
+}

+ 35 - 0
pages/topic/add.wxml

@@ -0,0 +1,35 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="one">
+            <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">场地名称</view>
+                    <view class="value">
+                        <view class="value"><input name="name" value="{{form.name}}" placeholder="请输入比赛场地名称" /></view>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">裁判:</view>
+                    <picker name="referee_id" bindchange="referee_idChange" value="{{form.referee_id}}" range-key='name' range="{{referee_idList}}">
+                        <view class="input">{{form.referee_name||'请选择裁判'}}</view>
+                    </picker>
+                </view>
+                <view class="content">
+                    <view class="label">备注:</view>
+                    <view class="value">
+                        <view class="value"><input name="remark" value="{{form.remark}}" placeholder="请输入备注" /></view>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">是否使用:</view>
+                    <picker name="is_use" bindchange="is_useChange" value="{{form.is_use}}" range-key='label' range="{{is_useList}}">
+                        <view class="input">{{form.is_use=='0'?'启用':form.is_use=='1'?'禁用':'选择是否使用'}}</view>
+                    </picker>
+                </view>
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交保存</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</mobile-main>

+ 34 - 0
pages/topic/add.wxss

@@ -0,0 +1,34 @@
+.main {
+  height: 88.8vh;
+}
+.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: 15px;
+}
+.main .one .content .value {
+  color: #666;
+  font-size: 16px;
+  text-align: right;
+}
+.main .one .content .value textarea {
+  max-width: 220px;
+}
+.main .one .btn {
+  width: 96vw;
+  margin: 2vw 0 0 0;
+  text-align: center;
+}
+.main .one .btn button {
+  font-size: 14px;
+}

+ 122 - 0
pages/topic/mess.js

@@ -0,0 +1,122 @@
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '话题信息管理', leftArrow: true, useBar: false },
+        searchInfo: {},
+        list: [],
+    },
+    // 跳转菜单
+    back(e) {
+        wx.navigateBack({ delta: 1 });
+    },
+    search: function (e) {
+        const that = this;
+        that.setData({ 'searchInfo.title': e.detail.value });
+        that.watchLogin()
+    },
+    // 添加
+    toAdd() {
+        wx.navigateTo({ url: '/pages/topic/messAdd' })
+    },
+    // 修改
+    toEdit: function (e) {
+        let { id } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/pages/topic/messAdd?id=${id}` })
+    },
+    // 删除
+    toDel: async function (e) {
+        const that = this;
+        const { id } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除该条数据?',
+            async success(res) {
+                if (res.confirm) {
+                    const arr = await app.$delete(`/newCourt/api/topic/${id}`);
+                    if (arr.errcode == '0') {
+                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.watchLogin()
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                    }
+                }
+            }
+        })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        const that = this;
+        // 监听用户是否登录
+    },
+    watchLogin: function () {
+        const that = this;
+        let searchInfo = that.data.searchInfo;
+        wx.getStorage({
+            key: 'user',
+            success: async (res) => {
+                let info = { skip: 0, limit: 1000 };
+                if (searchInfo && searchInfo.title) info.title = searchInfo.title;
+                const arr = await app.$get(`/newCourt/api/topic`, { ...info });
+                if (arr.errcode == '0') { that.setData({ list: arr.data }) }
+                else { wx.showToast({ title: `${res.errMsg}`, icon: 'fail', duration: 2000 }); }
+            },
+            fail: async (res) => {
+                wx.redirectTo({ url: '/pages/index/index' });
+            },
+        });
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        this.watchLogin();
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/topic/mess.json

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

+ 118 - 0
pages/topic/mess.less

@@ -0,0 +1,118 @@
+.main {
+    height: 88.8vh;
+
+    .zero {
+        width: 96vw;
+        margin: 0 0 2vw 0;
+        // background-color: #fff;
+    }
+
+    .zero:last-child {
+        margin: 0;
+    }
+
+    .one {
+        display: flex;
+        flex-direction: row;
+        border-radius: 5px;
+        background-color: #f1f1f1;
+
+        .one_1 {
+            width: 80vw;
+
+            input {
+                width: 100%;
+                font-size: 15px;
+                margin: 5px;
+            }
+        }
+
+        .one_2 {
+            width: 16vw;
+
+            button {
+                width: 100%;
+                font-size: 14px;
+                padding: 2vw 0;
+            }
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        width: 100%;
+        position: relative;
+
+        .scroll-view {
+            position: absolute;
+            top: 0;
+            left: 0;
+            right: 0;
+            bottom: 0;
+
+            .list-scroll-view {
+                display: flex;
+                flex-direction: column;
+
+                .list {
+                    background-color: #ffffff;
+                    border-bottom: 1px solid #cccccc;
+                    padding: 2vw 0;
+                    display: flex;
+                    flex-direction: column;
+
+                    .info {
+                        display: flex;
+                        flex-direction: row;
+                        margin: 0 0 2vw 0;
+
+                        .list_2 {
+                            padding: 0 0 0 2vw;
+
+                            .name {
+                                font-size: 18px;
+                                font-weight: bold;
+                                margin: 0 0 1vw 0;
+                                overflow: hidden;
+                                text-overflow: ellipsis;
+                                -webkit-line-clamp: 2;
+                                word-break: break-all;
+                                display: -webkit-box;
+                                -webkit-box-orient: vertical;
+                            }
+
+                            .other {
+                                .other_1 {
+                                    margin: 0 0 1vw 0;
+                                    color: #000000a6;
+                                    font-size: 15px;
+                                    overflow: hidden;
+                                    text-overflow: ellipsis;
+                                    -webkit-line-clamp: 4;
+                                    word-break: break-all;
+                                    display: -webkit-box;
+                                    -webkit-box-orient: vertical;
+
+                                    .names {
+                                        color: #000;
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    .btn {
+                        text-align: center;
+
+                        button {
+                            margin: 0 2vw;
+                            font-size: 14px;
+                        }
+                    }
+
+                }
+            }
+        }
+    }
+
+}

+ 46 - 0
pages/topic/mess.wxml

@@ -0,0 +1,46 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="zero one">
+            <view class="one_1">
+                <input type="text" value="{{searchInfo.title}}" bindconfirm="search" placeholder="请输入话题名称" />
+            </view>
+            <view class="one_2">
+                <button type="primary" bindtap="toAdd">添加</button>
+            </view>
+        </view>
+        <view class="zero two">
+            <scroll-view scroll-y="true" class="scroll-view">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="info">
+                            <view class="list_2">
+                                <view class="other">
+                                    <view class="other_1">
+                                        <text>话题名称:</text>
+                                        <text class="names">{{item.title||'暂无'}}</text>
+                                    </view>
+                                    <view class="other_1">
+                                        <text>来源:</text>
+                                        <text>{{item.origin||'暂无'}}</text>
+                                    </view>
+                                    <view class="other_1">
+                                        <text>发布时间:</text>
+                                        <text>{{item.create_time||'暂无'}}</text>
+                                    </view>
+                                    <view class="other_1">
+                                        <text>是否公开:</text>
+                                        <text>{{item.is_show=='0'?'公开':'不公开'}}</text>
+                                    </view>
+                                </view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button type="primary" bindtap="toEdit" data-id="{{item._id}}" size="mini">信息维护</button>
+                            <button size="mini" type="warn" bindtap="toDel" data-id="{{item._id}}">信息删除</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 95 - 0
pages/topic/mess.wxss

@@ -0,0 +1,95 @@
+.main {
+  height: 88.8vh;
+}
+.main .zero {
+  width: 96vw;
+  margin: 0 0 2vw 0;
+}
+.main .zero:last-child {
+  margin: 0;
+}
+.main .one {
+  display: flex;
+  flex-direction: row;
+  border-radius: 5px;
+  background-color: #f1f1f1;
+}
+.main .one .one_1 {
+  width: 80vw;
+}
+.main .one .one_1 input {
+  width: 100%;
+  font-size: 15px;
+  margin: 5px;
+}
+.main .one .one_2 {
+  width: 16vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  font-size: 14px;
+  padding: 2vw 0;
+}
+.main .two {
+  flex-grow: 1;
+  width: 100%;
+  position: relative;
+}
+.main .two .scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.main .two .scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.main .two .scroll-view .list-scroll-view .list {
+  background-color: #ffffff;
+  border-bottom: 1px solid #cccccc;
+  padding: 2vw 0;
+  display: flex;
+  flex-direction: column;
+}
+.main .two .scroll-view .list-scroll-view .list .info {
+  display: flex;
+  flex-direction: row;
+  margin: 0 0 2vw 0;
+}
+.main .two .scroll-view .list-scroll-view .list .info .list_2 {
+  padding: 0 0 0 2vw;
+}
+.main .two .scroll-view .list-scroll-view .list .info .list_2 .name {
+  font-size: 18px;
+  font-weight: bold;
+  margin: 0 0 1vw 0;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  -webkit-line-clamp: 2;
+  word-break: break-all;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+}
+.main .two .scroll-view .list-scroll-view .list .info .list_2 .other .other_1 {
+  margin: 0 0 1vw 0;
+  color: #000000a6;
+  font-size: 15px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  -webkit-line-clamp: 4;
+  word-break: break-all;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+}
+.main .two .scroll-view .list-scroll-view .list .info .list_2 .other .other_1 .names {
+  color: #000;
+}
+.main .two .scroll-view .list-scroll-view .list .btn {
+  text-align: center;
+}
+.main .two .scroll-view .list-scroll-view .list .btn button {
+  margin: 0 2vw;
+  font-size: 14px;
+}

+ 135 - 0
pages/topic/messAdd.js

@@ -0,0 +1,135 @@
+const app = getApp()
+import WxValidate from '../../utils/wxValidate'
+import { is_show_project } from '../../utils/dict';
+let util = require('../../utils/util');
+
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '信息管理', leftArrow: true, useBar: false },
+        id: '',
+        // 是否使用
+        is_showList: is_show_project,
+        form: {},
+    },
+    initValidate() {
+        const rules = { title: { required: true }, create_time: { required: false }, origin: { required: true }, brief: { required: true }, content: { required: true }, is_show: { required: true } }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { title: { required: '请输入话题名称', }, create_time: { required: '请输入发布时间', }, origin: { required: '请输入信息来源', }, brief: { required: '请输入信息简介' }, content: { required: '请输入信息内容' }, is_show: { required: '请选择是否公开' } };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 是否使用
+    is_showChange: function (e) {
+        const that = this;
+        let index = e.detail.value;
+        let value = that.data.is_showList[index];
+        that.setData({ 'form.is_show': value.value });
+    },
+    // 提交登录
+    onSubmit: async function (e) {
+        const that = this;
+        const params = e.detail.value;
+        const data = that.data.form;
+        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;
+            let time = util.formatTime(new Date());
+            time = time.slice(0, -3)
+            if (data._id) { arr = await app.$post(`/newCourt/api/topic/${data._id}`, params); }
+            else {
+                params.create_time = time;
+                arr = await app.$post(`/newCourt/api/topic`, params);
+            }
+            if (arr.errcode == '0') { wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back(); }
+            else wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+        }
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        const that = this;
+        that.setData({ id: options.id || '' })
+        //验证规则函数
+        that.initValidate();
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                if (that.data.id) {
+                    const arr = await app.$get(`/newCourt/api/topic/${that.data.id}`);
+                    if (arr.errcode == '0') {
+                        that.setData({ form: arr.data });
+                    }
+                }
+            },
+            fail: res => {
+                wx.redirectTo({ url: '/pages/index/index', })
+            }
+        })
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/topic/messAdd.json

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

+ 42 - 0
pages/topic/messAdd.less

@@ -0,0 +1,42 @@
+.main {
+   height: 88.8vh;
+
+   .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: 15px;
+           }
+
+           .value {
+               color: #666;
+               font-size: 16px;
+               text-align: right;
+
+               textarea {
+                   max-width: 220px;
+               }
+           }
+       }
+
+       .btn {
+           width: 96vw;
+           margin: 2vw 0 0 0;
+           text-align: center;
+
+           button {
+               font-size: 14px;
+           }
+       }
+   }
+
+}

+ 41 - 0
pages/topic/messAdd.wxml

@@ -0,0 +1,41 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="one">
+            <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">话题名称</view>
+                    <view class="value">
+                        <view class="value"><input name="title" value="{{form.title}}" placeholder="请输入话题名称" /></view>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">信息简介:</view>
+                    <view class="value">
+                        <view class="value"><input name="brief" value="{{form.brief}}" placeholder="请输入信息简介" /></view>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">信息来源:</view>
+                    <view class="value">
+                        <view class="value"><input name="origin" value="{{form.origin}}" placeholder="请输入信息来源" /></view>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">信息内容:</view>
+                    <view class="value">
+                        <textarea name="content" value="{{form.content}}" maxlength="-1" placeholder="请输入内容" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">是否公开:</view>
+                    <picker name="is_show" bindchange="is_showChange" value="{{form.is_show}}" range-key='label' range="{{is_showList}}">
+                        <view class="input">{{form.is_show=='0'?'公开':form.is_show=='1'?'不公开':'选择是否公开'}}</view>
+                    </picker>
+                </view>
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交保存</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</mobile-main>

+ 34 - 0
pages/topic/messAdd.wxss

@@ -0,0 +1,34 @@
+.main {
+  height: 88.8vh;
+}
+.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: 15px;
+}
+.main .one .content .value {
+  color: #666;
+  font-size: 16px;
+  text-align: right;
+}
+.main .one .content .value textarea {
+  max-width: 220px;
+}
+.main .one .btn {
+  width: 96vw;
+  margin: 2vw 0 0 0;
+  text-align: center;
+}
+.main .one .btn button {
+  font-size: 14px;
+}

+ 11 - 0
utils/dict.js

@@ -43,6 +43,13 @@ export const myBtn = [
                     { title: '比赛场地管理', route: 'match/address' },
                 ]
             },
+            {
+                title: '新闻管理',
+                routeList: [
+                    { title: '资讯信息管理', route: 'news/mess' },
+                    { title: '话题信息管理', route: 'topic/mess' },
+                ]
+            },
             {
                 title: '订单管理',
                 route: 'order/index',
@@ -126,6 +133,10 @@ export const is_use_project = [
     { label: '启用', value: '0' },
     { label: '禁用', value: '1' },
 ]
+export const is_show_project = [
+    { label: '公开', value: '0' },
+    { label: '不公开', value: '1' },
+]
 export const examine_status = [
     { label: '待审核', value: '0' },
     { label: '审核通过', value: '1' },