소스 검색

创建项目

guhongwei 2 년 전
커밋
166b14bd40
52개의 변경된 파일1526개의 추가작업 그리고 0개의 파일을 삭제
  1. 31 0
      .eslintrc.js
  2. 14 0
      .gitignore
  3. 26 0
      app.js
  4. 37 0
      app.json
  5. 13 0
      app.wxss
  6. 88 0
      components/datetime-picker/index.js
  7. 4 0
      components/datetime-picker/index.json
  8. 3 0
      components/datetime-picker/index.wxml
  9. 1 0
      components/datetime-picker/index.wxss
  10. 16 0
      components/dialog/index.js
  11. 4 0
      components/dialog/index.json
  12. 11 0
      components/dialog/index.wxml
  13. 43 0
      components/dialog/index.wxss
  14. 97 0
      components/editor/index.js
  15. 4 0
      components/editor/index.json
  16. 39 0
      components/editor/index.wxml
  17. 20 0
      components/editor/index.wxss
  18. 27 0
      components/tabs/index.js
  19. 4 0
      components/tabs/index.json
  20. 17 0
      components/tabs/index.wxml
  21. 26 0
      components/tabs/index.wxss
  22. 51 0
      components/upload/index.js
  23. 4 0
      components/upload/index.json
  24. 9 0
      components/upload/index.wxml
  25. 41 0
      components/upload/index.wxss
  26. 63 0
      icon/editoricon.wxss
  27. 70 0
      pages/index/index.js
  28. 3 0
      pages/index/index.json
  29. 8 0
      pages/index/index.wxml
  30. 4 0
      pages/index/index.wxss
  31. 66 0
      pages/login/index.js
  32. 4 0
      pages/login/index.json
  33. 3 0
      pages/login/index.wxml
  34. 1 0
      pages/login/index.wxss
  35. 66 0
      pages/register/index.js
  36. 4 0
      pages/register/index.json
  37. 3 0
      pages/register/index.wxml
  38. 1 0
      pages/register/index.wxss
  39. 125 0
      pagesCommon/test/index.js
  40. 11 0
      pagesCommon/test/index.json
  41. 48 0
      pagesCommon/test/index.wxml
  42. 6 0
      pagesCommon/test/index.wxss
  43. 66 0
      pagesHome/home/index.js
  44. 4 0
      pagesHome/home/index.json
  45. 3 0
      pagesHome/home/index.wxml
  46. 1 0
      pagesHome/home/index.wxss
  47. 51 0
      project.config.json
  48. 8 0
      project.private.config.json
  49. 7 0
      sitemap.json
  50. 262 0
      utils/datePicker.js
  51. 1 0
      utils/moment.min.js
  52. 7 0
      utils/util.js

+ 31 - 0
.eslintrc.js

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

+ 14 - 0
.gitignore

@@ -0,0 +1,14 @@
+# Windows
+[Dd]esktop.ini
+Thumbs.db
+$RECYCLE.BIN/
+
+# macOS
+.DS_Store
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+
+# Node.js
+node_modules/

+ 26 - 0
app.js

@@ -0,0 +1,26 @@
+// app.js
+App({
+    onLaunch() {
+        // 登录
+        wx.login({
+            success: res => {
+                console.log(res);
+            }
+        })
+        //获取设备顶部窗口的高度(不同设备窗口高度不一样,根据这个来设置自定义导航栏的高度
+        wx.getSystemInfo({
+            success: (res) => {
+                let data = res;
+                data.getMenu = wx.getMenuButtonBoundingClientRect();
+                this.globalData.client = data;
+            }
+        })
+    },
+    globalData: {
+        serverUrl: "https://broadcast.waityou24.cn",
+        // 当前设备信息
+        client: {},
+        // 微信用户openid,sessionKey
+        wxInfo: {},
+    }
+})

+ 37 - 0
app.json

@@ -0,0 +1,37 @@
+{
+    "pages": [
+        "pages/index/index",
+        "pages/login/index",
+        "pages/register/index"
+    ],
+    "subPackages": [
+        {
+            "root": "pagesHome",
+            "independent": true,
+            "pages": [
+                "home/index"
+            ]
+        },
+        {
+            "root": "pagesCommon",
+            "independent": true,
+            "pages": [
+                "test/index"
+            ]
+        }
+    ],
+    "lazyCodeLoading": "requiredComponents",
+    "window": {
+        "backgroundTextStyle": "light",
+        "navigationBarBackgroundColor": "#f0f0f0",
+        "navigationBarTitleText": "小程序模板",
+        "navigationBarTextStyle": "black"
+    },
+    "style": "v2",
+    "sitemapLocation": "sitemap.json",
+    "permission": {
+        "scope.userLocation": {
+            "desc": "你的位置信息将用于小程序位置接口的效果展示"
+        }
+    }
+}

+ 13 - 0
app.wxss

@@ -0,0 +1,13 @@
+.container {
+    display: flex;
+    flex-direction: column;
+    width: 100vw;
+    height: 100%;
+    box-sizing: border-box;
+}
+
+.textOver {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}

+ 88 - 0
components/datetime-picker/index.js

@@ -0,0 +1,88 @@
+const App = getApp();
+const dateTimePicker = require('../../utils/datePicker');
+const moment = require("../../utils/moment.min");
+Component({
+    options: { addGlobalClass: true },
+    properties: {
+        datetime: { type: String, value: '' },
+        name: { type: String, value: '' }
+    },
+    data: {
+        // 时间列表
+        dateTimeArray: null,
+        // 默认显示时间
+        valueDateTime: null,
+        // 开始时间
+        startDateTime: '',
+        // 结束时间
+        endDateTime: '',
+    },
+    pageLifetimes: {
+        show: function () {
+            const that = this;
+            that.search();
+
+            
+        },
+        hide: function () { },
+        resize: function (size) { }
+    },
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        search: function () {
+            const that = this;
+            // 计算时间区间
+            let startDateTime = moment().format('YYYY-MM-DD HH:mm');
+            let endDateTime = moment().add(100, 'years').format('YYYY-MM-DD HH:mm');
+            that.setData({ startDateTime: startDateTime, endDateTime: endDateTime })
+            // 获取完整的年月日 时分秒,以及默认显示的数组
+            that.data.unit = ['年', '月', '日', '时', '分']
+            that.data.dateTimePicker = dateTimePicker.newDateTimePicker(startDateTime, endDateTime)
+            let obj = that.data.dateTimePicker.render();
+            let lastArray = obj.dateTimeArray;
+            let lastTime = obj.dateTime;
+            for (let i = 0; i < lastArray.length; i++) {
+                lastArray[i] = lastArray[i].map(m => m + this.data.unit[i])
+            }
+            that.setData({ dateTimeArray: lastArray, valueDateTime: lastTime })
+        },
+        // 确认选择
+        change(e) {
+            const that = this;
+            const valueDateTime = that.data.valueDateTime;
+            const year = that.data.dateTimeArray[0][valueDateTime[0]].replace(/年/, '')
+            const month = that.data.dateTimeArray[1][valueDateTime[1]].replace(/月/, '')
+            const day = that.data.dateTimeArray[2][valueDateTime[2]].replace(/日/, '')
+            const hour = that.data.dateTimeArray[3][valueDateTime[3]].replace(/时/, '')
+            const minute = that.data.dateTimeArray[4][valueDateTime[4]].replace(/分/, '')
+            let dateTimeWhole = `${year}-${month}-${day} ${hour}:${minute}`;
+            that.triggerEvent('datetimeChange', { datetime: dateTimeWhole, name: that.properties.name })
+        },
+        // 选择时间
+        columnChange: function (e) {
+            const that = this;
+            // 时间列表
+            const dateTimeArray = that.data.dateTimeArray;
+            const { column, value } = e.detail
+            let dateTimeTemp = 'valueDateTime[' + column + ']'
+            that.setData({ [dateTimeTemp]: value })
+            // 当前选择的值
+            const valueDateTime = that.data.valueDateTime;
+            that.data.dateTimePicker.setValue({ dateTimeArray: dateTimeArray, dateTime: valueDateTime })
+            for (let i = 1; i < valueDateTime.length; i++) {
+                if (column == i - 1) {
+                    for (let j = i; j < valueDateTime.length; j++) {
+                        let temp = 'valueDateTime[' + j + ']'
+                        that.setData({ [temp]: 0 })
+                    }
+                }
+                let arr = that.data.dateTimePicker.dispatch(i).map(m => m + that.data.unit[i])
+                let temp1 = 'dateTimeArray[' + i + ']';
+                that.setData({ [temp1]: arr })
+            }
+            that.setData({ dateTimeArray: dateTimeArray, valueDateTime: valueDateTime })
+        },
+    }
+})

+ 4 - 0
components/datetime-picker/index.json

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

+ 3 - 0
components/datetime-picker/index.wxml

@@ -0,0 +1,3 @@
+<picker mode="multiSelector" value="{{valueDateTime}}" bindchange="change" bindcolumnchange="columnChange" range="{{dateTimeArray}}">
+    <view>{{datetime ||"请选择时间"}}</view>
+</picker>

+ 1 - 0
components/datetime-picker/index.wxss

@@ -0,0 +1 @@
+/* components/datetime-picker/index.wxss */

+ 16 - 0
components/dialog/index.js

@@ -0,0 +1,16 @@
+const app = getApp()
+Component({
+    options: { multipleSlots: true },
+    properties: {
+        dialog: { type: Object },
+    },
+    data: {},
+    methods: {
+        // 关闭弹框
+        toClose: function () {
+            const that = this;
+            that.triggerEvent('toClose')
+        }
+    }
+})
+

+ 4 - 0
components/dialog/index.json

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

+ 11 - 0
components/dialog/index.wxml

@@ -0,0 +1,11 @@
+<view class="dialog" wx:if="{{dialog.show}}">
+    <view class="one">
+        <view class="one_1">{{dialog.title}}</view>
+        <view class="one_2">
+            <icon class="icon-small icon" type="cancel" size="23" bindtap="toClose"></icon>
+        </view>
+    </view>
+    <view class="two">
+        <slot></slot>
+    </view>
+</view>

+ 43 - 0
components/dialog/index.wxss

@@ -0,0 +1,43 @@
+.dialog {
+    position: fixed;
+    top: 60vw;
+    z-index: 9999;
+    display: flex;
+    box-sizing: border-box;
+    flex-direction: column;
+    width: 96vw;
+    margin: 0 2vw;
+    padding: 2vw;
+    background-color: #f9f9f9;
+    box-shadow: 0 0 5px #cccccc;
+    border-radius: 5px;
+    animation: mymove 2s;
+    animation-iteration-count: 1;
+}
+
+.dialog .one {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    margin: 0 0 1vw 0;
+}
+
+.dialog .one .one_1 {
+    font-size: 14px;
+    font-weight: bold;
+}
+
+.dialog .two {
+    max-height: 40vh;
+    overflow-y: auto;
+}
+
+@keyframes mymove {
+    from {
+        top: 0vw;
+    }
+
+    to {
+        top: 60vw;
+    }
+}

+ 97 - 0
components/editor/index.js

@@ -0,0 +1,97 @@
+// components/editor/index.js
+const app = getApp()
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        content: { type: String, value: '' },
+        name: { type: String, value: '' }
+    },
+    // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
+    attached: function () { }, // 此处attached的声明会被lifetimes字段中的声明覆盖
+    ready: function () { },
+    pageLifetimes: {
+        // 组件所在页面的生命周期函数
+        show: function () { const that = this; that.search() },
+        hide: function () { },
+        resize: function () { },
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+        formats: {},
+        // 客户端平台,是否为苹果
+        isIOS: false
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        search() {
+            const that = this;
+            // 获取当前小程序版本
+            const platform = wx.getSystemInfoSync().platform;
+            // 客户端平台
+            const isIOS = platform === 'ios'
+            that.setData({ isIOS });
+        },
+        // 编辑初始化完成时触发
+        bindready: function () {
+            const that = this;
+            const query = wx.createSelectorQuery()
+            query.in(this).select('#editor').context(function (res) {
+                that.editorCtx = res.context;
+                let { content } = that.data;
+                let html = content;
+                if (html) that.editorCtx.setContents({ html })
+            }).exec()
+        },
+        // 编辑器值改变时触发
+        bindInput: function (e) {
+            const that = this;
+            const { html, text } = e.detail;
+            this.triggerEvent("bindInput", { html, text, name: that.properties.name });
+        },
+        // 样式设置
+        format(e) {
+            let { name, value, tips } = e.target.dataset
+            if (!name) return;
+            this.editorCtx.format(name, value);
+            wx.showToast({ title: `${tips}`, icon: 'none', duration: 2000 });
+        },
+        // 上传图片
+        insertImage() {
+            const that = this
+            wx.chooseImage({
+                count: 1,
+                sizeType: ['compressed'],
+                sourceType: ['album'],
+                success: function (res) {
+                    that._uploadImage(res.tempFilePaths[0]);
+                }
+            });
+        },
+        // 提交图片
+        _uploadImage: function (tempFilePath) {
+            let that = this;
+            wx.uploadFile({
+                url: `${app.globalData.serverUrl}/files/court/elimg/upload`,
+                filePath: tempFilePath,
+                name: 'file',
+                formData: {},
+                success: (res) => {
+                    let arr = JSON.parse(res.data);
+                    if (arr.errcode == '0') {
+                        that.editorCtx.insertImage({ src: app.globalData.serverUrl + arr.uri });
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'fail', duration: 2000 })
+                    }
+                },
+            })
+        },
+    }
+})

+ 4 - 0
components/editor/index.json

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

+ 39 - 0
components/editor/index.wxml

@@ -0,0 +1,39 @@
+<!-- <view class="container" style="height:{{editorHeight}}px;">
+    <editor id="editor" class="ql-container" placeholder="{{placeholder}}" bindstatuschange="onStatusChange" bindready="onEditorReady">
+    </editor>
+</view>
+
+<view class="toolbar" catchtouchend="format" hidden="{{keyboardHeight > 0 ? false : true}}" style="bottom: {{isIOS ? keyboardHeight : 0}}px">
+    <i class="iconfont icon-charutupian" catchtouchend="insertImage"></i>
+    <i class="iconfont icon-format-header-2 {{formats.header === 2 ? 'ql-active' : ''}}" data-name="header" data-value="{{2}}"></i>
+    <i class="iconfont icon-format-header-3 {{formats.header === 3 ? 'ql-active' : ''}}" data-name="header" data-value="{{3}}"></i>
+    <i class="iconfont icon-zitijiacu {{formats.bold ? 'ql-active' : ''}}" data-name="bold"></i>
+    <i class="iconfont icon-zitixieti {{formats.italic ? 'ql-active' : ''}}" data-name="italic"></i>
+    <i class="iconfont icon-zitixiahuaxian {{formats.underline ? 'ql-active' : ''}}" data-name="underline"></i>
+    <i class="iconfont icon--checklist" data-name="list" data-value="check"></i>
+    <i class="iconfont icon-youxupailie {{formats.list === 'ordered' ? 'ql-active' : ''}}" data-name="list" data-value="ordered"></i>
+    <i class="iconfont icon-wuxupailie {{formats.list === 'bullet' ? 'ql-active' : ''}}" data-name="list" data-value="bullet"></i>
+</view> -->
+<view class="main">
+    <view class="two" catchtouchend="format">
+        <view class="two_1">
+            <text class="iconfont icon-tupian" catchtouchend="insertImage"></text>
+        </view>
+        <view class="two_1">
+            <text class="iconfont icon-bold" data-name="bold" data-tips="加粗"></text>
+        </view>
+        <view class="two_1">
+            <text class="iconfont icon-zitixieti" data-name="italic" data-tips="斜体"></text>
+        </view>
+        <view class="two_1">
+            <text class="iconfont icon-orderedList" data-name="list" data-value="ordered" data-tips="有序列表"></text>
+        </view>
+        <view class="two_1">
+            <text class="iconfont icon-unorderedList" data-name="list" data-value="bullet" data-tips="无序列表"></text>
+        </view>
+    </view>
+    <view class="one">
+        <editor id="editor" placeholder="请输入信息内容" bindready="bindready" bind:input="bindInput">
+        </editor>
+    </view>
+</view>

+ 20 - 0
components/editor/index.wxss

@@ -0,0 +1,20 @@
+@import "/icon/editoricon.wxss";
+.main {
+  padding: 2vw;
+  border: 1px solid #0000ff;
+}
+.main .two {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+  margin: 0 0 2vw 0;
+}
+.main .two .two_1 {
+  text-align: center;
+  border: 1px solid #cccccc;
+  padding: 1vw 2vw;
+  border-radius: 4px;
+}
+.main .two .two_1 .iconfont {
+  font-size: 18px;
+}

+ 27 - 0
components/tabs/index.js

@@ -0,0 +1,27 @@
+// commpents/tabs/index.js
+const app = getApp()
+Component({
+    options: { multipleSlots: true },
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        tabs: { type: Object },
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {},
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        tabsChange(e) {
+            const that = this;
+            const { item } = e.currentTarget.dataset;
+            that.triggerEvent('tabsChange', item)
+        }
+    }
+})

+ 4 - 0
components/tabs/index.json

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

+ 17 - 0
components/tabs/index.wxml

@@ -0,0 +1,17 @@
+<view class="main">
+    <view class="one" style="background:{{tabs.bgColor||'#f9f9f9'}};">
+        <scroll-view class="scrollView" scroll-x="true">
+            <view class="list" wx:for="{{tabs.menu}}" wx:key="item" wx:for-item="item" wx:for-index="index" bindtap="tabsChange" data-item="{{item}}" style="background:{{tabs.active==item.active?tabs.acbgColor||'#ffffff':''}};">
+                <text style="color: {{tabs.active==item.active?tabs.actxtColor||'#000000':tabs.txtColor||'#999999'}};">{{item.title}}</text>
+            </view>
+        </scroll-view>
+    </view>
+    <slot></slot>
+</view>
+<!--
+    默认背景颜色,选中背景颜色,默认文字颜色,选中文字颜色
+    // bgColor: '#f9f9f9',
+    // acbgColor: '#ffffff',
+    // txtColor: '#999999',
+    // actxtColor: '#000000' 
+-->

+ 26 - 0
components/tabs/index.wxss

@@ -0,0 +1,26 @@
+@import "/app.wxss";
+.main .one {
+  padding: 2vw;
+}
+.main .one .scrollView {
+  display: flex;
+  white-space: nowrap;
+  text-align: center;
+}
+.main .one .list {
+  display: inline-block;
+  padding: 2vw;
+  margin: 0 1.5vw;
+  text-align: center;
+  border-radius: 5px;
+}
+.main .one .list text {
+  font-weight: bold;
+  font-size: var(--font14Size);
+}
+::-webkit-scrollbar {
+  display: none;
+  width: 0;
+  height: 0;
+  color: transparent;
+}

+ 51 - 0
components/upload/index.js

@@ -0,0 +1,51 @@
+const app = getApp()
+Component({
+    properties: {
+        list: { type: Array, value: [] },
+        name: { type: String },
+        count: { type: Number, value: 1 },
+    },
+    data: {},
+    methods: {
+        // 图片上传
+        imgUpload() {
+
+            const that = this;
+            const name = that.data.name;
+            wx.chooseImage({
+                count: 1,
+                sizeType: ['original', 'compressed'],
+                sourceType: ['album', 'camera'],
+                success(res) {
+                    const file = res.tempFilePaths;
+                    wx.uploadFile({
+                        url: `${app.globalData.serverUrl}/files/test/upload`,
+                        filePath: file[0],
+                        name: 'file',
+                        formData: {},
+                        success: (arr) => {
+                            let aee = JSON.parse(arr.data);
+                            if (arr.statusCode == 200) {
+                                that.triggerEvent('imgUpload', { data: { name: aee.name, url: `${app.globalData.serverUrl}` + aee.uri, uri: aee.uri }, name: name })
+                            } else {
+                                wx.showToast({ title: `${arr.errMsg}`, icon: 'error', duration: 2000 })
+                            }
+                        }
+                    })
+                }
+            })
+
+        },
+        imgDel(e) {
+            const that = this;
+            const name = that.data.name;
+            const { item, index } = e.currentTarget.dataset;
+            that.triggerEvent('imgDel', { data: { file: item, index: index }, name: name })
+        },
+        // 预览
+        toView: function (e) {
+            const { item } = e.currentTarget.dataset;
+            wx.previewImage({ current: '', urls: [item.url] })
+        }
+    }
+})

+ 4 - 0
components/upload/index.json

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

+ 9 - 0
components/upload/index.wxml

@@ -0,0 +1,9 @@
+<view class="upload">
+    <view class="list" wx:for="{{list}}" wx:key="index">
+        <image class="image" src="{{item.url}}" bindtap="toView" data-item="{{item}}" mode="aspectFill"></image>
+        <icon class="icon-small icon" type="cancel" size="23" bindtap="imgDel" data-item="{{item}}" data-index="{{index}}"></icon>
+    </view>
+    <view class="list list_1" bindtap="imgUpload" wx:if="{{list.length<count}}">
+        <text>+</text>
+    </view>
+</view>

+ 41 - 0
components/upload/index.wxss

@@ -0,0 +1,41 @@
+.upload {
+    display: flex;
+    flex-wrap: wrap;
+}
+
+.upload .list {
+    position: relative;
+    width: 23.3%;
+    height: 85px;
+    overflow: hidden;
+    margin: 0 5px 5px 0;
+    border: 1px solid #cccccc;
+    border-radius: 5px;
+}
+
+.upload .list:nth-child(4n) {
+    margin: 0 0 5px 0;
+}
+
+.upload .list .image {
+    width: 100%;
+    height: 100%;
+    border-radius: 5px;
+}
+
+.upload .list .icon {
+    position: absolute;
+    top: 1vw;
+    right: 1vw;
+}
+
+.upload .list_1 {
+    text-align: center;
+    line-height: 75px;
+}
+
+.upload .list_1 text {
+    font-size: 60px;
+    font-weight: bold;
+    color: #858588;
+}

+ 63 - 0
icon/editoricon.wxss

@@ -0,0 +1,63 @@
+@font-face {
+    font-family: "iconfont";
+    /* Project id 3618777 */
+    src: url('//at.alicdn.com/t/c/font_3618777_jt1c9kwnge.woff2?t=1661840869173') format('woff2'),
+        url('//at.alicdn.com/t/c/font_3618777_jt1c9kwnge.woff?t=1661840869173') format('woff'),
+        url('//at.alicdn.com/t/c/font_3618777_jt1c9kwnge.ttf?t=1661840869173') format('truetype');
+}
+
+.iconfont {
+    font-family: "iconfont" !important;
+    font-size: 16px;
+    font-style: normal;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-unorderedList:before {
+    content: "\e620";
+}
+
+.icon-h1:before {
+    content: "\e623";
+}
+
+.icon-undo:before {
+    content: "\e609";
+}
+
+.icon-orderedList:before {
+    content: "\e612";
+}
+
+.icon-alignLeft:before {
+    content: "\e621";
+}
+
+.icon-alignRight:before {
+    content: "\e622";
+}
+
+.icon-center:before {
+    content: "\e62e";
+}
+
+.icon-zitixieti:before {
+    content: "\ec85";
+}
+
+.icon-tupian:before {
+    content: "\e730";
+}
+
+.icon-h3:before {
+    content: "\e60b";
+}
+
+.icon-h2:before {
+    content: "\e61b";
+}
+
+.icon-bold:before {
+    content: "\eaef";
+}

+ 70 - 0
pages/index/index.js

@@ -0,0 +1,70 @@
+// pagesHome/home/index.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+
+    },
+    // 公共跳转
+    toCommon(e) {
+        const { route } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/${route}` })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+        // wx.navigateTo({ url: `/pagesCommon/test/index` })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 3 - 0
pages/index/index.json

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

+ 8 - 0
pages/index/index.wxml

@@ -0,0 +1,8 @@
+<view class="container">
+    <view class="one">
+        <button type="primary" size="mini" bindtap="toCommon" data-route="pagesCommon/test/index">组价页面</button>
+        <button type="primary" size="mini" bindtap="toCommon" data-route="pages/login/index">登录页面</button>
+        <button type="primary" size="mini" bindtap="toCommon" data-route="pages/register/index">注册页面</button>
+        <button type="primary" size="mini" bindtap="toCommon" data-route="pagesHome/home/index">系统首页</button>
+    </view>
+</view>

+ 4 - 0
pages/index/index.wxss

@@ -0,0 +1,4 @@
+.one {
+    display: flex;
+    margin: 1vw 0;
+}

+ 66 - 0
pages/login/index.js

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

+ 4 - 0
pages/login/index.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "账号登录"
+}

+ 3 - 0
pages/login/index.wxml

@@ -0,0 +1,3 @@
+<view class="container">
+    账号登录
+</view>

+ 1 - 0
pages/login/index.wxss

@@ -0,0 +1 @@
+/* pages/login/index.wxss */

+ 66 - 0
pages/register/index.js

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

+ 4 - 0
pages/register/index.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "账号注册"
+}

+ 3 - 0
pages/register/index.wxml

@@ -0,0 +1,3 @@
+<view class="container">
+    账号注册
+</view>

+ 1 - 0
pages/register/index.wxss

@@ -0,0 +1 @@
+/* pages/register/index.wxss */

+ 125 - 0
pagesCommon/test/index.js

@@ -0,0 +1,125 @@
+// pagesCommon/test/index.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        form: {
+            imgList: []
+        },
+        // 弹框
+        dialog: { title: '弹框标题', show: false, type: '1' },
+        // 日期时间选择
+        dateform: {},
+        // 选项卡
+        tabs: {
+            active: 'a',
+            menu: [
+                { title: '选项卡一', active: 'a' },
+                { title: '选项卡二', active: 'b' },
+                { title: '选项卡三', active: 'c' },
+                { title: '选项卡四', active: 'd' },
+                { title: '选项卡五', active: 'e' },
+            ],
+        },
+        // 富文本
+        content: ''
+    },
+    // 上传图片
+    imgUpl: function (e) {
+        const that = this;
+        let data = that.data.form[e.detail.name];
+        data.push(e.detail.data)
+        that.setData({ [`form.${e.detail.name}`]: data })
+    },
+    // 删除图片
+    imgDel: function (e) {
+        const that = this;
+        let data = that.data.form[e.detail.name];
+        let arr = data.filter((i, index) => index != e.detail.data.index)
+        that.setData({ [`form.${e.detail.name}`]: arr })
+    },
+    // 打开弹框
+    toDialog: function () {
+        const that = this;
+        that.setData({ dialog: { title: '弹框标题', show: true, type: '1' } })
+    },
+    // 关闭弹框
+    toClose: function () {
+        const that = this;
+        that.setData({ dialog: { title: '弹框标题', show: false, type: '1' } })
+    },
+    // 日期时间选择
+    datetimeChange: function (e) {
+        const that = this;
+        that.setData({ [`dateform.${e.detail.name}`]: e.detail.datetime });
+    },
+    // 选择选项卡
+    tabsChange: function (e) {
+        const that = this;
+        const { title, active } = e.detail;
+        that.setData({ 'tabs.active': active });
+    },
+    // 监听富文本输入
+    bindInput: function (e) {
+        const that = this;
+        const { html, text, name } = e.detail;
+        that.setData({ [`${name}`]: html })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 11 - 0
pagesCommon/test/index.json

@@ -0,0 +1,11 @@
+{
+    "component": true,
+    "usingComponents": {
+        "upload": "/components/upload/index",
+        "dialog": "/components/dialog/index",
+        "datatime-picker": "/components/datetime-picker/index",
+        "e-tabs": "/components/tabs/index",
+        "e-editor": "/components/editor/index"
+    },
+    "navigationBarTitleText": "组价页面"
+}

+ 48 - 0
pagesCommon/test/index.wxml

@@ -0,0 +1,48 @@
+<view class="container">
+    <view class="one">
+        <view>图片上传</view>
+        <view>信息说明:list:图片数组。name:字段标签。count:最大上传文件数量(1)</view>
+        <view>
+            <upload list="{{form.imgList}}" name="imgList" count="2" bind:imgUpload="imgUpl" bind:imgDel="imgDel"></upload>
+        </view>
+    </view>
+    <view class="one">
+        <view>弹框信息</view>
+        <view>信息说明:dialog:{title:'弹框标题',show:是否显示,type:弹框类型}。toClose:关闭弹框</view>
+        <view>
+            <button type="primary" size="mini" bindtap="toDialog">打开弹框</button>
+        </view>
+    </view>
+    <view class="one">
+        <view>日期时间选择</view>
+        <view>信息说明:datetime:时间数据,name:字段标签</view>
+        <view>
+            <datatime-picker datetime="{{dateform.start_time}}" name="start_time" bind:datetimeChange="datetimeChange"></datatime-picker>
+        </view>
+    </view>
+    <view class="one">
+        <view>选项卡</view>
+        <view>信息说明:tabs:{active:当前选中标签,menu:标签列表}</view>
+        <view>
+            <e-tabs tabs="{{tabs}}" bind:tabsChange="tabsChange">
+                <view hidden="{{tabs.active!='a'}}">1</view>
+                <view hidden="{{tabs.active!='b'}}">2</view>
+                <view hidden="{{tabs.active!='c'}}">3</view>
+                <view hidden="{{tabs.active!='d'}}">4</view>
+                <view hidden="{{tabs.active!='e'}}">5</view>
+            </e-tabs>
+        </view>
+    </view>
+    <view class="one">
+        <view>富文本editor</view>
+        <view>信息说明:content:信息内容,name:字段标签</view>
+        <view>
+            <e-editor content="{{content}}" name="content" bind:bindInput="bindInput"></e-editor>
+        </view>
+    </view>
+</view>
+<dialog dialog="{{dialog}}" bind:toClose="toClose">
+    <view wx:if="{{dialog.type=='1'}}" class="dialog_1">
+        弹框信息
+    </view>
+</dialog>

+ 6 - 0
pagesCommon/test/index.wxss

@@ -0,0 +1,6 @@
+.one {
+    padding: 2vw;
+    margin: 0 0 2vw 0;
+    border: 1px solid #ff0000;
+    font-size: 14px;
+}

+ 66 - 0
pagesHome/home/index.js

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

+ 4 - 0
pagesHome/home/index.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "系统首页"
+}

+ 3 - 0
pagesHome/home/index.wxml

@@ -0,0 +1,3 @@
+<view class="container">
+    系统首页
+</view>

+ 1 - 0
pagesHome/home/index.wxss

@@ -0,0 +1 @@
+/* pagesHome/home/index.wxss */

+ 51 - 0
project.config.json

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

+ 8 - 0
project.private.config.json

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

+ 7 - 0
sitemap.json

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

+ 262 - 0
utils/datePicker.js

@@ -0,0 +1,262 @@
+class BaseInfo {
+    constructor() { this.newDate = new Date(); }
+    withData(param) {
+        return parseInt(param) < 10 ? '0' + param : '' + param;
+    }
+    getLoopArray(start, end) {
+        var start = start || 0;
+        var end = end || 0;
+        var array = [];
+        for (var i = start; i <= end; i++) {
+            array.push(this.withData(i));
+        }
+        return array;
+    }
+    formatArr(dateString) {
+        return [...dateString.split(' ')[0].split('-'), ...dateString.split(' ')[1].split(':')]
+    }
+    beforeDateArr(disYear) {
+        /*
+         * 处理前
+         * 获取当前时间
+         */
+        let year = this.newDate.getFullYear() - (disYear || 0)
+        let month = this.newDate.getMonth() + 1
+        let day = this.newDate.getDate()
+        let hour = this.newDate.getHours()
+        let minute = this.newDate.getMinutes()
+        return [year, month, day, hour, minute]
+    }
+    afterDateArr() {
+        /*
+         * 处理后
+         * 获取当前时间
+         */
+        let year = this.withData(this.newDate.getFullYear())
+        let mont = this.withData(this.newDate.getMonth() + 1)
+        let date = this.withData(this.newDate.getDate())
+        let hour = this.withData(this.newDate.getHours())
+        let minu = this.withData(this.newDate.getMinutes())
+        return [year, mont, date, hour, minu];
+    }
+}
+
+// 实现
+class dateTimePicker extends BaseInfo {
+    constructor(startDate, endDate, defaultDate) {
+        super();
+        this.dateTimeArray = null
+        this.dateTime = null
+        this.startDate = super.formatArr(startDate); // 开始时间
+        this.endDate = endDate ? super.formatArr(endDate) : super.afterDateArr(); // 结束时间
+        this.defaultDate = defaultDate ? super.formatArr(defaultDate) : this.startDate;
+    }
+    setValue(obj) {
+        for (let key in obj) {
+            this[key] = obj[key]
+        }
+    }
+    /* 获取当前切换选择的日期值*/
+    getCurDateInfo() {
+        return this.dateTime && this.dateTimeArray ? {
+            year: this.dateTimeArray[0][this.dateTime[0]],
+            month: this.dateTimeArray[1][this.dateTime[1]],
+            day: this.dateTimeArray[2][this.dateTime[2]],
+            hour: this.dateTimeArray[3][this.dateTime[3]],
+            second: this.dateTimeArray[4][this.dateTime[4]],
+        } : {}
+    }
+    /* 获取月数组*/
+    getMonths() {
+        let array = []
+        const year = (this.getCurDateInfo().year || this.defaultDate[0]).replace(/年/, '');
+        if (this.startDate[0] == this.endDate[0]) {
+            /* 
+             * 开始的年和结束的年相同
+             * 就取(开始月,结束月)
+             */
+            array = super.getLoopArray(parseInt(this.startDate[1]), parseInt(this.endDate[1]))
+        } else {
+            switch (year) {
+                case this.startDate[0]:
+                    /* 开始年 */
+                    array = super.getLoopArray(parseInt(this.startDate[1]), 12)
+                    break;
+                case this.endDate[0]:
+                    /* 结束年 */
+                    array = super.getLoopArray(1, parseInt(this.endDate[1]))
+                    break;
+                default:
+                    array = super.getLoopArray(1, 12)
+                    break;
+            }
+        }
+
+        return array;
+    }
+    /* 获取日数组*/
+    getDays() {
+        let array = []
+        let lastDay = null
+        const year = (this.getCurDateInfo().year || this.defaultDate[0]).replace(/年/, '');
+        const month = (this.getCurDateInfo().month || this.defaultDate[1]).replace(/月/, '');
+        const flag = year % 400 == 0 || (year % 4 == 0 && year % 100 != 0);
+        switch (month) {
+            case '01':
+            case '03':
+            case '05':
+            case '07':
+            case '08':
+            case '10':
+            case '12':
+                lastDay = 31
+                break;
+            case '04':
+            case '06':
+            case '09':
+            case '11':
+                lastDay = 30
+                break;
+            case '02':
+                lastDay = flag ? 29 : 28
+                break;
+            default:
+                array = '月份格式不正确,请重新输入!'
+        }
+        const afterDateArr = super.afterDateArr()
+        const _start = year == this.startDate[0] && month == this.startDate[1]
+        const _end = year == this.endDate[0] && month == this.endDate[1]
+        if (this.startDate[0] == this.endDate[0] && this.startDate[1] == this.endDate[1]) {
+            /*
+             * 开始的年和结束的年相同,开始月和结束月相同
+             * 就取(开始日,结束日)
+             */
+            array = super.getLoopArray(parseInt(this.startDate[2]), parseInt(this.endDate[2]))
+        } else {
+            if (_start) { // 开始年月
+                array = super.getLoopArray(parseInt(this.startDate[2]), lastDay)
+            } else if (_end) { // 结束年月
+                array = super.getLoopArray(1, parseInt(this.endDate[2]))
+            } else {
+                array = super.getLoopArray(1, lastDay)
+            }
+        }
+
+        return array;
+    }
+
+    /* 获取小时数组*/
+    getHours() {
+        let array = []
+        const year = (this.getCurDateInfo().year || this.defaultDate[0]).replace(/年/, '');
+        const month = (this.getCurDateInfo().month || this.defaultDate[1]).replace(/月/, '');
+        const day = (this.getCurDateInfo().day || this.defaultDate[2]).replace(/日/, '');
+        const _start = year == this.startDate[0] && month == this.startDate[1] && day == this.startDate[2]
+        const _end = year == this.endDate[0] && month == this.endDate[1] && day == this.endDate[2]
+        const _equal = this.startDate[0] == this.endDate[0] && this.startDate[1] == this.endDate[1] && this.startDate[
+            2] == this.endDate[2]
+        if (_equal) {
+            /*
+             * 开始的年月日和结束的年月日都相同
+             * 就取(开始小时,结束小时)
+             */
+            array = super.getLoopArray(parseInt(this.startDate[3]), parseInt(this.endDate[3]))
+        } else {
+            if (_start) { // 开始年月日
+                array = super.getLoopArray(parseInt(this.startDate[3]), 23)
+            } else if (_end) { // 结尾年月日
+                array = super.getLoopArray(0, parseInt(this.endDate[3]))
+            } else {
+                array = super.getLoopArray(0, 23)
+            }
+        }
+        return array;
+    }
+    /* 获取分钟数组*/
+    getMinutes(years, months, days, hours) {
+        let array = []
+        const year = (this.getCurDateInfo().year || this.defaultDate[0]).replace(/年/, '');
+        const month = (this.getCurDateInfo().month || this.defaultDate[1]).replace(/月/, '');
+        const day = (this.getCurDateInfo().day || this.defaultDate[2]).replace(/日/, '');
+        const hour = (this.getCurDateInfo().hour || this.defaultDate[3]).replace(/时/, '');
+        const _start = year == this.startDate[0] && month == this.startDate[1] && day == this.startDate[2] && hour == this
+            .startDate[3]
+        const _end = year == this.endDate[0] && month == this.endDate[1] && day == this.endDate[2] && hour == this
+            .endDate[3]
+        const _equal = this.startDate[0] == this.endDate[0] && this.startDate[1] == this.endDate[1] && this.startDate[
+            2] == this.endDate[2] && this.startDate[3] == this.endDate[3]
+        if (_equal) {
+            /*
+             * 开始的年月日时和结束的年月日时都相同
+             * 就取(开始小时,结束小时)
+             */
+            array = super.getLoopArray(parseInt(this.startDate[4]), parseInt(this.endDate[4]))
+        } else {
+            if (_start) { // 开始年月日
+                array = super.getLoopArray(parseInt(this.startDate[4]), 59)
+            } else if (_end) { // 结尾年月日
+                array = super.getLoopArray(0, parseInt(this.endDate[4]))
+            } else {
+                array = super.getLoopArray(0, 59)
+            }
+        }
+        return array;
+    }
+    /*  */
+    dispatch(index) {
+        let arr = []
+        switch (index) {
+            case 0:
+                arr = super.getLoopArray(this.startDate[0], this.endDate[0]);
+                break;
+            case 1:
+                arr = this.getMonths();
+                break;
+            case 2:
+                arr = this.getDays();
+                break;
+            case 3:
+                arr = this.getHours();
+                break;
+            case 4:
+                arr = this.getMinutes();
+                break;
+            default:
+                break;
+        }
+        return arr
+    }
+
+    /* 初始默认数据 */
+    render() {
+        const dateTime = []
+        const dateTimeArray = [
+            [],
+            [],
+            [],
+            [],
+            []
+        ];
+        /*年月日 时分秒*/
+        for (let i = 0; i < dateTimeArray.length; i++) {
+            dateTimeArray[i] = this.dispatch(i)
+        }
+        dateTimeArray.forEach((current, index) => {
+            const _index = current.indexOf(this.defaultDate[index])
+            dateTime.push(_index == -1 ? 0 : _index);
+        });
+
+        return {
+            dateTimeArray,
+            dateTime
+        }
+    }
+}
+
+function newDateTimePicker(startDateTime, endDateTime, pText) {
+    let newDateTimePicker = new dateTimePicker(startDateTime, endDateTime, pText)
+    return newDateTimePicker
+}
+module.exports = {
+    newDateTimePicker: newDateTimePicker,
+}

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
utils/moment.min.js


+ 7 - 0
utils/util.js

@@ -0,0 +1,7 @@
+// 菜单
+export const system = [
+    { title: '微信', normal: '', active: '', route: '' },
+    { title: '通讯录', normal: '', active: '', route: '' },
+    { title: '发现', normal: '', active: '', route: '' },
+    { title: '我的', normal: '', active: '', route: '' },
+]