guhongwei 3 år sedan
förälder
incheckning
7437b91580

+ 10 - 0
app.json

@@ -1,8 +1,18 @@
 {
   "pages": [
+   
     "pages/index/index",
     "pages/login/index",
     "pages/home/index",
+    "pages/group/index",
+    "pages/group/detail",
+    "pages/group/create",
+    "pages/group/add",
+    "pages/index_1/index",
+    "pages/map/index",
+    "pages/map/detail",
+    "pages/management/index",
+    "pages/management/detail",
     "pages/county/index",
     "pages/county/detail",
     "pages/user/index",

+ 132 - 0
pages/group/add.js

@@ -0,0 +1,132 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '群组信息', leftArrow: true, useBar: false },
+    // 主体高度
+    infoHeight: '',
+    form: {},
+    roleList: [
+        { role: '1', name: '管理人员' },
+        { role: '2', name: '区县人员' },
+        { role: '3', name: '办案人员' },
+      ]
+  },
+  initValidate() {
+    const rules = { name: { required: true, }, create_time: { required: true, }, brief: { required: true, }, status: { required: true, }}
+    // 验证字段的提示信息,若不传则调用默认的信息
+    const messages = { name: { required: '请输入名称', }, phone: { required: '请输入创建时间', }, brief: { required: '请输入简介', }, status: { required: '请输入状态', }};
+    this.WxValidate = new WxValidate(rules, messages)
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/group/index' })
+  },
+  // 选择检查时间
+   dateChange: function (e) {
+    let { value } = e.detail;
+    this.setData({ 'form.create_time': value })
+  },
+  // 选择用户类别
+  roleChange: function (e) {
+    let { value } = e.detail;
+    let data = this.data.roleList[value];
+    this.setData({ 'form.role': data.role })
+    this.setData({ 'form.name': data.name })
+  },
+  // 取消保存
+  onReset: function (e) {
+    this.back()
+  },
+  // 提交保存
+  onSubmit: function (e) {
+    const params = e.detail.value;
+    if (!this.WxValidate.checkForm(params)) {
+      const error = this.WxValidate.errorList[0];
+      wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+      return false
+    } else {
+      console.log(params);
+      wx.showToast({ title: `创建信息成功`, icon: 'success', duration: 2000 })
+    }
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    //验证规则函数
+    this.initValidate()
+    const { id } = options;
+    // 查询信息
+    if (id) this.search(id);
+    // 计算高度
+    this.searchHeight()
+  },
+  // 查询信息
+  search: function (id) {
+    console.log(id);
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    // 减去状态栏
+    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/group/add.json

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

+ 56 - 0
pages/group/add.wxml

@@ -0,0 +1,56 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <form bindsubmit="onSubmit" catchreset="onReset">
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-xingming"></text>
+          </view>
+          <view class="right">
+            <input name="name" value="{{form.name}}" placeholder='请输入成员名称' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-shijian"></text>
+          </view>
+          <view class="right">
+            <picker mode="date" name="create_time" bindchange="dateChange" value="{{form.create_time}}">
+              <view>{{form.create_time||'选择创建时间'}}</view>
+            </picker>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-mima"></text>
+          </view>
+          <view class="right">
+            <input type='text' name="brief" value="{{form.brief}}" brief placeholder='请输入个人信息' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-quxiantongxunlu"></text>
+          </view>
+          <view class="right">
+            <input name="status_id" value="{{form.status_id}}" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-quxiantongxunlu"></text>
+          </view>
+          <view class="right">
+            <picker class="picker" bindchange="roleChange" name="role" value="{{form.role}}" range="{{roleList}}" range-key="name">
+              <view>{{form.name||'选择成员类别'}}</view>
+            </picker>
+          </view>
+        </view>
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消保存</button>
+          <button type="primary" size="mini" formType="submit">提交保存</button>
+        </view>
+      </form>
+    </view>
+  </view>
+</mobile-main>

+ 38 - 0
pages/group/add.wxss

@@ -0,0 +1,38 @@
+.main {
+    position: relative;
+    width: 100%;
+  }
+  
+  .main .one {
+    position: relative;
+    padding: 10px;
+  }
+  
+  .main .one .content {
+    position: relative;
+    padding: 10px 0;
+    box-shadow: 0 0 5px #000000;
+    margin: 0 0 10px 0;
+    border-radius: 5px;
+  }
+  
+  .main .one .content .left {
+    float: left;
+    margin: 0 10px;
+  }
+  
+  .main .one .content .left .icon {
+    color: #000000;
+  }
+  
+  .main .one .content .right input {
+    color: #000000;
+  }
+  
+  .main .one .save {
+    text-align: center;
+  }
+  
+  .main .one .save button {
+    margin: 10px;
+  }

+ 132 - 0
pages/group/create.js

@@ -0,0 +1,132 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '群组信息', leftArrow: true, useBar: false },
+    // 主体高度
+    infoHeight: '',
+    form: {},
+    statusList: [
+        { id: '0', status: '待审中' },
+        { id: '1', status: '审核通过' },
+        { id: '-1', status: '审核拒绝' },
+      ]
+  },
+  initValidate() {
+    const rules = { name: { required: true, }, create_time: { required: true, }, brief: { required: true, }, status: { required: true, }}
+    // 验证字段的提示信息,若不传则调用默认的信息
+    const messages = { name: { required: '请输入名称', }, phone: { required: '请输入创建时间', }, brief: { required: '请输入简介', }, status: { required: '请输入状态', }};
+    this.WxValidate = new WxValidate(rules, messages)
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/group/index' })
+  },
+  // 选择检查时间
+   dateChange: function (e) {
+    let { value } = e.detail;
+    this.setData({ 'form.create_time': value })
+  },
+   // 选择状态
+   statusChange: function (e) {
+    let { value } = e.detail;
+    let data = this.data.statusList[value];
+    this.setData({ 'form.status_id': data.id })
+    this.setData({ 'form.status_name': data.status })
+  },
+  // 取消保存
+  onReset: function (e) {
+    this.back()
+  },
+  // 提交保存
+  onSubmit: function (e) {
+    const params = e.detail.value;
+    if (!this.WxValidate.checkForm(params)) {
+      const error = this.WxValidate.errorList[0];
+      wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+      return false
+    } else {
+      console.log(params);
+      wx.showToast({ title: `创建信息成功`, icon: 'success', duration: 2000 })
+    }
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    //验证规则函数
+    this.initValidate()
+    const { id } = options;
+    // 查询信息
+    if (id) this.search(id);
+    // 计算高度
+    this.searchHeight()
+  },
+  // 查询信息
+  search: function (id) {
+    console.log(id);
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    // 减去状态栏
+    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/group/create.json

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

+ 56 - 0
pages/group/create.wxml

@@ -0,0 +1,56 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <form bindsubmit="onSubmit" catchreset="onReset">
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-xingming"></text>
+          </view>
+          <view class="right">
+            <input name="name" value="{{form.name}}" placeholder='请输入名称' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-shijian"></text>
+          </view>
+          <view class="right">
+            <picker mode="date" name="create_time" bindchange="dateChange" value="{{form.create_time}}">
+              <view>{{form.create_time||'选择创建时间'}}</view>
+            </picker>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-mima"></text>
+          </view>
+          <view class="right">
+            <input type='text' name="brief" value="{{form.brief}}" brief placeholder='请输入简介' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-quxiantongxunlu"></text>
+          </view>
+          <view class="right">
+            <input name="status_id" value="{{form.status_id}}" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-quxiantongxunlu"></text>
+          </view>
+          <view class="right">
+            <picker class="picker" bindchange="statusChange" name="status_name" value="{{form.status_name}}" range="{{statusList}}" range-key="status">
+              <view>{{form.status_name||'选择状态'}}</view>
+            </picker>
+          </view>
+        </view>
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消保存</button>
+          <button type="primary" size="mini" formType="submit">提交保存</button>
+        </view>
+      </form>
+    </view>
+  </view>
+</mobile-main>

+ 38 - 0
pages/group/create.wxss

@@ -0,0 +1,38 @@
+.main {
+    position: relative;
+    width: 100%;
+  }
+  
+  .main .one {
+    position: relative;
+    padding: 10px;
+  }
+  
+  .main .one .content {
+    position: relative;
+    padding: 10px 0;
+    box-shadow: 0 0 5px #000000;
+    margin: 0 0 10px 0;
+    border-radius: 5px;
+  }
+  
+  .main .one .content .left {
+    float: left;
+    margin: 0 10px;
+  }
+  
+  .main .one .content .left .icon {
+    color: #000000;
+  }
+  
+  .main .one .content .right input {
+    color: #000000;
+  }
+  
+  .main .one .save {
+    text-align: center;
+  }
+  
+  .main .one .save button {
+    margin: 10px;
+  }

+ 132 - 0
pages/group/detail.js

@@ -0,0 +1,132 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '群组信息', leftArrow: true, useBar: false },
+    // 主体高度
+    infoHeight: '',
+    form: {},
+    statusList: [
+        { id: '0', status: '待审中' },
+        { id: '1', status: '审核通过' },
+        { id: '-1', status: '审核拒绝' },
+      ]
+  },
+  initValidate() {
+    const rules = { name: { required: true, }, create_time: { required: true, }, brief: { required: true, }}
+    // 验证字段的提示信息,若不传则调用默认的信息
+    const messages = { name: { required: '请输入名称', }, phone: { required: '请输入创建时间', }, brief: { required: '请输入简介', }};
+    this.WxValidate = new WxValidate(rules, messages)
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/group/index' })
+  },
+  // 选择检查时间
+   dateChange: function (e) {
+    let { value } = e.detail;
+    this.setData({ 'form.create_time': value })
+  },
+//    // 选择状态
+//    statusChange: function (e) {
+//     let { value } = e.detail;
+//     let data = this.data.statusList[value];
+//     this.setData({ 'form.status_id': data.id })
+//     this.setData({ 'form.status_name': data.status })
+//   },
+  // 取消保存
+  onReset: function (e) {
+    this.back()
+  },
+  // 提交保存
+  onSubmit: function (e) {
+    const params = e.detail.value;
+    if (!this.WxValidate.checkForm(params)) {
+      const error = this.WxValidate.errorList[0];
+      wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+      return false
+    } else {
+      console.log(params);
+      wx.showToast({ title: `创建信息成功`, icon: 'success', duration: 2000 })
+    }
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    //验证规则函数
+    this.initValidate()
+    const { id } = options;
+    // 查询信息
+    if (id) this.search(id);
+    // 计算高度
+    this.searchHeight()
+  },
+  // 查询信息
+  search: function (id) {
+    console.log(id);
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    // 减去状态栏
+    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/group/detail.json

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

+ 56 - 0
pages/group/detail.wxml

@@ -0,0 +1,56 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <form bindsubmit="onSubmit" catchreset="onReset">
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-xingming"></text>
+          </view>
+          <view class="right">
+            <input name="name" value="{{form.name}}" placeholder='请输入名称' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-shijian"></text>
+          </view>
+          <view class="right">
+            <picker mode="date" name="create_time" bindchange="dateChange" value="{{form.create_time}}">
+              <view>{{form.create_time||'选择创建时间'}}</view>
+            </picker>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-mima"></text>
+          </view>
+          <view class="right">
+            <input type='text' name="brief" value="{{form.brief}}" brief placeholder='请输入简介' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <!-- <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-quxiantongxunlu"></text>
+          </view>
+          <view class="right">
+            <input name="status_id" value="{{form.status_id}}" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-quxiantongxunlu"></text>
+          </view>
+          <view class="right">
+            <picker class="picker" bindchange="statusChange" name="status_name" value="{{form.status_name}}" range="{{statusList}}" range-key="status">
+              <view>{{form.status_name||'选择状态'}}</view>
+            </picker>
+          </view>
+        </view> -->
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消保存</button>
+          <button type="primary" size="mini" formType="submit">提交保存</button>
+        </view>
+      </form>
+    </view>
+  </view>
+</mobile-main>

+ 38 - 0
pages/group/detail.wxss

@@ -0,0 +1,38 @@
+.main {
+    position: relative;
+    width: 100%;
+  }
+  
+  .main .one {
+    position: relative;
+    padding: 10px;
+  }
+  
+  .main .one .content {
+    position: relative;
+    padding: 10px 0;
+    box-shadow: 0 0 5px #000000;
+    margin: 0 0 10px 0;
+    border-radius: 5px;
+  }
+  
+  .main .one .content .left {
+    float: left;
+    margin: 0 10px;
+  }
+  
+  .main .one .content .left .icon {
+    color: #000000;
+  }
+  
+  .main .one .content .right input {
+    color: #000000;
+  }
+  
+  .main .one .save {
+    text-align: center;
+  }
+  
+  .main .one .save button {
+    margin: 10px;
+  }

+ 156 - 0
pages/group/index.js

@@ -0,0 +1,156 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '群组管理', leftArrow: true, useBar: false },
+    // 主体高度
+    infoHeight: '',
+    radio:'',
+    list: [
+      { id: '1', name: '群名1', create_time: '2022-02-23', brief: '无',status: '审核通过' },
+      { id: '1', name: '群名2', create_time: '2022-02-23', brief: '无',status: '审核通过' },
+    ],
+    // 弹框
+    dialog: { title: '详细信息', show: false, type: '1' },
+    // 弹框2
+    dialog: { title: '解散审核', show: false, type: '2' },
+    // 详细信息
+    info: { id: '1', name: '群名1', create_time: '2022-02-23', brief: '无',status: '审核通过'},
+  },
+  // 详细信息
+  toView: function (e) {
+    const { id } = e.currentTarget.dataset;
+    console.log(id);
+    // this.setData({ info: {} })
+    this.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
+  },
+  formSubmit(e) {
+    console.log('form发生了submit事件,携带数据为:', e.detail.value)
+    const radio = e.detail.value.radio;
+    console.log(radio);
+    wx.showModal({
+          title: '提示',content: '确定解散?',
+          success: function () {
+          if (radio=='radio3') {//这里是点击了确定以后
+            wx.showToast({ title: `解散成功`, icon: 'success', duration: 2000 })
+          } else {//这里是点击了取消以后
+            wx.showToast({ title: `解散失败`, icon: 'error', duration: 2000 })
+          }
+        }
+      })
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
+  },
+  // 添加人员
+  toAdd: function () {
+    wx.navigateTo({ url: `/pages/group/detail` })
+  },
+  // 信息变更
+  toEdit: function (e) {
+    const { id } = e.currentTarget.dataset;
+    wx.navigateTo({ url: `/pages/group/detail?id=${id}` })
+  },
+  // 解散审核
+  dissolution: function (e) {
+    const { id } = e.currentTarget.dataset;
+    console.log(id);
+    // this.setData({ info: {} })
+    this.setData({ dialog: { title: '解散审核', show: true, type: '2' } })
+  },
+  toAudit: function () {
+    wx.navigateTo({ url: `/pages/group/create` })
+  },
+  toAdds: function () {
+    wx.navigateTo({ url: `/pages/group/add` })
+  },
+
+  // // 解散审核
+  // toUnbound: function (e) {
+  //   const { radio } = e.currentTarget.dataset.radio;
+  //   console.log(radio);
+  //   // wx.showToast({ title: `解散成功`, icon: 'success', duration: 2000 })
+  //   wx.showModal({
+  //     title: '提示',content: '确定解散?',
+  //     success: function (radio) {
+  //     if (radio=='radio3') {//这里是点击了确定以后
+  //       wx.showToast({ title: `解散成功`, icon: 'success', duration: 2000 })
+  //       wx.navigateBack({ url: `/pages/group/index` })
+  //     } else {//这里是点击了取消以后
+  //       wx.showToast({ title: `解散失败`, icon: 'error', duration: 2000 })
+  //     }
+  //   }
+  // })
+  // },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    // 计算高度
+    this.searchHeight()
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    // 减去状态栏
+    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/group/index.json

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

+ 69 - 0
pages/group/index.wxml

@@ -0,0 +1,69 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <button type="primary" size="mini" bindtap="toAdd">添加</button>
+    </view>
+    <view class="two">
+      <view class="list" wx:key="item" wx:for="{{list}}">
+        <view class="name">{{item.name}}</view>
+        <view class="other">
+          <view class="otherInfo">创建时间:<text>{{item.create_time||'暂无' }}</text></view>
+          <view class="otherInfo">简介:<text>{{item.brief||'暂无' }}</text></view>
+          <view class="otherInfo textOver">状态:<text>{{item.status||'暂无' }}</text></view>
+        </view>
+        <view class="btn">
+          <button type="info" size="mini" bindtap="toView" data-id="{{item.id}}">详细信息</button>
+          <button type="info" size="mini" bindtap="toEdit" data-id="{{item.id}}">维护信息</button>
+          <button type="info" size="mini" bindtap="toAudit" data-id="{{item.id}}">创建审核</button>
+          <button type="info" size="mini" bindtap="dissolution" data-id="{{item.id}}">解散审核</button>
+          <button type="info" size="mini" bindtap="toAdds" data-id="{{item.id}}">成员添加</button>
+        </view>
+      </view>
+    </view>
+  </view>
+</mobile-main>
+<van-dialog use-slot title="{{dialog.title}}" show="{{ dialog.show }}" confirmButtonText="返回">
+  <view class="dialog">
+    <view wx:if="{{dialog.type=='1'}}" class="dialog_1">
+      <form>
+        <view class="content">
+          <view class="left"><text>名称</text></view>
+          <view class="right"><input name="name" value="{{info.name}}" disabled></input></view>
+        </view>
+        <view class="content">
+          <view class="left"><text>创建时间</text></view>
+          <view class="right"><input name="create_time" value="{{info.create_time}}" disabled></input></view>
+        </view>
+        <view class="content">
+          <view class="left"><text>简介</text></view>
+          <view class="right"><input name="brief" value="{{info.brief}}" disabled></input></view>
+        </view>
+        <view class="content">
+          <view class="left"><text>状态</text></view>
+          <view class="right"><input name="status" value="{{info.status}}" disabled></input></view>
+        </view>
+      </form>
+    </view>
+    <view wx:if="{{dialog.type=='2'}}" class="dialog_1">
+      <form catchsubmit="formSubmit">
+        <view class="content">
+          <view class="left"><text>名称</text></view>
+          <view class="right"><input name="name" value="{{info.name}}" disabled></input></view>
+        </view>
+        <view class="content">
+          <view class="left"><text>status</text></view>
+          <view class="right">
+          <radio-group name="radio" style="font-size: 12px;">
+          <label><radio value="radio1"/>待审中</label>
+          <label><radio value="radio2"/>审核通过</label>
+          <label><radio value="radio3"/>审核拒绝</label>
+        </radio-group>
+         </view>
+        </view>
+        <view class="btn-area">
+        <button style="margin: 30rpx 0" type="primary" formType="submit">确认</button>
+      </view>
+      </form>
+    </view>
+  </view>
+</van-dialog>

+ 87 - 0
pages/group/index.wxss

@@ -0,0 +1,87 @@
+.main {
+  position: relative;
+  width: 100%;
+}
+
+.main .one {
+  position: relative;
+  width: 100%;
+  text-align: center;
+  border-bottom: 1px dashed #000000;
+}
+
+.main .one button {
+  margin: 10px;
+}
+
+.main .two {
+  position: relative;
+  padding: 10px;
+}
+
+.main .two .list {
+  float: left;
+  width: 100%;
+  margin: 0 0 8px 0;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  padding: 8px 0;
+}
+
+.main .two .list .name {
+  font-size: 16px;
+  margin: 0 0 5px 0;
+  padding: 0 10px;
+}
+
+.main .two .list .other .otherInfo {
+  margin: 0 0 5px 0;
+  font-size: 14px;
+  color: #666666;
+  padding: 0 10px;
+}
+
+.main .two .list .other .otherInfo text {
+  color: #000000;
+}
+
+.main .two .list .btn {
+  text-align: center;
+}
+
+.main .two .list .btn button {
+  margin: 0 5px;
+}
+.dialog {
+  min-height: 30px;
+  max-height: 320px;
+  overflow-y: auto;
+  padding: 0 8px;
+}
+
+.dialog .dialog_1 .content {
+  position: relative;
+  padding: 8px 0;
+  border-radius: 6px;
+  margin: 0 0 5px 0;
+  background-color: #f1f1f1;
+}
+
+.dialog .dialog_1 .content .left {
+  float: left;
+  margin: 0 10px;
+}
+
+.dialog .dialog_1 .content .left text {
+  font-size: 14px;
+  color: #666666;
+}
+
+.dialog .dialog_1 .content .right input {
+  font-size: 12px;
+}
+
+.van-dialog__header {
+  padding-top: 0 !important;
+  padding: 10px 0 !important;
+}

+ 194 - 0
pages/index_1/index.js

@@ -0,0 +1,194 @@
+const app = getApp()
+Page({
+    onShareAppMessage() {
+        return {
+          title: 'swiper',
+          path: 'page/component/pages/swiper/swiper'
+        }
+      },
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '练习', leftArrow: true, useBar: false},
+    // 主体高度
+    infoHeight: '',
+    latitude: 23.099994,
+    longitude: 113.324520,
+    x: 0,
+    y: 0,
+    scale: 2,
+    background: ['demo-text-1', 'demo-text-2', 'demo-text-3'],
+    indicatorDots: true,
+    vertical: false,
+    autoplay: false,
+    interval: 2000,
+    duration: 500,
+    iconSize: [20, 30, 40, 50, 60, 70],
+    iconColor: [
+      'red', 'orange', 'yellow', 'green', 'rgb(0,255,255)', 'blue', 'purple'
+    ],
+    iconType: [
+      'success', 'success_no_circle', 'info', 'warn', 'waiting', 'cancel', 'download', 'search', 'clear'
+    ],
+    chosen: '',
+    focus: false,
+    inputValue: '',
+    checkboxItems: [
+      {name: 'USA', value: '美国'},
+      {name: 'CHN', value: '中国', checked: 'true'}
+    ],
+    radioItems: [
+      {name: 'USA', value: '美国'},
+      {name: 'CHN', value: '中国', checked: 'true'}
+    ],
+    hidden: false,
+    height: 20,
+    focus: false
+  },
+  bindButtonTap: function() {
+    this.setData({
+      focus: true
+    })
+  },
+  bindTextAreaBlur: function(e) {
+    console.log(e.detail.value)
+  },
+  bindFormSubmit: function(e) {
+    console.log(e.detail.value.textarea)
+  },
+  radioChange(e) {
+    const checked = e.detail.value
+    const changed = {}
+    for (let i = 0; i < this.data.radioItems.length; i++) {
+      if (checked.indexOf(this.data.radioItems[i].name) !== -1) {
+        changed['radioItems[' + i + '].checked'] = true
+      } else {
+        changed['radioItems[' + i + '].checked'] = false
+      }
+    }
+    this.setData(changed)
+  },
+  bindKeyInput: function (e) {
+    this.setData({
+      inputValue: e.detail.value
+    })
+  },
+  changeIndicatorDots() {
+    this.setData({
+      indicatorDots: !this.data.indicatorDots
+    })
+  },
+ formReset(e) {
+    console.log('form发生了reset事件,携带数据为:', e.detail.value)
+    this.setData({
+      chosen: ''
+    })
+  },
+  changeAutoplay() {
+    this.setData({
+      autoplay: !this.data.autoplay
+    })
+  },
+
+  intervalChange(e) {
+    this.setData({
+      interval: e.detail.value
+    })
+  },
+
+  durationChange(e) {
+    this.setData({
+      duration: e.detail.value
+    })
+  },
+  tap() {
+    this.setData({
+      x: 30,
+      y: 30
+    })
+  },
+
+  tap2() {
+    this.setData({
+      scale: 3
+    })
+  },
+
+  onChange(e) {
+    console.log(e.detail)
+  },
+
+  onScale(e) {
+    console.log(e.detail)
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function () {
+    // 计算高度
+    this.searchHeight()
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    // 减去状态栏
+    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/index_1/index.json

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

+ 123 - 0
pages/index_1/index.wxml

@@ -0,0 +1,123 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+  <view class="page-body">
+    <view class="page-section page-section-gap">
+      <map
+        style="width: 100%; height: 600px;"
+        latitude="{{latitude}}"
+        longitude="{{longitude}}"
+      >
+        <cover-view class="cover-view">
+            <cover-view class="flex-wrp" style="flex-direction:column;">
+              <cover-view class="flex-item demo-text-3"></cover-view>
+            </cover-view>
+        </cover-view>
+        <page-container class="page-container" show="true" position="top">
+        </page-container>
+    <!-- <match-media min-width="300" max-width="600">
+        <view>当页面宽度在 300 ~ 500 px 之间时展示这里</view>
+    </match-media>
+    <match-media min-height="400" orientation="landscape">
+        <view>当页面高度不小于 400 px 且屏幕方向为纵向时展示这里</view>
+    </match-media> -->
+     <view class="page-section page-section-spacing swiper">
+      <swiper indicator-dots="{{indicatorDots}}"
+        autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
+        <block wx:for="{{background}}" wx:key="*this">
+          <swiper-item>
+            <view class="swiper-item {{item}}"></view>
+          </swiper-item>
+        </block>
+      </swiper>
+    </view>
+    <view class="page-section" style="margin-top: 40rpx;margin-bottom: 0;">
+      <view class="weui-cells weui-cells_after-title">
+        <view class="weui-cell weui-cell_switch">
+          <view class="weui-cell__bd">指示点</view>
+          <view class="weui-cell__ft">
+            <switch checked="{{indicatorDots}}" bindchange="changeIndicatorDots" />
+          </view>
+        </view>
+        <view class="weui-cell weui-cell_switch">
+          <view class="weui-cell__bd">自动播放</view>
+          <view class="weui-cell__ft">
+            <switch checked="{{autoplay}}" bindchange="changeAutoplay" />
+          </view>
+        </view>
+    </view>
+</view>
+<view class="icon-box">
+    <view class="icon-small-wrp">
+      <button  style="border: none;" class="button-sp-area" plain="true" data-id="{{item.id}}" >
+      <icon  style="border: none;" class="icon-small" type="search" size="14"></icon>
+     </button>
+    </view>
+    <view class="icon-box-ctn">
+      <view class="icon-box-title">搜索</view>
+    </view>
+  </view>
+  <view class="icon-box">
+    <view class="icon-small-wrp">
+      <button  style="border: none;" class="button-sp-area" plain="true" data-id="{{item.id}}" >
+        <icon style="border: none;" class="icon-small" type="cancel" size="14"></icon>
+     </button>
+    </view>
+    <view class="icon-box-ctn">
+      <view class="icon-box-title">关闭</view>
+    </view>
+  </view>
+  <!-- <editor class="editor" show-img-toolbar="true">
+  </editor> -->
+  <!-- <form catchsubmit="formSubmit" catchreset="formReset">
+  <view class="page-section page-section-gap">
+        <view class="page-section-title">slider</view>
+        <slider value="50" name="slider" show-value ></slider>
+  </view>
+  <view class="btn-area">
+        <button style="margin: 30rpx 0" type="primary" formType="submit">Submit</button>
+        <button style="margin: 30rpx 0" formType="reset">Reset</button>
+  </view>
+  </form> -->
+  <!-- <view class="page-section">
+    <view class="weui-cells__title">实时获取输入值:{{inputValue}}</view>
+    <view class="weui-cells weui-cells_after-title">
+      <view class="weui-cell weui-cell_input">
+        <input class="weui-input"  maxlength="10" bindinput="bindKeyInput" placeholder="输入同步到view中"/>
+      </view>
+    </view>
+  </view> -->
+  <view class="page-section page-section-gap">
+      <view class="page-section-title">label用for标识表单组件</view>
+      <radio-group class="group" bindchange="radioChange">
+        <view class="label-2" wx:for="{{radioItems}}">
+          <radio id="{{item.name}}" value="{{item.name}}" checked="{{item.checked}}"></radio>
+          <label class="label-2-text" for="{{item.name}}"><text>{{item.name}}</text></label>
+        </view>
+      </radio-group>
+    </view>
+    <view class="section">
+  <textarea  placeholder-style="color:black;" bindblur="bindTextAreaBlur" auto-height placeholder="自动变高" />
+</view>
+<view class="section">
+  <textarea placeholder="placeholder颜色是红色的" placeholder-style="color:red;"  />
+</view>
+<view class="section">
+  <textarea placeholder="这是一个可以自动聚焦的textarea" auto-focus />
+</view>
+<view class="section">
+  <textarea placeholder="这个只有在按钮点击的时候才聚焦" focus="{{focus}}" />
+  <view class="btn-area">
+    <button bindtap="bindButtonTap">使得输入框获取焦点</button>
+  </view>
+</view>
+<view class="section">
+  <form bindsubmit="bindFormSubmit">
+    <textarea placeholder="form 中的 textarea" name="textarea"/>
+    <button form-type="submit"> 提交 </button>
+  </form>
+</view>
+      </map>
+    </view>
+  </view>
+  </view>
+</mobile-main>

+ 65 - 0
pages/index_1/index.wxss

@@ -0,0 +1,65 @@
+ .main {
+    position: relative;
+    width: 100%;
+  }
+  .cover-view {
+    position: absolute;
+    top: 0px;
+    left: 0px;
+    margin:0;
+    /* opacity: .7; */
+  }
+  .flex-wrp{
+    display:flex;
+    margin:0;
+  }
+  
+  .flex-item{
+    width: 200rpx;
+    height: 300rpx;
+    font-size: 26rpx;
+  }
+  .demo-text-1 {
+    width: 800rpx;
+    height: 200rpx;
+    background: rgba(26, 173, 25, 0.7);
+  }
+  
+  .demo-text-2 {
+    width: 800rpx;
+    height: 200rpx;
+    background: rgba(39, 130, 215, 0.7);
+  }
+  
+  .demo-text-3 {
+    width: 800rpx;
+    height: 200rpx;
+    background: rgba(255, 255, 255, 0.7);
+  }
+.icon-small-wrp{
+  float: left;
+  margin: 0;
+}
+.icon-small{
+  float: left;
+  margin: 0;
+  border: none; 
+}
+.button-sp-area{
+  height: 20px;
+  border: none;
+}
+.editor{
+  background-color: papayawhip;
+}
+.label-1, .label-2{
+  margin: 30rpx 0;
+}
+.label-3-text{
+  color: #576B95;
+  font-size: 28rpx;
+}
+.checkbox-3{
+  display: block;
+  margin: 30rpx 0;
+}

+ 1 - 1
pages/login/index.js

@@ -39,7 +39,7 @@ Page({
       wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
       return false
     } else {
-      params.name = '顾红伟';
+      params.name = '办案人员';
       app.globalData.userInfo = params;
       wx.setStorage({ key: "token", data: 'token' })
       wx.setStorage({ key: "role", data: params.role })

+ 132 - 0
pages/management/detail.js

@@ -0,0 +1,132 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '群组信息', leftArrow: true, useBar: false },
+    // 主体高度
+    infoHeight: '',
+    form: {},
+    statusList: [
+        { id: '0', status: '待审中' },
+        { id: '1', status: '审核通过' },
+        { id: '-1', status: '审核拒绝' },
+      ]
+  },
+  initValidate() {
+    const rules = { name: { required: true, }, create_time: { required: true, }, brief: { required: true, }}
+    // 验证字段的提示信息,若不传则调用默认的信息
+    const messages = { name: { required: '请输入名称', }, phone: { required: '请输入创建时间', }, brief: { required: '请输入简介', }};
+    this.WxValidate = new WxValidate(rules, messages)
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/group/index' })
+  },
+  // 选择检查时间
+   dateChange: function (e) {
+    let { value } = e.detail;
+    this.setData({ 'form.create_time': value })
+  },
+//    // 选择状态
+//    statusChange: function (e) {
+//     let { value } = e.detail;
+//     let data = this.data.statusList[value];
+//     this.setData({ 'form.status_id': data.id })
+//     this.setData({ 'form.status_name': data.status })
+//   },
+  // 取消保存
+  onReset: function (e) {
+    this.back()
+  },
+  // 提交保存
+  onSubmit: function (e) {
+    const params = e.detail.value;
+    if (!this.WxValidate.checkForm(params)) {
+      const error = this.WxValidate.errorList[0];
+      wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+      return false
+    } else {
+      console.log(params);
+      wx.showToast({ title: `创建信息成功`, icon: 'success', duration: 2000 })
+    }
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    //验证规则函数
+    this.initValidate()
+    const { id } = options;
+    // 查询信息
+    if (id) this.search(id);
+    // 计算高度
+    this.searchHeight()
+  },
+  // 查询信息
+  search: function (id) {
+    console.log(id);
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    // 减去状态栏
+    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/management/detail.json

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

+ 56 - 0
pages/management/detail.wxml

@@ -0,0 +1,56 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <form bindsubmit="onSubmit" catchreset="onReset">
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-xingming"></text>
+          </view>
+          <view class="right">
+            <input name="name" value="{{form.name}}" placeholder='请输入名称' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-shijian"></text>
+          </view>
+          <view class="right">
+            <picker mode="date" name="create_time" bindchange="dateChange" value="{{form.create_time}}">
+              <view>{{form.create_time||'选择创建时间'}}</view>
+            </picker>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-mima"></text>
+          </view>
+          <view class="right">
+            <input type='text' name="brief" value="{{form.brief}}" brief placeholder='请输入简介' placeholder-class="placeholder"></input>
+          </view>
+        </view>
+        <!-- <view class="content" style="display: none;">
+          <view class="left">
+            <text class="icon iconfont icon-quxiantongxunlu"></text>
+          </view>
+          <view class="right">
+            <input name="status_id" value="{{form.status_id}}" disabled></input>
+          </view>
+        </view>
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-quxiantongxunlu"></text>
+          </view>
+          <view class="right">
+            <picker class="picker" bindchange="statusChange" name="status_name" value="{{form.status_name}}" range="{{statusList}}" range-key="status">
+              <view>{{form.status_name||'选择状态'}}</view>
+            </picker>
+          </view>
+        </view> -->
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消保存</button>
+          <button type="primary" size="mini" formType="submit">提交保存</button>
+        </view>
+      </form>
+    </view>
+  </view>
+</mobile-main>

+ 38 - 0
pages/management/detail.wxss

@@ -0,0 +1,38 @@
+.main {
+    position: relative;
+    width: 100%;
+  }
+  
+  .main .one {
+    position: relative;
+    padding: 10px;
+  }
+  
+  .main .one .content {
+    position: relative;
+    padding: 10px 0;
+    box-shadow: 0 0 5px #000000;
+    margin: 0 0 10px 0;
+    border-radius: 5px;
+  }
+  
+  .main .one .content .left {
+    float: left;
+    margin: 0 10px;
+  }
+  
+  .main .one .content .left .icon {
+    color: #000000;
+  }
+  
+  .main .one .content .right input {
+    color: #000000;
+  }
+  
+  .main .one .save {
+    text-align: center;
+  }
+  
+  .main .one .save button {
+    margin: 10px;
+  }

+ 123 - 0
pages/management/index.js

@@ -0,0 +1,123 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '群组管理', leftArrow: true, useBar: false },
+    // 主体高度
+    infoHeight: '',
+    list: [
+      { id: '1', name: '群名1', create_time: '2022-02-23', brief: '无',status: '审核通过' },
+      { id: '1', name: '群名2', create_time: '2022-02-23', brief: '无',status: '审核通过' },
+    ],
+    // 弹框
+    dialog: { title: '详细信息', show: false, type: '1' },
+    // 详细信息
+    info: { id: '1', name: '群名1', create_time: '2022-02-23', brief: '无',status: '审核通过'},
+  },
+  // 详细信息
+  toView: function () {
+    wx.navigateTo({ url: `/pages/management/detail` })
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
+  },
+  // 添加人员
+  toAdd: function () {
+    wx.navigateTo({ url: `/pages/management/detail` })
+  },
+  // 信息变更
+  toEdit: function (e) {
+    const { id } = e.currentTarget.dataset;
+    wx.navigateTo({ url: `/pages/group/detail?id=${id}` })
+  },
+  toAudit: function () {
+    wx.navigateTo({ url: `/pages/group/create` })
+  },
+  // 解散申请
+  toUnbound: function (e) {
+    const { id } = e.currentTarget.dataset;
+    console.log(id);
+    // wx.showToast({ title: `解散成功`, icon: 'success', duration: 2000 })
+    wx.showModal({
+      title: '提示',content: '确定解散?',
+      success: function (e) {
+      if (id!=0) {//这里是点击了确定以后
+        wx.showToast({ title: `解散成功`, icon: 'success', duration: 2000 })
+      } else {//这里是点击了取消以后
+        wx.showToast({ title: `解散失败`, icon: 'error', duration: 2000 })
+      }
+    }
+  })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    // 计算高度
+    this.searchHeight()
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    // 减去状态栏
+    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/management/index.json

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

+ 25 - 0
pages/management/index.wxml

@@ -0,0 +1,25 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <button type="primary" size="mini" bindtap="toAdd">创建群组</button>
+    </view>
+    <view class="two">
+      <view class="list" wx:key="item" wx:for="{{list}}">
+        <view class="name">{{item.name}}</view>
+        <view class="other">
+          <view class="otherInfo">创建时间:<text>{{item.create_time||'暂无' }}</text></view>
+          <view class="otherInfo">简介:<text>{{item.brief||'暂无' }}</text></view>
+          <view class="otherInfo textOver">状态:<text>{{item.status||'暂无' }}</text></view>
+        </view>
+        <view class="btn">
+          <button type="info" size="mini" bindtap="toView" data-id="{{item.id}}">群组管理</button>
+          <button type="info" size="mini" bindtap="toView" data-id="{{item.id}}">添加成员</button>
+          <button type="info" size="mini" bindtap="toView" data-id="{{item.id}}">删除成员</button>
+          <button type="info" size="mini" bindtap="toUnbound" data-id="{{item.id}}">解散申请</button>
+          <button type="info" size="mini" bindtap="toEdit" data-id="{{item.id}}">信息</button>
+          <button type="info" size="mini" bindtap="toAudit" data-id="{{item.id}}">对讲机</button>
+        </view>
+      </view>
+    </view>
+  </view>
+</mobile-main>

+ 87 - 0
pages/management/index.wxss

@@ -0,0 +1,87 @@
+.main {
+    position: relative;
+    width: 100%;
+  }
+  
+  .main .one {
+    position: relative;
+    width: 100%;
+    text-align: center;
+    border-bottom: 1px dashed #000000;
+  }
+  
+  .main .one button {
+    margin: 10px;
+  }
+  
+  .main .two {
+    position: relative;
+    padding: 10px;
+  }
+  
+  .main .two .list {
+    float: left;
+    width: 100%;
+    margin: 0 0 8px 0;
+    background-color: #f9f9f9;
+    border-radius: 5px;
+    padding: 8px 0;
+  }
+  
+  .main .two .list .name {
+    font-size: 16px;
+    margin: 0 0 5px 0;
+    padding: 0 10px;
+  }
+  
+  .main .two .list .other .otherInfo {
+    margin: 0 0 5px 0;
+    font-size: 14px;
+    color: #666666;
+    padding: 0 10px;
+  }
+  
+  .main .two .list .other .otherInfo text {
+    color: #000000;
+  }
+  
+  .main .two .list .btn {
+    text-align: center;
+  }
+  
+  .main .two .list .btn button {
+    margin: 0 5px;
+  }
+  .dialog {
+    min-height: 30px;
+    max-height: 320px;
+    overflow-y: auto;
+    padding: 0 8px;
+  }
+  
+  .dialog .dialog_1 .content {
+    position: relative;
+    padding: 8px 0;
+    border-radius: 6px;
+    margin: 0 0 5px 0;
+    background-color: #f1f1f1;
+  }
+  
+  .dialog .dialog_1 .content .left {
+    float: left;
+    margin: 0 10px;
+  }
+  
+  .dialog .dialog_1 .content .left text {
+    font-size: 14px;
+    color: #666666;
+  }
+  
+  .dialog .dialog_1 .content .right input {
+    font-size: 12px;
+  }
+  
+  .van-dialog__header {
+    padding-top: 0 !important;
+    padding: 10px 0 !important;
+  }

+ 133 - 0
pages/map/detail.js

@@ -0,0 +1,133 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '群组信息', leftArrow: true, useBar: false },
+    // 主体高度
+    infoHeight: '',
+    form: {},
+    countyList: [
+        { id: '12', name: '白山市石川县' },
+        { id: '34', name: '白山市江源区' },
+      ]
+  },
+  initValidate() {
+    const rules = { name: { required: true, }}
+    // 验证字段的提示信息,若不传则调用默认的信息
+    const messages = { name: { required: '请输入名称', }};
+    this.WxValidate = new WxValidate(rules, messages)
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/map/index' })
+  },
+ // 选择区县
+ countyChange: function (e) {
+    let { value } = e.detail;
+    let data = this.data.countyList[value];
+    this.setData({ 'form.county_id': data.id })
+    this.setData({ 'form.county_name': data.name })
+  },
+//    // 选择状态
+//    statusChange: function (e) {
+//     let { value } = e.detail;
+//     let data = this.data.statusList[value];
+//     this.setData({ 'form.status_id': data.id })
+//     this.setData({ 'form.status_name': data.status })
+//   },
+  // 取消保存
+  onReset: function (e) {
+    this.back()
+  },
+  // 提交保存
+  onSubmit: function (e) {
+    const params = e.detail.value;
+    if (!this.WxValidate.checkForm(params)) {
+      const error = this.WxValidate.errorList[0];
+      wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+      return false
+    } else {
+      console.log(params);
+      wx.showToast({ title: `创建信息成功`, icon: 'success', duration: 2000 })
+    }
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    //验证规则函数
+    this.initValidate()
+    const { id } = options;
+    // 查询信息
+    if (id) this.search(id);
+    // 计算高度
+    this.searchHeight()
+  },
+  // 查询信息
+  search: function (id) {
+    console.log(id);
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    // 减去状态栏
+    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/map/detail.json

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

+ 38 - 0
pages/map/detail.wxml

@@ -0,0 +1,38 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="one">
+      <form bindsubmit="onSubmit" catchreset="onReset">
+        <!-- <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-xingming"></text>
+          </view>
+          <view class="right">
+            <input name="name" value="{{form.name}}" placeholder='请输入地点' placeholder-class="placeholder"></input>
+          </view>
+        </view> -->
+        <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-shijian"></text>
+          </view>
+          <view class="right">
+            <picker class="picker" bindchange="countyChange" name="county_name" value="{{form.county_name}}" range="{{countyList}}" range-key="name">
+              <view>{{form.county_name||'选择所属区县'}}</view>
+            </picker>
+          </view>
+        </view>
+        <!-- <view class="content">
+          <view class="left">
+            <text class="icon iconfont icon-mima"></text>
+          </view>
+          <view class="right">
+            <input type='text' name="brief" value="{{form.brief}}" brief placeholder='请输入纬度' placeholder-class="placeholder"></input>
+          </view>
+        </view> -->
+        <view class="save">
+          <button type="warn" size="mini" formType="reset">取消保存</button>
+          <button type="primary" size="mini" formType="submit">提交保存</button>
+        </view>
+      </form>
+    </view>
+  </view>
+</mobile-main>

+ 38 - 0
pages/map/detail.wxss

@@ -0,0 +1,38 @@
+.main {
+    position: relative;
+    width: 100%;
+  }
+  
+  .main .one {
+    position: relative;
+    padding: 10px;
+  }
+  
+  .main .one .content {
+    position: relative;
+    padding: 10px 0;
+    box-shadow: 0 0 5px #000000;
+    margin: 0 0 10px 0;
+    border-radius: 5px;
+  }
+  
+  .main .one .content .left {
+    float: left;
+    margin: 0 10px;
+  }
+  
+  .main .one .content .left .icon {
+    color: #000000;
+  }
+  
+  .main .one .content .right input {
+    color: #000000;
+  }
+  
+  .main .one .save {
+    text-align: center;
+  }
+  
+  .main .one .save button {
+    margin: 10px;
+  }

+ 125 - 0
pages/map/index.js

@@ -0,0 +1,125 @@
+// pages/login/login.js
+import WxValidate from '../../utils/wxValidate'
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    frameStyle: { useTop: true, name: '地图', leftArrow: true, useBar: false },
+    // 主体高度
+    infoHeight: '',
+    latitude: 41.57385,
+    longitude: 126.22398,
+    markers:[
+        {id: 3,latitude: 41.57385,longitude: 126.22398,},
+        {id: 4,latitude: 41.811979,longitude: 126.918087,},
+        // {latitude: 41.811979,longitude: 126.918087,}
+    ],
+  },
+  toEdit: function (e) {
+    const { id } = e.currentTarget.dataset;
+    wx.navigateTo({ url: `/pages/map/detail?id=${id}` })
+  },
+  back: function () {
+    wx.navigateBack({ url: '/pages/home/index' })
+  },
+   /**
+    * 标示点移动触发
+    */
+  regionchange(e) {
+     console.log(e.type)
+   },
+  /**
+ * 点击标识点触发
+ */
+  markertap(e) {
+       console.log(e)
+ },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    // 计算高度
+    this.searchHeight()
+  },
+  onLoad: function () {
+    var that = this;
+    wx.getLocation({
+      type: "wgs84",
+      success: function (res) {
+        var latitude = res.latitude;
+        var longitude = res.longitude;
+        //console.log(res.latitude);
+        that.setData({
+          latitude: res.latitude,
+          longitude: res.longitude,
+          markers: [{
+            latitude: res.latitude,
+            longitude: res.longitude
+          }]
+        })
+      }
+    })
+  },
+  // 计算高度
+  searchHeight: function () {
+    let frameStyle = this.data.frameStyle;
+    let client = app.globalData.client;
+    // 减去状态栏
+    let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+    // 是否减去底部菜单
+    if (frameStyle.useBar) infoHeight = infoHeight - 50;
+    if (infoHeight) this.setData({ infoHeight: infoHeight })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/map/index.json

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

+ 16 - 0
pages/map/index.wxml

@@ -0,0 +1,16 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+  <view slot="info" class="main" style="height:{{infoHeight}}px;">
+    <view class="page-body">
+    <view class="page-section page-section-gap">
+      <map
+        bindmarkertap="markertap" bindregionchange="regionchange"
+        style="width: 100%; height: 600px;"
+        scale="15" latitude="{{latitude}}"longitude="{{longitude}}" markers="{{markers}}">
+        <view class="btn" style="text-align: right;">
+          <button style="margin: 10px;" type="info" size="mini" bindtap="toEdit" data-id="{{item.id}}">关键位置设置</button>
+        </view>
+      </map>
+    </view>
+  </view>
+  </view>
+</mobile-main>

+ 4 - 0
pages/map/index.wxss

@@ -0,0 +1,4 @@
+.main {
+    position: relative;
+    width: 100%;
+  }

+ 1 - 1
project.config.json

@@ -48,7 +48,7 @@
   "compileType": "miniprogram",
   "libVersion": "2.21.2",
   "appid": "wx0fd4b616bc7cf3bb",
-  "projectname": "%E7%83%9F%E8%8D%89-%E5%B0%8F%E7%A8%8B%E5%BA%8F",
+  "projectname": "tobacco-applet",
   "debugOptions": {
     "hidedInDevtools": []
   },

+ 5 - 0
utils/dict.js

@@ -12,6 +12,9 @@ export const admin = [
   { icon: 'icon-jiucuo', title: '商户信息纠错', router: 'merchant_error' },
   { icon: 'icon-shouye', title: '检查历史', router: 'inspect' },
   { icon: 'icon-shangpinxinxi', title: '商品信息', router: 'market' },
+  { icon: 'icon-shangpinxinxi', title: '群组管理', router: 'group' },
+  // { icon: 'icon-dengji', title: 'test', router: 'index_1' },
+
 ]
 // 区县
 export const county = [
@@ -21,4 +24,6 @@ export const county = [
 export const user = [
   { icon: 'icon-shanghuguanli', title: '商户信息', router: 'user_merchant' },
   { icon: 'icon-shangpinxinxi', title: '商品信息', router: 'user_market' },
+  { icon: 'icon-shangpinxinxi', title: '群组管理', router: 'management' },
+  { icon: 'icon-shenfenleibie', title: '地图', router: 'map' },
 ]