Pārlūkot izejas kodu

修改程序bug

wangjinbiao 5 gadi atpakaļ
vecāks
revīzija
7d152e1b99

+ 4 - 4
dorm-manager-wx/pages/home/index.js

@@ -26,20 +26,20 @@ Page({
     iconList: [{
       picUrl: '/images/message.png',
       content: '通知公告',
-      url: './list/index?type=administrationInfo&title=行政动态'
+      url: './list/index?type=administrationInfo&title=通知公告'
     },
     {
       picUrl: '/images/video.png',
       content: '媒体科大',
-      url: './list/index?type=servicePacesetter&title=服务标兵'
+      url: './list/index?type=servicePacesetter&title=媒体科大'
     }, {
       picUrl: '/images/audio.png',
       content: '科大视听',
-      url: './list/index?type=administrationInfo&title=行政动态'
+      url: './list/index?type=administrationInfo&title=科大视听'
     }, {
       picUrl: '/images/wenhua.png',
       content: '校园文化',
-      url: './list/index?type=administrationInfo&title=行政动态'
+      url: './list/index?type=administrationInfo&title=校园文化'
     }
     ],
 

+ 3 - 3
dorm-manager-wx/pages/home/index.wxml

@@ -17,7 +17,7 @@
       <view class='flexRow icon'>
         <text class='fwb'>科大要闻</text>
       </view>
-      <view class='flexRow more' bindtap='navigate_native' data-url="./list/index?type=administrationInfo&title=行政动态">
+      <view class='flexRow more' bindtap='navigate_native' data-url="./list/index?type=administrationInfo&title=科大要闻">
         <text>查看更多</text>
         <image src='/images/right.png'></image>
       </view>
@@ -29,7 +29,7 @@
       <view class='flexRow icon'>
         <text class='fwb'>学生标兵</text>
       </view>
-      <view class='flexRow more' bindtap='navigate_native' data-url="./list/index?type=servicePacesetter&title=服务标兵">
+      <view class='flexRow more' bindtap='navigate_native' data-url="./list/index?type=servicePacesetter&title=学生标兵">
         <text>查看更多</text>
         <image src='/images/right.png'></image>
       </view>
@@ -45,7 +45,7 @@
       <view class='flexRow icon'>
         <text class='fwb'>校园动态</text>
       </view>
-      <view class='flexRow more' bindtap='navigate_native' data-url="./list/index?type=centraActivities&title=中心活动">
+      <view class='flexRow more' bindtap='navigate_native' data-url="./list/index?type=centraActivities&title=校园动态">
         <text>查看更多</text>
         <image src='/images/right.png'></image>
       </view>

+ 1 - 0
dorm-manager-wx/pages/home/list/index.js

@@ -16,6 +16,7 @@ Page({
     title,
     type
   }) {
+    debugger
     wx.setNavigationBarTitle({
       title
     })

+ 21 - 12
dorm-manager-wx/pages/student/application/application.js

@@ -76,20 +76,23 @@ Page({
       })
       return false
     }
-    if (!e.detail.value.name && !e.detail.value.phone && !e.detail.value.idcard){
+    if (!e.detail.value.name || !e.detail.value.phone || !e.detail.value.idcard || !e.detail.value.text){
       wx.showToast({
         title: '请填写访客基本信息',
         icon: 'none'
       })
       return false
     }
-    if (!e.detail.value.code){
-      wx.showToast({
-        title: '请填写短信验证码',
-        icon: 'none'
-      })
-      return false
-    }
+    // if (!e.detail.value.code){
+    //   wx.showToast({
+    //     title: '请填写短信验证码',
+    //     icon: 'none'
+    //   })
+    //   return false
+    // }
+    wx.showLoading({
+      title: '正在提交',
+    })
     wx.uploadFile({
       url: api.editorAlumniVisitor,
       filePath: that.data.photo[0],
@@ -106,12 +109,11 @@ Page({
           'remarks': '',
       },
       success(res) {
-        console.log(JSON.parse(res.data))
+        wx.hideLoading()
         res = JSON.parse(res.data)
         if (res.errno == 0) {
-          wx.showToast({ 
-            title: '上传成功',
-            icon: 'none'
+          wx.redirectTo({
+            url: '/pages/success/index',
           })
         }else{
           wx.showToast({
@@ -147,6 +149,13 @@ Page({
       urls: [this.data.filePaths[0]] // 需要预览的图片http链接列表
     })
   },
+  up:function(){
+    this.data.current--
+    this.setData({
+      current: this.data.current,
+      swipercurrent: this.data.current
+    })
+  },
   next:function(){
     this.data.current++
     this.setData({

+ 5 - 2
dorm-manager-wx/pages/student/application/application.wxml

@@ -94,7 +94,7 @@
           </view>
           <view class="result-content">
             <view class="result-name">通行原因:</view>
-            <view class="result-data1">{{text}}</view>
+            <view class="result-data1">{{text?text:'未填'}}</view>
           </view>
           
         </view>
@@ -105,5 +105,8 @@
       </view>
     </swiper-item>
   </swiper>
-  <button class="next" bindtap="{{current==2?'':'next'}}" formType="{{current==2?'submit':''}}">{{current==2?'提交':'下一步'}}</button>
+  <view class="bottom">
+    <button class="next"  bindtap="{{current>0?'up':''}}" wx:if="{{current>0}}">上一步</button>
+    <button class="next" bindtap="{{current==2?'':'next'}}" formType="{{current==2?'submit':''}}">{{current==2?'提交':'下一步'}}</button>
+  </view>
 </form>

+ 12 - 8
dorm-manager-wx/pages/student/application/application.wxss

@@ -94,17 +94,21 @@ swiper{
   width: 86rpx;
   height: 70rpx;
 }
-.next{
-  width: 690rpx;
-  height: 90rpx;
-  background: #6282f4;
-  color: #fff;
-  border-radius: 10rpx;
+.bottom{
   position: fixed;
   left: 0;
   right: 0;
   margin:0 auto;
   bottom: 60rpx;
+  display: flex;
+}
+.next{
+  width: 100%;
+  height: 90rpx;
+  background: #6282f4;
+  color: #fff;
+  border-radius: 10rpx;
+  margin: 20rpx;
 }
 
 .form{
@@ -208,14 +212,14 @@ textarea{
   color:#333;
 }
 .result-data{
-  font-size: 30rpx;
+  font-size: 28rpx;
   color:#666;
 }
 .result-data1{
   width: 400rpx;
   display: flex; 
   flex-wrap: wrap;
-  font-size: 24rpx;
+  font-size: 28rpx;
   color:#666;
 }
 .photo-show{

+ 6 - 3
dorm-manager-wx/pages/student/facephoto/facephoto.js

@@ -49,6 +49,9 @@ Page({
   },
   upload: function (file, isShowPhoto){
     let that=this
+    wx.showLoading({
+      title: '正在上传',
+    })
     wx.uploadFile({
       url: 'http://dgt.dgtis.com/oneportal/userinfo/updateUserHeadImage.if',
       filePath: file[0],
@@ -60,10 +63,10 @@ Page({
         'isShowPhoto': isShowPhoto
       },
       success(res) {
+        wx.hideLoading()
         if (JSON.parse(res.data).youtuMessage.error_code==0){
-          wx.showToast({
-            title: '上传成功',
-            icon:'none'
+          wx.redirectTo({
+            url: '/pages/success/index',
           })
         }
       }

+ 1 - 1
dorm-manager-wx/pages/student/menu/menu.js

@@ -74,7 +74,7 @@ Page({
       }
     ],
     listTeacher: [{
-      'title': '预提醒',
+      'title': '预提醒',
       nav: 'yujing-2',
       url: 'warning'
     }, {

+ 5 - 4
dorm-manager-wx/pages/student/statistics/statistics.js

@@ -72,6 +72,7 @@ Page({
     let that=this
     this.setData({
       enddata:data.formatDate(),
+      checkenddate: data.formatDate(),
       startdata: data.getDateStr(data.formatDate(),-30)
     })
     var windowWidth = 320;
@@ -104,22 +105,22 @@ Page({
       },
       series: [{
         name: '正常进入',
-        data: 25,
+        data: 0,
         stroke: false,
         color:'#6282f4'
       }, {
         name: '正常外出',
-        data: 35,
+        data: 0,
         stroke: false,
           color:'#ed5c68'
       }, {
         name: '晚归',
-        data: 78,
+        data: 0,
         stroke: false,
           color:'#89c997'
       }, {
         name: '未归寝',
-        data: 63,
+        data: 0,
         stroke: false,
         color:'#f29b76'
       }],

+ 6 - 6
dorm-manager-wx/pages/student/statistics/statistics.wxml

@@ -17,7 +17,7 @@
   </view>
   <view class="top-line">
     <view class="top-name">结束日期:</view>
-    <picker mode="date" value="{{enddata}}" start="2015-09-01" end="{{enddata}}" bindchange="bindendDateChange">
+    <picker mode="date" value="{{enddata}}" start="2015-09-01" end="{{checkenddate}}" bindchange="bindendDateChange">
       <view class="data">
         <view class="data-title">
           <image class="data-icon" src="/images/data-icon.png"></image>
@@ -55,7 +55,7 @@
       <view class="bottom-line">
         <view class="bottom-bigback bottom-bigback1">
           <view class="bottom-smllback bottom-smllback1">
-            <text>2次</text>
+            <text>{{data.unIn1Count?data.unIn1Count:0}}次</text>
           </view>
         </view>
       </view>
@@ -65,21 +65,21 @@
       <view class="bottom-line">
         <view class="bottom-bigback bottom-bigback2">
           <view class="bottom-smllback bottom-smllback2">
-            <text>2次</text>
+            <text>{{data.unIn3Count?data.unIn3Count:0}}次</text>
           </view>
         </view>
       </view>
-      <view class="bottom-title">1日未归寝</view>
+      <view class="bottom-title">3日未归寝</view>
     </view>
     <view>
       <view class="bottom-line">
         <view class="bottom-bigback bottom-bigback3">
           <view class="bottom-smllback bottom-smllback3">
-            <text>2次</text>
+            <text>{{data.unIn5Count?data.unIn5Count:0}}次</text>
           </view>
         </view>
       </view>
-      <view class="bottom-title">1日未归寝</view>
+      <view class="bottom-title">5日未归寝</view>
     </view>
   </view>
 </view>

+ 65 - 39
dorm-manager-wx/pages/success/index.js

@@ -1,43 +1,69 @@
-
-const {
-  globalData: {
-    util: {
-      regeneratorRuntime,
-      api: {
-        reservationDetail,
-      },
-      request: {
-        get
-      },
-      goHome,
-      navigate_auth_native,
-    }
-  }
-} = getApp()
 Page({
-  async onLoad(option) {
-    this.data.option=option
-    this.setData({
-      msg: await this.getMsg(option)
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    
+  },
+  goHome:function(){
+    wx.switchTab({
+      url: '/pages/student/menu/menu',
     })
   },
-  async getMsg({ type, id }) {
-    switch (type) {
-      case 'reservation': //在线预约
-        let { reservationNumber, reservationDate, reservationInterval, deptName, _err } = await get(reservationDetail, { id })
-        if (_err) return ''
-        return `尊敬的用户:您好,您预约的事项已经预约成功,预约号码【${reservationNumber}】,请于${reservationDate} ${reservationInterval == 'AM' ? '上午' : '下午'}准时到达行政服务中心${deptName}窗口进行办理,并注意查收手机短信。`
-      case 'interaction'://互动
-        return ''
-      case 'userinfo'://用户信息
-        return ''
-      case 'assess'://用户评价
-        return ''
-      case 'handle'://在线办理
-        return '尊敬的用户:您好,您申报的办件已经申报成功,办件编号【' +this.data.option.code+'】请在个人中心 —〉 我的办件中查询办件进度。'
-
-    }
-  },
-  goHome,
-  navigate_auth_native
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+    
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+    
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+    
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+    
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+    
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+    
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+    
+  }
 })

+ 1 - 5
dorm-manager-wx/pages/success/index.wxml

@@ -2,12 +2,8 @@
   <view class="flexCol flexCenter tip">
     <image style="padding-top:200rpx;" src='/images/result.png'></image>
     <text>提交成功</text>
-    <view class="p30">{{msg}}</view>
   </view>
   <view class="flexRow  p20 jcsb buttons">
-    <button type="primary" class="w100 button" bind:tap="navigate_auth_native" data-url='/pages/user/index' data-t='switchTab'>
-      进入个人中心
-    </button>
-    <button type="primary" class="w100 button" bind:tap="goHome">返回首页</button>
+    <button type="primary" class="w100 button" bindtap="goHome">返回大厅</button>
   </view>
 </view>

+ 1 - 1
dorm-manager-wx/pages/user/setting/index.js

@@ -36,7 +36,7 @@ Page({
   },
   preview: function () {
     wx.previewImage({
-      urls: ['https://mp.weixin.qq.com/wxopen/qrcode?action=download&fakeid=3827135683&token=849973044&type=0&pixsize=336&line_r=undefined&line_g=undefined&line_b=undefined'],
+      urls: ['http://dgt.dgtis.com/oneportal//fileServer/head_image/201911061454581573023298346.png'],
     })
   }
 })

+ 1 - 1
dorm-manager-wx/utils/api.js

@@ -108,7 +108,7 @@ const index = 2,
   [oneportal, root] =
     [["http://192.168.100.234:8080/oneportal/", "https://zhll.dgtis.com/wx/"],
       ["http://192.168.100.254:9082/wx/", "https://zhll.dgtis.com/wx/"],
-      ["http://dorm.dgtis.com/oneportal/", "https://zhll.dgtis.com/wx/"]][index]
+      ["https://dorm.dgtis.com/oneportal/", "http://192.168.100.248:9082/wx/"]][index]
 Object.keys(api).forEach(x => {
   let v = api[x]
   api[x] = `${/\.if$/.test(v) ? oneportal : root}${v}`