y595705120 há 4 meses atrás
pai
commit
39656f8de0

+ 0 - 3
app.json

@@ -15,10 +15,7 @@
     "pages/study/index/index",
     "pages/study/sign/index",
     "pages/study/market/index",
-    "pages/user/bind/index",
     "pages/user/register/index",
-    "pages/my/message/info/index",
-    "pages/my/message/list/index",
     "pages/post/post",
     "pages/train/index/index",
     "pages/train/limitHome/index",

BIN
assets/card.png


BIN
assets/cardback.png


+ 0 - 14
component/iView/load-more/index.js

@@ -1,14 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-
-    properties: {
-        loading: {
-            type: Boolean,
-            value: true
-        },
-        tip: {
-            type: String,
-            value: ''
-        }
-    },
-});

+ 0 - 3
component/iView/load-more/index.json

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

+ 0 - 8
component/iView/load-more/index.wxml

@@ -1,8 +0,0 @@
-<view class="i-class i-load-more {{ loading ? '' : 'i-load-more-line' }}">
-    <view class="i-load-more-loading" wx:if="{{ loading }}"></view>
-    <view class="i-load-more-tip">
-        <view wx:if="{{ tip !== '' }}">{{ tip }}</view>
-        <view wx:elif="{{ tip === '' && loading }}">正在加载</view>
-        <view class="i-load-more-empty" wx:else></view>
-    </view>
-</view>

+ 0 - 1
component/iView/load-more/index.wxss

@@ -1 +0,0 @@
-.i-load-more{width:65%;margin:1.5em auto;line-height:1.6em;font-size:14px;text-align:center}.i-load-more-loading{display:inline-block;margin-right:12px;vertical-align:middle;width:14px;height:14px;background:0 0;border-radius:50%;border:2px solid #e9eaec;border-color:#e9eaec #e9eaec #e9eaec #2d8cf0;animation:btn-spin .6s linear;animation-iteration-count:infinite}.i-load-more-tip{display:inline-block;vertical-align:middle;color:#495060}.i-load-more-line{border-top:1px solid #dddee1;display:flex;border-top:0}.i-load-more-line::before{position:relative;top:-1px;-webkit-box-flex:1;-webkit-flex:1;flex:1;content:'';border-top:1px solid #dddee1}.i-load-more-line::after{position:relative;top:-1px;-webkit-box-flex:1;-webkit-flex:1;flex:1;content:'';border-top:1px solid #dddee1}.i-load-more-line .i-load-more-tip{position:relative;top:-.9em;padding:0 .55em}.i-load-more-empty{width:4px;height:4px;border-radius:50%;background-color:#e5e5e5;display:inline-block;position:relative;vertical-align:0;top:-.16em}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}

+ 0 - 79
pages/my/message/info/index.js

@@ -1,79 +0,0 @@
-const app = getApp()
-Page({
-  data: {
-    message: null
-  },
-
-  onLoad: function(options) {
-    let msgId = options.id;
-    let _this = this
-    _this.setData({
-      spinShow: true
-    });
-    app.formPost('/api/wx/student/user/message/detail/' + msgId, null).then(res => {
-      _this.setData({
-        spinShow: false
-      });
-      if (res.code === 1) {
-        _this.setData({
-          message: res.response,
-        });
-        app.formPost('/api/wx/student/user/message/read/' + msgId, null);
-      }
-    }).catch(e => {
-      _this.setData({
-        spinShow: false
-      });
-      app.message(e, 'error')
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function() {
-
-  }
-})

+ 0 - 7
pages/my/message/info/index.json

@@ -1,7 +0,0 @@
-{
-  "usingComponents": {
-    "i-panel": "/component/iView/panel/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index"
-  }
-}

+ 0 - 19
pages/my/message/info/index.wxml

@@ -1,19 +0,0 @@
-<view class="msg-page">
-  <view class="msg-title">
-    <h1>{{message.title}}</h1>
-  </view>
-  <view>
-    <view class="msg-content">
-      <h1>发送人:{{message.sendUserName}}</h1>
-    </view>
-    <view class="msg-content">
-      <h1>发送时间:{{message.createTime}}</h1>
-    </view>
-    <view class="msg-content">
-      <h1>发送内容:{{message.content}}</h1>
-    </view>
-
-    <i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
-    <i-message id="message" />
-  </view>
-</view>

+ 0 - 16
pages/my/message/info/index.wxss

@@ -1,16 +0,0 @@
-.msg-page {
-  background: white;
-  width: 100%;
-  height: 100%;
-  padding: 10px 0px;
-}
-
-.msg-title {
-  text-align: center;
-  font-size: 14px;
-}
-
-.msg-content {
-  padding: 8px 15px;
-  font-size: 14px;
-}

+ 0 - 72
pages/my/message/list/index.js

@@ -1,72 +0,0 @@
-const app = getApp()
-Page({
-  data: {
-    spinShow: false,
-    loadMoreLoad: false,
-    loadMoreTip: '暂无数据',
-    queryParam: {
-      pageIndex: 1,
-      pageSize: app.globalData.pageSize
-    },
-    tableData: [],
-    total: 1
-  },
-  onLoad: function(options) {
-    this.setData({
-      spinShow: true
-    });
-    this.search(true);
-  },
-  onPullDownRefresh() {
-    this.setData({
-      spinShow: true
-    });
-    if (!this.loading) {
-      this.setData({
-        ['queryParam.pageIndex']: 1
-      });
-      this.search(true)
-    }
-  },
-  onReachBottom() {
-    if (!this.loading && this.data.queryParam.pageIndex < this.data.total) {
-      this.setData({
-        loadMoreLoad: true,
-        loadMoreTip: '正在加载'
-      });
-      this.setData({
-        ['queryParam.pageIndex']: this.data.queryParam.pageIndex + 1
-      });
-      this.search(false)
-    }
-  },
-  search: function(override) {
-    let _this = this
-    app.formPost('/api/wx/student/user/message/page', this.data.queryParam).then(res => {
-      _this.setData({
-        spinShow: false
-      });
-      wx.stopPullDownRefresh()
-      if (res.code === 1) {
-        const re = res.response
-        _this.setData({
-          ['queryParam.pageIndex']: re.pageNum,
-          tableData: override ? re.list : this.data.tableData.concat(re.list),
-          total: re.pages
-        });
-
-        if (re.pageNum >= re.pages) {
-          this.setData({
-            loadMoreLoad: false,
-            loadMoreTip: '暂无数据'
-          });
-        }
-      }
-    }).catch(e => {
-      _this.setData({
-        spinShow: false
-      });
-      app.message(e, 'error')
-    })
-  }
-})

+ 0 - 10
pages/my/message/list/index.json

@@ -1,10 +0,0 @@
-{
-  "usingComponents": {
-    "i-cell-group": "/component/iView/cell-group/index",
-    "i-cell": "/component/iView/cell/index",
-    "i-load-more": "/component/iView/load-more/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index"
-  },
-  "enablePullDownRefresh": true
-}

+ 0 - 10
pages/my/message/list/index.wxml

@@ -1,10 +0,0 @@
-<wxs module="enumItem" src="../../../../wxs/enumItem.wxs"></wxs>
-<view>
-  <i-cell-group>
-    <i-cell wx:for="{{tableData}}" data-item="item" label="{{item.content}}" wx:key="{{item.id}}" url="/pages/my/message/info/index?id={{item.id}}" title="{{item.title}}" lable="{{item.content}}" is-link value="{{enumItem.format(enumItem.state.user.message.readText,item.readed)}}"></i-cell>
-  </i-cell-group>
-</view>
-
-<i-load-more tip="{{loadMoreTip}}" loading="{{loadMoreLoad}}" />
-<i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
-<i-message id="message" />

+ 0 - 1
pages/my/message/list/index.wxss

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

+ 0 - 1
pages/train/orderTest/answer.wxml

@@ -10,7 +10,6 @@
   </view>
 
   <i-panel i-class="exam-panel-title">
-
     <i-cell-group i-class="exam-cell">
       <!-- 单选题 -->
       <i-cell wx:if="{{info.type ==2}}">

+ 1 - 1
pages/train/orderTest/answer.wxss

@@ -28,7 +28,7 @@
 }
 
 .exam-panel-title {
-  margin-top: 30px;
+  margin-top: 35px;
 }
 
 .exam-radio-item-label {

+ 0 - 47
pages/user/bind/index.js

@@ -1,47 +0,0 @@
-const app = getApp()
-Page({
-  data: {
-    spinShow: false,
-    userName: '',
-    password: '',
-  },
-  formSubmit: function(e) {
-    let _this = this
-    _this.setData({
-      spinShow: true
-    });
-    wx.login({
-      success(wxres) {
-        if (wxres.code) {
-          e.detail.value.code = wxres.code
-          app.formPost('/api/wx/student/auth/bind', e.detail.value)
-            .then(res => {
-              _this.setData({
-                spinShow: false
-              });
-              if (res.code == 1) {
-                wx.setStorageSync('token', res.response)
-                wx.reLaunch({
-                  url: '/pages/index/index',
-                });
-              } else {
-                app.message(res.message, 'error')
-              }
-            }).catch(e => {
-              _this.setData({
-                spinShow: false
-              });
-              app.message(e, 'error')
-            })
-        } else {
-          app.message(res.errMsg, 'error')
-        }
-      }
-    })
-  },
-  register: function(e) {
-    wx.navigateTo({
-      url: "../register/index"
-    })
-  }
-})

+ 0 - 9
pages/user/bind/index.json

@@ -1,9 +0,0 @@
-{
-  "usingComponents": {
-    "i-button": "/component/iView/button/index",
-    "i-panel": "/component/iView/panel/index",
-    "i-input": "/component/iView/input/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index"
-  }
-}

+ 0 - 21
pages/user/bind/index.wxml

@@ -1,21 +0,0 @@
-<!--pages/user/bind/index.wxml-->
-<view class="card-image-container">
-  <image src="/assets/logo2.png" style="width:175px;height:147px"></image>
-</view>
-
-<form bindsubmit='formSubmit'>
-  <i-panel title="用户名">
-    <i-input value="{{ userName }}" name="userName" maxlength="-1"  />
-  </i-panel>
-
-  <i-panel title="密码">
-    <i-input value="{{ password }}" name="password" maxlength="-1" />
-  </i-panel>
-
-  <view>
-    <button class="i-btn i-btn- i-btn-primary i-btn-square" form-type='submit'>绑定手机</button>
-  </view>
-
-</form>
-
-<i-message id="message" />

+ 0 - 7
pages/user/bind/index.wxss

@@ -1,7 +0,0 @@
-/* pages/user/bind/index.wxss */
-
-.card-image-container {
-  align-items: center;
-  display: flex;
-  justify-content: center;
-}

+ 2 - 32
pages/user/identify/index.wxml

@@ -1,36 +1,6 @@
-<camera device-position="back" flash="auto" binderror="errorCamara" id="myCamera" wx:if="{{showcamara}}"
-  style="width: 100%; height:100vh;">
-  <cover-view class="mcover-view" style='width: 100%; height:100%; top:45%' wx:if="{{!hidden}}">
-    <cover-image class="dialog-body wh70" style='right:45%' src="/assets/loading.gif" />
-  </cover-view>
-  <cover-view class="mcover-bar" wx:if="{{hidden}}">
-    <cover-view class="mcover-view">
-      <cover-view>
-        <cover-image class="dialog-body circle wh60" src="/assets/img_gallery.png" bindtap="chooseImg" />
-      </cover-view>
-      <cover-view class="dialog-body camara" bindtap="takePhoto">
-        <cover-view class="camara-1"></cover-view>
-      </cover-view>
 
-      <cover-view>
-        <cover-image class="dialog-body circle wh60" src="/assets/img_close.png" bindtap="goBack" />
-      </cover-view>
-    </cover-view>
-  </cover-view>
-</camera>
-
-<scroll-view scroll-y="true" wx:else class="scroll-view">
-  <view class="identify-box" style="heigth:300rpx;">
-    <view class="identify-list">
-      <image wx:if="{{studyUser.cardImg}}" src="{{studyUser.cardImg+'?x-oss-process=image/resize,w_200'}}"
-        bindlongpress="takeCard" data-src="{{info.card_img}}" class="identify-img" bindtap="previewImage" />
-      <image wx:else src="/assets/card.png" class="identify-img" bindtap="takeCard" />
-    </view>
-    <view class="identify-list">
-      <image wx:if="{{studyUser.cardBackImg}}" src="{{studyUser.cardBackImg+'?x-oss-process=image/resize,w_200'}}"
-        data-src="{{studyUser.cardBackImg}}" class="identify-img" bindtap="previewImage" bindlongpress="takeCardBack" />
-      <image wx:else src="/assets/cardback.png" class="identify-img" bindtap="takeCardBack" />
-    </view>
+<scroll-view scroll-y="true" class="scroll-view">
+  <view class="identify-box" style="height:300rpx;">
   </view>
 
   <view class="p20 ">

+ 62 - 44
pages/user/register/index.js

@@ -1,48 +1,66 @@
-const app = getApp()
+// pages/user/register/index.js
 Page({
+
+  /**
+   * 页面的初始数据
+   */
   data: {
-    levelIndex: 0
-  },
-  bindLevelChange: function (e) {
-    this.setData({
-      levelIndex: e.detail.value
-    })
-  },
-  formSubmit: function(e) {
-    let _this = this;
-    let form = e.detail.value
-    if (form.userName == null || form.userName == '') {
-      app.message('用户名不能为空', 'error');
-      return;
-    }
-    if (form.password == null || form.password == '') {
-      app.message('密码不能为空', 'error');
-      return;
-    }
-    if (form.userLevel == null || form.userLevel == '') {
-      app.message('年级不能为空', 'error');
-      return;
-    }
-    _this.setData({
-      spinShow: true
-    });
-    app.formPost('/api/wx/student/user/register', form)
-      .then(res => {
-        _this.setData({
-          spinShow: false
-        });
-        if (res.code == 1) {
-          wx.reLaunch({
-            url: '/pages/user/bind/index',
-          });
-        } else {
-          app.message(res.message, 'error')
-        }
-      }).catch(e => {
-        _this.setData({
-          spinShow: false
-        });
-        app.message(e, 'error')
-      })
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
   }
 })

+ 0 - 9
pages/user/register/index.json

@@ -1,9 +0,0 @@
-{
-  "usingComponents": {
-    "i-button": "/component/iView/button/index",
-    "i-panel": "/component/iView/panel/index",
-    "i-input": "/component/iView/input/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index"
-  }
-}

+ 2 - 26
pages/user/register/index.wxml

@@ -1,26 +1,2 @@
-<wxs module="enumItem" src="../../../wxs/enumItem.wxs"></wxs>
-<view class="card-image-container">
-  <image src="/assets/logo2.png" style="width:175px;height:147px"></image>
-</view>
-
-<form bindsubmit='formSubmit'>
-  <i-panel title="用户名">
-    <i-input value="{{ userName }}" name="userName" maxlength="-1" />
-  </i-panel>
-
-  <i-panel title="密码">
-    <i-input value="{{ password }}" name="password" maxlength="-1" />
-  </i-panel>
-  <i-panel title="年级">
-    <picker mode="selector" range="{{ enumItem.state.user.levelEnum }}" range-key="{{'value'}}" value="{{levelIndex}}" bindchange="bindLevelChange">
-      <view class="i-cell i-input exam-pick-input">{{ enumItem.state.user.levelEnum[levelIndex].value }}</view>
-      <i-input value="{{enumItem.state.user.levelEnum[levelIndex].key}}" maxlength="-1" name="userLevel" class="exam-hidden" />
-    </picker>
-  </i-panel>
-  <view>
-    <button class="i-btn i-btn- i-btn-primary i-btn-square" form-type='submit'>注册</button>
-  </view>
-  <i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
-</form>
-
-<i-message id="message" />
+<!--pages/user/register/index.wxml-->
+<text>pages/user/register/index.wxml</text>

+ 0 - 18
pages/user/register/index.wxss

@@ -1,18 +0,0 @@
-/* pages/user/register/index.wxss */
-
-.card-image-container {
-  align-items: center;
-  display: flex;
-  justify-content: center;
-}
-
-
-.register-level {
-  font-size: 13px;
-}
-
-.register-level-item {
-  line-height: 45px;
-  margin-left: 25px;
-}
-

+ 58 - 58
project.config.json

@@ -1,60 +1,60 @@
 {
-	"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-	"packOptions": {
-		"ignore": [],
-		"include": []
-	},
-	"setting": {
-		"urlCheck": false,
-		"es6": true,
-		"enhance": false,
-		"postcss": true,
-		"preloadBackgroundData": false,
-		"minified": true,
-		"newFeature": true,
-		"coverView": true,
-		"nodeModules": false,
-		"autoAudits": false,
-		"showShadowRootInWxmlPanel": true,
-		"scopeDataCheck": false,
-		"uglifyFileName": false,
-		"checkInvalidKey": true,
-		"checkSiteMap": true,
-		"uploadWithSourceMap": true,
-		"compileHotReLoad": false,
-		"useMultiFrameRuntime": true,
-		"useApiHook": true,
-		"useApiHostProcess": true,
-		"babelSetting": {
-			"ignore": [],
-			"disablePlugins": [],
-			"outputPath": ""
-		},
-		"enableEngineNative": false,
-		"bundle": false,
-		"useIsolateContext": true,
-		"useCompilerModule": false,
-		"userConfirmedUseCompilerModuleSwitch": false,
-		"userConfirmedBundleSwitch": false,
-		"packNpmManually": false,
-		"packNpmRelationList": [],
-		"minifyWXSS": true,
-		"lazyloadPlaceholderEnable": false,
-		"useStaticServer": true,
-		"showES6CompileOption": false,
-		"disableUseStrict": false,
-		"useCompilerPlugins": false,
-		"minifyWXML": true
-	},
-	"compileType": "miniprogram",
-	"libVersion": "2.30.2",
-	"appid": "wx701d6e0be4d00ae7",
-	"projectname": "ndjsxh",
-	"simulatorType": "wechat",
-	"simulatorPluginLibVersion": {},
-	"editorSetting": {
-		"tabIndent": "insertSpaces",
-		"tabSize": 2
-	},
-	"condition": {}
+  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+  "packOptions": {
+    "ignore": [],
+    "include": []
+  },
+  "setting": {
+    "urlCheck": false,
+    "es6": true,
+    "enhance": false,
+    "postcss": true,
+    "preloadBackgroundData": false,
+    "minified": true,
+    "newFeature": true,
+    "coverView": true,
+    "nodeModules": false,
+    "autoAudits": false,
+    "showShadowRootInWxmlPanel": true,
+    "scopeDataCheck": false,
+    "uglifyFileName": false,
+    "checkInvalidKey": true,
+    "checkSiteMap": true,
+    "uploadWithSourceMap": true,
+    "compileHotReLoad": false,
+    "useMultiFrameRuntime": true,
+    "useApiHook": true,
+    "useApiHostProcess": true,
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    },
+    "enableEngineNative": false,
+    "bundle": false,
+    "useIsolateContext": true,
+    "useCompilerModule": false,
+    "userConfirmedUseCompilerModuleSwitch": false,
+    "userConfirmedBundleSwitch": false,
+    "packNpmManually": false,
+    "packNpmRelationList": [],
+    "minifyWXSS": true,
+    "lazyloadPlaceholderEnable": false,
+    "useStaticServer": true,
+    "showES6CompileOption": false,
+    "disableUseStrict": false,
+    "useCompilerPlugins": false,
+    "minifyWXML": true
+  },
+  "compileType": "miniprogram",
+  "libVersion": "2.30.2",
+  "appid": "wx701d6e0be4d00ae7",
+  "projectname": "ndjsxh",
+  "simulatorType": "wechat",
+  "simulatorPluginLibVersion": {},
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
+  },
+  "condition": {}
 }