guhongwei 2 years ago
parent
commit
23da5093b9
47 changed files with 374 additions and 663 deletions
  1. 0 3
      app.json
  2. 0 37
      commpents/dialog/index.js
  3. 0 4
      commpents/dialog/index.json
  4. 0 8
      commpents/dialog/index.wxml
  5. 0 19
      commpents/dialog/index.wxss
  6. 0 37
      commpents/tabs/index.js
  7. 0 4
      commpents/tabs/index.json
  8. 0 3
      commpents/tabs/index.wxml
  9. 0 0
      commpents/tabs/index.wxss
  10. 0 11
      commpents/tabs/read.md
  11. 36 17
      commpents/upload/index.js
  12. 2 2
      commpents/upload/index.json
  13. 32 0
      commpents/upload/index.less
  14. 11 1
      commpents/upload/index.wxml
  15. 24 1
      commpents/upload/index.wxss
  16. 0 19
      commpents/upload/read.md
  17. 1 6
      pages/home/index.js
  18. 2 2
      pages/home/index.less
  19. 1 1
      pages/home/index.wxml
  20. 2 2
      pages/home/index.wxss
  21. 2 4
      pages/index/index.js
  22. 1 2
      pages/index/index.wxml
  23. 0 77
      pages/my/index.js
  24. 0 6
      pages/my/index.json
  25. 0 4
      pages/my/index.less
  26. 0 5
      pages/my/index.wxml
  27. 0 4
      pages/my/index.wxss
  28. 0 77
      pages/news/index.js
  29. 0 6
      pages/news/index.json
  30. 0 4
      pages/news/index.less
  31. 0 5
      pages/news/index.wxml
  32. 0 4
      pages/news/index.wxss
  33. 24 2
      pages/other/agree.less
  34. 196 1
      pages/other/agree.wxml
  35. 19 2
      pages/other/agree.wxss
  36. 4 16
      pages/register/index.js
  37. 1 1
      pages/register/index.json
  38. 6 7
      pages/register/index.less
  39. 3 11
      pages/register/index.wxml
  40. 6 6
      pages/register/index.wxss
  41. 1 3
      pages/test/index.json
  42. 0 75
      pages/topic/index.js
  43. 0 6
      pages/topic/index.json
  44. 0 4
      pages/topic/index.less
  45. 0 5
      pages/topic/index.wxml
  46. 0 4
      pages/topic/index.wxss
  47. 0 145
      utils/dict.js

+ 0 - 3
app.json

@@ -3,9 +3,6 @@
         "pages/index/index",
         "pages/register/index",
         "pages/home/index",
-        "pages/news/index",
-        "pages/topic/index",
-        "pages/my/index",
         "pages/test/index",
         "pages/other/agree",
         "pages/logs/logs"

+ 0 - 37
commpents/dialog/index.js

@@ -1,37 +0,0 @@
-// commpents/mobile-frame/mobile-main.js
-const app = getApp()
-Component({
-    /**
-     * 组件的属性列表
-     */
-    options: { multipleSlots: true },
-    properties: {
-        dialog: { type: Object, value: {} },
-    },
-
-    // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
-    attached: function () { }, // 此处attached的声明会被lifetimes字段中的声明覆盖
-    ready: function () { },
-    pageLifetimes: {
-        // 组件所在页面的生命周期函数
-        show: function () { },
-        hide: function () { },
-        resize: function () { },
-    },
-    /**
-     * 组件的初始数据
-     */
-    data: {
-
-    },
-    /**
-     * 组件的方法列表
-     */
-    methods: {
-        // 关闭弹框
-        toClose() {
-            this.triggerEvent('toClose')
-        }
-    }
-})
-

+ 0 - 4
commpents/dialog/index.json

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

+ 0 - 8
commpents/dialog/index.wxml

@@ -1,8 +0,0 @@
-<van-dialog use-slot title="{{dialog.title}}" show="{{ dialog.show }}" showConfirmButton="{{false}}">
-    <view class="info">
-        <slot name="info"></slot>
-    </view>
-    <view class="btn">
-        <button type="warn" size="mini" bindtap="toClose">关闭</button>
-    </view>
-</van-dialog>

+ 0 - 19
commpents/dialog/index.wxss

@@ -1,19 +0,0 @@
-.info {
-    float: left;
-    width: 95%;
-    padding: 0 10px;
-    max-height: 300px;
-    overflow-y: auto;
-}
-
-.btn {
-    float: left;
-    width: 100%;
-    text-align: center;
-    margin: 5px 0;
-}
-
-.btn button {
-    font-size: 12px;
-    padding: 0 15px;
-}

+ 0 - 37
commpents/tabs/index.js

@@ -1,37 +0,0 @@
-// commpents/mobile-frame/mobile-main.js
-const app = getApp()
-Component({
-    /**
-     * 组件的属性列表
-     */
-    options: { multipleSlots: true },
-    properties: {
-        tabs: { type: Object },
-    },
-
-    // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
-    attached: function () { }, // 此处attached的声明会被lifetimes字段中的声明覆盖
-    ready: function () { },
-    pageLifetimes: {
-        // 组件所在页面的生命周期函数
-        show: function () { },
-        hide: function () { },
-        resize: function () { },
-    },
-    /**
-     * 组件的初始数据
-     */
-    data: {
-
-    },
-    /**
-     * 组件的方法列表
-     */
-    methods: {
-        // 关闭弹框
-        tabsChange(e) {
-            this.triggerEvent('tabsChange', e.detail)
-        }
-    }
-})
-

+ 0 - 4
commpents/tabs/index.json

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

+ 0 - 3
commpents/tabs/index.wxml

@@ -1,3 +0,0 @@
-<van-tabs active="{{tabs.active}}" bind:change="tabsChange" type="{{tabs.type||'line'}}" color="{{tabs.color||'#024702'}}" duration="{{tabs.duration||'0.3'}}" line-width="{{tabs.linewidth||'40'}}" line-height="{{tabs.lineheight||'3'}}" swipeable="{{true}}" title-active-color="{{activeC||'#024702'}}" title-inactive-color="{{inactiveC||'#666666'}}">
-    <van-tab wx:for="{{tabs.list}}" wx:key="item" title="{{item.title}}" name="{{item.name}}"></van-tab>
-</van-tabs>

+ 0 - 0
commpents/tabs/index.wxss


+ 0 - 11
commpents/tabs/read.md

@@ -1,11 +0,0 @@
-# 选项卡组件使用说明
-## 参数说明
-### active--当前选中标签的标识符
-### type--样式风格,默认值:line,可选值:card
-### color--标签主题色
-### duration--动画时间
-### linewidth--底部条宽度
-### lineheight--底部条高度
-### swipeable--是否开启手势左右滑动切换
-### title-active-color--标题选中态颜色
-

+ 36 - 17
commpents/upload/index.js

@@ -8,7 +8,7 @@ Component({
     properties: {
         list: { type: Array, value: [] },
         count: { type: Number, value: 1 },
-        previewSize: { type: String, value: '60' }
+        previewSize: { type: String, value: '30' }
     },
 
     // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
@@ -31,26 +31,45 @@ Component({
      */
     methods: {
         // 图片上传
-        imgUpload(event) {
-            const { file } = event.detail;
-            wx.uploadFile({
-                url: `${app.globalData.publicUrl}/files/court/elimg/upload`,
-                filePath: file.url,
-                name: 'file',
-                formData: {},
-                success: (res) => {
-                    let arr = JSON.parse(res.data);
-                    if (res.statusCode == 200) {
-                        this.triggerEvent('imgUpload', { name: arr.name, url: `${app.globalData.publicUrl}` + arr.uri, uri: arr.uri })
-                    } else {
-                        wx.showToast({ title: `${res.errMsg}`, icon: 'fail', duration: 2000 })
-                    }
+        imgUpload: function () {
+            const that = this;
+            wx.chooseImage({
+                count: 1,
+                sizeType: ['original', 'compressed'],
+                sourceType: ['album', 'camera'],
+                success(res) {
+                    const file = res.tempFilePaths;
+                    wx.uploadFile({
+                        url: `${app.globalData.fileUrl}/files/court/elimg/upload`,
+                        filePath: file[0],
+                        name: 'file',
+                        formData: {},
+                        success: (arr) => {
+                            let aee = JSON.parse(arr.data);
+                            if (arr.statusCode == 200) {
+                                that.triggerEvent('imgUpload', { name: aee.name, url: `${app.globalData.fileUrl}` + aee.uri, uri: aee.uri })
+                            } else {
+                                wx.showToast({ title: `${arr.errMsg}`, icon: 'error', duration: 2000 })
+                            }
+                        }
+                    })
                 }
             })
         },
         // 图片删除
-        imgDel(e) {
-            this.triggerEvent('imgDel', { file: e.detail.file, index: e.detail.index })
+        imgDel: function (e) {
+            const that = this;
+            const { item, index } = e.currentTarget.dataset;
+            that.triggerEvent('imgDel', { file: item, index: index })
+        },
+        // 预览
+        toView: function (e) {
+            const { item } = e.currentTarget.dataset;
+            wx.previewImage({
+                current: '',
+                urls: [item.url]
+            })
+
         }
     }
 })

+ 2 - 2
commpents/upload/index.json

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

+ 32 - 0
commpents/upload/index.less

@@ -0,0 +1,32 @@
+.main {
+    .one {
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        flex-wrap: wrap;
+        margin: 0 0 1vw 0;
+
+        .list {
+            position: relative;
+            margin: 0 1vw 0 0;
+            border-radius: 5px;
+
+            .image {
+                width: 100%;
+                height: 15vh;
+                border-radius: 5px;
+            }
+
+            .icon {
+                position: absolute;
+                right: 0;
+            }
+        }
+    }
+
+    .two {
+        .btn {
+            font-size: var(--font14Size);
+        }
+    }
+}

+ 11 - 1
commpents/upload/index.wxml

@@ -1 +1,11 @@
-<van-uploader file-list="{{list}}" max-count="{{count}}" bind:after-read="imgUpload" bind:delete="imgDel" preview-size="{{previewSize}}" />
+<view class="main">
+    <view class="one">
+        <view class="list" wx:for="{{list}}" wx:key="index" style="width: {{previewSize}}vw;">
+            <image class="image" src="{{item.url}}" bindtap="toView" data-item="{{item}}"></image>
+            <icon class="icon-small icon" type="cancel" size="23" bindtap="imgDel" data-item="{{item}}" data-index="{{index}}"></icon>
+        </view>
+    </view>
+    <view class="two">
+        <button class="btn" type="primary" size="mini" bindtap="imgUpload" wx:if="{{list.length<count}}">上传图片</button>
+    </view>
+</view>

+ 24 - 1
commpents/upload/index.wxss

@@ -1 +1,24 @@
-/* commpents/upload/index.wxss */
+.main .one {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  flex-wrap: wrap;
+  margin: 0 0 1vw 0;
+}
+.main .one .list {
+  position: relative;
+  margin: 0 1vw 0 0;
+  border-radius: 5px;
+}
+.main .one .list .image {
+  width: 100%;
+  height: 15vh;
+  border-radius: 5px;
+}
+.main .one .list .icon {
+  position: absolute;
+  right: 0;
+}
+.main .two .btn {
+  font-size: var(--font14Size);
+}

+ 0 - 19
commpents/upload/read.md

@@ -1,19 +0,0 @@
-# 上传图片组件使用说明
-## 参数
-### 图片存储列表:list
-### 图片上传数量限制:count
-
-## 方法
-### 上传图片---imgUpload
-### 传回父组件参数,图片名称:name,图片完整地址:url,图片地址:uri
-### 父组价接收参数变量:e.detail
-
-### 删除图片---imgDel
-### 传回父组件参数:图片数据:file,图片所在列表下标:index
-### 父组件接收参数变量:e.detail
-
-## 引用组件
-### json:"vanupload": "/commpents/upload/index"
-### 组件使用:<vanupload></vanupload>
-### 参数传值方式:list="{{list}}"
-### 方法传值方式:bind:imgUpload="imgUpload"

+ 1 - 6
pages/home/index.js

@@ -1,12 +1,7 @@
 const app = getApp()
 Page({
     data: {
-        frameStyle: { useTop: true, name: '首页', leftArrow: false, useBar: true },
-    },
-    // 跳转菜单
-    tabPath(e) {
-        let { route } = e.detail.detail;
-        if (route) wx.redirectTo({ url: `/${route}` })
+        frameStyle: { useTop: true, name: '首页', leftArrow: false, useBar: false },
     },
     /**
      * 生命周期函数--监听页面加载

+ 2 - 2
pages/home/index.less

@@ -1,4 +1,4 @@
 .main {
-    height: var(--thrHeight);
-    background-color: var(--bgColor);
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
 }

+ 1 - 1
pages/home/index.wxml

@@ -1,4 +1,4 @@
-<mobile-main frameStyle="{{frameStyle}}" bind:tabPath="tabPath">
+<mobile-main frameStyle="{{frameStyle}}">
     <view slot="info" class="container main">
         系统首页
     </view>

+ 2 - 2
pages/home/index.wxss

@@ -1,4 +1,4 @@
 .main {
-  height: var(--thrHeight);
-  background-color: var(--bgColor);
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
 }

+ 2 - 4
pages/index/index.js

@@ -10,16 +10,14 @@ Page({
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) {
-
-    },
+    onLoad: function (options) { },
     // 监听用户是否登录
     watchLogin: async function () {
         // 监听用户是否登录,
         wx.getStorage({
             key: 'user',
             success: async res => {
-                // if (res.data) wx.redirectTo({ url: '/pages/home/index' })
+                if (res.data) wx.redirectTo({ url: '/pages/home/index' })
             },
             fail: async res => {
                 wx.login({

+ 1 - 2
pages/index/index.wxml

@@ -3,10 +3,9 @@
         <view class="one">
             <view>系统首页</view>
             <view>
-                <button type="primary" size="mini" bindtap="toCommon" data-route="login/index">去登录</button>
                 <button type="primary" size="mini" bindtap="toCommon" data-route="register/index">去注册</button>
                 <button type="primary" size="mini" bindtap="toCommon" data-route="home/index">系统首页</button>
-                <button type="primary" size="mini" bindtap="toCommon" data-route="test/index">组件页面</button>
+                <!-- <button type="primary" size="mini" bindtap="toCommon" data-route="test/index">组件页面</button> -->
             </view>
         </view>
     </view>

+ 0 - 77
pages/my/index.js

@@ -1,77 +0,0 @@
-const app = getApp()
-import { myBtn } from "../../utils/dict";
-Page({
-    data: {
-        frameStyle: { useTop: true, name: '我的', leftArrow: false, useBar: true },
-    },
-    // 跳转菜单
-    tabPath(e) {
-        let { route } = e.detail.detail;
-        if (route) wx.redirectTo({ url: `/${route}` })
-    },
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) { },
-    // 监听用户是否登录
-    watchLogin: async function () {
-        const that = this;
-        wx.getStorage({
-            key: 'user',
-            success: async (res) => { },
-            fail: async (res) => {
-                // wx.redirectTo({ url: '/pages/index/index' });
-            },
-        });
-    },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-        const that = this;
-        // 监听用户是否登录
-        that.watchLogin();
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload: function () {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh: function () {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage: function () {
-
-    }
-})

+ 0 - 6
pages/my/index.json

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

+ 0 - 4
pages/my/index.less

@@ -1,4 +0,0 @@
-.main {
-    height: var(--thrHeight);
-    background-color: var(--bgColor);
-}

+ 0 - 5
pages/my/index.wxml

@@ -1,5 +0,0 @@
-<mobile-main frameStyle="{{frameStyle}}" bind:tabPath="tabPath">
-    <view slot="info" class="container main">
-        我的
-    </view>
-</mobile-main>

+ 0 - 4
pages/my/index.wxss

@@ -1,4 +0,0 @@
-.main {
-  height: var(--thrHeight);
-  background-color: var(--bgColor);
-}

+ 0 - 77
pages/news/index.js

@@ -1,77 +0,0 @@
-const app = getApp()
-Page({
-    data: {
-        frameStyle: { useTop: true, name: '资讯', leftArrow: false, useBar: true },
-    },
-    // 跳转菜单
-    tabPath(e) {
-        let { route } = e.detail.detail;
-        if (route) wx.redirectTo({ url: `/${route}` })
-    },
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) { },
-    // 监听用户是否登录
-    watchLogin: async function () {
-        const that = this;
-        // 监听用户是否登录,
-        wx.getStorage({
-            key: 'user',
-            success: async res => { },
-            fail: async res => {
-                // wx.redirectTo({ url: '/pages/index/index' })
-            }
-        })
-    },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-        const that = this;
-        // 监听用户是否登录
-        that.watchLogin();
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload: function () {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh: function () {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage: function () {
-
-    }
-})

+ 0 - 6
pages/news/index.json

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

+ 0 - 4
pages/news/index.less

@@ -1,4 +0,0 @@
-.main {
-    height: var(--thrHeight);
-    background-color: var(--bgColor);
-}

+ 0 - 5
pages/news/index.wxml

@@ -1,5 +0,0 @@
-<mobile-main frameStyle="{{frameStyle}}" bind:tabPath="tabPath">
-    <view slot="info" class="container main">
-        资讯
-    </view>
-</mobile-main>

+ 0 - 4
pages/news/index.wxss

@@ -1,4 +0,0 @@
-.main {
-  height: var(--thrHeight);
-  background-color: var(--bgColor);
-}

+ 24 - 2
pages/other/agree.less

@@ -1,4 +1,26 @@
 .main {
-    height: var(--thrHeight);
-    background-color: var(--bgColor);
+    background-color: var(--mainColor);
+
+    .one {
+        width: 100vw;
+
+        .text {
+            text-align: center;
+            font-size: 22px;
+            margin: 2vw 0;
+            font-weight: bold;
+        }
+
+        .info {
+            padding: 0 10px;
+            font-size: var(--f16Size);
+
+            text {
+                float: left;
+                width: 100%;
+                margin: 0 0 10px 0;
+            }
+        }
+
+    }
 }

File diff suppressed because it is too large
+ 196 - 1
pages/other/agree.wxml


+ 19 - 2
pages/other/agree.wxss

@@ -1,4 +1,21 @@
 .main {
-  height: var(--thrHeight);
-  background-color: var(--bgColor);
+  background-color: var(--mainColor);
+}
+.main .one {
+  width: 100vw;
+}
+.main .one .text {
+  text-align: center;
+  font-size: 22px;
+  margin: 2vw 0;
+  font-weight: bold;
+}
+.main .one .info {
+  padding: 0 10px;
+  font-size: var(--f16Size);
+}
+.main .one .info text {
+  float: left;
+  width: 100%;
+  margin: 0 0 10px 0;
 }

+ 4 - 16
pages/register/index.js

@@ -1,26 +1,20 @@
 const app = getApp()
 import WxValidate from '../../utils/wxValidate';
-const { gender, type } = require('../../utils/dict')
+const { gender } = require('../../utils/dict')
 Page({
     data: {
-        frameStyle: { useTop: true, name: '注册', leftArrow: true, useBar: false },
+        frameStyle: { useTop: true, name: '注册', leftArrow: false, useBar: false },
         form: { icon: [] },
         // 性别
         genderList: gender,
-        // 用户类型
-        typeList: type,
         agree: false
     },
     initValidate() {
-        const rules = { icon: { required: true }, name: { required: true }, card: { required: true }, gender: { required: true }, phone: { required: true, tel: true }, type: { required: true } }
+        const rules = { icon: { required: true }, name: { required: true }, card: { required: true }, gender: { required: true }, phone: { required: true, tel: true } }
         // 验证字段的提示信息,若不传则调用默认的信息
-        const messages = { icon: { required: '请选择头像', }, name: { required: '请输入用户姓名', }, card: { required: '请输入身份证号', }, gender: { required: '请选择性别', }, phone: { required: '请输入手机号', }, type: { required: '请选择用户类型', } };
+        const messages = { icon: { required: '请选择头像', }, name: { required: '请输入用户姓名', }, card: { required: '请输入身份证号', }, gender: { required: '请选择性别', }, phone: { required: '请输入手机号', } };
         this.WxValidate = new WxValidate(rules, messages)
     },
-    back: function () {
-        wx.navigateBack({ delta: 1 })
-    },
-    // 上传图片
     imgUpl: function (e) {
         const that = this;
         let data = that.data.form.icon;
@@ -40,12 +34,6 @@ Page({
         let data = that.data.genderList[e.detail.value];
         if (data) that.setData({ 'form.gender': data.value });
     },
-    // 用户类型
-    typeChange: function (e) {
-        const that = this;
-        let data = that.data.typeList[e.detail.value];
-        if (data) that.setData({ 'form.type': data.value });
-    },
     // 公共跳转
     toCommon: function (e) {
         // 登录

+ 1 - 1
pages/register/index.json

@@ -2,6 +2,6 @@
     "component": true,
     "usingComponents": {
         "mobile-main": "/commpents/mobile-frame/index",
-        "vanupload": "/commpents/upload/index"
+        "upload": "/commpents/upload/index"
     }
 }

+ 6 - 7
pages/register/index.less

@@ -1,6 +1,5 @@
 .main {
-    height: var(--twoHeight);
-    background-color: var(--bgColor);
+    background-color: var(--mainColor);
 
     .one {
         .content {
@@ -12,7 +11,7 @@
 
             .value {
                 flex-grow: 1;
-                color: var(--labelColor);
+                color: var(--blackColor);
 
             }
         }
@@ -22,18 +21,18 @@
             margin: 5vw 0 0 0;
 
             button {
-                width: 96vw;
-                // margin: 0 2vw;
+                width: 40vw;
+                margin: 0 2vw;
                 padding: 1vw 0;
             }
         }
 
         .agree {
-            margin: 2vw 0 0 0;
+            margin: 2vw 0 5vw 0;
             padding: 0 10vw;
 
             text {
-                font-size: 12px;
+                font-size: var(--font12Size);
             }
         }
     }

+ 3 - 11
pages/register/index.wxml

@@ -1,11 +1,11 @@
-<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+<mobile-main frameStyle="{{frameStyle}}">
     <view slot="info" class="container main">
         <view class="one">
             <form catchsubmit="toRegister">
                 <view class="content">
                     <view class="label">头像:</view>
                     <view class="value">
-                        <vanupload list="{{form.icon}}" count="{{1}}" previewSize="{{80}}" bind:imgUpload="imgUpl" bind:imgDel="imgDel"></vanupload>
+                        <upload list="{{form.icon}}" count="{{1}}" previewSize="{{30}}" bind:imgUpload="imgUpl" bind:imgDel="imgDel"></upload>
                     </view>
                 </view>
                 <view class="content">
@@ -34,17 +34,9 @@
                         <input type="text" name="phone" value="{{form.phone}}" placeholder="请输入手机号" />
                     </view>
                 </view>
-                <view class="content">
-                    <view class="label">用户类型:</view>
-                    <view class="value">
-                        <picker mode="selector" bindchange="typeChange" name="type" value="{{form.type}}" range="{{typeList}}" range-key="label">
-                            <view class="picker">{{form.type=='-1'?'管理员':form.type=='0'?'普通用户':form.type=='1'?'裁判用户':'请选择用户类型'}}</view>
-                        </picker>
-                    </view>
-                </view>
                 <view class="btn">
                     <button type="primary" size="mini" formType="submit">提交注册</button>
-                    <!-- <button type="warn" size="mini" bindtap="toCommon" data-route="login/index">返回登录</button> -->
+                    <button type="warn" size="mini">游客登录</button>
                 </view>
                 <view class="agree">
                     <label>

+ 6 - 6
pages/register/index.wxss

@@ -1,6 +1,5 @@
 .main {
-  height: var(--twoHeight);
-  background-color: var(--bgColor);
+  background-color: var(--mainColor);
 }
 .main .one .content {
   display: flex;
@@ -11,20 +10,21 @@
 }
 .main .one .content .value {
   flex-grow: 1;
-  color: var(--labelColor);
+  color: var(--blackColor);
 }
 .main .one .btn {
   text-align: center;
   margin: 5vw 0 0 0;
 }
 .main .one .btn button {
-  width: 96vw;
+  width: 40vw;
+  margin: 0 2vw;
   padding: 1vw 0;
 }
 .main .one .agree {
-  margin: 2vw 0 0 0;
+  margin: 2vw 0 5vw 0;
   padding: 0 10vw;
 }
 .main .one .agree text {
-  font-size: 12px;
+  font-size: var(--font12Size);
 }

+ 1 - 3
pages/test/index.json

@@ -2,8 +2,6 @@
     "component": true,
     "usingComponents": {
         "mobile-main": "/commpents/mobile-frame/index",
-        "vanupload": "/commpents/upload/index",
-        "e-dialog": "/commpents/dialog/index",
-        "e-tabs": "/commpents/tabs/index"
+        "vanupload": "/commpents/upload/index"
     }
 }

+ 0 - 75
pages/topic/index.js

@@ -1,75 +0,0 @@
-const app = getApp()
-Page({
-    data: {
-        frameStyle: { useTop: true, name: '话题', leftArrow: false, useBar: true },
-    },
-    // 跳转菜单
-    tabPath(e) {
-        let { route } = e.detail.detail;
-        if (route) wx.redirectTo({ url: `/${route}` })
-    },
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) { },
-    // 监听用户是否登录
-    watchLogin: async function () {
-        const that = this;
-        wx.getStorage({
-            key: 'user',
-            success: async (res) => { },
-            fail: async (res) => {
-                // wx.redirectTo({ url: '/pages/index/index' });
-            },
-        });
-    },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
-    },
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-        const that = this;
-        // 监听用户是否登录
-        that.watchLogin();
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload: function () {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh: function () {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage: function () {
-
-    }
-})

+ 0 - 6
pages/topic/index.json

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

+ 0 - 4
pages/topic/index.less

@@ -1,4 +0,0 @@
-.main {
-    height: var(--thrHeight);
-    background-color: var(--bgColor);
-}

+ 0 - 5
pages/topic/index.wxml

@@ -1,5 +0,0 @@
-<mobile-main frameStyle="{{frameStyle}}" bind:tabPath="tabPath">
-    <view slot="info" class="container main">
-        话题
-    </view>
-</mobile-main>

+ 0 - 4
pages/topic/index.wxss

@@ -1,4 +0,0 @@
-.main {
-  height: var(--thrHeight);
-  background-color: var(--bgColor);
-}

+ 0 - 145
utils/dict.js

@@ -1,151 +1,6 @@
-// 菜单
-export const system = [
-    { title: '首页', normal: '/image/tabs/home.png', active: '/image/tabs/home_1.png', route: 'pages/home/index', type: '0' },
-    { title: '资讯', normal: '/image/tabs/news.png', active: '/image/tabs/news_1.png', route: 'pages/news/index', type: '0' },
-    { title: '话题', normal: '/image/tabs/topic.png', active: '/image/tabs/topic_1.png', route: 'pages/topic/index', type: '0' },
-    { title: '我的', normal: '/image/tabs/my.png', active: '/image/tabs/my_1.png', route: 'pages/my/index', type: '0' },
-]
 // 性别
 export const gender = [
     { label: '男', value: '0' },
     { label: '女', value: '1' },
     { label: '未知', value: '2' },
-]
-//资讯类型
-export const news_type = [
-    { label: '其他', value: '0' },
-    { label: '羽毛球', value: '1' },
-];
-// 是否启用
-export const isuse = [
-    { label: '启用', value: '0' },
-    { label: '禁用', value: '1' },
-]
-// 我的页面,功能按钮
-// -1:管理员,0:普通用户,1:裁判用户
-export const myBtn = [
-    {
-        type: '-1',
-        menu: [
-            {
-                title: '用户管理',
-                btn: [
-                    { title: '信息管理', route: 'user/list' },
-                ]
-            },
-            {
-                title: '赛事管理',
-                btn: [
-                    { title: '信息管理', route: 'match/list' },
-                    { title: '报名管理', route: 'sign/list' },
-                    { title: '组队管理', route: 'team/list' },
-                    { title: '赛事组管理', route: 'matchteam/list' },
-                    { title: '小组赛管理', route: 'race/list' },
-                    { title: '淘汰赛管理', route: 'eliminate/list' },
-                ]
-            },
-            {
-                title: '新闻管理',
-                btn: [
-                    { title: '资讯管理', route: 'news/list' },
-                    { title: '话题管理', route: 'topic/list' },
-                ]
-            },
-            {
-                title: '字典管理',
-                btn: [
-                    { title: '比赛项目管理', route: 'project/list' },
-                    { title: '比赛场地管理', route: 'address/list' },
-                ]
-            },
-            {
-                title: '账号管理',
-                btn: [
-                    { title: '资料修改', route: 'setting/basic' },
-                    { title: '联系我们', route: 'setting/contact' },
-                ]
-            },
-        ]
-    },
-    {
-        type: '0',
-        menu: [
-            {
-                title: '赛事管理',
-                btn: [
-                    { title: '我的赛事', route: 'personalmatch/index' },
-                    { title: '报名管理', route: 'personalsign/index' },
-                    { title: '组队管理', route: 'personalteam/index' },
-                ]
-            },
-            {
-                title: '账号管理',
-                btn: [
-                    { title: '资料修改', route: 'setting/basic' },
-                    { title: '联系我们', route: 'setting/contact' },
-                ]
-            },
-        ]
-    },
-    {
-        type: '1',
-        menu: [
-            {
-                title: '赛事管理',
-                btn: [
-                    { title: '小组赛管理', route: 'refereerace/list' },
-                    { title: '淘汰赛管理', route: 'refereeeliminate/list' },
-                ]
-            },
-            {
-                title: '账号管理',
-                btn: [
-                    { title: '资料修改', route: 'setting/basic' },
-                    { title: '联系我们', route: 'setting/contact' },
-                ]
-            },
-        ]
-    }
-];
-// 用户类型
-export const type = [
-    // { label: '管理员', value: '-1' },
-    { label: '普通用户', value: '0' },
-    { label: '裁判用户', value: '1' },
-]
-//比赛类型
-export const match_project = [
-    { label: '单打', value: '单打' },
-    { label: '双打', value: '双打' },
-]
-//是否公开
-export const is_show_project = [
-    { label: '公开', value: '0' },
-    { label: '不公开', value: '1' },
-]
-// 赛事类别
-export const matchType = [
-    { label: '团体赛', value: '团体赛' },
-    { label: '单项赛', value: '单项赛' },
-];
-// 赛程状态
-export const race_status = [
-    { label: '已安排', value: '0' },
-    { label: '待开赛', value: '1' },
-    { label: '已开赛', value: '2' },
-    { label: '已结束', value: '3' },
-]
-//组队审核
-export const examine_status = [
-    { label: '待审核', value: '0' },
-    { label: '审核通过', value: '1' },
-    { label: '审核拒绝', value: '-1' }
-]
-//支付状态
-export const paystatusList = [
-    { label: '未支付', value: '0' },
-    { label: '支付成功', value: '1' },
-    { label: '支付失败', value: '-1' },
-    { label: '申请退款', value: '-2' },
-    { label: '已退款', value: '-3' },
 ]